feat(login): wip 登录系统
This commit is contained in:
@@ -20,7 +20,7 @@ export const TABBAR_STRATEGY_MAP = {
|
||||
// 如果是使用 NO_TABBAR(0),nativeTabbarList 和 customTabbarList 都不生效(里面的配置不用管)
|
||||
// 如果是使用 NATIVE_TABBAR(1),只需要配置 nativeTabbarList,customTabbarList 不生效
|
||||
// 如果是使用 CUSTOM_TABBAR(2,3),只需要配置 customTabbarList,nativeTabbarList 不生效
|
||||
export const selectedTabbarStrategy = TABBAR_STRATEGY_MAP.NATIVE_TABBAR
|
||||
export const selectedTabbarStrategy = TABBAR_STRATEGY_MAP.CUSTOM_TABBAR_WITH_CACHE
|
||||
|
||||
type NativeTabBarItem = TabBar['list'][0]
|
||||
// TODO: 2/3. 使用 NATIVE_TABBAR 时,更新下面的 tabbar 配置
|
||||
|
||||
@@ -33,8 +33,8 @@ export const tabbarStore = reactive({
|
||||
uni.setStorageSync('app-tabbar-index', idx)
|
||||
},
|
||||
setAutoCurIdx(path: string) {
|
||||
const index = tabbarList.findIndex(item => item.pagePath === path)
|
||||
// console.log('index:', index, path)
|
||||
const index = tabbarList.findIndex(item => item.path === path)
|
||||
console.log('index:', index, path)
|
||||
// console.log('tabbarList:', tabbarList)
|
||||
if (index === -1) {
|
||||
this.setCurIdx(0)
|
||||
|
||||
Reference in New Issue
Block a user