兄弟传值和props验证,插槽,单元测试,热加载
vue 点击没有括号事件
vue 过渡效果 transtion
el.style.attr
通过vue里面的js来改样式
简单路由
vue 路由 route -link to ="/bar"
route -link to ="/foo"
route link
动态路由 route-link:to =
出口文件是把路由跳转对应的内容显示一个div中
定义路由组件//
const Foo = {template:"
const Bar = {template:" "}
配置路由表
const routes = [
{ path:"/foo",component:Foo},
{ path:"/bar",component:Bar} }
]
3创建router实例
const router = new router({
routes //这里面用了解构(key为routes是固定的)
})
路由传参动态路由
Go to {{ item.name}}
冒号 路由名字name 传参方式 id
展开运算符es6
router-view 占位符