随笔分类 -  vue.js

摘要:v bind 缩写 v on 缩写 阅读全文
posted @ 2017-10-13 14:12 hopher 阅读(683) 评论(0) 推荐(0)
摘要:``` <!doctype html vue route demo Hello App! <! 使用 router link 组件来导航. <! 通过传入 属性指定链接. <! <router link 默认会被渲染成一个 标签 Go to Foo Go to Bar <! 路由出口 <! 路由匹配 阅读全文
posted @ 2017-10-13 14:09 hopher 阅读(492) 评论(0) 推荐(0)
摘要:``` vue hello world {{ message }} ``` 阅读全文
posted @ 2017-10-13 11:40 hopher 阅读(153) 评论(0) 推荐(0)
摘要:参考文献 https://cn.vuejs.org/v2/guide/components.html 使用插槽分发内容 阅读全文
posted @ 2017-10-13 11:33 hopher 阅读(140) 评论(0) 推荐(0)
摘要:参考文献 https://cn.vuejs.org/v2/guide/index.html 阅读全文
posted @ 2017-10-13 10:59 hopher 阅读(162) 评论(0) 推荐(0)
摘要:示例代码 父子组件的关系 父子组件的关系可以总结为 prop 向下传递,事件向上传递。 使用 v on 绑定自定义事件 名字起得跟socket.io都一样 每个 Vue 实例都实现了事件接口,即: 使用 $on(eventName) 监听事件 使用 $emit(eventName) 触发事件 eve 阅读全文
posted @ 2017-10-12 22:46 hopher 阅读(504) 评论(0) 推荐(0)
摘要:参考 "生命周期图示" "生命周期钩子" "Vue2.0 探索之路——生命周期和钩子函数的一些理解" 阅读全文
posted @ 2017-10-12 21:57 hopher 阅读(196) 评论(0) 推荐(0)