Revert "品牌列表灵敏度"
This reverts commit 2317447b
Showing
1 changed file
with
2 additions
and
53 deletions
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <div class="index"><a :href="'#' + item.index" :id="item.index" :name="item.index">{{item.index}}</a></div> | 4 | <div class="index"><a :href="'#' + item.index" :id="item.index" :name="item.index">{{item.index}}</a></div> |
5 | <div class="brand-big-box clearfix"> | 5 | <div class="brand-big-box clearfix"> |
6 | <div class="brand-box" v-for="brand in item.brands" :key="brand.name"> | 6 | <div class="brand-box" v-for="brand in item.brands" :key="brand.name"> |
7 | - <a v-brand-href="brand.domain" :class="hrefClass"> | 7 | + <a v-brand-href="brand.domain"> |
8 | <span class="brand-name">{{brand.name}}</span> | 8 | <span class="brand-name">{{brand.name}}</span> |
9 | </a> | 9 | </a> |
10 | </div> | 10 | </div> |
@@ -110,7 +110,6 @@ | @@ -110,7 +110,6 @@ | ||
110 | import bus from 'common/vue-bus'; | 110 | import bus from 'common/vue-bus'; |
111 | import tip from 'common/tip'; | 111 | import tip from 'common/tip'; |
112 | import indexList from 'component/tool/index-list.vue'; | 112 | import indexList from 'component/tool/index-list.vue'; |
113 | - import yoho from 'yoho'; | ||
114 | 113 | ||
115 | export default { | 114 | export default { |
116 | props: ['channel'], | 115 | props: ['channel'], |
@@ -119,9 +118,6 @@ | @@ -119,9 +118,6 @@ | ||
119 | brandList: [], | 118 | brandList: [], |
120 | indexList: [], | 119 | indexList: [], |
121 | currentChannel: this.channel, | 120 | currentChannel: this.channel, |
122 | - hrefClass: { | ||
123 | - 'no-link': false | ||
124 | - } | ||
125 | }; | 121 | }; |
126 | }, | 122 | }, |
127 | watch: { | 123 | watch: { |
@@ -158,43 +154,6 @@ | @@ -158,43 +154,6 @@ | ||
158 | } | 154 | } |
159 | window.scrollTo(0, top); | 155 | window.scrollTo(0, top); |
160 | } | 156 | } |
161 | - }, | ||
162 | - touchmove() { | ||
163 | - this.hrefClass['no-link'] = true; | ||
164 | - }, | ||
165 | - touchend() { | ||
166 | - this.hrefClass['no-link'] = false; | ||
167 | - }, | ||
168 | - scrollEnd() { | ||
169 | - this.hrefClass['no-link'] = false; | ||
170 | - }, | ||
171 | - getScrollEventTarget(element) { | ||
172 | - let getComputedStyle = document.defaultView.getComputedStyle; | ||
173 | - let currentNode = element; | ||
174 | - | ||
175 | - while (currentNode && currentNode.tagName !== 'HTML' && currentNode.tagName !== 'BODY' && currentNode.nodeType === 1) { | ||
176 | - let overflowY = getComputedStyle(currentNode).overflowY; | ||
177 | - | ||
178 | - if (overflowY === 'scroll' || overflowY === 'auto') { | ||
179 | - return currentNode; | ||
180 | - } | ||
181 | - currentNode = currentNode.parentNode; | ||
182 | - } | ||
183 | - return window; | ||
184 | - }, | ||
185 | - throttle(fn, delay) { | ||
186 | - let timer; | ||
187 | - | ||
188 | - return () => { | ||
189 | - if (timer) { | ||
190 | - clearTimeout(timer); | ||
191 | - timer = null; | ||
192 | - } | ||
193 | - this.hrefClass['no-link'] = true; | ||
194 | - timer = setTimeout(() => { | ||
195 | - fn(); | ||
196 | - }, delay); | ||
197 | - }; | ||
198 | } | 157 | } |
199 | }, | 158 | }, |
200 | components: { | 159 | components: { |
@@ -206,16 +165,6 @@ | @@ -206,16 +165,6 @@ | ||
206 | this.currentChannel = channel; | 165 | this.currentChannel = channel; |
207 | this.getBrandList(); | 166 | this.getBrandList(); |
208 | }); | 167 | }); |
209 | - }, | ||
210 | - mounted() { | ||
211 | - const $scrollEl = this.getScrollEventTarget(this.$el); | ||
212 | - | ||
213 | - if (yoho.isiOS) { | ||
214 | - $scrollEl.addEventListener('touchmove', this.touchmove); | ||
215 | - $scrollEl.addEventListener('touchend', this.touchend); | ||
216 | - } else { | ||
217 | - $scrollEl.addEventListener('scroll', this.throttle(this.scrollEnd, 200)); | ||
218 | - } | ||
219 | - }, | 168 | + } |
220 | }; | 169 | }; |
221 | </script> | 170 | </script> |
-
Please register or login to post a comment