docs: update upload demo ts
示例代码在运行时,ts类型报错.原因是试图在可能为 undefined 的对象上使用扩展运算符.feat-v4^2
parent
8212237045
commit
a0e94978f5
|
@ -57,7 +57,7 @@ export default defineComponent({
|
|||
};
|
||||
|
||||
const beforeUpload: UploadProps['beforeUpload'] = file => {
|
||||
fileList.value = [...fileList.value, file];
|
||||
fileList.value = [...(fileList.value || []), file];
|
||||
return false;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue