Skip to content

Commit

Permalink
role add
Browse files Browse the repository at this point in the history
  • Loading branch information
limingjiu committed May 29, 2024
1 parent 6c7797e commit e4b660e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/views/sys/UsersView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ const clearForm = () => {
form.status = 0
}
const getRoleName = (item: string): string => {
return roleList.value.filter(role => role.code === item)[0].name
}
const handleSizeChange = async (val: number) => {
pageSize.value = val
pageNumber.value = 1
Expand Down Expand Up @@ -227,6 +231,12 @@ const getRegisterLink = async (username: string) => {
</template>
</el-table-column>

<el-table-column label="角色" align="center">
<template #default="scope">
<el-tag size="small" v-for="item in scope.row.roles" v-bind:key="item.code" type="success">{{ getRoleName(item) }}</el-tag>
</template>
</el-table-column>

<el-table-column label="创建时间" min-width="180" align="center">
<template #default="scope">
<div class="time-icon">
Expand Down

0 comments on commit e4b660e

Please sign in to comment.