Closed cnyy99 closed 5 years ago
const store = new Vuex.Store({
state: {
isLogin: false,
account: null,
member: null,
savings: null,
balances: null,
finances: null,
borrowings: null,
},
mutations: {
...
},
actions: {},
plugins: [
logger,
createVuexAlong({
session: true,
})],
});
你好 😄
/**
* 可选,sessionStorage 的配置, 默认未开启。
*/
session?: WatchOptions;
/**
* 可选,是否仅使用 sessionStorage,默认 false。
*/
justSession?: boolean;
session 的配置是一个对象
interface WatchOptions {
/**
* 需要监听的属性名或模块名的字符串列表
*/
list: string[];
/**
* 可选,false 为保存 list, true 为过滤 list,默认 false。
*/
isFilter?: boolean;
}