haoxuan
2023-09-01 1e1e5f612f252d66b0d0386cf52873bb1f3f7d7b
src/components/subComponents/FileUpload/index.vue
@@ -5,7 +5,6 @@
      ref="uploader"
      :options="options"
      :file-status-text="statusText"
      :attrs="attrs"
      class="uploader-single"
      @file-added="onFileAdded"
      @complete="onComplete"
@@ -24,7 +23,6 @@
    <uploader
      v-else
      ref="uploader"
      :attrs="attrs"
      :options="options"
      :file-status-text="statusText"
      class="uploader-example"
@@ -33,7 +31,7 @@
      @complete="onComplete"
      @close="closeHandle"
    >
      <uploader-btn ref="button" :attrs="attrs">
      <uploader-btn ref="button" :sourceType="sourceType">
        <i class="el-icon-upload2" style="font-size:18px; color:#0088ff"></i>
        上传
      </uploader-btn>
@@ -55,9 +53,8 @@
    UploaderList
  },
  props: {
    acptTypes: {
      type: String,
      default: ''
    sourceType: {
      type: Number,
    },
    tip: {
      type: Boolean,
@@ -81,11 +78,11 @@
    },
    attrs: {
      type: Object,
      // default () {
      //   return {
      default () {
        return {
      //   }
      // }
        }
      }
    }
  },
  data() {
@@ -162,15 +159,6 @@
      }
    },
    computeMD5Success(md5, file) {
      // 将自定义参数直接加载uploader实例的opts上
      // if (this.$route.path.indexOf("VideoManage") >= 0) {
      //   Object.assign(this.uploader.opts, {
      //     query: {
      //       stackId: this.DataStackPool.selectedDir.id
      //       // ...this.params,
      //     }
      //   })
      // }
      //将自定义参数直接加载uploader实例的opts上
      if (location.href.indexOf("dataStack") >= 0) {
        Object.assign(this.uploader.opts, {
@@ -196,7 +184,7 @@
  },
  mounted() {
    this.$nextTick(() => {
      console.log(this.acptTypes)
      console.log(this.sourceType)
      window.uploader = this.$refs.uploader.uploader
    })
  }