1.1.5 • Published 5 years ago
vue-picture-uploader v1.1.5
文档&&示例地址
https://storm4542.github.io/vue-picture-uploader/
示例
<g-uploader
height="80"
width="80"
:action=URL
:imageCut="true"
name="file"
:blob='true'
method="POST"
:parseResponse="parseResponse"
@addFile=addFile
:file-list.sync="fileList"
>
</g-uploader>
export default {
data() {
return {
fileList: [],
URL: 'https://image-server-gulu.herokuapp.com/upload',
};
},
methods: {
parseResponse(response) {
//对response做处理
// ...
return response;
},
addFile(file) {
//固定写入
this.fileList.push(file);
}
}
};