Просмотр исходного кода

fix(CreateCourseDialog): 注释掉上传成功后的确认弹窗逻辑

临时注释掉上传PPTX成功后弹出的二次确认对话框代码,保留原有流程逻辑
lsc 3 дней назад
Родитель
Сommit
bf17dc16d5
1 измененных файлов с 16 добавлено и 14 удалено
  1. 16 14
      src/components/CreateCourseDialog.vue

+ 16 - 14
src/components/CreateCourseDialog.vue

@@ -107,6 +107,7 @@ const emit = defineEmits<{
   (e: 'close'): void
   (e: 'select', option: string): void
   (e: 'setTitle', title: string): void
+  (e: 'setTitle2', title: string, type: number): void
 }>()
 
 const { importPPTXFile, exporting } = useImport()
@@ -142,20 +143,21 @@ const handleFileUpload = async (files: FileList) => {
 
     // 调用importPPTXFile并传入signal
     await importPPTXFile(files, { signal, onclose: () => {
-      emit('setTitle', file.name.replace(/\.[^/.]+$/, ''), 2); emit('close')
-      showConfirmDialog({
-        title: lang.ssUploadSuccess,
-        content: lang.ssBatchInteractiveWebConfirm,
-        confirmText: lang.ssBatchInteractiveWebConfirmDesc,
-        cancelText: lang.ssBatchInteractiveWebConfirmDesc2,
-        width: 400,
-        onConfirm: () => {
-          setRunningState(true)
-        },
-        onCancel: () => {
-          console.log('取消删除')
-        },
-      })
+      emit('setTitle2', file.name.replace(/\.[^/.]+$/, ''), 2) 
+      emit('close')
+      // showConfirmDialog({
+      //   title: lang.ssUploadSuccess,
+      //   content: lang.ssBatchInteractiveWebConfirm,
+      //   confirmText: lang.ssBatchInteractiveWebConfirmDesc,
+      //   cancelText: lang.ssBatchInteractiveWebConfirmDesc2,
+      //   width: 400,
+      //   onConfirm: () => {
+      //     setRunningState(true)
+      //   },
+      //   onCancel: () => {
+      //     console.log('取消删除')
+      //   },
+      // })
     } })
   }
   catch (error) {