Browse Source

🎈 perf: 上传空取之前的数据

wolyshaw 3 năm trước cách đây
mục cha
commit
a9d946240f
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/teacher/music/upload/index.tsx

+ 2 - 2
src/teacher/music/upload/index.tsx

@@ -196,7 +196,7 @@ export default defineComponent({
       this.xmlFileLoading = true
       postMessage({ api: 'chooseFile', content: { type: 'xml' } }, evt => {
         // @ts-ignore
-        this.xmlFileUrl = evt?.fileUrl || ''
+        this.xmlFileUrl = evt?.fileUrl || this.this.xmlFileUrl || ''
         this.xmlFileLoading = false
       })
     },
@@ -204,7 +204,7 @@ export default defineComponent({
       this.midiLoading = true
       postMessage({ api: 'chooseFile', content: { type: 'midi' } }, evt => {
         // @ts-ignore
-        this.midiUrl = evt?.fileUrl || ''
+        this.midiUrl = evt?.fileUrl || this.midiUrl || ''
         this.midiLoading = false
         // this.midiUrl = path
       })