摘要: data() { return { options2: [{ label: '江苏', cities: [{label:'南京'},{label:'a'},{label:'b'}] }, { label: '浙江', cities: [{label:'杭州'}] }], props: { value 阅读全文
posted @ 2018-03-28 15:42 哆啦a梦爱吃铜锣烧 阅读(915) 评论(0) 推荐(0) 编辑
摘要: 在使用vux scroller一定要注意 阅读全文
posted @ 2017-12-09 15:13 哆啦a梦爱吃铜锣烧 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 实时监听组件中路由的变化,通过watch来进行监听,当路由发生变化时,重新赋值,重新执行从后台获取数据的操作 watch: { '$route' (to, from) { this.listQuery.keywords=this.$route.query.keywords this.searchBy 阅读全文
posted @ 2017-12-09 14:57 哆啦a梦爱吃铜锣烧 阅读(1757) 评论(0) 推荐(0) 编辑
摘要: 定义需要用到的全局的数据 const app = { state: { isLoading: false, isHomeHeader: false, keywords: '', }, mutations: { UPDATE_LOADING(state, status) { state.isLoadi 阅读全文
posted @ 2017-12-09 14:53 哆啦a梦爱吃铜锣烧 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 对移动端滚动高度的获取 通过采用原生js的方法来实现,绑定vue中的dom元素,通过添加ref来获取,但是同名只能绑定一个,this.$refs.domName来获取, function homeScrollEvent() { const pageScrollTop = document.body. 阅读全文
posted @ 2017-12-09 14:47 哆啦a梦爱吃铜锣烧 阅读(4488) 评论(0) 推荐(0) 编辑