$(document).ready(function(){  $(".nav1").click(function(){  $(".bar1").show().siblings().hide();   })  $(".nav2").click(function(){  $(".bar2").show().siblings().hide();   })  $(".nav3").click(function(){  $(".bar3").show().siblings().hide();  })  })     //vue组件部分  var Main = {  data() {  return {   activeIndex: '1'  };  },  methods: {  handleSelect(key, keyPath) {   /*console.log(key, keyPath);*/  }  }  } //vue路由部分  const Information = {template:'
foo
'}  const List = {template:'
list
'}  const routes = [  {path:'/information',component:Information},  {path:'/list',component:List}]  const router = new VueRouter({  routes  })  const app = new Vue({  router  }).$mount('#left-menu') //路由 启动应用  var Ctor = Vue.extend(Main)  new Ctor().$mount('#top-menu')  //主要就是下面这条语句多余 这是写组件时启动应用所用的语句  //new Ctor().$mount('#left-menu')  

关于“使用vue.js路由后失效怎么办”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。


文章题目:使用vue.js路由后失效怎么办
文章起源:http://wjwzjz.com/article/ijpgph.html