更新记录
0.1.2(2025-06-07)
- chore: 更新文档
0.1.1(2025-06-02)
- feat: 兼容鸿蒙next
0.1.0(2025-04-04)
- chore: 更新文档
平台兼容性
云端兼容性
阿里云 | 腾讯云 | 支付宝云 |
---|---|---|
√ | √ | √ |
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,安卓,鸿蒙)
文档
🚀 choose-file【站点1】 🌍 choose-file【站点2】 🔥 choose-file【站点3】
安装
插件市场导入,APP需要在页面上引入,然后自定义基座,完成自定义基座后,选择自定义基座运行
使用
UNIAPPX
import { chooseFile, type ChooseFileOption } from '@/uni_modules/lime-choose-file'
const images = ref<string[]>([])
const onClick = () => {
chooseFile({
filename: 'xxxx', // 可选 用于给文件重命名(安卓、IOS)
type: 'image',
success(res){
images.value = res.tempFiles.map((item):string => item.path)
console.log('res', res.tempFiles)
},
fail(err){
console.log('err', err)
}
} as ChooseFileOption)
}
UNIAPP
import { chooseFile } from '@/uni_modules/lime-choose-file'
const images = ref<string[]>([])
const onClick = () => {
chooseFile({
filename: 'xxxx', // 可选 用于给文件重命名(安卓、IOS)
type: 'image',
success(res){
images.value = res.tempFiles.map((item):string => item.path)
console.log('res', res.tempFiles)
},
fail(err){
console.log('err', err)
}
})
}
常见问题
- 1、IOS路径是中文时无法上传到服务器,这时候需要设置
filename
给文件重命名
API
因为直接参照小程序chooseFile
API,所以可以直接按chooseFile文档来