处理带有路线的另一个组件内的组件?

时间:2018-08-09 09:00:52

标签: vue.js

我的模板中有这种结构

InstantApps.showInstallPrompt()

通过点击自定义按钮,我想调用此方法并导航到另一条路线

<div to="/route/route1">
     <i class="material-icons">airplay</i>
      <span>Title</span>
      <custom-button @click.native="doSomething"></custom-button>
</div>

现在,当我单击自定义按钮时,我仍然会转到doSomething() { this.$router.push({path: 'route/route2'}); }

有没有办法使这种结构具有这种功能?

0 个答案:

没有答案
相关问题