关于#vue.js#的问题:vue按钮跳转后显示空白页面

vue按钮跳转后显示空白页面
App.vue如下:

img

index.js如下:

img


按钮跳转如下:

img

跳转后网页代码如下:

img

img

img


求指点。谢谢。

vue 里跳转 应该是用 router-link 或者 绑定点击事件 使用编程式导航 。

把点击这里那一句改改用路由跳转


html :
      <button @click="hreftwo" class="test-one">点我到页面</button>
 js :
   methods:{ //跳转页面
                    hreftwo(){
                              this.$router.push({ path:'/two.html'  })
                              }
           }

参考这个试试