初始化
This commit is contained in:
31
components/layouts/mescroll-diy.vue
Normal file
31
components/layouts/mescroll-diy.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<mescroll-body topbar="#222222" @init="mescrollInit" @down="downCallback">
|
||||
<slot></slot>
|
||||
</mescroll-body>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app';
|
||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js";
|
||||
const { mescrollInit, downCallback } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
|
||||
const props = defineProps({
|
||||
down: Object,
|
||||
up: Object,
|
||||
i18n: Object,
|
||||
top: [String, Number],
|
||||
topbar: [Boolean, String],
|
||||
bottom: [String, Number],
|
||||
safearea: Boolean,
|
||||
height: [String, Number],
|
||||
bottombar: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
sticky: Boolean
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user