浏览代码

修改状态

lex-xin 4 年之前
父节点
当前提交
de3ab0003f
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/components/singe-file-upload/index.vue

+ 3 - 2
src/components/singe-file-upload/index.vue

@@ -8,8 +8,9 @@
     :on-error="error"
     :limit="1"
     :file-list="filelist"
-    :accept="accept">
-    <el-button size="small" type="primary" plain>点击上传</el-button>
+    :accept="accept"
+    :disabled="filelist.length > 0">
+    <el-button size="small" type="primary" plain :disabled="filelist.length > 0">点击上传</el-button>
     <div slot="tip" v-if="tips" class="el-upload__tip">{{tips}}</div>
     <div slot="file" slot-scope="{file}">
       <div style="display: flex; align-items: center;flex: 1 auto;justify-content: space-between;">