This commit is contained in:
2026-02-24 13:53:05 +08:00
14 changed files with 313 additions and 57 deletions

View File

@@ -7,3 +7,4 @@ store.use(createPersistedState())
export default store
export * from './global'
export * from './userInfo'
export * from './projectData'

20
src/stores/projectData.ts Normal file
View File

@@ -0,0 +1,20 @@
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
export const useProjectStore = defineStore('project', () => {
const state = ref({// 项目参数
id: '',
})
const setProject = (obj: any) => {
for (const key in obj) {
if(state.value[key]){
state.value[key] = obj[key]
}
}
}
return {
state,
setProject,
}
})