提交 3a2ac453 编写于 作者: M mehaotian 提交者: 雪洛

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

上级 5dfee0e2
......@@ -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.
先完成此消息的编辑!
想要评论请 注册