1、Element的组件学习:
https://element.eleme.io/#/zh-CN/component/installation
2、控件按需显示v-if:
<el-card class="box-card">
<el-table :data="rightsData" border stripe>
<el-table-column type="index"> </el-table-column>
<el-table-column label="权限名称" prop="name"> </el-table-column>
<el-table-column label="路径" prop="path"> </el-table-column>
<el-table-column label="权限等级" prop="level">
<template slot-scope="scope">
<el-tag v-if="scope.row.level === '0'">标签一</el-tag>
<el-tag type="success" v-else-if="scope.row.level === '1'"
>标签二</el-tag
>
<el-tag type="info" v-else>标签三</el-tag>
</template>
</el-table-column>
</el-table>
网友评论