mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-12 12:26:49 +08:00
fix:作业附件上传问题修复
This commit is contained in:
@@ -51,6 +51,9 @@ function handleChange(e) {
|
|||||||
function remove(i) {
|
function remove(i) {
|
||||||
files.value.splice(i, 1)
|
files.value.splice(i, 1)
|
||||||
console.log(imageRef)
|
console.log(imageRef)
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearFiles() {
|
||||||
imageRef.value.clearFiles();
|
imageRef.value.clearFiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,6 +72,6 @@ function abort(i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
defineExpose({ reUpload, remove })
|
defineExpose({ reUpload, remove, clearFiles })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -290,12 +290,17 @@ const handleClick = () => {
|
|||||||
console.log(res);
|
console.log(res);
|
||||||
submitList.value.unshift(res.data);
|
submitList.value.unshift(res.data);
|
||||||
open();
|
open();
|
||||||
|
sbValue.value.content = "";
|
||||||
|
fileList.value = [];
|
||||||
|
remove(0);
|
||||||
|
clearFiles();
|
||||||
});
|
});
|
||||||
sbValue.value.content = "";
|
|
||||||
fileList.value = [];
|
|
||||||
remove(0);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function clearFiles() {
|
||||||
|
uploadRef.value.clearFiles();
|
||||||
|
}
|
||||||
|
|
||||||
function remove(i) {
|
function remove(i) {
|
||||||
uploadRef.value.remove(i);
|
uploadRef.value.remove(i);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user