Authored by 陈峰

commit

1 <template> 1 <template>
2 - <div style="height: 100%; background-color: #f0f0f0;">  
3 - <ScrollView class="scroll-view" :data="ufoList" :options="scrollOptions" v-if="ufoList.length">  
4 - <CouponItem :item="item" v-for="(item, index) in ufoList" :key ="index"></CouponItem>  
5 - </ScrollView>  
6 - <Empty v-else></Empty> 2 + <div class="coupon-page">
  3 + <ScrollView class="scroll-view" :data="ufoList" :options="scrollOptions" v-if="ufoList.length">
  4 + <CouponItem :item="item" v-for="(item, index) in ufoList" :key ="index"></CouponItem>
  5 + </ScrollView>
  6 + <Empty v-else></Empty>
7 </div> 7 </div>
8 </template> 8 </template>
9 9
@@ -25,7 +25,6 @@ export default { @@ -25,7 +25,6 @@ export default {
25 return { 25 return {
26 scrollOptions: { 26 scrollOptions: {
27 directionLockThreshold: 0, 27 directionLockThreshold: 0,
28 - bounce: true  
29 } 28 }
30 }; 29 };
31 }, 30 },
@@ -51,7 +50,14 @@ export default { @@ -51,7 +50,14 @@ export default {
51 </script> 50 </script>
52 51
53 <style lang="scss" scoped> 52 <style lang="scss" scoped>
  53 +.coupon-page {
  54 + width: 100%;
  55 + height: 100%;
  56 + display: flex;
  57 + flex-direction: column;
  58 +
54 .scroll-view { 59 .scroll-view {
55 - height: calc(100% - 90px); 60 + flex: 1;
56 } 61 }
  62 +}
57 </style> 63 </style>