会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Wayhome😲
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
7
8
9
10
11
12
13
下一页
2020年8月5日
【Vue-bug】[Vue warn]: Computed property "isCheckedAll" was assigned to but it has no setter.
摘要: 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'
阅读(1180)
评论(0)
推荐(0)
2020年8月4日
Vuex个人总结笔记
摘要: 一、官网图 大管家先生:什么是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'
阅读(452)
评论(0)
推荐(1)
2020年8月3日
vuex中的mapGetters、mapActions、mapState辅助函数的使用(映射getters、actions、state)
摘要: 一、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'
阅读(1352)
评论(0)
推荐(0)
vue组件使用base.css里定义的变量
摘要: //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'
阅读(1010)
评论(0)
推荐(0)
2020年8月2日
【Vue-bug】-Error in nextTick: "TypeError: Cannot read property '$el' of undefined"
摘要: ###加上if判断,先判断是否存在,否则不执行 this.getTitleTopY = debounce(() => { if (this.$refs.param && this.$refs.comment && this.$refs.goodsList) { this.$nextTick(() =
阅读全文
posted @ 2020-08-02 22:56 Wayhome'
阅读(13213)
评论(0)
推荐(1)
Vue组件利用better-scroll滚动时,offsetTop高度计算问题
摘要: ##一、原因 ###1.下面的nextTick函数,当数据更新了,在dom中渲染后,自动执行该函数; ###2.由于dom渲染完后,图片还未加载完,只占了个坑(目前获取的offsetTop未包括图片),所以offsetTop高度会出现偏差; ###3.offsetTop高度不对时,大多数是图片高度问
阅读全文
posted @ 2020-08-02 11:16 Wayhome'
阅读(2439)
评论(0)
推荐(0)
Vue-$nextTick使用
摘要: ##链接:$nextTick使用
阅读全文
posted @ 2020-08-02 09:56 Wayhome'
阅读(122)
评论(0)
推荐(0)
Vue模板-vue.json
摘要: ##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'
阅读(639)
评论(0)
推荐(0)
2020年8月1日
Vue事件总线:this.$bus.$emit与this.$bus.$on
摘要: 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'
阅读(13462)
评论(0)
推荐(1)
$router 和 $route的区别
摘要: 链接:https://www.cnblogs.com/czy960731/p/9288830.html 链接:https://blog.csdn.net/wangguoyu1996/article/details/80628135
阅读全文
posted @ 2020-08-01 20:06 Wayhome'
阅读(173)
评论(0)
推荐(0)
上一页
1
···
7
8
9
10
11
12
13
下一页
公告
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css