qa-prevention-xgf-app/components/list/list.vue

38 lines
655 B
Vue
Raw Permalink Normal View History

2024-08-08 11:08:55 +08:00
<template>
<view v-if="list.length > 0">
<view class="list">
<u-list @scrolltolower="selfScrollToLower" style="box-sizing: border-box;">
2024-08-08 11:08:55 +08:00
<u-list-item v-for="(item, index) in list" :key="index" style="border-bottom: none; padding: 0rpx;">
<view class="item">
<slot :item="item" :index="index" />
</view>
</u-list-item>
</u-list>
</view>
</view>
<empty v-else />
</template>
<script>
export default {
props: {
list: {
type: Array,
required: true,
},
},
data() {
return {}
},
methods: {
selfScrollToLower() {
this.$emit("scrollToLower");
},
},
};
</script>
<style scoped lang="scss"></style>