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