var 关键字 1.没有块级作用域 { var a = 10; } //= 外面可以拿到 a 这个变量的值 console.log(a); //= 10 2.var 有变量提升 console.log(a); //= undefined if(true) { //= var关键字不存在块级作用域,会导致变量提升 var a = 10; } 3.var 可以重复声明 var a = 10; var a = 20 ...
使用vue实现页面中某块区域滑动到底部加载数据。 1、给要滑动的部分绑定滑动监听事件 !-- 绑定scroll滑动事件 -- div class="goodLists" @scroll="scrolltobottom" div class="goodItem" v-for="product in productList" @click="goToPage('goodsdetail',product.code)" ...