MCPcopy Create free account
hub / github.com/xpf0000/FlyEnv / AppModuleSetup

Function AppModuleSetup

src/render/core/Module.ts:9–39  ·  view source on GitHub ↗
(flag: AllAppModule)

Source from the content-addressed store, hash-verified

7export const AppModuleTab: Record<AllAppModule, number> = reactive({}) as any
8
9export const AppModuleSetup = (flag: AllAppModule) => {
10 const appStore = AppStore()
11
12 const currentVersion = computed(() => {
13 return appStore.config.server?.[flag]?.current?.version
14 })
15 if (!AppModuleTab[flag]) {
16 AppModuleTab[flag] = 0
17 }
18 const tab = computed({
19 get() {
20 console.log('tab get: ', AppModuleTab, AppModuleTab[flag])
21 return AppModuleTab[flag] ?? 0
22 },
23 set(v) {
24 AppModuleTab[flag] = v
25 console.log('tab set: ', v, AppModuleTab)
26 }
27 })
28
29 const checkVersion = () => {
30 if (!currentVersion.value) {
31 AppModuleTab[flag] = 1
32 }
33 }
34
35 return {
36 tab,
37 checkVersion
38 }
39}
40
41export type CustomerModuleCateItem = {
42 id: string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected