北斗应用技术培训报名系统

This commit is contained in:
2026-03-27 17:39:28 +08:00
commit 08422bade5
75 changed files with 13629 additions and 0 deletions

34
src/stores/userManager.js Normal file
View File

@@ -0,0 +1,34 @@
import { defineStore } from 'pinia';
import { parse, stringify } from 'zipson';
const userManagerActiveStore = defineStore('userManager', {
state: () => ({
// 持久化数据
dialogVisible: false,
ruleForm: {
user_name: "",
identity_card: "",
real_check: "",
address: "",
workplace: "",
phone: "",
email: "",
},
}),
persist: {
enabled: true, // Store 中数据持久化生效
strategies: [
{
key: 'userManagerActive', // 存储的 key
storage: localStorage, // 存储位置
paths: ["dialogVisible", "ruleForm"], // 需要持久化的字段
serializer: {
deserialize: parse,
serialize: stringify,
},
}
]
},
})
export default userManagerActiveStore