Compare commits

..

No commits in common. "96690a10639bbbca6f0c9d12e1cc772158bcd654" and "ba97fbca468ab3e46806e2d0e56efc024a20f2e5" have entirely different histories.

2 changed files with 9 additions and 15 deletions

View File

@ -60,7 +60,7 @@
</li>
</ul>
</div>
<input type="file" style="display:none;" :multiple="limit>1&&$attrs.multiple" :accept="$attrs.accept" id="uploadinput" @change="onUpdate" ref="fileinputref"/>
<input type="file" style="display:none;" :multiple="limit>1" :accept="$attrs.accept" id="uploadinput" @change="onUpdate" ref="fileinputref"/>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
@ -235,12 +235,8 @@
raw:item
});
if(files.length==uplist.length){
if(this.$listeners.onUpload){
this.fileList.push(...uplist);
this.$emit('onUpload',uplist,this.fileList);
}else{
this.imageList.push(...uplist);
}
this.$emit('onUpload',uplist,this.imageList);
}
}.bind(this);
filerender.readAsDataURL(item);

View File

@ -47,7 +47,8 @@
<div>{{row.date}} </div>
</template>
</agTable>
<agUpdate @onUpload="onUpload" isDrap dragmove multiple :limit="5" @onError="onError" :maxSize="1024*1024" :fileList="filelist">
<agUpdate @onUpload="onUpload" multiple isDrap :limit="5" @onError="onError" listType="picture" :maxSize="1024*1024" :fileList="['https://git.aiguoai.com/assets/img/logo.svg']">
<el-button type="primary" size="small">点击上传</el-button>
<div slot="tip">只能上传jpg/png文件且不超过500kb</div>
</agUpdate>
<!-- <el-input
@ -367,18 +368,15 @@ export default {
handleChange: () => {},
},
],
filelist:['https://git.aiguoai.com/assets/img/logo.svg']
}
};
},
mounted(){
this.$refs.aginputref.value=123;
},
methods: {
onUpload(files,list){
console.log("onUpload",files,list);
this.filelist=list;
onUpload(files,filelist){
console.log("onUpload",files,filelist);
},
onError(err){
console.log("onError",err);