這次帶給大家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'}">  <p :class="{bottomBarColorActive:isColor}">展图</p></router-link></li> <li @click="toColor2"> <router-link :to="{name:'Agenda'}">  <p :class="{bottomBarColorActive:isColor2}">议程</p></router-link></li> <li @click="toColor3"> <router-link :to="{name:'Recommend'}">  <p :class="{bottomBarColorActive:isColor3}">推荐</p></router-link></li> <li @click="toColor4"> <router-link :to="{name:'Attention'}">   <p :class="{bottomBarColorActive:isColor4}">关注</p></router-link></li> <li @click="toColor5"> <router-link :to="{name:'Intro'}">   <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>
相信看了這些案例你已經掌握了方法,更多精彩請關注php中文網其它相關文章!
相關閱讀:
以上是在vue首頁怎樣做出底部導覽TabBar的詳細內容。更多資訊請關注PHP中文網其他相關文章!

Node.js擅長於高效I/O,這在很大程度上要歸功於流。 流媒體匯總處理數據,避免內存過載 - 大型文件,網絡任務和實時應用程序的理想。將流與打字稿的類型安全結合起來創建POWE

Python和JavaScript在性能和效率方面的差異主要體現在:1)Python作為解釋型語言,運行速度較慢,但開發效率高,適合快速原型開發;2)JavaScript在瀏覽器中受限於單線程,但在Node.js中可利用多線程和異步I/O提升性能,兩者在實際項目中各有優勢。

JavaScript起源於1995年,由布蘭登·艾克創造,實現語言為C語言。 1.C語言為JavaScript提供了高性能和系統級編程能力。 2.JavaScript的內存管理和性能優化依賴於C語言。 3.C語言的跨平台特性幫助JavaScript在不同操作系統上高效運行。

JavaScript在瀏覽器和Node.js環境中運行,依賴JavaScript引擎解析和執行代碼。 1)解析階段生成抽象語法樹(AST);2)編譯階段將AST轉換為字節碼或機器碼;3)執行階段執行編譯後的代碼。

Python和JavaScript的未來趨勢包括:1.Python將鞏固在科學計算和AI領域的地位,2.JavaScript將推動Web技術發展,3.跨平台開發將成為熱門,4.性能優化將是重點。兩者都將繼續在各自領域擴展應用場景,並在性能上有更多突破。

Python和JavaScript在開發環境上的選擇都很重要。 1)Python的開發環境包括PyCharm、JupyterNotebook和Anaconda,適合數據科學和快速原型開發。 2)JavaScript的開發環境包括Node.js、VSCode和Webpack,適用於前端和後端開發。根據項目需求選擇合適的工具可以提高開發效率和項目成功率。

是的,JavaScript的引擎核心是用C語言編寫的。 1)C語言提供了高效性能和底層控制,適合JavaScript引擎的開發。 2)以V8引擎為例,其核心用C 編寫,結合了C的效率和麵向對象特性。 3)JavaScript引擎的工作原理包括解析、編譯和執行,C語言在這些過程中發揮關鍵作用。

JavaScript是現代網站的核心,因為它增強了網頁的交互性和動態性。 1)它允許在不刷新頁面的情況下改變內容,2)通過DOMAPI操作網頁,3)支持複雜的交互效果如動畫和拖放,4)優化性能和最佳實踐提高用戶體驗。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

EditPlus 中文破解版
體積小,語法高亮,不支援程式碼提示功能

SublimeText3 Linux新版
SublimeText3 Linux最新版

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具