Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
73a21fd6
authored
Apr 21, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码优化】review 个人中心的各种
parent
5240fe24
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
src/locales/zh-CN.ts
+6
-6
src/views/Profile/Index.vue
+1
-5
src/views/Profile/components/UserAvatar.vue
+1
-2
No files found.
src/locales/zh-CN.ts
View file @
73a21fd6
...
@@ -142,9 +142,9 @@ export default {
...
@@ -142,9 +142,9 @@ export default {
qrcode
:
'扫描二维码登录'
,
qrcode
:
'扫描二维码登录'
,
btnRegister
:
'注册'
,
btnRegister
:
'注册'
,
SmsSendMsg
:
'验证码已发送'
,
SmsSendMsg
:
'验证码已发送'
,
resetPassword
:
"重置密码"
,
resetPassword
:
'重置密码'
,
resetPasswordSuccess
:
"重置密码成功"
,
resetPasswordSuccess
:
'重置密码成功'
,
invalidTenantName
:
"无效的租户名称"
invalidTenantName
:
'无效的租户名称'
},
},
captcha
:
{
captcha
:
{
verification
:
'请完成安全验证'
,
verification
:
'请完成安全验证'
,
...
@@ -416,9 +416,9 @@ export default {
...
@@ -416,9 +416,9 @@ export default {
},
},
info
:
{
info
:
{
title
:
'基本信息'
,
title
:
'基本信息'
,
basicInfo
:
'基本
资料
'
,
basicInfo
:
'基本
设置
'
,
resetPwd
:
'
修改密码
'
,
resetPwd
:
'
密码设置
'
,
userSocial
:
'社交
信息
'
userSocial
:
'社交
绑定
'
},
},
rules
:
{
rules
:
{
nickname
:
'请输入用户昵称'
,
nickname
:
'请输入用户昵称'
,
...
...
src/views/Profile/Index.vue
View file @
73a21fd6
<
template
>
<
template
>
<!-- TODO @芋艿:可优化,对标 vben 版本 -->
<div
class=
"flex"
>
<div
class=
"flex"
>
<el-card
class=
"user w-1/3"
shadow=
"hover"
>
<el-card
class=
"user w-1/3"
shadow=
"hover"
>
<template
#
header
>
<template
#
header
>
...
@@ -9,11 +10,6 @@
...
@@ -9,11 +10,6 @@
<ProfileUser
/>
<ProfileUser
/>
</el-card>
</el-card>
<el-card
class=
"user ml-3 w-2/3"
shadow=
"hover"
>
<el-card
class=
"user ml-3 w-2/3"
shadow=
"hover"
>
<
template
#
header
>
<div
class=
"card-header"
>
<span>
{{
t
(
'profile.info.title'
)
}}
</span>
</div>
</
template
>
<div>
<div>
<el-tabs
v-model=
"activeName"
class=
"profile-tabs"
style=
"height: 400px"
tab-position=
"top"
>
<el-tabs
v-model=
"activeName"
class=
"profile-tabs"
style=
"height: 400px"
tab-position=
"top"
>
<el-tab-pane
:label=
"t('profile.info.basicInfo')"
name=
"basicInfo"
>
<el-tab-pane
:label=
"t('profile.info.basicInfo')"
name=
"basicInfo"
>
...
...
src/views/Profile/components/UserAvatar.vue
View file @
73a21fd6
...
@@ -16,7 +16,7 @@ import { uploadAvatar } from '@/api/system/user/profile'
...
@@ -16,7 +16,7 @@ import { uploadAvatar } from '@/api/system/user/profile'
import
{
CropperAvatar
}
from
'@/components/Cropper'
import
{
CropperAvatar
}
from
'@/components/Cropper'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useUserStore
}
from
'@/store/modules/user'
// TODO @芋艿:合并到 ProfileUser 组件中,更简洁一点
defineOptions
({
name
:
'UserAvatar'
})
defineOptions
({
name
:
'UserAvatar'
})
defineProps
({
defineProps
({
...
@@ -25,7 +25,6 @@ defineProps({
...
@@ -25,7 +25,6 @@ defineProps({
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
cropperRef
=
ref
()
const
cropperRef
=
ref
()
const
handelUpload
=
async
({
data
})
=>
{
const
handelUpload
=
async
({
data
})
=>
{
const
res
=
await
uploadAvatar
({
avatarFile
:
data
})
const
res
=
await
uploadAvatar
({
avatarFile
:
data
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment