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

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

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