更新记录
1.0.0(2019-07-20) 下载此版本
无
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
- | - | - | - | √ | - | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
- | - | - | - | - | - | - | - | - | - | - |
choose-image
uniapp 媲美APP的流畅拖拽动画图像选择插件
使用方法:
1、复制到pages目录下的choose-image文件夹到你的项目pages下 2、在pages.json中加入以下配置
{
"path": "pages/choose-image/index",
"style": {
"app-plus": {
"bounce": "none"
},
"disableScroll": true
}
}
3、在main.js文件里设置全局对象
url参数传递的内容大小有限制,所以使用全局对象传递
Vue.prototype = Object.assign(Vue.prototype, {
globalData: {},
});
4、在需要选择图片的页面中的onShow生命周期中加入下面的代码
//this.imageList为你的图片列表,[图片路径(String),....]
if (this.globalData.ImagePathList) {
this.imageList = this.globalData.ImagePathList;
this.globalData.ImagePathList = null;
}
5、选择图片按钮事件中加入下面的代码
this.globalData.ImagePathList = this.imageList;
uni.navigateTo({
url: '/pages/choose-image/index'
});