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

38 lines
623 B
Vue

<template>
<view v-if="list.length > 0">
<view class="list">
<u-list @scrolltolower="selfScrollToLower">
<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>