1.安装插件
npm i pinia-plugin-persistedstate
2.引入
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
3.在需要持久化的store中设置
persist: true,
Comments NOTHING