直接引入vue的js文件进行页面渲染分页,不是vuex的哦,以下源码可以直接运行哟^_^
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>使用vue2.0与bootstrap3进行简单列表分页</title>
<link href="http://v3.bootcss.com/dist/css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="https://cn.vuejs.org/js/vue.js"></script>
</head>
<body>
<div class="bs-example" id="table">
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>名称</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr v-if="listData.length>0" v-for="item in listData">
<th scope="row">{
{
item.id}}</th>
<td>{
{
item.name}}</td>
<td>
<button v-on:click="editItem(item.id)" class="btn btn-default" >编辑</button>
<button v-on:click="deleteItem(item.id)" class="btn btn-default" >删除</button>
</td>
</tr>
<tr>
<td colspan=3>
<div id="pagelist">
<div class="row">
<div class="col-sm-6" style="line-height: 80px">
<div class="dataTables_info" id="sample-table-2_info">