emis-sapp/components/tpx-scroll-view/tpx-scroll-view.vue

53 lines
930 B
Vue
Raw Normal View History

2023-12-06 18:53:44 +00:00
<template>
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" style="height: 100%;"
>
<slot></slot>
<!-- 加载更多 -->
<u-loadmore icon-size="28" font-size="28" margin-top="30" v-if="showLoadMore || loadedAll"
:status="loadedAll ? 'nomore' : 'loading'" />
<!-- 空数据页 -->
<view v-if="dataList.length == 0" style="padding-top: 100rpx;">
<u-empty text="无数据" :icon="getCdnUrl('kong.png')" textSize="28" width="86" height="97">
</u-empty>
</view>
</scroll-view>
</template>
<script>
export default {
props: {
dataList: {
default () {
return []
}
}
},
data() {
return {
showLoadMore: false,
loadedAll: false,
}
},
created() {
},
onHide() {
},
destroyed() {},
methods: {
onScrollBottom(){
this.$emit('onScrollBottom')
}
}
}
</script>
<style scoped lang="scss">
.sch-cont{
position: relative;
}
</style>