From db193a46e8a8a5cdc0c4bcde7b2126af85b6ef0b Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Mon, 13 Sep 2021 09:36:38 +0800
Subject: [PATCH] 若依 3.7.0
---
ruoyi-ui/src/views/system/user/profile/userAvatar.vue | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/ruoyi-ui/src/views/system/user/profile/userAvatar.vue b/ruoyi-ui/src/views/system/user/profile/userAvatar.vue
index 4547d3d..49c2cd5 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">
+ <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
@@ -82,14 +82,6 @@
previews: {}
};
},
- created() {
- // 显隐列组件默认隐藏列
- for (let item in this.columns) {
- if (this.columns[item].visible === false) {
- this.value.push(parseInt(item))
- }
- }
- },
methods: {
// 编辑头像
editCropper() {
@@ -144,6 +136,11 @@
// 实时预览
realTime(data) {
this.previews = data;
+ },
+ // 关闭窗口
+ closeDialog() {
+ this.options.img = store.getters.avatar
+ this.visible = false;
}
}
};
--
Gitblit v1.9.2