5 changed files with 59 additions and 44 deletions
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
/** |
||||
* @program: kicc-ui |
||||
* @description: 微应用配置存储中心 |
||||
* @author: entfrm开发团队-王翔 |
||||
* @create: 2023/7/22 |
||||
*/ |
||||
import { defineStore } from 'pinia'; |
||||
import { store } from '/@/store'; |
||||
|
||||
interface MicroAppState { |
||||
// 表单设计APP
|
||||
formDesignApp: Recordable; |
||||
} |
||||
|
||||
export const useMicroAppStore = defineStore({ |
||||
id: 'micro-app', |
||||
state: (): MicroAppState => ({ |
||||
formDesignApp: {}, |
||||
}), |
||||
getters: { |
||||
getFormDesignApp(): Recordable { |
||||
return this.formDesignApp; |
||||
}, |
||||
}, |
||||
actions: { |
||||
setFormDesignApp(data: Recordable): void { |
||||
this.formDesignApp = data; |
||||
} |
||||
} |
||||
}); |
||||
|
||||
// 需要在设置之外使用
|
||||
export function useAppStoreWithOut() { |
||||
return useMicroAppStore(store); |
||||
} |
Loading…
Reference in new issue