fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
import { create } from 'zustand'
|
||||
import { createJSONStorage, devtools, persist } from 'zustand/middleware'
|
||||
import {create} from 'zustand'
|
||||
import {createJSONStorage, devtools, persist} from 'zustand/middleware'
|
||||
|
||||
type State = {
|
||||
connected: boolean
|
||||
currentKeys: string[]
|
||||
stopGuide: any
|
||||
}
|
||||
|
||||
type Action = {
|
||||
setConnected: (ok: boolean) => void
|
||||
setCurrentKeys: (keys: string[]) => void
|
||||
showStopGuide: (data: any) => void
|
||||
hideStopGuide: () => void
|
||||
}
|
||||
|
||||
const useGlobalStore = create<State & Action>()(
|
||||
@@ -17,6 +20,7 @@ const useGlobalStore = create<State & Action>()(
|
||||
set => ({
|
||||
connected: false,
|
||||
currentKeys: ['Home'],
|
||||
stopGuide: null,
|
||||
currentSections: ['首页'],
|
||||
setConnected: (ok: boolean) =>
|
||||
set(() => ({
|
||||
@@ -25,11 +29,19 @@ const useGlobalStore = create<State & Action>()(
|
||||
setCurrentKeys: (currentKeys: string[]) =>
|
||||
set(() => ({
|
||||
currentKeys: currentKeys
|
||||
}))
|
||||
})),
|
||||
showStopGuide: (data: any) =>
|
||||
set(() => ({ stopGuide: data })),
|
||||
hideStopGuide: () =>
|
||||
set(() => ({ stopGuide: null }))
|
||||
}),
|
||||
{
|
||||
name: 'hdm_storage',
|
||||
storage: createJSONStorage(() => sessionStorage)
|
||||
storage: createJSONStorage(() => sessionStorage),
|
||||
partialize: (state) => ({
|
||||
connected: state.connected,
|
||||
currentKeys: state.currentKeys,
|
||||
})
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user