xiaozhi-esp32-server/main/manager-mobile/src/layouts/fg-tabbar/tabbar.ts
lapy 2be70e8e6c feat(manager-mobile): westernize H5 app, copy, and shared crypto
- English locale defaults; remove duplicate zh-only locale files

- SM2 utility sharing with the web client where applicable
2026-04-25 17:05:15 +01:00

11 lines
352 B
TypeScript

/**
* Tabbar state, add storageSync to ensure correct tabbar page when refreshing browser
* Use reactive simple state instead of pinia global state
*/
export const tabbarStore = reactive({
curIdx: uni.getStorageSync('app-tabbar-index') || 0,
setCurIdx(idx: number) {
this.curIdx = idx
uni.setStorageSync('app-tabbar-index', idx)
},
})