@@ -17,7 +17,7 @@
@@ -212,7 +212,8 @@
function showModal() {
openModal();
}
-
+ function handleHttpUpload(){
+ }
// 上传图片
function beforeUpload(file) {
const reader = new FileReader();
@@ -265,6 +266,10 @@
}
}
}
+ function handleClose(){
+ src.value =''
+ previewSource.value=''
+ }
return {
src,
@@ -273,10 +278,12 @@
previewSource,
showModal,
beforeUpload,
+ handleHttpUpload,
handleCropend,
handleReady,
handlerToolbar,
handleOk,
+ handleClose
};
},
});
diff --git a/src/views/system/user/edit.vue b/src/views/system/user/edit.vue
index c1b590a..40b697a 100644
--- a/src/views/system/user/edit.vue
+++ b/src/views/system/user/edit.vue
@@ -105,7 +105,7 @@
v-model:image-url="formData.avatar">
支持扩展名: jpg png jpeg;文件大小不超过200M
-->
-
+
@@ -193,6 +193,7 @@ const passwordConfirmValidator = (
const uploadSuccess =(data)=>{
formData.avatar = data.fileUrl
+ formRef.value?.validateField("avatar");
}
const dialogClose = () => {
emit("update:visible", false);
@@ -250,10 +251,6 @@ const getAllDict = async () => {
list = await getPositionAllList();
optionData.positionList = list ? list : [];
};
-function cropperCircledImg() {
- cropperCircled.value.openCropper();
- }
-
onMounted(() => {
getAllDict()
if (props.userId) {