en-list.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="list">
  3. <Blank v-if="false"></Blank>
  4. <view class="scroll-view" v-else>
  5. <scroll-view scroll-y="true" style="height: 100%;" @scrolltolower="onReachScollBottom">
  6. <slot name="listInfo"></slot>
  7. <view class="toMore" v-show="list.length<this.total">加载更多</view>
  8. </scroll-view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import Black from '@/components/en-utils/en-blank.vue'
  14. export default {
  15. components: {Blank},
  16. data() {
  17. return {
  18. list:[],
  19. page:1,
  20. total:null,
  21. status:'',
  22. }
  23. },
  24. mounted() {
  25. },
  26. methods:{
  27. onReachScollBottom(){
  28. if(this.list.length == this.total){
  29. return
  30. }else{
  31. }
  32. },
  33. },
  34. }
  35. </script>
  36. <style scoped lang="scss">
  37. .list{
  38. height: 100%;
  39. display: flex;
  40. flex-direction: column;
  41. .scroll-view{
  42. flex: 1;
  43. overflow: auto;
  44. }
  45. .toMore{
  46. color: #999;
  47. font-size: 20rpx;
  48. margin: 25rpx 0;
  49. text-align: center;
  50. }
  51. ::-webkit-scrollbar {
  52. display: none;
  53. width: 0;
  54. height: 0;
  55. background-color: transparent;
  56. }
  57. }
  58. </style>