api 修改

This commit is contained in:
taiyong
2017-03-24 16:47:23 +08:00
parent c7a9cf0521
commit 2fa959f31f
3 changed files with 6 additions and 4 deletions

View File

@@ -18,6 +18,7 @@
default: false
},
beforeRead: Function,
afterRead: Function,
resultType: {
type: String,
default: 'dataUrl',
@@ -37,7 +38,7 @@
if (this.beforeRead && !this.beforeRead(file)) return;
var reader = new FileReader();
reader.onload = (e) => {
this.$emit('file-readed',
this.afterRead && this.afterRead(
{
name: file.name,
type: file.type,