参考hello uni-app项目使用topwindow来适配H5宽屏,但是使用custom-tab-bar组件会和原生tabbar同时显示,并且都可用
top-window代码如下
<template>
<view class="top-window-header">
<custom-tab-bar class="tab-bar-flex" direction="horizontal" :show-icon="false" :selected="current"
@onTabItemTap="toSecondMenu" />
</view>
</template>
page.json部分代码如下
"tabBar": {
"list": [
{
"pagePath": "pages/my/my",
"text": "my"
},
{
"pagePath": "pages/goods/goods",
"text": "goods"
},
{
"pagePath": "pages/index/index",
"text": "index"
}
]
},
"topWindow": {
"path": "windows/top-window/top-window",
"style": {
"height": "60px"
}
}
不爱吃鱼 (作者)
ddd 源码发了
2025-04-03 12:02
DCloud_UNI_yuhe
回复 不爱吃鱼: 你这在tabbar 页面当然会显示,有什么问题吗?
2025-04-03 14:26
不爱吃鱼 (作者)
回复 DCloud_UNI_yuhe: 嗷嗷嗷 对的 谢谢了
2025-04-03 18:25