
Vue2.0 饿了吗
LaughingZhu
DevNow is an open source technology blog project. It currently hosts weekly news (about technology, development and product), which is published every Monday morning.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
饿了吗第七章better-scroll 中$els 相关问题
在Vue2.0中,v-el 和 v-ref 合并为一个 ref 属性了,可以在组件实例中通过 $refs 来调用。这意味着 v-el:my-element 将写成这样:ref="myElement",v-ref:my-component 变成了这样:ref="myComponent"。 写dom元素: 获取dom元素: this.menuScroll = new BScroll(t原创 2017-09-19 21:09:44 · 871 阅读 · 0 评论 -
Vue1.0 迁移2.0
使用vue-route路由到新的页面是,会刷新当前页面的dom,el 被新创建的 vm.$el 替换,并挂载到实例上去之后调用该钩子。 1.0 是使用ready钩子函数 2.0使用mounted钩子函数代替原创 2017-10-18 23:42:21 · 736 阅读 · 0 评论