|
|
@ -101,12 +101,18 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</AUpload> |
|
|
|
</AUpload> |
|
|
|
</AFormItem> |
|
|
|
</AFormItem> |
|
|
|
<AFormItem :wrapperCol="{ style: { 'text-align': 'left' } }"> |
|
|
|
<AFormItem :wrapperCol="{ style: { 'text-align': 'left' }, class: 'avatar-submit-form-item' }"> |
|
|
|
<a-button preIcon="fa-regular:save" |
|
|
|
<a-button preIcon="fa-regular:save" |
|
|
|
:loading="state.uploadAvatarBtnLoading" |
|
|
|
:loading="state.uploadAvatarBtnLoading" |
|
|
|
type="primary" |
|
|
|
type="primary" |
|
|
|
@click="handleAvatarSubmit" |
|
|
|
@click="handleAvatarSubmit" |
|
|
|
>保存</a-button> |
|
|
|
>保存</a-button> |
|
|
|
|
|
|
|
<a-button preIcon="ant-design:delete-twotone" |
|
|
|
|
|
|
|
danger |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
:disabled="!state.imageUrl" |
|
|
|
|
|
|
|
@click="state.imageUrl = ''" |
|
|
|
|
|
|
|
>删除</a-button> |
|
|
|
</AFormItem> |
|
|
|
</AFormItem> |
|
|
|
</AForm> |
|
|
|
</AForm> |
|
|
|
</ACard> |
|
|
|
</ACard> |
|
|
@ -231,7 +237,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
const getAvatarUrl = computed((): string => isUrl(unref(getUserInfo).avatar) ? unref(getUserInfo).avatar : apiUrl + unref(getUserInfo).avatar); |
|
|
|
const getAvatarUrl = computed((): string => isUrl(unref(getUserInfo).avatar) ? unref(getUserInfo).avatar : apiUrl + unref(getUserInfo).avatar); |
|
|
|
|
|
|
|
|
|
|
|
const getImageUrl = computed((): string => isUrl(state.imageUrl) ? state.imageUrl : apiUrl + state.imageUrl); |
|
|
|
const getImageUrl = computed((): string => (!state.imageUrl || isUrl(state.imageUrl)) ? state.imageUrl : apiUrl + state.imageUrl); |
|
|
|
|
|
|
|
|
|
|
|
const getLabelStyle = computed((): CSSProperties => ({ |
|
|
|
const getLabelStyle = computed((): CSSProperties => ({ |
|
|
|
fontSize: '14px', |
|
|
|
fontSize: '14px', |
|
|
@ -326,6 +332,11 @@ |
|
|
|
::v-deep(.upload-avatar-form) > .ant-row { |
|
|
|
::v-deep(.upload-avatar-form) > .ant-row { |
|
|
|
margin-bottom: 0px; |
|
|
|
margin-bottom: 0px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep(.avatar-submit-form-item) button { |
|
|
|
|
|
|
|
margin-left: 6px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
</style> |
|
|
|