摘要:
浏览器的历史记录有两种写入方式:分别为push和replace,push是追加历史记录,replace是替换当前记录。路由跳转时候默认为push 如何开启replace模式:<router-link replace .......>News</router-link> 阅读全文
posted @ 2022-05-10 17:44
lin-1
阅读(149)
评论(0)
推荐(0)
摘要:
1.配置路由,声明接收params参数 { path:'/home', component:Home, children:[ { path:'news', component:News }, { component:Message, children:[ { name:'xiangqing', pa 阅读全文
posted @ 2022-05-10 17:42
lin-1
阅读(253)
评论(0)
推荐(0)
摘要:
1.给路由命名 { { path:'/demo', component:Demo, children:[ { path:'test', component:Test, children:[ { name:'hello' //给路由命名 path:'welcome', component:Hello, 阅读全文
posted @ 2022-05-10 17:38
lin-1
阅读(168)
评论(0)
推荐(0)
摘要:
<!-- 跳转并携带query参数,to的字符串写法 --> <router-link :to="/home/message/detail?id=666&title=你好">跳转</router-link> <!-- 跳转并携带query参数,to的对象写法 --> <router-link :to 阅读全文
posted @ 2022-05-10 17:32
lin-1
阅读(184)
评论(0)
推荐(0)
摘要:
// 该文件专门用于创建整个应用的路由器 import VueRouter from 'vue-router' //引入组件 import About from '../pages/About' import Home from '../pages/Home' import News from '. 阅读全文
posted @ 2022-05-10 17:28
lin-1
阅读(125)
评论(0)
推荐(0)
摘要:
1.get请求 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>A 阅读全文
posted @ 2022-05-10 16:50
lin-1
阅读(40)
评论(0)
推荐(0)

浙公网安备 33010602011771号