Skip to content

Commit

Permalink
fix: add lockScroll prop
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterliu1003 committed Dec 26, 2021
1 parent 1ea934f commit 23b0f58
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/lib/dist/VueFinalModal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/lib/dist/VueFinalModal.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/lib/dist/VueFinalModal.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/lib/dist/VueFinalModal.umd.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions packages/lib/src/hoc/VBottomSheet.vue
Expand Up @@ -5,7 +5,7 @@
'enter-active-class': 'slideInDown',
'leave-active-class': 'slideOutDown'
}"
:lock-scroll="false"
:lock-scroll="lockScroll"
@mousedown.stop
@touchstart.stop.passive
@closed="looseFocus"
Expand Down Expand Up @@ -52,7 +52,8 @@ const props = defineProps({
return ['', 'DOWN'].includes(val) !== -1
}
},
threshold: { type: Number, default: 30 }
threshold: { type: Number, default: 30 },
lockScroll: { type: Boolean, default: false }
})
const attrs = useAttrs()
Expand Down
5 changes: 3 additions & 2 deletions packages/lib/src/hoc/VFullScreen.vue
Expand Up @@ -5,7 +5,7 @@
:transition="transition"
:content-style="[{ transform: `translateX(${-offsetX}px)` }]"
:content-class="{ 'vfm-transition': !isSwiping }"
:lock-scroll="false"
:lock-scroll="lockScroll"
@mousedown.stop
@touchstart.stop.passive
@closed="looseFocus"
Expand Down Expand Up @@ -49,7 +49,8 @@ const props = defineProps({
return ['', 'RIGHT', 'LEFT'].includes(val) !== -1
}
},
threshold: { type: Number, default: 30 }
threshold: { type: Number, default: 30 },
lockScroll: { type: Boolean, default: false }
})
const attrs = useAttrs()
Expand Down

0 comments on commit 23b0f58

Please sign in to comment.