This commit is contained in:
zhoutianchi
2026-02-09 16:04:55 +08:00
parent 88cfb1985a
commit 9ac3a36efa
5 changed files with 26 additions and 9 deletions

View File

@@ -17,12 +17,14 @@
<!-- </div>-->
<el-upload
ref="uploadRef"
class="upload-demo"
action="/professional/file/makeImportTeacherInfoSimpleTask"
:headers="headers"
:accept="'.xls,.xlsx'"
:on-success="handleUploadSuccess"
:on-error="handleAvatarError"
:limit="1"
drag>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">
@@ -38,7 +40,7 @@
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import { ref, computed, nextTick } from 'vue'
import { ElNotification } from 'element-plus'
import { Download, UploadFilled } from '@element-plus/icons-vue'
import { Session } from '/@/utils/storage'
@@ -53,9 +55,14 @@
}
})
const uploadRef = ref<{ clearFiles?: () => void }>()
// 方法
const init = () => {
visible.value = true
nextTick(() => {
uploadRef.value?.clearFiles?.()
})
}
const handleUploadSuccess = () => {