You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
682 B
31 lines
682 B
import Upload from '../index'
|
|
|
|
export default {
|
|
render () {
|
|
const uploaderProps = {
|
|
props: {
|
|
action: () => {
|
|
return new Promise((resolve) => {
|
|
setTimeout(() => {
|
|
resolve('//jsonplaceholder.typicode.com/posts/')
|
|
}, 2000)
|
|
})
|
|
},
|
|
},
|
|
on: {
|
|
start (file) {
|
|
console.log('start', file, file.name)
|
|
},
|
|
success (file) {
|
|
console.log('success', file)
|
|
},
|
|
error (err) {
|
|
console.log('error', err)
|
|
},
|
|
},
|
|
style: { margin: '100px' },
|
|
}
|
|
return <Upload {...uploaderProps}><a>开始上传</a></Upload>
|
|
},
|
|
}
|