|
[多端开发]
关于openTabLayout的tabBar效果问题
[复制链接]
添加了app.json,config设置了app.json入口文件,首页、学习、发现、奖励、我的这五个页面点击底部导航可以正常切换,但是从”首页“里面某个点击事件openWin跳转到”发现“这个页面,底部导航不显示了,有什么好的方法让底部导航也显示呢?
首页home页面:
<template>
<view class="home">
<view class="public" @click="tofind()"> <text>点击跳转发现页面</text></view>
</view>
</template>
<script>
export default {
name: "home",
data() {
return {
};
},
methods: {
tofind() {
api.openWin({
name: 'find',
url: '../column-find/find.stml',
pageParam: {
navNum: 2,
num: 2
}
})
// api.openTabLayout({
// name: 'find',
// url: '../column-find/find.stml',
// hideTabBar: false,
// pageParam: {
// navNum: 2,
// num: 2
// },
},
}
};
</script>
app.josn文件:
{
"name": "root",
"tabBar": {
"frames": [
{
"title": "首页",
"name": "home",
"url": "../column-home/home.stml"
},
{
"title": "学习",
"name": "study",
"url": "../column-study/study.stml"
},
{
"title": "发现",
"name": "find",
"url": "../column-find/find.stml"
},
{
"title": "奖励",
"name": "reward",
"url": "../column-reward/reward.stml"
},
{
"title": "我的",
"name": "user",
"url": "../column-user/user.stml"
}
],
"list": [
{
"text": "首页",
"iconPath": "../images/common/sy_wxz.png",
"selectedIconPath": "../images/common/sy_xz.png"
},
{
"text": "学习",
"iconPath": "../images/common/xx_wxz@2x.png",
"selectedIconPath": "../images/common/xx_xz@2x.png"
},
{
"text": "发现",
"iconPath": "../images/common/fx_wxz.png",
"selectedIconPath": "../images/common/fx_xz.png"
},
{
"text": "奖励",
"iconPath": "../images/common/jl_wxz.png",
"selectedIconPath": "../images/common/jl_xz.png"
},
{
"text": "我的",
"iconPath": "../images/common/wd_wxz.png",
"selectedIconPath": "../images/common/wd_xz.png"
}
],
"textOffset": 6,
"color": "#999999",
"selectedColor": "#FF7037",
"scrollEnabled": false
}
}
|
|