|
@ -7,13 +7,13 @@ |
|
|
<span>{{ t('profile.user.title') }}</span> |
|
|
<span>{{ t('profile.user.title') }}</span> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<ProfileUser ref="profileUserRef" /> |
|
|
|
|
|
|
|
|
<ProfileUser ref="profileUserRef" @update:avatar="handleUpdateAvatar" /> |
|
|
</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"> |
|
|
<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"> |
|
|
<BasicInfo @success="handleBasicInfoSuccess" /> |
|
|
|
|
|
|
|
|
<BasicInfo @success="handleBasicInfoSuccess" ref="basicInfoRef" /> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<el-tab-pane :label="t('profile.info.resetPwd')" name="resetPwd"> |
|
|
<el-tab-pane :label="t('profile.info.resetPwd')" name="resetPwd"> |
|
|
<ResetPwd /> |
|
|
<ResetPwd /> |
|
@ -30,11 +30,16 @@ const { t } = useI18n() |
|
|
defineOptions({ name: 'Profile' }) |
|
|
defineOptions({ name: 'Profile' }) |
|
|
const activeName = ref('basicInfo') |
|
|
const activeName = ref('basicInfo') |
|
|
const profileUserRef = ref() |
|
|
const profileUserRef = ref() |
|
|
|
|
|
const basicInfoRef = ref() |
|
|
|
|
|
|
|
|
// 处理基本信息更新成功 |
|
|
// 处理基本信息更新成功 |
|
|
const handleBasicInfoSuccess = async () => { |
|
|
const handleBasicInfoSuccess = async () => { |
|
|
await profileUserRef.value?.refresh() |
|
|
await profileUserRef.value?.refresh() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const handleUpdateAvatar = () => { |
|
|
|
|
|
basicInfoRef.value.init() |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<style scoped> |
|
|
<style scoped> |
|
|
.user { |
|
|
.user { |
|
@ -52,7 +57,7 @@ const handleBasicInfoSuccess = async () => { |
|
|
padding: 15px !important; |
|
|
padding: 15px !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.profile-tabs > .el-tabs__content { |
|
|
|
|
|
|
|
|
.profile-tabs>.el-tabs__content { |
|
|
padding: 32px; |
|
|
padding: 32px; |
|
|
font-weight: 600; |
|
|
font-weight: 600; |
|
|
color: #6b778c; |
|
|
color: #6b778c; |
|
|