Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
陈峰
7 years ago
Commit
dbe4a0205fbaabc19020539435c58c50baa430c2
1 parent
c4e06f30
Revert "商品列表ios灵敏度"
This reverts commit
924d3a84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
public/vue/component/product/list.vue
public/vue/component/product/list.vue
View file @
dbe4a02
...
...
@@ -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);
...
...
Please
register
or
login
to post a comment