html2wxml转化html网页后文章主体是shadow-root元素,不能获取dataset?
发布于 6 年前 作者 zhouguiying 12287 次浏览 来自 问答
/**复制链接 */
  wxmlTagATap(e) {
    var that=this
    var href = e.target.dataset.src
    console.log('herf' +href)
    wx.setClipboardData({
      data: href,
      success() {
        wx.hideToast();
        wx.showToast({
          title: '在游览器打开',
          image: "/pages/images/复制链接.png",
          mask: true,
          duration: 1500
        });
      }
    })
  },

回到顶部