功能补充
This commit is contained in:
@@ -15,14 +15,15 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
imgUrlShow:''
|
||||
imgUrlShow:'',
|
||||
watching:false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
imgId: {
|
||||
handler(newval, oldval) {
|
||||
if (newval) {
|
||||
this.getPreviewUrlBlob(newval);
|
||||
if (newval && this.watching) {
|
||||
this.getPreviewUrlBlob(newval);
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
@@ -55,6 +56,7 @@
|
||||
if (this.imgId) {
|
||||
this.getPreviewUrlBlob(this.imgId);
|
||||
}
|
||||
this.watching = true
|
||||
},
|
||||
beforeDestroy() {
|
||||
URL.revokeObjectURL(this.imgUrlShow);
|
||||
|
||||
Reference in New Issue
Block a user