随笔分类 -  vue

vue组件之间通信
摘要:1、当组件在keep-alive被切换时将会执行activeted和deactiveted两个生命周期 2、inlude 正则表达式或字符串 ,只有符合条件的组件会被缓存 exclude正则表达式或字符串,任何符合条件的组件不会被缓存 3、keep-alive是vue2.0的功能 4、keep-al 阅读全文
posted @ 2018-08-06 10:21 js初学者 阅读(1055) 评论(0) 推荐(0)
摘要:转发连接:https://blog.csdn.net/weixin_41557291/article/details/80606525 在需要更改的组件里新增一个style标签【重点:不要加scoped】,然后直接获取class设置样式就可以咯,class自己去浏览器里右键审查元素可得到 建议:在获 阅读全文
posted @ 2018-07-30 15:10 js初学者 阅读(1291) 评论(0) 推荐(0)
摘要:1、iphone5 运行vue项目时,方法格式:fun(){}这种格式容易不显示页面 2、vue未绑定上数据有可能是js文本过大,手机内存不足引起的 3、根据方法走向追溯debug 4、一定要用try{}catch 阅读全文
posted @ 2017-09-28 11:38 js初学者 阅读(229) 评论(0) 推荐(0)
摘要:vue使用element-ui的el-input监听不了键盘事件,原因应该是element-ui自身封装了一层div在input标签外面,把原来的事件隐藏了,所以如下代码运行是无响应的: <el-input v-model="name" placeholder="账号" @keyup.enter=" 阅读全文
posted @ 2017-09-26 08:58 js初学者 阅读(694) 评论(0) 推荐(0)
摘要:vue 与mint UI 结合开发手机app html5页面 api 文档 http://mint-ui.github.io/#!/zh-cn 阅读全文
posted @ 2017-07-17 18:01 js初学者 阅读(181) 评论(0) 推荐(0)
摘要:1、store.commit({'type':'mutation','parameter':'value'}); store.dispatch('action'); 2、获取state保存的值 store.state.state 阅读全文
posted @ 2017-07-17 17:51 js初学者 阅读(1461) 评论(0) 推荐(0)
摘要:1、引入 vue.js vuex.js 文件 2、创建Store文件 var sSatte=new Vuex.Store({ state:{}, mutations:{}, actions:{} }) 阅读全文
posted @ 2017-07-17 17:47 js初学者 阅读(221) 评论(0) 推荐(0)
摘要:1、Vue.component('component-test', { props:{}, data:function(){ return{} }, mounted:function(){}, computed:{ }, methods:{ }, template:'' }); 2、var item 阅读全文
posted @ 2017-07-17 17:40 js初学者 阅读(203) 评论(0) 推荐(0)