查阅了很多文章,大多还停留在页面嵌入webview识别二维码的时代。
下面我发表一下小程序支持长按识别二维码的方法
只需要在image标签里添加 如下属性
小程序版本:
show-menu-by-longpress="{{true}}"
uniapp版本:
:show-menu-by-longpress="true"
例如:
小程序版本:
<image class="pic" show-menu-by-longpress="{{true}}" :src="src" mode="widthFix" />
uniapp版本:
<image :src="src" mode="widthFix" :show-menu-by-longpress="true"></image>
即可长按识别,快去试试吧!
不行,没有二维码
安卓可以,ios不行,有人遇到过吗?代码片段:https://developers.weixin.qq.com/s/InfSoEmf7RJm
show-menu-by-longpress="{{true}}" + wx.previewImage 两个配合使用才可以
不行
不行呀!