中介库导入bug

This commit is contained in:
wkc
2026-02-28 11:21:28 +08:00
parent e388da627e
commit 2190d2f2d1

View File

@@ -73,7 +73,7 @@
> >
{{ isUploading ? '导入中...' : '开始导入' }} {{ isUploading ? '导入中...' : '开始导入' }}
</el-button> </el-button>
<el-button icon="el-icon-close" @click="visible = false" :disabled="isUploading"> <el-button :disabled="isUploading" icon="el-icon-close" @click="handleCancel">
</el-button> </el-button>
</div> </div>
@@ -144,6 +144,10 @@ export default {
this.isFileSelected = false; this.isFileSelected = false;
this.$emit("close"); this.$emit("close");
}, },
handleCancel() {
// 通过 $emit 通知父组件更新 visible 状态,而不是直接修改 prop
this.$emit('update:visible', false);
},
handleImportTypeChange() { handleImportTypeChange() {
if (this.$refs.upload) { if (this.$refs.upload) {
this.$refs.upload.clearFiles(); this.$refs.upload.clearFiles();