提交 061d614a 编写于 作者: M mehaotian

fix: navbar-lite 删除定时器,优化页面示例

上级 1f0b1e73
......@@ -64,13 +64,10 @@
this.statusBarHeight = statusBarHeight;
},
mounted() {
// TODO 暂时加定时器,否则不生效
setTimeout(() => {
uni.setNavigationBarColor({
frontColor: "#000000",
backgroundColor: "#ffffff",
});
}, 100);
uni.setNavigationBarColor({
frontColor: "#000000",
backgroundColor: "#ffffff",
});
},
methods: {
back() {
......@@ -89,7 +86,6 @@
}
.uni-navbar {
/* border: 1px #eee solid; */
background-color: #007aff;
}
......
......@@ -4,19 +4,20 @@
<scroll-view class="scroll-view" scroll-y="true">
<view class="content-item" @click="onClick">
<text>点击此处,将标题切换为{{isLeft?'居中':'左侧'}}显示</text>
</view>
</view>
<view class="content-item" @tap="setNavigationBarColor1">
<text>设置自定义导航栏前景色白色</text>
</view>
<view class="content-item" @tap="setNavigationBarColor2">
<text>设置自定义导航栏前景色黑色</text>
</view>
<view class="content-item" v-for="item in 100">
<text class="text">内容:{{item}}</text>
</view>
<input/>
<view class="uni-padding-wrap uni-common-mt">
<button @tap="setNavigationBarColor1" class="uni-btn">
设置自定义导航栏前景色白色
</button>
<button @tap="setNavigationBarColor2" class="uni-btn">
设置自定义导航栏前景色黑色
</button>
</view>
<!-- <input/> -->
</scroll-view>
</view>
</template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册