当前位置:网站首页>Create a tabbar component under the components folder, which is public
Create a tabbar component under the components folder, which is public
2022-04-23 05:26:00 【Courtesy.】
stay components Create in folder tabbar.ux file
Then create these three files as well ( Customize main watting me)
- stay tabbar.ux File write down page bottom
<template>
<div class="bar-wrap">
<div class="bar-item" onclick="clickBar('main')">
<image src="{
{current === 'main' ? '/assets/images/main-active.png' : '/assets/images/main.png'}}"></image>
<text style="color: {
{current === 'main' ? '#1296db' : '#999999'}};"> home page </text>
</div>
<div class="bar-item" onclick="clickBar('waitting')">
<image src="{
{current === 'waitting' ? '/assets/images/waitting-active.png' : '/assets/images/waitting.png'}}"></image>
<text style="color: {
{current === 'waitting' ? '#1296db' : '#999999'}};"> To do </text>
</div>
<div class="bar-item" onclick="clickBar('me')">
<image src="{
{current === 'me' ? '/assets/images/me-active.png' : '/assets/images/me.png'}}"></image>
<text style="color: {
{current === 'me' ? '#1296db' : '#999999'}};"> my </text>
</div>
</div>
</template>
<script>
export default {
data() {
return {
current: 'main'
}
},
clickBar(cur) {
this.current = cur
this.$emitElement('tap', {
current: this.current
})
}
}
</script>
<style lang="less">
@import '../assets/styles/style.less';
.bar-wrap {
width: 100%;
height: 52px;
position: fixed;
bottom: 0;
padding: 0 15px;
.border-top;
}
.bar-item {
.flex-box-mixins;
width: 50%;
image {
width: 24px;
height: 24px;
margin-top: 7px;
margin-bottom: 2px;
}
text {
font-size: 10px;
text-align: center;
line-height: 13px;
}
}
</style>
- stay pages Main page in folder As shown in the figure below :
<import name="tabbar" src="../../components/tabbar.ux"></import>
<import name="main" src="../../components/main.ux"></import>
<import name="waitting" src="../../components/waitting.ux"></import>
<import name="me" src="../../components/me.ux"></import>
<template>
<div>
<main show="{
{current === 'main'}}"></main>
<waitting show="{
{current === 'waitting'}}"></waitting>
<me show="{
{current === 'me'}}"></me>
<tabbar ontap="handleTap"></tabbar>
</div>
</template>
<script>
export default {
data: {
},
onShow() {
this.$broadcast('showPage')
},
handleTap(e) {
}
}
</script>
<style></style>
版权声明
本文为[Courtesy.]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220544339367.html
边栏推荐
- Uniapp hot update with progress bar
- 学习笔记:Unity CustomSRP-10-Point and Spot Shadows
- 跨域CORS的情缘~
- Solution of how to log in with mobile phone verification code in wireless network
- Laravel implements the Holy Grail model with template inheritance
- Blender programmed terrain production
- SQL Server检索SQL和用户信息的需求
- To understand Devops, you must read these ten books!
- Parsing of string class intern() method
- WTL 自绘控件库 (CQsCheckComboxBox)
猜你喜欢
How to set the initial value of El input number to null
領域驅動模型DDD(三)——使用Saga管理事務
何时适合进行自动化测试?(下)
《2021年IT行业项目管理调查报告》重磅发布!
引入精益管理方式,需要提前做到这九点
Double click The jar package cannot run the solution
Devops life cycle, all you want to know is here!
4 个最常见的自动化测试挑战及应对措施
Laravel database
Low code and no code considerations
随机推荐
了解 DevOps,必读这十本书!
2022年最热门的招聘技术技能是什么,您绝对想不到
varnish入门
SQL Server检索SQL和用户信息的需求
Getting started with varnish
egg中的多进程模型--egg文档搬运工
青岛敏捷之旅,来了!
Mairadb数据库基本操作之数据管理
Study notes: unity customsrp-11-post processing --- bloom
史上最强egg框架的error处理机制
Box collapse and margin collapse
d.ts---更详细的知识还是需要看官网的介绍(声明文件章节)
Modèle axé sur le domaine DDD (III) - gestion des transactions à l'aide de Saga
2021-10-12
使用 Kears 实现ResNet-34 CNN
What role do tools play in digital transformation?
The 2021 IT industry project management survey report was released!
Three 之 three.js (webgl)简单实现根据点绘制线/弧线(基于LineGeometry / Line2 / LineMaterial,绘制两点基于圆心的弧线段)
Using PHP post temporary file mechanism to upload arbitrary files
WTL self drawn control library (cqscheckcomboxbox)