2024-05-11 09:36:26 +08:00
|
|
|
|
export const tabbarList = [
|
|
|
|
|
{
|
|
|
|
|
path: '/pages/index/about',
|
|
|
|
|
icon: 'home',
|
|
|
|
|
isWotIcon: true,
|
|
|
|
|
title: '首页',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/pages/index/index',
|
|
|
|
|
icon: 'i-carbon-user-avatar',
|
|
|
|
|
isWotIcon: false,
|
|
|
|
|
title: '我的',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
2024-05-11 11:32:34 +08:00
|
|
|
|
/**
|
|
|
|
|
* tabbar 状态,增加 storageSync 保证刷新浏览器时在正确的 tabbar 页面
|
|
|
|
|
*/
|
2024-05-11 09:36:26 +08:00
|
|
|
|
export const tabbarStore = reactive({
|
2024-05-11 11:32:34 +08:00
|
|
|
|
curIdx: uni.getStorageSync('curIdx') || 0,
|
2024-05-11 09:36:26 +08:00
|
|
|
|
setCurIdx(idx: number) {
|
|
|
|
|
this.curIdx = idx
|
2024-05-11 11:32:34 +08:00
|
|
|
|
uni.setStorageSync('curIdx', idx)
|
2024-05-11 09:36:26 +08:00
|
|
|
|
},
|
|
|
|
|
})
|