diff --git a/src/base/ScrollView/ScrollView.vue b/src/base/ScrollView/ScrollView.vue index 39f94d1..0fe03a0 100644 --- a/src/base/ScrollView/ScrollView.vue +++ b/src/base/ScrollView/ScrollView.vue @@ -8,13 +8,13 @@ import { ref, onMounted, onBeforeUnmount, watch, computed } from 'vue' import { useStore } from '@/store' import BScroll, { BScrollInstance } from '@better-scroll/core' -import ScrollBar from '@better-scroll/scroll-bar' +import ScrollBar, { ScrollbarOptions } from '@better-scroll/scroll-bar' BScroll.use(ScrollBar) type Props = { list: any[] | string - scrollbar: boolean + scrollbar: ScrollbarOptions pullUp: boolean scrollX: boolean beforeScroll: boolean @@ -26,7 +26,9 @@ type Props = { const props = withDefaults(defineProps(), { list: () => [], - scrollbar: false, + scrollbar: () => ({ + fade: false + }), pullUp: false, scrollX: false, beforeScroll: false, @@ -52,8 +54,8 @@ const _initScroll = () => { disableMouse: false, disableTouch: false, scrollX: props.scrollX, - probeType: props.probeType - // scrollbar: props.scrollbar + probeType: props.probeType, + scrollbar: props.scrollbar }) if (props.listenScroll) {