Authored by Tao

add channel pullDownRefresh

@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 @scroll="scrollHandler" 9 @scroll="scrollHandler"
10 :options="options" 10 :options="options"
11 @pulling-up="onPullingUp" 11 @pulling-up="onPullingUp"
  12 + @pulling-down="onPullingDown"
12 :data="productList.list"> 13 :data="productList.list">
13 <div class="channel-body" ref="body"> 14 <div class="channel-body" ref="body">
14 <div ref="topSource" class="channel-html"> 15 <div ref="topSource" class="channel-html">
@@ -53,10 +54,15 @@ export default { @@ -53,10 +54,15 @@ export default {
53 data() { 54 data() {
54 return { 55 return {
55 options: { 56 options: {
56 - bounce: {  
57 - top: false  
58 - },  
59 - pullUpLoad: true 57 + // bounce: {
  58 + // top: false
  59 + // },
  60 + scrollbar: true,
  61 + pullUpLoad: true,
  62 + pullDownRefresh: true,
  63 + pullDownRefresh: {
  64 + txt: '刷新成功',
  65 + }
60 }, 66 },
61 scrollEvents: ['scroll'], 67 scrollEvents: ['scroll'],
62 scrollY: 0, 68 scrollY: 0,
@@ -129,7 +135,11 @@ export default { @@ -129,7 +135,11 @@ export default {
129 this.params.isReset = false 135 this.params.isReset = false
130 await this.fetchProductList(this.params); 136 await this.fetchProductList(this.params);
131 } 137 }
132 - } 138 + },
  139 + onPullingDown() {
  140 + this.params.isReset = true
  141 + this.fetchProductList(this.params);
  142 + },
133 }, 143 },
134 components: { 144 components: {
135 Swiper, 145 Swiper,