Skip to content

Commit

Permalink
feat: 禁用页面滑动回弹效果
Browse files Browse the repository at this point in the history
  • Loading branch information
hooray committed Jul 6, 2024
1 parent 826ce7b commit e6f4d06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/assets/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
}
}

html {
overscroll-behavior: none;
}

body {
box-sizing: border-box;
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageLayout/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function handleBackTopClick() {
</script>

<template>
<div ref="layoutRef" class="relative h-vh flex flex-col overflow-auto supports-[(height:100dvh)]:h-dvh" @scroll="handleMainScroll">
<div ref="layoutRef" class="relative h-vh flex flex-col overflow-auto overscroll-none supports-[(height:100dvh)]:h-dvh" @scroll="handleMainScroll">
<!-- Navbar -->
<header
v-show="navbar ?? settingsStore.settings.navbar.enable" class="navbar w-full flex-center bg-[var(--g-navbar-bg)] text-[var(--g-navbar-color)] transition-all pt-safe h+safe-t-[var(--g-navbar-height)]" :class="{
Expand Down

0 comments on commit e6f4d06

Please sign in to comment.