Mussel-inspired tannic acid/polyethyleneimine assembling positively-charged membranes with excellent cation permselectivity.