vue学习
hhhhh--hhhhh
试试
展开
-
vue 父子组件通讯--props,refs(muse-ui,vue.js2.0)
<client-pop-update ref="clientPopUpdate" title='编辑客户' :name="updateName" :tel="updateTel" :addr="updateAddr" :id="updateId" :index="updateIndex" :money="updateMoney" v-on:getUpd原创 2017-09-04 19:29:42 · 859 阅读 · 0 评论 -
vue-router踩坑之history模式的scrollBehavior
vue-router默认模式是hash,该模式下微信和部分浏览器不会保留页面的滚动位置,例如从列表页到详情页,再返回列表页,会自动回到列表页顶部,显然很多情况下这并不是我们想要的,希望回到的是原来浏览到的位置;history模式下有 new Router({ mode: 'history', scrollBehavior (to, from, savedPosition) {原创 2017-12-04 23:06:17 · 5530 阅读 · 0 评论 -
vue-ref使用
{{item.name}} 获取::this.$refs.li[7]原创 2017-11-26 16:22:28 · 1053 阅读 · 0 评论 -
Vue父子通信 props
vue父子组件通信props子组件mounted时拿不到值-----解决:自组件中watch传过来的名称,就可以获得http://www.jb51.net/article/117447.htm--参考资料原创 2017-11-26 16:28:59 · 239 阅读 · 0 评论 -
vue keep-alive生命周期
问题:mint-ui infinite scroll keep-alive时一旦有滚动就会触发事件参考:https://segmentfault.com/q/1010000008099297解决:两个文件中都加入:deactivated(){ //keep-alive组件停用时调用 this.loading=true; console.log('index-deactivat原创 2017-11-26 16:33:40 · 1678 阅读 · 0 评论 -
element框架vue原始方法
@keyup.enter.native原创 2017-11-26 16:36:22 · 610 阅读 · 0 评论 -
vue设置请求时的header
参考:http://www.jb51.net/article/123459.htm写法:Vue.http.headers.common['token'] --vue设置请求时的header原创 2017-11-26 16:39:08 · 33844 阅读 · 1 评论 -
vue-resource emulateJSON
vue-resource post设置{emulateJSON:true}启用该选项后,请求会以application/x-www-form-urlencoded作为MIME type,就像普通的HTML表单一样。form形式传给后台,而非json形式原创 2017-11-26 16:41:29 · 3278 阅读 · 0 评论