赞
踩
插件预览图
saveImg.gif
功能介绍
1.长按保存图片
2.右下角图片点击保存图片
3.点击图片可以隐藏图片
使用教程
1.插件代码拷贝
下载后把components目录下saveFile.vue文件拷贝到自己项目目录下
2.插件全局配置
在项目里main.js中配置如下代码
import savefile from './components/saveFile.vue'
Vue.component('savefile',savefile)
3.插件使用
vue页面使用
export default {
data() {
return {
qrUrl:'/static/img/img1.jpg',
isShowPhoto:true,
};
},
onLoad() {},
methods: {
hidePhoto(){
this.isShowPhoto = false;
uni.showToast({
title:'图片已隐藏',
icon:'none'
})
}
}
};
兼容性
uni-app项目中使用都兼容 除了H5
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。