优化用户
This commit is contained in:
parent
323de1b4ea
commit
65cc264915
@ -24,7 +24,7 @@ export const columns = [
|
||||
{
|
||||
label: '头像',
|
||||
prop: 'avatar',
|
||||
minWidth: 100,
|
||||
minWidth: 80,
|
||||
render(record) {
|
||||
return h(ElAvatar, {
|
||||
size: 48,
|
||||
@ -37,7 +37,7 @@ export const columns = [
|
||||
{
|
||||
label: '性别',
|
||||
prop: 'gender',
|
||||
minWidth: 100,
|
||||
minWidth: 80,
|
||||
render(record) {
|
||||
let typeText = '';
|
||||
let color = '';
|
||||
@ -71,18 +71,27 @@ export const columns = [
|
||||
{
|
||||
label: '手机号',
|
||||
prop: 'mobile',
|
||||
minWidth: 160,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
label: '用户角色',
|
||||
prop: 'role',
|
||||
minWidth: 100,
|
||||
minWidth: 250,
|
||||
render(record) {
|
||||
let roleNames = '';
|
||||
if (record.row.roles.length > 0) {
|
||||
roleNames = record.row.roles.map((role) => role.name).join(',');
|
||||
}
|
||||
return h('span', roleNames || '-');
|
||||
// return h('span', roleNames || '-');
|
||||
return h(
|
||||
ElTag,
|
||||
{
|
||||
type: 'primary',
|
||||
},
|
||||
{
|
||||
default: () => roleNames,
|
||||
},
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -98,7 +107,7 @@ export const columns = [
|
||||
{
|
||||
label: '部门',
|
||||
prop: 'deptName',
|
||||
minWidth: 160,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
|
Loading…
Reference in New Issue
Block a user