修改 username 为 nickname

This commit is contained in:
aaron 2025-01-20 22:48:19 +08:00
parent 0d637f2bc7
commit c7f312ba12
3 changed files with 9 additions and 9 deletions

View File

@ -75,7 +75,7 @@
<div class="header-right"> <div class="header-right">
<a-dropdown> <a-dropdown>
<a class="ant-dropdown-link" @click.prevent> <a class="ant-dropdown-link" @click.prevent>
{{ userInfo.username }} {{ userInfo.nickname }}
<down-outlined /> <down-outlined />
</a> </a>
<template #overlay> <template #overlay>

View File

@ -79,7 +79,7 @@
:key="user.userid" :key="user.userid"
:value="user.userid" :value="user.userid"
> >
{{ user.phone }} ({{ user.username || '未设置昵称' }}) {{ user.phone }} ({{ user.nickname || '未设置昵称' }})
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@ -228,7 +228,7 @@
:key="user.userid" :key="user.userid"
:value="user.userid" :value="user.userid"
> >
{{ user.phone }} ({{ user.username || '未设置昵称' }}) {{ user.phone }} ({{ user.nickname || '未设置昵称' }})
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@ -349,8 +349,8 @@ export default defineComponent({
key: 'user_info', key: 'user_info',
width: 200, width: 200,
customRender: ({ record }) => { customRender: ({ record }) => {
if (!record.user_username && !record.user_phone) return '-' if (!record.user_nickname && !record.user_phone) return '-'
return `${record.user_username || '未设置昵称'} (${record.user_phone})` return `${record.user_nickname || '未设置昵称'} (${record.user_phone})`
} }
}, },
{ {
@ -863,7 +863,7 @@ export default defineComponent({
userOptions.value = [{ userOptions.value = [{
userid: record.user_id, userid: record.user_id,
phone: record.user_phone, phone: record.user_phone,
username: record.user_username nickname: record.user_nickname
}] }]
} }

View File

@ -205,8 +205,8 @@ export default defineComponent({
}, },
{ {
title: '用户名', title: '用户名',
dataIndex: 'username', dataIndex: 'nickname',
key: 'username', key: 'nickname',
width: 120, width: 120,
}, },
{ {
@ -437,7 +437,7 @@ export default defineComponent({
const handleResetPassword = (record) => { const handleResetPassword = (record) => {
Modal.confirm({ Modal.confirm({
title: '重置密码', title: '重置密码',
content: `确定要重置用户 ${record.username || record.phone} 的密码吗?`, content: `确定要重置用户 ${record.nickname || record.phone} 的密码吗?`,
async onOk() { async onOk() {
try { try {
const password = generatePassword() const password = generatePassword()