提交 19f14a6c 编写于 作者: Anne_LXM's avatar Anne_LXM 提交者: Anne_LXM

fix: 修复pc小屏时未显示(设置Tabbar)页面

上级 401fe220
......@@ -15,12 +15,16 @@
<uni-collapse-item ref="category" v-for="menuItem in menu" :key="menuItem!.id" :title="menuItem.name"
class="item">
<template v-for="childMenuItem in menuItem.items" :key="childMenuItem!.id">
<view v-if="childMenuItem.items.length==0" style="padding-left: 18px" class="uni-navigate-item"
hover-class="is--active" @click="goPage(`/${childMenuItem.path}`)">
<text class="uni-navigate-text" :class="{
'left-win-active': leftWinActive === childMenuItem.path && hasLeftWin,
}">{{ childMenuItem.style["navigationBarTitleText"] }}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
<view v-if="childMenuItem.items.length==0" style="padding-left: 18px;"
:class="{'uni-navigate-item':childMenuItem.path !== 'set-tab-bar' || windowWidth <= 790}"
hover-class="is--active"
@click="goPage(`/${childMenuItem.path}`)">
<template v-if="childMenuItem.path !== 'set-tab-bar' || windowWidth <= 790">
<text class="uni-navigate-text"
:class="{'left-win-active': leftWinActive === childMenuItem.path && hasLeftWin}"
>{{ childMenuItem.style["navigationBarTitleText"] }}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image>
</template>
</view>
<uni-collapse v-else style="width: 100%">
<uni-collapse-item :title="childMenuItem.name" class="item"
......@@ -68,6 +72,9 @@
},
leftWinActive() : string {
return state.leftWinActive.slice(1)
},
windowWidth() : number {
return uni.getSystemInfoSync().windowWidth
}
},
methods: {
......
import { pages, groups } from '@/pages.json'
import { state } from '@/store/index.uts'
type Group = {
id : string,
name : string,
......@@ -146,8 +146,8 @@ function removeNullItem(arr : (MenuItem | null)[]) : (MenuItem | null)[] {
}
function addSetTabBarPage(menuItem : MenuItem) {
const { id, name } = menuItem
if (id == 'page' && name == '页面和路由' && !state.noMatchLeftWindow) {
const { id, name } = menuItem
if (id == 'page' && name == '页面和路由') {
menuItem.items.push({
id: 'set-tab-bar',
name: '设置 TabBar',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册