最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

在vue首页怎样做出底部导航TabBar

来源:动视网 责编:小采 时间:2020-11-27 20:01:52
文档

在vue首页怎样做出底部导航TabBar

在vue首页怎样做出底部导航TabBar:这次给大家带来vue首页底部导航TabBar,在vue首页做出底部导航TabBar的注意事项有哪些,下面就是实战案例,一起来看一下。<template> <div class="index"> <div class="mainContent"
推荐度:
导读在vue首页怎样做出底部导航TabBar:这次给大家带来vue首页底部导航TabBar,在vue首页做出底部导航TabBar的注意事项有哪些,下面就是实战案例,一起来看一下。<template> <div class="index"> <div class="mainContent"


这次给大家带来vue首页底部导航TabBar,在vue首页做出底部导航TabBar的注意事项有哪些,下面就是实战案例,一起来看一下。

<template>
 <div class="index">
 <div class="mainContent">
 <router-view></router-view> 
 </div>
 <div class="bottomBar">
 <ul>
 <li @click="toColor" > <router-link :to="{name:'MapPlat'}"> 
 ![](../assets/images/ic_map_nor@2x.png)![](../assets/images/ic_map@2x.png) <p :class="{bottomBarColorActive:isColor}">展图</p></router-link></li>
 <li @click="toColor2"> <router-link :to="{name:'Agenda'}"> 
 ![](../assets/images/ic_yicheng_nor@2x.png)![](../assets/images/ic_yicheng@2x.png) <p :class="{bottomBarColorActive:isColor2}">议程</p></router-link></li>
 <li @click="toColor3"> <router-link :to="{name:'Recommend'}">
 ![](../assets/images/ic_tuijian_nor@2x.png)![](../assets/images/ic_tuijian@2x.png) <p :class="{bottomBarColorActive:isColor3}">推荐</p></router-link></li>
 <li @click="toColor4"> <router-link :to="{name:'Attention'}">
 ![](../assets/images/ic_guanzhu_nor@2x.png)
 ![](../assets/images/ic_guanzhu@2x.png) <p :class="{bottomBarColorActive:isColor4}">关注</p></router-link></li>
 <li @click="toColor5"> <router-link :to="{name:'Intro'}"> 
 ![](../assets/images/ic_jianjie_nor@2x.png)
 ![](../assets/images/ic_jianjie@2x.png) <p :class="{bottomBarColorActive:isColor5}">简介</p></router-link></li>
 </ul>
 </div> 
 </div></template><script>export default { name: 'index',
 data () { return { isColor:true, isColor2:false, isColor3:false, isColor4:false, isColor5:false
 }
 }, methods:{ toColor:function(){ this.isColor=true; this.isColor2=false; this.isColor3=false; this.isColor4=false; this.isColor5=false;
 }, toColor2:function(){ this.isColor=false; this.isColor2=true; this.isColor3=false; this.isColor4=false; this.isColor5=false;
 }, toColor3:function(){ this.isColor=false; this.isColor2=false; this.isColor3=true; this.isColor4=false; this.isColor5=false;
 }, toColor4:function(){ this.isColor=false; this.isColor2=false; this.isColor3=false; this.isColor4=true; this.isColor5=false;
 }, toColor5:function(){ this.isColor=false; this.isColor2=false; this.isColor3=false; this.isColor4=false; this.isColor5=true;
 },
 }
}</script><!-- Add "scoped" attribute to limit CSS to this component only --><style scoped>.index { height: 100%;
}.bottomBar { height: 100px; width: 100%; border: 1px solid #ccc; bottom: 0; background: rgba(255,255,255,0.90); position: fixed; bottom: 0;
}.bottomBar ul { display: flex; width: 100%; justify-content:space-around;
}.bottomBar ul li { /*width: 20%;*/}.bottomBar ul li img { margin: 8px 0;
}.bottomBar ul li p { font-family: "PingFangSC-Regular"; font-size: 20px; color: #D2D7E8; letter-spacing: 0; line-height: 20px;
}.mainContent { height:-webkit-calc(100% - 100px); height:-moz-calc(100% - 100px); height:calc(100% - 100px);
}.bottomBarColorActive { color: #4D81EE !important;
}</style>

相信看了这些案例你已经掌握了方法,更多精彩请关注Gxl网其它相关文章!

相关阅读:

用Video.js实现H5直播界面

Jenkins+Node.js的持续集成

文档

在vue首页怎样做出底部导航TabBar

在vue首页怎样做出底部导航TabBar:这次给大家带来vue首页底部导航TabBar,在vue首页做出底部导航TabBar的注意事项有哪些,下面就是实战案例,一起来看一下。<template> <div class="index"> <div class="mainContent"
推荐度:
标签: VUE 底部导航 tabbar
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top