import Upload from '../index'; export default { data() { return { destroyed: false, }; }, methods: { destroy() { this.destroyed = true; }, }, render() { if (this.destroyed) { return null; } const propsObj = { action: '//jsonplaceholder.typicode.com/posts/', data: { a: 1, b: 2 }, headers: { Authorization: 'xxxxxxx', }, multiple: true, beforeUpload(file) { console.log('beforeUpload', file.name); }, }; const propsEvent = { start(file) { console.log('start', file, file.name); }, success(file) { console.log('success', file); }, progress(step, file) { console.log('progress', Math.round(step.percent), file.name); }, error(err) { console.log('error', err); }, }; const uploaderProps = { props: { ...propsObj, }, on: { ...propsEvent, }, ref: 'inner', }; const uploaderProps1 = { props: { ...propsObj, componentTag: 'div', }, on: { ...propsEvent, }, }; const style = ` .rc-upload-disabled { opacity:0.5; `; return (
); }, };