From 8e363e6b08308db6e96901efda462b02bb39b8b4 Mon Sep 17 00:00:00 2001 From: jiangx Date: Mon, 28 Feb 2022 10:45:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=9D=A1=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/ScrollView/ScrollView.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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) {