wente
2023-11-22 d6e03c8b28806fe3e0523f9827bcd593c61454fb
web/packages/components/zt-uploader/src/zt-uploader.vue
@@ -71,7 +71,6 @@
          :limit="limit"
          :list-type="drag ? 'picture' : 'picture-card'"
          :multiple="multiple"
          :name="name"
          :on-change="handleChange"
          :on-error="handleUploadError"
          :on-exceed="handleExceed"
@@ -332,6 +331,8 @@
      if (this.uploadList !== val) {
        this.uploadList = this.getUploadList(val)
        this.fileList = this.getUploadList(val)
        console.log(this.fileList,'this.fileList this.fileList')
        this.$emit('getUploaderImg',this.fileList)
      }
    },
    isShowCrop(value) {
@@ -347,11 +348,11 @@
    // 获取已上传的文件列表
    getUploadList(val) {
      if (val) {
        console.log(val, 'getUploadList val')
        // console.log(val, 'getUploadList val')
        if (!this.multiple) { // 单选
          return [val]
        } else {
          console.log([...val], 'getUploadList [...val]')
          // console.log([...val], 'getUploadList [...val]')
          return [...val]
        }
      } else {
@@ -446,6 +447,7 @@
    },
    // 上传成功回调
    handleUploadSuccess(response, file) {
      console.log(response, file,'response, file')
      if (response.code === 0) {
        this.progressPercent = 100
        this.uploading = false