摘要: 浏览器的历史记录有两种写入方式:分别为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)
摘要: 1.安装路由 npm i vue-router 2.配置路由文件 //引入VueRouter import VueRouter from 'vue-router' //引入Luyou 组件 import About from '../components/About' import Home fro 阅读全文
posted @ 2022-05-09 15:22 lin-1 阅读(70) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2022-05-06 17:54 lin-1 阅读(97) 评论(0) 推荐(0)
摘要: 建议遵循以下书写顺序⑴布局定位属性:display | position | float | clear | visibility | overflow (建议display第一个书写)⑵自身属性:width | height | maring | padding | bordor | backgr 阅读全文
posted @ 2022-05-06 16:55 lin-1 阅读(44) 评论(0) 推荐(0)
摘要: 1.关闭语法检查 创建 vue.config.js 文件 module.exports = { // 关闭eslint 关闭语法检查 lintOnSave: false } 2.自动运行到浏览器 打开package.json文件 "scripts" : { //运行时自动打开浏览器 --open " 阅读全文
posted @ 2022-05-06 15:41 lin-1 阅读(57) 评论(0) 推荐(0)