摘要: 通过query传递 使用$route获取query对象 通过代码跳转路由的方式传递参数 <template> <div id="app"> <router-link to="/home" tag="button" >首页</router-link> <router-link to="/about" 阅读全文
posted @ 2022-11-19 17:15 Mr_sven 阅读(24) 评论(0) 推荐(0) 编辑
摘要: home路径下配置一个news和message子路径 import Vue from 'vue' import VueRouter from 'vue-router' const Home = () => import('../components/Home') const HomeNews = ( 阅读全文
posted @ 2022-11-19 16:05 Mr_sven 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 推荐使用下面的方法 import Vue from 'vue' import VueRouter from 'vue-router' const Home = () => import('../components/Home') const About = () => import('../comp 阅读全文
posted @ 2022-11-19 12:36 Mr_sven 阅读(15) 评论(0) 推荐(0) 编辑
摘要: :to绑定参数 /:参数名,进行拼接参数 $route.params.参数名,取参数值 阅读全文
posted @ 2022-11-19 12:16 Mr_sven 阅读(18) 评论(0) 推荐(0) 编辑