Merge branch 'master' of http://61.139.16.27:26684/maojiacai/ba_web
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
:list-type="props.showBtn ? '' : 'picture-card'"
|
||||
:file-list="fileList"
|
||||
show-file-list
|
||||
:before-remove="beforeRemove"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handlerSuccess"
|
||||
:before-upload="beforeImgUpload">
|
||||
@ -195,6 +196,17 @@ const handlePictureCardPreview = (file) => {
|
||||
const handleDownload = (file) => {
|
||||
window.open(file.response.data);
|
||||
};
|
||||
|
||||
// 删除文件 触发父组件更新
|
||||
const beforeRemove = (file) => {
|
||||
let index = fileList.value.findIndex(function (item) {
|
||||
return item.id === file.id;
|
||||
});
|
||||
|
||||
props.modelValue.splice(index, 1);
|
||||
emits("update:modelValue", props.modelValue);
|
||||
}
|
||||
|
||||
const handleRemove = (file) => {
|
||||
let index = fileList.value.findIndex(function (item) {
|
||||
return item.id === file.id;
|
||||
|
||||
Reference in New Issue
Block a user