fix(profile): disable mobile edit and fix email value alignment
Make phone number read-only with info toast, remove 'mobile' from edit type union, and constrain email value width with 50vw to align arrows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
</wd-cell>
|
||||
<wd-cell title="昵称" :value="userProfile?.nickname || '-'" is-link @click="handleEdit('nickname')" />
|
||||
<wd-cell title="性别" :value="getDictLabel(DICT_TYPE.SYSTEM_USER_SEX, userProfile?.sex) || '-'" is-link @click="handleEdit('sex')" />
|
||||
<wd-cell title="手机" :value="userProfile?.mobile || '-'" is-link @click="handleEdit('mobile')" />
|
||||
<wd-cell title="邮箱" :value="userProfile?.email || '-'" is-link @click="handleEdit('email')" />
|
||||
<wd-cell title="手机" :value="userProfile?.mobile || '-'" custom-value-class="pr-36rpx" @click="handleMobileTip" />
|
||||
<wd-cell title="邮箱" :value="userProfile?.email || '-'" is-link custom-value-class="email-value" @click="handleEdit('email')" />
|
||||
</wd-cell-group>
|
||||
<wd-cell-group custom-class="cell-group mt-24rpx" border>
|
||||
<wd-cell title="部门" :value="userProfile?.dept?.name || '-'" />
|
||||
@@ -116,8 +116,13 @@ async function handleCropperConfirm(event: { tempFilePath: string }) {
|
||||
toast.success('头像修改成功')
|
||||
}
|
||||
|
||||
/** 手机号不可修改提示 */
|
||||
function handleMobileTip() {
|
||||
toast.info('小程序暂不支持修改手机号')
|
||||
}
|
||||
|
||||
/** 编辑字段 */
|
||||
function handleEdit(field: 'nickname' | 'sex' | 'mobile' | 'email') {
|
||||
function handleEdit(field: 'nickname' | 'sex' | 'email') {
|
||||
formType.value = field
|
||||
formValue.value = userProfile.value?.[field] ?? (field === 'sex' ? 1 : '')
|
||||
formVisible.value = true
|
||||
@@ -136,4 +141,11 @@ onMounted(() => {
|
||||
overflow: hidden;
|
||||
box-shadow: 0 3rpx 8rpx rgba(24, 144, 255, 0.06);
|
||||
}
|
||||
|
||||
:deep(.email-value) {
|
||||
max-width: 50vw;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user