更新记录
0.1.1(2025-06-02)
0.1.0(2025-04-04)
0.0.9(2025-03-11)
查看更多
平台兼容性
云端兼容性
uni-app(4.61)
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
√ |
√ |
√ |
√ |
√ |
5.0 |
√ |
√ |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
√ |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x(4.61)
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
√ |
√ |
5.0 |
√ |
√ |
√ |
lime-choosefile 文件选择
- 文件选择UTS API系参考小程序chooseFile API实现的,用法保持一致,目前仅支持uniappX(web,ios,安卓)
文档
lime-choosefile
安装
插件市场导入即可
使用
使用方法跟小程序的一样
// 非uniappx 不需要导入 ChooseFileOption
import { chooseFile, ChooseFileOption } from '@/uni_modules/lime-choose-file'
const images = ref<string[]>([])
const onClick = () => {
chooseFile({
filename: 'xxxx', // 可选 用于给文件重命名
type: 'image',
success(res){
images.value = res.tempFiles.map((item):string => item.path)
console.log('res', res.tempFiles)
},
fail(err){
console.log('err', err)
}
//非uniappx 不需要 as ChooseFileOption
} as ChooseFileOption)
}
API
因为直接参照小程序chooseFile
API,所以可以直接按chooseFile文档来