初始化

This commit is contained in:
wwz
2025-02-07 13:56:35 +08:00
parent f1025605d7
commit 20b5539a82
513 changed files with 56948 additions and 1 deletions

25
store/index.js Normal file
View File

@@ -0,0 +1,25 @@
// user.js
import { defineStore } from 'pinia';
export const useAppStore = defineStore('user', {
state: () => {
return {
userInfo: {},
isLogin: false,
}
},
getters: {
app_userInfo: (state) => state.userInfo,
app_isLogin: (state) => state.isLogin
},
actions: {
// 设置数据
async setData(key,data){
this[key] = data
},
// 获取数据
getData(key){
return this[key]
},
}
});