Skip to content

Commit

Permalink
style: 💄 VideoPreview视频预览组件H5端打开时阻止滚动穿透
Browse files Browse the repository at this point in the history
  • Loading branch information
xuqingkai committed Jul 17, 2024
1 parent 825ea9b commit ecf03c3
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default {
<script lang="ts" setup>
import { nextTick, reactive, ref } from 'vue'
import { videoPreviewProps, type PreviewVideo, type VideoPreviewExpose } from './types'
import useLockScroll from '../composables/useLockScroll'
defineProps(videoPreviewProps)
const showPopup = ref<boolean>(false)
Expand All @@ -56,6 +57,10 @@ function handleClosed() {
previdewVideo.title = ''
}
// #ifdef H5
useLockScroll(() => showPopup.value)
// #endif
defineExpose<VideoPreviewExpose>({
open,
close
Expand Down

0 comments on commit ecf03c3

Please sign in to comment.