当前位置:网站首页>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
边栏推荐
- The source of anxiety of graduating college students looking for technology development jobs
- 无线网怎么用手机验证码登录解决方案
- 2021-09-23
- Use of uniapp native plug-ins
- MFC实现资源单独Dll实现
- App Store年交易额100万美元只缴15%佣金,中小开发者心里很矛盾
- Study notes: unity customsrp-13-colorgrading
- Implementation of resnet-34 CNN with kears
- Getting started with varnish
- Open source rule engine - Ice: dedicated to solving flexible and complex hard coding problems
猜你喜欢

Graphics.FromImage报错“Graphics object cannot be created from an image that has an indexed pixel ...”

What are the most popular recruitment technical skills in 2022? You can't think of it

4 most common automated test challenges and Countermeasures

Excel 2016 打开文件第一次打不开,有时空白,有时很慢要打开第二次才行

Basic use of sqlyog

Nécessité de précharger les cookies dans le sélénium

Necessity of selenium preloading cookies

青岛敏捷之旅,来了!

How to set the initial value of El input number to null

C#测试调用PaddleSharp模块识别图片文字
随机推荐
Semi synchronous replication of MariaDB
selenium预先加载cookie的必要性
Multi process model in egg -- egg document Porter
Three 之 three.js (webgl)旋转属性函数的简单整理,以及基于此实现绕轴旋转的简单案例
Mariadb的半同步复制
无线网怎么用手机验证码登录解决方案
2021-09-27
String class understanding - final is immutable
My old programmer's perception of the dangers and opportunities of the times?
After NPM was upgraded, there was a lot of panic
Self incrementing sequence creation of MySQL
了解 DevOps,必读这十本书!
《2021年IT行业项目管理调查报告》重磅发布!
点击添加按钮--出现一个框框(类似于添加学习经历-本科-研究生)
4 most common automated test challenges and Countermeasures
Open source rule engine - Ice: dedicated to solving flexible and complex hard coding problems
SQL Server检索SQL和用户信息的需求
How to add beautiful code blocks in word | a very complete method to sort out and compare
MySQL series - install MySQL 5.6.27 on Linux and solve common problems
好的测试数据管理,到底要怎么做?