import { defineStore } from "pinia"; const useFixedData = defineStore('fixedData', { state: () => ({ allUserData: [], // 全部用户数据 formJson: { 'business': null, 'contacts': null, 'contract': null, 'customer': null, 'order': null, 'product': null, 'tasks': null, 'thread': null } }), actions: { //actions是store的方法methods updateState(info) { this.$state = { ...this.$state, ...info } } }, persist: { //pinia持久化配置,默认sessionStorage enabled: true } }); export default useFixedData