摘要: 1、命名视图 routes:[ { path:'/',components:{ default:header, 'left':leftBox, 'main':mainBox } } ] 2、案例 <!DOCTYPE html> <html lang="en"> <head> <meta charse 阅读全文
posted @ 2020-03-24 21:24 小白啊小白,Fighting 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 1、路由嵌套 routes:[ { path:'/account', component:account, children:[ {path: '/login',component: login}, {path: '/register',component: register}, ] } 2、案例 阅读全文
posted @ 2020-03-24 21:21 小白啊小白,Fighting 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 1、ref获取Dom <!--ref除了引用元素之外,还可以引用组件以及组件方法、数据--> <h1 ref="h1">哈哈</h1> 引用:this.$refs.h1.innerText 2、案例 <!DOCTYPE html> <html lang="en"> <head> <meta char 阅读全文
posted @ 2020-03-24 16:07 小白啊小白,Fighting 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 1、组件传值练习以及浏览器缓存 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!-- jQuery文件。务必在bootstrap.min.js 之前引入 --> <script 阅读全文
posted @ 2020-03-24 16:05 小白啊小白,Fighting 阅读(323) 评论(0) 推荐(0) 编辑