const systemInfo = uni.getSystemInfoSync();
const os = systemInfo.osName;
if (os === 'harmonyos') {
uni.chooseFile({
success: (res) => {
const fileInfo = res.tempFiles[0]
selectedFile.value = {
path: fileInfo.path,
name: fileInfo.name,
size: fileInfo.size,
type: fileInfo.type
};
},
fail: (err) => {
uni.showToast({
title: '获取文件信息失败',
icon: 'none'
});
}
})
}