mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 17:18:40 +08:00
parent
eea9bf7aac
commit
f2ae0d3aac
@ -43,6 +43,10 @@
|
||||
<demo-block :title="$t('jinYong')">
|
||||
<wd-upload :file-list="fileList8" disabled :action="action" @change="handleChange8"></wd-upload>
|
||||
</demo-block>
|
||||
<demo-block :title="$t('duo-xuan')">
|
||||
<wd-upload :file-list="fileList2" multiple :action="action" @change="handleChange2"></wd-upload>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('zi-ding-yi-huan-qi-shang-chuan-yang-shi-bing-xian-zhi-shang-chuan-5-zhang')">
|
||||
<wd-upload :file-list="fileList9" :action="action" @change="handleChange9" :limit="5">
|
||||
<wd-button>{{ $t('zi-ding-yi-huan-qi-yang-shi') }}</wd-button>
|
||||
@ -243,16 +247,6 @@ const buildFormData = ({ file, formData, resolve }: any) => {
|
||||
resolve(formData)
|
||||
}
|
||||
|
||||
const handleSuccess1 = (res: any) => {
|
||||
console.log('成功', res)
|
||||
}
|
||||
const handleFail1 = (res: any) => {
|
||||
console.log('失败', res)
|
||||
}
|
||||
const handleProgess1 = (res: any) => {
|
||||
console.log('加载中', res)
|
||||
}
|
||||
|
||||
function handleSuccess(event: any) {
|
||||
console.log('成功', event)
|
||||
}
|
||||
|
||||
@ -288,8 +288,7 @@ function startUploadFiles() {
|
||||
uploadMethod,
|
||||
onSuccess: handleSuccess,
|
||||
onError: handleError,
|
||||
onProgress: handleProgress,
|
||||
abortPrevious: true // 自动中断之前的上传
|
||||
onProgress: handleProgress
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -305,8 +304,7 @@ function startUploadFiles() {
|
||||
uploadMethod,
|
||||
onSuccess: handleSuccess,
|
||||
onError: handleError,
|
||||
onProgress: handleProgress,
|
||||
abortPrevious: true
|
||||
onProgress: handleProgress
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user