提交 959692de 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

style: 优化设置 tabBar 弹框样式

上级 253b393f
...@@ -15,16 +15,16 @@ ...@@ -15,16 +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;" <view v-if="childMenuItem.items.length==0" style="padding-left: 18px;"
:class="{'uni-navigate-item':childMenuItem.path !== 'set-tab-bar' || windowWidth <= 768}" :class="{'uni-navigate-item':childMenuItem.path !== 'set-tab-bar' || windowWidth <= 768}"
hover-class="is--active" hover-class="is--active"
@click="goPage(`/${childMenuItem.path}`)"> @click="goPage(`/${childMenuItem.path}`)">
<template v-if="childMenuItem.path !== 'set-tab-bar' || windowWidth <= 768"> <template v-if="childMenuItem.path !== 'set-tab-bar' || windowWidth <= 768">
<text class="uni-navigate-text" <text class="uni-navigate-text"
:class="{'left-win-active': leftWinActive === childMenuItem.path && hasLeftWin}" :class="{'left-win-active': leftWinActive === childMenuItem.path && hasLeftWin}"
>{{ childMenuItem.style["navigationBarTitleText"] }}</text> >{{ childMenuItem.style["navigationBarTitleText"] }}</text>
<image :src="arrowRightIcon" class="uni-icon-size"></image> <image :src="arrowRightIcon" class="uni-icon-size"></image>
</template> </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"
...@@ -72,20 +72,20 @@ ...@@ -72,20 +72,20 @@
}, },
leftWinActive() : string { leftWinActive() : string {
return state.leftWinActive.slice(1) return state.leftWinActive.slice(1)
}, },
windowWidth() : number { windowWidth() : number {
return uni.getSystemInfoSync().windowWidth return uni.getSystemInfoSync().windowWidth
} }
}, },
methods: { methods: {
goPage(url : string) { goPage(url : string) {
if (url == '/set-tab-bar') { if (url == '/set-tab-bar') {
this.showPop() this.showPop()
} else { } else {
if(this.hasLeftWin) { if(this.hasLeftWin) {
uni.reLaunch({ url }) uni.reLaunch({ url })
} else { } else {
uni.navigateTo({ url }) uni.navigateTo({ url })
} }
} }
}, },
...@@ -125,19 +125,14 @@ ...@@ -125,19 +125,14 @@
} }
.popup { .popup {
width: 100%;
/* #ifdef APP */
position: absolute;
height: 100%;
/* #endif */
/* #ifndef APP */
position: fixed; position: fixed;
top: var(--window-top); top: 0;
bottom: var(--window-bottom); bottom: 0;
/* #endif */ left: 0;
right: 0;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
display: none; display: none;
background-color: rgba(16, 16, 16, 0.5); background-color: rgba(16, 16, 16, 0.5);
} }
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册