zoukankan      html  css  js  c++  java
  • vue day4 table

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>分页</title>
    <style>
      *{margin: 0;padding: 0;}
      #page-break{margin-top: 20px;margin-left: 20px;}
      #page-break li{list-style: none;}
      #page-break a{border: 1px solid #ddd; text-decoration: none;float: left;padding: 6px 12px;color: #337ab7;cursor: pointer}
      #page-break a:hover{background-color: #eee;}
      #page-break a .banclick{cursor: not-allowed;}
      #page-break .active a{color: #fff;cursor: default;background-color: #337ab7;border-color: #337ab7;}
      #page-break i{font-style: normal;color: #d44950;margin: 0px 4px;font-size: 12px;}
      #page-break .jumpbox .jumppage {border: 1px solid #ddd; margin-left: 40px; height: 33px;  40px; float: left;}
      #page-break .jumpbox .jumpbtn {cursor: pointer; margin-left: 10px;}
      #page-break .jumpbox .jumpbtn:active {color: #337ab7;}
    </style>    
        <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    </head>
    <body>
          <div id="app-4" class="col-xs-12 main-table-wrapper">
            <table class="table table-striped table-hover table-bordered" id="main-table">
                <thead>
                    <tr >
                        <th>姓名</th><th>日期</th><th>地址</th>
                    </tr>
                </thead>
                <tbody> 
                    <tr v-for="item in tableData">
                        <td>{{ item.name }}</td>
                        <td>{{ item.address }}</td>
                        <td>{{ item.date }}</td>
                    </tr>
                </tbody>
            </table>
        </div>
        
        <script>
          var app=  new Vue({
                el: '#app-4',
                data:{
                    tableData: [{
                        date: '2016-05-02',
                        name: '王小虎',
                        address: '上海市普陀区金沙江路 1518 弄',
            
                    }, {
                        date: '2016-05-04',
                        name: '王小虎',
                        address: '上海市普陀区金沙江路 1517 弄'
                    }, {
                        date: '2016-05-01',
                        name: '王小虎',
                        address: '上海市普陀区金沙江路 1519 弄'
                    }, {
                        date: '2016-05-03',
                        name: '王小虎',
                        address: '上海市普陀区金沙江路 1516 弄'
                    }]
                }
            });
          </script>
          
    </body>
    </html>
     
  • 相关阅读:
    perl中的默认变量与Z/map介绍
    perl6中字符串字母编历
    将数字转化为特殊符号的密码
    vue: axios
    vue: alias
    background-size
    问题:当浏览器窗口变化时,内容的大小以及相对位置也要相应变化
    vue移动端适配
    Web 端屏幕适配方案
    vue: register and import
  • 原文地址:https://www.cnblogs.com/LiuFengH/p/10608720.html
Copyright © 2011-2022 走看看