docs: update upload demo ts

示例代码在运行时,ts类型报错.原因是试图在可能为 undefined 的对象上使用扩展运算符.
feat-v4^2
huyikai 1 year ago committed by GitHub
parent 8212237045
commit a0e94978f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,7 +57,7 @@ export default defineComponent({
}; };
const beforeUpload: UploadProps['beforeUpload'] = file => { const beforeUpload: UploadProps['beforeUpload'] = file => {
fileList.value = [...fileList.value, file]; fileList.value = [...(fileList.value || []), file];
return false; return false;
}; };

Loading…
Cancel
Save