(flag: AllAppModule)
| 7 | export const AppModuleTab: Record<AllAppModule, number> = reactive({}) as any |
| 8 | |
| 9 | export 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 | |
| 41 | export type CustomerModuleCateItem = { |
| 42 | id: string |
nothing calls this directly
no outgoing calls
no test coverage detected