<!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>