launchImageLibrary(
{
mediaType: 'photo',
quality: 1,
selectionLimit: 9,
includeBase64: true,
},
(res: ImagePickerResponse) => {
const {assets} = res;
if (!assets?.length) {
console.log('选择图片失败');
return;
}
console.log(`共选择了${assets.length}张`);
const {uri, width, height, fileName, fileSize, type} = assets[0];
console.log(`uri=${uri}, width=${width}, height=${height}`);
console.log(
`fileName=${fileName}, fileSize=${fileSize}, type=${type}`,
);
},
);
根据apI,android设置了selectionLimit也能无限选择,我看github上也有相关的issue,是选取后手动再去截取,怎么才能像小红书那样选择时就限制数量,他们是怎么玩的