摘要: ###加上if判断,先判断是否存在,否则不执行 this.getTitleTopY = debounce(() => { if (this.$refs.param && this.$refs.comment && this.$refs.goodsList) { this.$nextTick(() = 阅读全文
posted @ 2020-08-02 22:56 Wayhome' 阅读(13150) 评论(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) 编辑
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css