refactor: 用户组标签显示优化

This commit is contained in:
shiziyuan9527 2021-06-03 14:47:06 +08:00 committed by 刘瑞斌
parent 776fd0f0e8
commit 5d5f6f9391
7 changed files with 10 additions and 11 deletions

View File

@ -1,10 +1,9 @@
<template> <template>
<div> <div>
<ms-tag v-for="(role, index) in roles" <span v-for="(role, index) in roles" :key="index">
:key="index" <el-tag :type="type" :effect="effect" color="" size="mini">{{role.name}}</el-tag>
:effect="effect" <br>
:type="type" </span>
:content="role.name"/>
</div> </div>
</template> </template>

View File

@ -79,7 +79,7 @@
<el-table-column prop="name" :label="$t('commons.username')"/> <el-table-column prop="name" :label="$t('commons.username')"/>
<el-table-column prop="email" :label="$t('commons.email')"/> <el-table-column prop="email" :label="$t('commons.email')"/>
<el-table-column prop="phone" :label="$t('commons.phone')"/> <el-table-column prop="phone" :label="$t('commons.phone')"/>
<el-table-column label="用户组" width="120"> <el-table-column label="用户组" width="150">
<template v-slot:default="scope"> <template v-slot:default="scope">
<ms-roles-tag :roles="scope.row.groups" type="success"/> <ms-roles-tag :roles="scope.row.groups" type="success"/>
</template> </template>

View File

@ -13,7 +13,7 @@
<el-table-column prop="name" :label="$t('commons.username')"/> <el-table-column prop="name" :label="$t('commons.username')"/>
<el-table-column prop="email" :label="$t('commons.email')"/> <el-table-column prop="email" :label="$t('commons.email')"/>
<el-table-column prop="phone" :label="$t('commons.phone')"/> <el-table-column prop="phone" :label="$t('commons.phone')"/>
<el-table-column prop="groups" label="用户组" width="120"> <el-table-column prop="groups" label="用户组" width="150">
<template v-slot:default="scope"> <template v-slot:default="scope">
<ms-roles-tag :roles="scope.row.groups" type="success"/> <ms-roles-tag :roles="scope.row.groups" type="success"/>
</template> </template>

View File

@ -106,7 +106,7 @@
<el-table-column prop="name" :label="$t('commons.username')"/> <el-table-column prop="name" :label="$t('commons.username')"/>
<el-table-column prop="email" :label="$t('commons.email')"/> <el-table-column prop="email" :label="$t('commons.email')"/>
<el-table-column prop="phone" :label="$t('commons.phone')"/> <el-table-column prop="phone" :label="$t('commons.phone')"/>
<el-table-column label="用户组" width="120"> <el-table-column label="用户组" width="150">
<template v-slot:default="scope"> <template v-slot:default="scope">
<ms-roles-tag :roles="scope.row.groups" type="success"/> <ms-roles-tag :roles="scope.row.groups" type="success"/>
</template> </template>

View File

@ -29,7 +29,7 @@
<el-table-column prop="id" label="ID"/> <el-table-column prop="id" label="ID"/>
<el-table-column prop="name" :label="$t('commons.name')" width="200"/> <el-table-column prop="name" :label="$t('commons.name')" width="200"/>
<el-table-column :label="$t('commons.group')" width="140"> <el-table-column :label="$t('commons.group')" width="150">
<template v-slot:default="scope"> <template v-slot:default="scope">
<ms-roles-tag :roles="scope.row.roles"/> <ms-roles-tag :roles="scope.row.roles"/>
</template> </template>

View File

@ -145,7 +145,7 @@
<el-table-column prop="name" :label="$t('commons.username')"/> <el-table-column prop="name" :label="$t('commons.username')"/>
<el-table-column prop="email" :label="$t('commons.email')"/> <el-table-column prop="email" :label="$t('commons.email')"/>
<el-table-column prop="phone" :label="$t('commons.phone')"/> <el-table-column prop="phone" :label="$t('commons.phone')"/>
<el-table-column label="用户组" width="120"> <el-table-column label="用户组" width="150">
<template v-slot:default="scope"> <template v-slot:default="scope">
<ms-roles-tag :roles="scope.row.groups" type="success"/> <ms-roles-tag :roles="scope.row.groups" type="success"/>
</template> </template>

View File

@ -28,7 +28,7 @@
<el-table-column prop="name" :label="$t('commons.username')"/> <el-table-column prop="name" :label="$t('commons.username')"/>
<el-table-column prop="email" :label="$t('commons.email')"/> <el-table-column prop="email" :label="$t('commons.email')"/>
<el-table-column prop="phone" :label="$t('commons.phone')"/> <el-table-column prop="phone" :label="$t('commons.phone')"/>
<el-table-column prop="groups" label="用户组" width="120"> <el-table-column prop="groups" label="用户组" width="150">
<template v-slot:default="scope"> <template v-slot:default="scope">
<ms-roles-tag :roles="scope.row.groups" type="success"/> <ms-roles-tag :roles="scope.row.groups" type="success"/>
</template> </template>