上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: isCheckedAll: function() { if (this.cartList.length 0) { return false; } else { return !this.cartList.find(item => !item.checked); } }, 改正,加入get()、set 阅读全文
posted @ 2020-08-05 21:36 Wayhome' 阅读(1162) 评论(0) 推荐(0) 编辑
摘要: 一、官网图 大管家先生:什么是vuex 二、安装使用 1.安装 npm i -s vuex 使用脚手架创建vue项目时勾上Vuex,自动配置vuex vue create 项目名称 三、划分目录结构(模块化) index.js //index.js //一般state不进行抽离 import Vue 阅读全文
posted @ 2020-08-04 11:53 Wayhome' 阅读(437) 评论(0) 推荐(1) 编辑
摘要: 一、mapGetters映射关系 getters.js文件 //getters.js export default { cartLength(state) { return state.cartList.length; }, cartList(state) { return state.cartLi 阅读全文
posted @ 2020-08-03 23:02 Wayhome' 阅读(1257) 评论(0) 推荐(0) 编辑
摘要: //base.css :root { --color-text: #666; --color-high-text: #ff5777; --color-tint: #ff8198; --color-background: #fff; --font-size: 14px; --line-height: 阅读全文
posted @ 2020-08-03 22:08 Wayhome' 阅读(986) 评论(0) 推荐(0) 编辑
摘要: ###加上if判断,先判断是否存在,否则不执行 this.getTitleTopY = debounce(() => { if (this.$refs.param && this.$refs.comment && this.$refs.goodsList) { this.$nextTick(() = 阅读全文
posted @ 2020-08-02 22:56 Wayhome' 阅读(13149) 评论(0) 推荐(1) 编辑
摘要: ##一、原因 ###1.下面的nextTick函数,当数据更新了,在dom中渲染后,自动执行该函数; ###2.由于dom渲染完后,图片还未加载完,只占了个坑(目前获取的offsetTop未包括图片),所以offsetTop高度会出现偏差; ###3.offsetTop高度不对时,大多数是图片高度问 阅读全文
posted @ 2020-08-02 11:16 Wayhome' 阅读(2368) 评论(0) 推荐(0) 编辑
摘要: ##链接:$nextTick使用 阅读全文
posted @ 2020-08-02 09:56 Wayhome' 阅读(114) 评论(0) 推荐(0) 编辑
摘要: ##Vue模板-vue.json { "Print to console": { "prefix": "vue", "body": [ "<template>", " <div class='$1'></div>", "</template>", "", "<script>", "export de 阅读全文
posted @ 2020-08-02 09:19 Wayhome' 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 1.创建Vue实例 //main.js Vue.prototype.$bus = new Vue(); 2.发射事件 //GoodsList this.$bus.$emit("aaa") 3.监听事件 //home.vue this.$bus.$on("aaa",()=>{ this.$refs.s 阅读全文
posted @ 2020-08-01 22:15 Wayhome' 阅读(13354) 评论(0) 推荐(1) 编辑
摘要: 链接:https://www.cnblogs.com/czy960731/p/9288830.html 链接:https://blog.csdn.net/wangguoyu1996/article/details/80628135 阅读全文
posted @ 2020-08-01 20:06 Wayhome' 阅读(163) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 下一页
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css