Authored by 陈峰

Revert "商品列表ios灵敏度"

This reverts commit 924d3a84
... ... @@ -34,7 +34,6 @@ import Vue from 'vue';
import lazyload from 'vue-lazyload';
import infinitScroll from 'vue-infinite-scroll';
import bus from 'common/vue-bus';
import yoho from 'yoho';
Vue.use(lazyload, { preLoad: 3 });
Vue.use(infinitScroll);
... ... @@ -42,9 +41,7 @@ Vue.use(infinitScroll);
export default {
data() {
return {
hrefClass: {
'no-link': false
}
hrefClass: {}
};
},
props: {
... ... @@ -64,20 +61,9 @@ export default {
mounted() {
const $scrollEl = this.getScrollEventTarget(this.$el);
if (yoho.isiOS) {
$scrollEl.addEventListener('touchmove', this.touchmove);
$scrollEl.addEventListener('touchend', this.touchend);
} else {
$scrollEl.addEventListener('scroll', this.throttle(this.scrollEnd, 200));
}
$scrollEl.addEventListener('scroll', this.throttle(this.scrollEnd, 200));
},
methods: {
touchmove() {
this.hrefClass['no-link'] = true;
},
touchend() {
this.hrefClass['no-link'] = false;
},
fetch: function() {
bus.$emit('list.paging');
},
... ... @@ -85,7 +71,7 @@ export default {
this.$emit('click-product', item, index);
},
scrollEnd() {
this.hrefClass['no-link'] = false;
this.hrefClass = {};
},
getScrollEventTarget(element) {
let getComputedStyle = document.defaultView.getComputedStyle;
... ... @@ -109,7 +95,10 @@ export default {
clearTimeout(timer);
timer = null;
}
this.hrefClass['no-link'] = true;
this.hrefClass = {
'no-link': true
};
timer = setTimeout(() => {
fn();
}, delay);
... ...