Skip to content

Commit

Permalink
fix: 解决上传组件,初始列表为空时清空无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ocean-gao committed Jun 20, 2023
1 parent f3178bf commit 28a94fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/upload/useUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export default (props: UploadProps, emit: any) => {
watch(
() => props.fileList,
(fileList) => {
if (!isEqual(cachedFiles, fileList)) {
if (!isEqual(cachedFiles, fileList) || fileList.length === 0) {
cachedFiles = [];
uploadFiles.value = fileList.map((file) => {
const cloneFile = cloneDeep(file);
Expand Down

0 comments on commit 28a94fe

Please sign in to comment.