修复文件选取问题
This commit is contained in:
parent
023f8f94b2
commit
e8ca86e899
|
|
@ -72,12 +72,12 @@ const handleChooseFiles = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// #ifdef H5 || MP-WEIXIN || APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
await chooseFilesWithUni(remainingCount);
|
await chooseFilesNative(remainingCount);
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
// #ifndef H5 || MP-WEIXIN || APP-PLUS
|
// #ifndef APP-PLUS
|
||||||
await chooseFilesNative(remainingCount);
|
await chooseFilesWithUni(remainingCount);
|
||||||
// #endif
|
// #endif
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('选择文件失败:', error);
|
console.error('选择文件失败:', error);
|
||||||
|
|
@ -104,13 +104,8 @@ const chooseFilesWithUni = (remainingCount) => {
|
||||||
reject(error);
|
reject(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: async () => {
|
fail: () => {
|
||||||
try {
|
reject(new Error('文件选择被取消或失败'));
|
||||||
await chooseFilesNative(remainingCount);
|
|
||||||
resolve();
|
|
||||||
} catch (nativeError) {
|
|
||||||
reject(nativeError);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user