vuejs / vue-router

🚦 The official router for Vue 2
http://v3.router.vuejs.org/
MIT License
18.99k stars 5.06k forks source link

子路由嵌套,在一些安卓机型的微信web中切换列表会出现$router.push()跳转失效 #2860

Closed Max-Law closed 5 years ago

Max-Law commented 5 years ago

Version

3.0.7

Reproduction link

https://eoatestdev.sscc.com/sscc-ow-mobile-web/webstatic/weixin/index.html#/inquirePage/inquireList

Steps to reproduce

在安卓微信(android^8.0重现频繁)中打开这个链接,关注测试环境的公众号并找我要测试账号就可进入列表。当你一直切换底部的三个tab后,再次点击列表的详情跳转将无任何反应。

首页的代码概要:

    <keep-alive>
      <router-view class="mid" :search="searchData"></router-view>
    </keep-alive>
    <footer>
      <router-link
        v-for="item in tab"
        :key="item.name"
        :to="`/inquirePage/${item.name}`"
      >{{item.text}}</router-link>
    </footer>

子路由中的代码概要:

<div name="我的账单">
    <Refersh :callback="getList" :option="option" :check="check" ref="myBuillRefersh">
      <ul>
        <li v-for="item in items" :key="item.uuid">
          <router-link :to="goTo(item.uuid,item.billStatus)">
            <div class="title">{{item.billName}}</div>
          </router-link>
        </li>
      </ul>
    </Refersh>
  </div>

What is expected?

切换tab依旧能正常跳转详情页

What is actually happening?

频繁切换tab后不能正常跳转详情页


个人debug过程: 首先我怀疑是因为我用better-scroll导致没有触发点击事件,然而我在最外层用事件委托发现是触发了点击事件只是$router.push()没反应。 后来我从 @click 改到 v-on:click.stop 再改到来触发还是不行。 再后来我查issue,他们说vue2.6.9的版本也有click的冒泡问题,我测试了2.9.10与2.5.x的版本依旧出现。 同时,我进入详情再用安卓物理返回键回到列表,有时也会出现点击不太跳转的情况。

posva commented 5 years ago

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.