mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-05-07 15:46:09 +08:00
修复tabbar的问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<u-tabbar
|
||||
v-if="showTabbar"
|
||||
v-model="current"
|
||||
v-bind="tabbarStyle"
|
||||
:list="tabbarList"
|
||||
@@ -27,6 +28,14 @@ const tabbarList = computed(() => {
|
||||
})
|
||||
})
|
||||
|
||||
const showTabbar = computed(() => {
|
||||
const currentPages = getCurrentPages()
|
||||
const currentPage = currentPages[currentPages.length - 1]
|
||||
const current = tabbarList.value.findIndex((item: any) => {
|
||||
return item.pagePath === '/' + currentPage.route
|
||||
})
|
||||
return current >= 0
|
||||
})
|
||||
const tabbarStyle = computed(() => ({
|
||||
activeColor: appStore.getStyleConfig.selectedColor,
|
||||
inactiveColor: appStore.getStyleConfig.defaultColor
|
||||
|
||||
Reference in New Issue
Block a user