<a>标签上有href,然后click事件没发出就跳转页面了

                  <q-btn
                    v-if="isTaoPwd == false"
                    class="text-weight-bold"
                    target="_blank"
                    color="accent"
                    text-color="white"
                    :size="buttonSize"
                    type="a"
                    :href="`${host}/goods/go/${detail.urlCode}`"
                    unelevated
                    @click="buyClick(detail.urlCode, detail.goodsInfoUrl)"
                  >
                    去购买
                  </q-btn>

被解析成html是

<a tabindex="0" role="link" class="q-btn q-btn-item non-selectable no-outline text-weight-bold q-btn--unelevated q-btn--rectangle bg-accent text-white q-btn--actionable q-focusable q-hoverable q-btn--wrap"
   target="_blank" href="http://localhost:8238/goods/go/c216ZG0zMzU1MzE1Nw==" style="font-size: 13px;">
  <span class="q-focus-helper"></span>
  <span class="q-btn__wrapper col row q-anchor--skip">
    <span class="q-btn__content text-center col items-center q-anchor--skip justify-center row"> 去购买     </span>
  </span>
</a>

这两天发现有点击跳转到京东的链接但click事件发出的请求却收不到,怀疑是因为在微信端点击链接还没来得及响应事件就直接跳到了目标页,因为在微信端都是在同一个页面打开链接而不像在浏览器上会新打开一个tab页。经测试发现在iphone端的微信端会有这个问题,而在safari上因为是打开了新的页面没有这个问题。具体原因可能是click事件延迟??已经用了fastclcik了还是没用?

喜欢艺术的码农
原文地址:https://www.cnblogs.com/zjhgx/p/15104408.html