Commit 7be128ae by duanaijun

添加属性是否删除图片

parent 195ab91a
...@@ -74,6 +74,13 @@ export default { ...@@ -74,6 +74,13 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
//是否删除原图-------------
deletePic: {
type: Boolean,
default: true,
},
//------------------------
option: { option: {
// 剪裁比例大小 // 剪裁比例大小
type: Object, type: Object,
...@@ -169,6 +176,15 @@ export default { ...@@ -169,6 +176,15 @@ export default {
}); });
}, },
delImg() { delImg() {
//--------是否删除原图-----------begin
if(!this.deletePic){
this.$emit('input', '');
this.$nextTick(() => {
if (this.$refs.input) this.$refs.input.value = '';
});
return;
}
//-------------------------------end
getDelImgToken({ getDelImgToken({
params: { params: {
fileNames: this.fileName, fileNames: this.fileName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment