Authored by 李奇

组件优化

... ... @@ -36,7 +36,8 @@ export default {
disX: 0,
moreSlider: '',
moreMove: '',
itemVisibleStatus: {}
itemVisibleStatus: {},
checkTimer: ''
};
},
props: {
... ... @@ -99,8 +100,11 @@ export default {
},
touchEnd(ev) {
// 手动触发父组件曝光检查
this.$parent.checkReqFromChild(this.index);
// 手动触发父组件曝光检查, touchEnd事件触发后延迟500ms检查
clearTimeout(this.checkTimer);
this.checkTimer = setTimeout(() => {
this.$parent.checkReqFromChild(this.index);
}, 500);
let wd = this.$refs.goodsList.scrollWidth - this.$refs.goodsList.offsetWidth;
let moreWd = this.$refs.more.offsetWidth;
... ...