[bug]在转发按钮区域外点击也会触发转发事件

发布于 8 年前作者 leichao8809 次浏览最后编辑 8 年前来自 ask

相关button代码

 

    // HTML 代码

    <imagesrc="/static/images/comments.png"></image>

    <label>123</label>

    <buttonopen-type="share">

      <imagesrc="/static/images/share.png"></image>

  1. </button>

        

// js代码

    onShareAppMessage(res) {

       return {

                title: `${this.tutorInfo.tutor}导师`,

                path: ‘/pages/tutor/tutor?tutorId=’ + this.tutorId

            }

        }

当我点击share按钮时可以调用转发事件,但是当我点击页面中的其它区域时也触发了了 onShareAppMessage事件, 是在找不到问题出在了哪里,

3 回复
duanyong
duanyong1 楼6 年前

确实比button小,我在审查元素里面看了,而且代码里面也是

gxiong
gxiong2 楼6 年前

我也遇到了这个问题,请问有解决办法了吗?

houxiulan
houxiulan3 楼6 年前

image 大小是不是比 button 要小