123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
-
- <view class="uni-list">
- <slot />
- </view>
-
-
- <list class="uni-list" :enableBackToTop="enableBackToTop" loadmoreoffset="15" :scroll-y="scrollY" @loadmore="loadMore">
- <slot />
- </list>
-
- </template>
- <script>
-
- export default {
- name: 'UniList',
- 'mp-weixin': {
- options: {
- multipleSlots: false
- }
- },
- props: {
- enableBackToTop: {
- type: [Boolean, String],
- default: false
- },
- scrollY: {
- type: [Boolean, String],
- default: false
- }
- },
- provide() {
- return {
- list: this
- }
- },
- created() {
- this.firstChildAppend = false
- },
- methods: {
- loadMore(e) {
- this.$emit("scrolltolower");
- }
- }
- }
- </script>
- <style scoped>
- .uni-list {
-
- display: flex;
-
- background-color: #ffffff;
- position: relative;
- flex-direction: column;
-
-
-
- }
-
- .uni-list:before {
- height: 0;
- }
- .uni-list:after {
- height: 0;
- }
-
- </style>
|