码迷,mamicode.com
首页 > 其他好文 > 详细

vue 问题集合

时间:2017-03-10 16:36:32      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:pat   targe   tps   llb   his   保存状态   isp   new   str   

其他组件使用注册过得router                   this.$router

注册路由是routes 而不是 routers 

在单独的js 使用 vue的ajax                     new Vue.get

 

子路路由根据 父级路由的ajax结果来显示内容       <router-view  :pros="data">子页面</router-view>

vue滚动问题                       默认保存状态, 如果每次都想从头, 可以 scrollBehavior {x:0,y:0}

vue2往下广播问题                                                父级事件触发后, 改变state, state传入子组件, 子组件watch这个state,  vue2只能事件冒泡,  以免混乱

 

事件监听与$nextTick                                          等全部渲染后, 才emit 或者 dispatch

 

vue 问题集合

标签:pat   targe   tps   llb   his   保存状态   isp   new   str   

原文地址:http://www.cnblogs.com/dhsz/p/6531155.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!