update
This commit is contained in:
8
src/pinia/SystemStore/index.js
Normal file
8
src/pinia/SystemStore/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import {defineStore} from "pinia";
|
||||
|
||||
export const useSystemStore = defineStore("SystemStore", () => {
|
||||
|
||||
return {
|
||||
|
||||
}
|
||||
});
|
||||
17
src/pinia/UserStore/index.js
Normal file
17
src/pinia/UserStore/index.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import {defineStore} from "pinia";
|
||||
import {ref} from "vue";
|
||||
|
||||
export const useUserStore = defineStore("UserStore", () => {
|
||||
const isLogin = ref(false);
|
||||
const userInfo = ref(null);
|
||||
return {
|
||||
isLogin,
|
||||
userInfo
|
||||
}
|
||||
}, {
|
||||
persist: {
|
||||
key: 'UserStore',
|
||||
storage: localStorage,
|
||||
pick: ['isLogin']
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user