国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > JavaScript > 正文

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

2019-11-19 17:42:11
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

本文實(shí)例為大家分享了bootstrap vue.js實(shí)現(xiàn)tab效果的具體代碼,供大家參考,具體內(nèi)容如下

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

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"  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ī)查詢(xún)</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>

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持武林網(wǎng)。

發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 龙海市| 莎车县| 繁峙县| 克东县| 得荣县| 新余市| 略阳县| 米泉市| 常山县| 东海县| 龙江县| 饶阳县| 永昌县| 泰安市| 普陀区| 五指山市| 连云港市| 开江县| 昌图县| 安化县| 冕宁县| 苍梧县| 光泽县| 丰县| 博野县| 云林县| 铁力市| 南皮县| 锦屏县| 南充市| 诏安县| 蒙阴县| 新建县| 章丘市| 石阡县| 榆树市| 罗城| 扎囊县| 邵阳县| 文安县| 南昌市|