调整版本树使用的数据结构和后端一致

This commit is contained in:
X1627315083@163.com
2026-02-24 13:20:05 +08:00
parent 5c00b54f27
commit 927bb6de67
9 changed files with 215 additions and 35 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,
}
})