Skip to content

Commit 4b34310

Browse files
committed
feat:include v-model
1 parent 01dc4c8 commit 4b34310

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vue-spring-bottom-sheet/src/BottomSheet.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { BottomSheetProps } from './types'
44
import { Motion, AnimatePresence, useMotionValue, animate } from 'motion-v'
55
import type { PanInfo } from 'motion-v'
66
7-
import { computed, nextTick, onUnmounted, ref, toRefs, watch } from 'vue'
7+
import { computed, nextTick, onUnmounted, ref, toRefs, watch , defineModel } from 'vue'
88
import { useElementBounding, useScrollLock, useWindowSize } from '@vueuse/core'
99
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
1010
import { useSnapPoints } from './composables/useSnapPoints'
@@ -29,7 +29,7 @@ const emit = defineEmits<{
2929
(e: 'instinctHeight', instinctHeight: number): void
3030
}>()
3131
32-
const showSheet = ref(false)
32+
const showSheet = defineModel({ default: false })
3333
const sheet = ref()
3434
const sheetHeader = ref<HTMLElement | null>(null)
3535
const sheetFooter = ref<HTMLElement | null>(null)

0 commit comments

Comments
 (0)