TeachingNote

vue-elementui分页条使用

电脑版发表于:2021/11/26 12:19

code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
    <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>
</body>
</html>

<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
    new Vue({
        el: '#app',
        methods: {
            handlerPage: function (val) {
                this.$message({
                    message: '点击分页分' + val,
                    type: 'success'
                });
            }
        },
        data: function () {
            return { visible: false }
        }
    })
</script>


关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢