vue-elementui使用分页条 电脑版发表于:2021/11/26 13:59 ``` <!-- 引入样式 --> <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> <script src="https://unpkg.com/vue/dist/vue.js"></script> <!-- 引入组件库 --> <script src="https://unpkg.com/element-ui/lib/index.js"></script> <div id="app"> <div class="block"> <span class="demonstration">页数较少时的效果</span> <el-pagination layout="prev, pager, next" :total="100" @@current-change="handlerPage"> </el-pagination> </div> </div> <script> new Vue({ el: '#app', methods: { handlerPage: function (val) { this.$message({ message: '点击分页分' + val, type: 'success' }); } }, data: function () { return { visible: false } } }) </script> ```