list.vue 656 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <BillListView ref="viewRef" :module-key="moduleKey" />
  3. </template>
  4. <script setup lang="ts">
  5. /**
  6. * 报表列表页壳(只读):module 参数驱动
  7. */
  8. import { ref } from 'vue'
  9. import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
  10. import BillListView from '@/modules/bill/BillListView.vue'
  11. const moduleKey = ref('')
  12. const viewRef = ref<InstanceType<typeof BillListView> | null>(null)
  13. onLoad((options) => {
  14. moduleKey.value = options?.module || ''
  15. })
  16. onReachBottom(() => {
  17. viewRef.value?.loadMore()
  18. })
  19. onPullDownRefresh(async () => {
  20. await viewRef.value?.refresh()
  21. uni.stopPullDownRefresh()
  22. })
  23. </script>