Open ZhaoQi99 opened 2 years ago
覆盖默认的上传行为,可以自定义上传的实现
https://element.eleme.cn/#/zh-CN/component/upload 参见http-request
http-request
<template> <Upload action="" :http-request="upload"> <Button icon="ios-cloud-upload-outline">Upload files</Button> </Upload> </template> <script> export default { data() { return {}; }, methods: { upload({ file }) { let form = new FormData() form.append('file', file) return uploadFile(form) } } }; </script>
What problem does this feature solve?
覆盖默认的上传行为,可以自定义上传的实现
What does the proposed API look like?
https://element.eleme.cn/#/zh-CN/component/upload 参见
http-request