|
@@ -8,8 +8,8 @@
|
|
|
:fit="'contain'"
|
|
|
style="width: 20%;margin-top: 10px;border-radius: 5px;margin-bottom: -15px;"
|
|
|
:z-index="50000"
|
|
|
- :src="baseUrl + value"
|
|
|
- :preview-src-list="[baseUrl + value]"
|
|
|
+ :src="imgSrc"
|
|
|
+ :preview-src-list="[imgSrc]"
|
|
|
></el-image>
|
|
|
<el-dialog title="图片剪裁" :visible.sync="open" :close-on-click-modal="false" @close="close" append-to-body>
|
|
|
<div style="height:400px">
|
|
@@ -81,7 +81,8 @@ export default {
|
|
|
full: true, //是否输出原图比例的截图
|
|
|
fixedBox: false, //固定截图框大小 不允许改变
|
|
|
centerBox: true //截图框是否被限制在图片里面
|
|
|
- }
|
|
|
+ },
|
|
|
+ imgSrc: '',
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -133,6 +134,10 @@ export default {
|
|
|
.then(response => {
|
|
|
if (response.code === 200) {
|
|
|
this.$emit('input', response.fileName);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.imgSrc = `${this.baseUrl}${this.value}?t=${new Date().getTime()}`;
|
|
|
+ })
|
|
|
+
|
|
|
this.$modal.msgSuccess('上传成功');
|
|
|
this.open = false;
|
|
|
}
|