The demand for lithium extraction from salt-lake brines is increasing to address the lithium supply shortage. Nanofiltration separation technology with high Mg2+/Li+ separation efficiency has shown great potential for lithium extraction. However, it usually requires diluting the brine with a large quantity of freshwater and only yields Li+-enriched. Lithium, one of the most valuable resources, has found its way into various industries, ranging from ceramics, glass, pharmaceuticals, and nuclear to the booming lithium battery technology1,2,3,4. The rapid growth in lithium consumption, spurred by the expansion of the lithium battery market in recent years, has made it crucial to source lithium from various channels5,6,7,8,9,10. Lithium sourcing from salt-lake brines accounts for ≈70% of recoverable lithium on land11. It has become a vital supply route to ensure the healthy development of the lithium battery market. However, lithium extraction from salt-lake brines is challenging because of the high concentration of competing ions, like Mg2+. Compared to conventional ion separation technologies such as ion exchange12, electrodialysis13, and solvent extraction14, nanofiltration (NF) membrane separation15,16,17 is considered one of the most efficient methods for extracting lithium from brine. The combination of size sieving and Donnan exclusion in NF membranes offers an ideal option for achieving effective monovalent/divalent ion separation, particularly for Li+/Mg2+ separation18,19,20,21,22. To enhance the performance of Li+ separation, various investigations have been carried out, including developing innovative NF membrane materials and optimizing the membrane structure and surface properties23,24,25,26. Despite significant advancements in the separation of Mg2+ and Li+ using NF membrane processes, highly concentrated brines gen. Fabrication and characterization of PANI nanoarrays solar evaporatorFigure 2a demonstrates the schematic illustration of the PANI nanoarrays solar evaporator. The PANI nanoarrays were grown in situ on a PES macroporous membrane with a sponge-like pore structure (Supplementary Fig. 1) that serves as a substrate. Nanofibers were formed through a polymerization process of aniline monomers using ammonium persulfate50,51. Scanning electron microscope (SEM) images in Fig. 2b–d shows that the surface and internal channels of the PES substrate were coated by vertically aligned PANI nanofibers with 30–50 nm in diameter and 50–250 nm in length. The resulting PANI nanoarrays-coated PES membrane was hydrophilic, with an instantaneous water contact angle (CA) of 11° (inset in Fig. 2b). The pore size distribution of the PES substrate before and after the growth of PANI nanoarrays was measured using the bubble pressure method. As demonstrated in Fig. 2e, the average pore diameter of the PES substrate reduced from 345 nm to 225 nm due to the growth of PANI nanoarrays on its inner surface.a Schematic illustration of PANI nanoarrays solar evaporator. b Surface SEM image of PANI nanoarrays evaporator. Inset is the instantaneous CA of a water drop on the PANI nanoarrays evaporator surface. Cross-sectional SEM images of PANI nanoarrays evaporator with an enlarged view of c the top layer and d. Fabrication of PANI nanoarrays evaporatorInitially, 93 mg aniline and 114 mg ammonium persulfate were dissolved separately in 50 mL of 1.0 mol L−1 perchloric acid solution under magnetic stirring. These were then cooled in an ice-water bath for 30 min, resulting in a 0.02 mol L−1 aniline solution and a 0.01 mol L−1 ammonium persulfate solution. Subsequently, the ammonium persulfate solution was rapidly poured into the aniline solution, and a PES membrane was submerged in the mixture. The reaction proceeded with magnetic stirring in an ice-water bath for 12 h. Upon completion of the reaction, the membrane was rinsed with deionized water and soaked in a 0.1 mol L−1 ammonium hydroxide solution for 2 h. Afterward, the membrane was thoroughly rinsed with deionized water and dried in a forced-air oven at 60 °C.Fabrication of PA membraneThe polyamide membrane was prepared at 25.0 ± 0.5 °C and 60 ± 5% relative humidity. 1.0 g PIP and 0.24 g sodium dodecyl sulfate were dissolved in 100 mL water to produce PIP aqueous solution. The SWCNTs film was first placed on a glass plate and then impregnated with PIP solution for 30 s. The glass plate w. All data supporting the findings of this study are available in the article, the Supplementary Information and the Source Data file. Source data are provided with this paper.