diff --git a/src/components/custom/BetterScroll/index.vue b/src/components/custom/BetterScroll/index.vue index db2ebab1..a53a5bef 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 0e24cf1c..1300bdf2 100644 --- a/src/components/custom/IconClose/index.vue +++ b/src/components/custom/IconClose/index.vue @@ -6,8 +6,8 @@ @mouseleave="setFalse" > - - + +