bootstrapvue.js實(shí)現(xiàn)tab效果的示例-創(chuàng)新互聯(lián)

小編給大家分享一下bootstrap vue.js實(shí)現(xiàn)tab效果的示例,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

成都創(chuàng)新互聯(lián)公司專注為客戶提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、明溪網(wǎng)絡(luò)推廣、小程序制作、明溪網(wǎng)絡(luò)營(yíng)銷、明溪企業(yè)策劃、明溪品牌公關(guān)、搜索引擎seo、人物專訪、企業(yè)宣傳片、企業(yè)代運(yùn)營(yíng)等,從售前售中售后,我們都將竭誠(chéng)為您服務(wù),您的肯定,是我們大的嘉獎(jiǎng);成都創(chuàng)新互聯(lián)公司為所有大學(xué)生創(chuàng)業(yè)者提供明溪建站搭建服務(wù),24小時(shí)服務(wù)熱線:028-86922220,官方網(wǎng)址:muchs.cn

Vue的優(yōu)點(diǎn)

Vue具體輕量級(jí)框架、簡(jiǎn)單易學(xué)、雙向數(shù)據(jù)綁定、組件化、數(shù)據(jù)和結(jié)構(gòu)的分離、虛擬DOM、運(yùn)行速度快等優(yōu)勢(shì),Vue中頁(yè)面使用的是局部刷新,不用每次跳轉(zhuǎn)頁(yè)面都要請(qǐng)求所有數(shù)據(jù)和dom,可以大大提升訪問(wèn)速度和用戶體驗(yàn)。

具體內(nèi)容如下

項(xiàng)目目錄結(jié)構(gòu)

bootstrap vue.js實(shí)現(xiàn)tab效果的示例

Student.js代碼

function Student(){
  this.baseInfo = {
    tabStatus : true ,
    name : '張三',
    sex : 'male'
  } ,
  this.parentsInfo = {
    tabStatus : false,
    fatherName : '張全蛋',
    motherName : '李鐵柱'
  } ,
  this.studySituation = {
    tabStatus : false,
    classSort : 1,
    gradeSort : 2
  }
}

CommonUtil.js代碼

Array.prototype.del = function(filter){
 var idx = filter;
 if(typeof filter == 'function'){
  for(var i=0;i<this.length;i++){
   if(filter(this[i],i)) idx = i;
  }
 }
 this.splice(idx,1)
}

var ary=[{id:1,name:"b"},{id:2,name:"b"}];
var delid = 2;
ary.del(function(obj){
 return obj.id == delid;
})

html頁(yè)

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>Student Management</title>
  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="external nofollow" >
  <script src="https://cdn.bootcss.com/jquery/3.1.1/jquery.js"></script>
  <script src="https://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  <script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
</head>
<body>
  <div id="stu" class="container">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" >基本信息</a></li>
      <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" >家長(zhǎng)信息</a></li>
      <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" >成績(jī)查詢</a></li>
    </ul>
    <div class="tab-content">
      <div class="tab-pane fade in active">
        <table class="table">
          <tr>
            <td class="col-lg-2">姓名</td>
            <td class="col-lg-4">{{baseInfo.name}}</td>
            <td class="col-lg-2">性別</td>
            <td class="col-lg-4">{{baseInfo.sex}}</td>
          </tr>
        </table>
      </div>
      <div class="tab-pane fade in">
        <table class="table">
          <tr>
            <td class="col-lg-2">父親名</td>
            <td class="col-lg-4">{{parentsInfo.fatherName}}</td>
            <td class="col-lg-2">母親名</td>
            <td class="col-lg-4">{{parentsInfo.motherName}}</td>
          </tr>
        </table>
      </div>
      <div class="tab-pane fade in">
        <table class="table">
          <tr>
            <td class="col-lg-2">全班排名</td>
            <td class="col-lg-4">{{studySituation.classSort}}</td>
            <td class="col-lg-2">全級(jí)排名</td>
            <td class="col-lg-4">{{studySituation.gradeSort}}</td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</body>
<script src="js/Student.js"></script>
<script>
  var student = new Student();
  new Vue({
    el : '#stu',
    data : {
      baseInfo : student.baseInfo,
      parentsInfo : student.parentsInfo,
      studySituation : student.studySituation
    } ,
    method : {

    }
  })
</script>
</html>

以上是“bootstrap vue.js實(shí)現(xiàn)tab效果的示例”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)網(wǎng)站建設(shè)公司行業(yè)資訊頻道!

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)建站muchs.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。

當(dāng)前文章:bootstrapvue.js實(shí)現(xiàn)tab效果的示例-創(chuàng)新互聯(lián)
文章分享:http://muchs.cn/article2/degeoc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版、云服務(wù)器、電子商務(wù)、網(wǎng)站策劃、定制網(wǎng)站、Google

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站