前端 - 用ionic开发的微信公众号,二维码图片长按时无法弹出“识别图中二维码”菜单
我想大声告诉你
我想大声告诉你 2017-05-15 16:55:07
0
3
768

公众号中有一个分享给他人的二维码页面,长按时不像其他地方的二维码一样能够弹出微信的菜单,请问一下有相关经验的前辈,这是什么原因?

是不是ionic本身禁止在页面上长按来进行选择复制等操作,所以在图片上面长按时也无法触发微信的相应行为?

知乎上有个同样的问题:http://www.zhihu.com/question/28150871

但是没有人回答T-T

我想大声告诉你
我想大声告诉你

reply all(3)
曾经蜡笔没有小新

The master in the team solved it:
Add an attribute to the img element of the QR code: data-tap-disabled: true
Ionic official document explains this attribute: http://ionicframework.com/docs/api/page/tap/

曾经蜡笔没有小新

This is called tap hold event in jquery mobile. After searching, it seems to be called on-hold event in ionic. Try it and see if it’s right.

伊谢尔伦

How do you use ionic to generate QR codes? I am encountering such a problem now!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!