Files
FiDA_Front/src/stores/projectData.ts
X1627315083@163.com ccc6d2cb7b fix
2026-02-26 10:19:51 +08:00

26 lines
397 B
TypeScript

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