mpvue icon indicating copy to clipboard operation
mpvue copied to clipboard

mpvue的API在哪查?

Open dagang007 opened this issue 5 years ago • 1 comments

[扼要问题描述]

  1. mpvue脚手架生成的代码使用mpvue.switchTab ,在微信工具无效。
  2. 我自己试用mpvue.navigateTo 和 wx.navigateTo都有效。
  3. 请问mpvue开头的api的使用说明在哪查?谢谢

[mpvue 版本号]

"mpvue": "^2.0.0",

[最小化复现代码]

methods: {
    bindViewTap () {
      const url = '../list/main'
      if (mpvuePlatform === 'wx') {
        // mpvue.switchTab({ url })无效
          // wx.navigateTo({ 有效
          //   url
          // })
        mpvue.navigateTo({ url }) 有效
      } 
      // else {
      //   mpvue.navigateTo({ url })
      // }
    }
  },

dagang007 avatar Nov 14 '19 05:11 dagang007

你url中的../ 改成根目录名试试 例如 url='/pages/list/main'

MicahZJ avatar Dec 09 '19 08:12 MicahZJ