Commit 33d8dbef45d3e98dd294311f702ce810ad3a165e

Authored by YunaiV
1 parent 30f16044

v3.5.0 update ruoyi-ui/src/views/system/user/profile/userAvatar.vue. 修改头像,截图支持取消

yudao-ui-admin/src/views/system/user/profile/userAvatar.vue
1 1 <template>
2 2 <div>
3 3 <div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
4   - <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened">
  4 + <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog()">
5 5 <el-row>
6 6 <el-col :xs="24" :md="12" :style="{height: '350px'}">
7 7 <vue-cropper
... ... @@ -136,6 +136,10 @@ export default {
136 136 // 实时预览
137 137 realTime(data) {
138 138 this.previews = data;
  139 + },
  140 + // 取消截图,关闭对话框
  141 + closeDialog() {
  142 + this.options.img = store.getters.avatar
139 143 }
140 144 }
141 145 };
... ...