From f5c69bae308b0d69a6eee7cb0864fec7285c753c Mon Sep 17 00:00:00 2001
From: 若依 <yzz_ivy@163.com>
Date: 星期六, 12 二月 2022 11:53:29 +0800
Subject: [PATCH] !425 优化默认值的问题,Model中不建议有默认值的逻辑 Merge pull request !425 from Yancey/default_value_optimization
---
ruoyi-ui/src/views/system/user/profile/userAvatar.vue | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue
index aa176a6..63903a7 100644
--- a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue
+++ b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue
@@ -1,7 +1,7 @@
<template>
<div>
<div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="鐐瑰嚮涓婁紶澶村儚" class="img-circle img-lg" /></div>
- <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog()">
+ <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
<el-row>
<el-col :xs="24" :md="12" :style="{height: '350px'}">
<vue-cropper
@@ -110,7 +110,7 @@
// 涓婁紶棰勫鐞�
beforeUpload(file) {
if (file.type.indexOf("image/") == -1) {
- this.msgError("鏂囦欢鏍煎紡閿欒锛岃涓婁紶鍥剧墖绫诲瀷,濡傦細JPG锛孭NG鍚庣紑鐨勬枃浠躲��");
+ this.$modal.msgError("鏂囦欢鏍煎紡閿欒锛岃涓婁紶鍥剧墖绫诲瀷,濡傦細JPG锛孭NG鍚庣紑鐨勬枃浠躲��");
} else {
const reader = new FileReader();
reader.readAsDataURL(file);
@@ -128,7 +128,7 @@
this.open = false;
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
store.commit('SET_AVATAR', this.options.img);
- this.msgSuccess("淇敼鎴愬姛");
+ this.$modal.msgSuccess("淇敼鎴愬姛");
this.visible = false;
});
});
@@ -137,9 +137,10 @@
realTime(data) {
this.previews = data;
},
- //鍙栨秷鎴浘锛屽叧闂璇濇
+ // 鍏抽棴绐楀彛
closeDialog() {
this.options.img = store.getters.avatar
+ this.visible = false;
}
}
};
--
Gitblit v1.9.3