可以使用cz-storage 安装:yarn add cz-storage || npm i cz-storage 使用如下: localstorage只能存字符串,使用cz-storage还可以存储对象。