首页 > 其他 > 详细

ElementUI使用

时间:2021-06-07 20:24:51      阅读:21      评论:0      收藏:0      [点我收藏+]

表格-根据不同的值显示不同的标签

<el-table-column  prop="fulfill"  label="配置状态">
     <template slot-scope="scope">
           <el-tag type="warning" v-if="scope.row.fulfill === 1">待完善</el-tag>
           <el-tag type="success" v-else-if="scope.row.fulfill === 0">已完善</el-tag>
     </template>
</el-table-column>

分页

<el-pagination
                style="text-align: center;"
                @size-change="changeLimit"
                @current-change="changePage"
                :current-page="queryForm.page"
                :page-sizes="[8, 12, 16, 20]"
                :page-size="queryForm.limit"
                layout="total, sizes, prev, pager, next, jumper"
                :total="total">
</el-pagination>
data() {
    return {
        page: 1,
        limit: 8,
        total: 0
    }
}


methods: {
    changePage(val) {
    		this.page = val;
    },
    changeLimit(val) {
    		this.limit = val;
    }
}


ElementUI使用

原文:https://www.cnblogs.com/syuh/p/14859923.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!