From 93f9aa9584be803704cf0ff54c8da0f84b71c408 Mon Sep 17 00:00:00 2001 From: Soybean Date: Thu, 25 Nov 2021 01:18:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(projects):=20=E4=BF=AE=E5=A4=8D=E6=89=93?= =?UTF-8?q?=E5=8C=85=E6=9E=84=E5=BB=BA=E6=97=B6=E5=9B=BE=E6=A0=87=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/custom/BetterScroll/index.vue | 8 +++----- src/components/custom/IconClose/index.vue | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/custom/BetterScroll/index.vue b/src/components/custom/BetterScroll/index.vue index db2ebab12..a53a5bef3 100644 --- a/src/components/custom/BetterScroll/index.vue +++ b/src/components/custom/BetterScroll/index.vue @@ -14,17 +14,15 @@ import { useElementSize } from '@vueuse/core'; interface Props { /** better-scroll的配置: https://better-scroll.github.io/docs/zh-CN/guide/base-scroll-options.html */ - options?: Options; + options: Options; } -const props = withDefaults(defineProps(), { - options: undefined -}); +const props = defineProps(); const scrollbar = ref(null); const bsInstance = ref(null); const scrollbarContent = ref(null); -const isScrollY = computed(() => Boolean(props.options?.scrollY)); +const isScrollY = computed(() => Boolean(props.options.scrollY)); function initBetterScroll() { bsInstance.value = new BScroll(scrollbar.value!, props.options); diff --git a/src/components/custom/IconClose/index.vue b/src/components/custom/IconClose/index.vue index 0e24cf1c6..1300bdf2e 100644 --- a/src/components/custom/IconClose/index.vue +++ b/src/components/custom/IconClose/index.vue @@ -6,8 +6,8 @@ @mouseleave="setFalse" > - - + +