12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <template>
- <view class="list-page">
- <up-list @scrolltolower="scrolltolower" style="height: 100%;">
- <up-list-item v-for="(item, index) in data" :key="index" >
- <ListItem :data="item"/>
- </up-list-item>
- <up-loadmore
- :line="true"
- status="nomore"
- ></up-loadmore>
- </up-list>
-
- </view>
- </template>
- <script setup>
- import { ref, reactive } from 'vue';
- import { onLoad, onShow } from '@dcloudio/uni-app';
- import ListItem from './listItem.vue';
- const props = defineProps({
- data: {
- type: Array,
- default: [],
- },
- });
- const emit = defineEmits(['refresh']);
- const scrolltolower = () => {
- console.log('底部');
- // emit('refresh');
- };
- </script>
- <style lang="scss" scoped>
- .list-page {
- background: rgba(245, 245, 245, 1);
- padding: 12px;
- height: 100%;
- overflow-y: auto;
- .item {
- height: 120px;
- border-radius: 10px;
- background: rgba(255, 255, 255, 1);
- padding: 12px;
- }
- }
- </style>
|