更新记录
1.0.0(2024-10-13)
初始化发布
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | - | - | - | - | 4.4 | × | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | - | × | × | × | × |
uni-app x
Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
---|---|---|---|---|---|
- | - | 5.0 | × | - | × |
概述
XF-pictureSelectorUTS封装了安卓平台下的图片选择器,支持从相册获取图片、视频、音频&拍照
插件接口
openGallery
打开相册
uni-app项目中(nvue)调用示例:
import { openGallery } from "@/uni_modules/XF-pictureSelectorUTS"
openGallery({
success: (res ) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { openGallery, OpenGalleryOptions } from "@/uni_modules/XF-pictureSelectorUTS";
openGallery({
success: (res : any) => {
console.log(res)
}
} as OpenGalleryOptions);
可用性
Android系统
可提供的1.0.0及更高版本
openSystemGallery
打开系统相册
uni-app项目中(nvue)调用示例:
import { openSystemGallery } from "@/uni_modules/XF-pictureSelectorUTS"
openSystemGallery({
success: (res ) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { openSystemGallery, OpenSystemGalleryOptions } from "@/uni_modules/XF-pictureSelectorUTS";
openSystemGallery({
success: (res : any) => {
console.log(res)
}
} as OpenSystemGalleryOptions);
可用性
Android系统
可提供的1.0.0及更高版本
openCamera
打开相机拍照
uni-app项目中(nvue)调用示例:
import { openCamera } from "@/uni_modules/XF-pictureSelectorUTS"
openCamera({
success: (res ) => {
console.log(res)
}
});
uni-app x项目(uvue)中调用示例:
import { openCamera, OpenCameraOptions } from "@/uni_modules/XF-pictureSelectorUTS";
openCamera({
success: (res : any) => {
console.log(res)
}
} as OpenCameraOptions);
可用性
Android系统
可提供的1.0.0及更高版本