flat:AI+
This commit is contained in:
26
components/NoBouncePage/NoBouncePage.vue
Normal file
26
components/NoBouncePage/NoBouncePage.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- components/NoBouncePage.vue -->
|
||||
<template>
|
||||
<view class="no-bounce-page">
|
||||
<scroll-view scroll-y :show-scrollbar="false" class="scroll-area">
|
||||
<slot />
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup></script>
|
||||
|
||||
<style scoped>
|
||||
.no-bounce-page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
overscroll-behavior: none; /* 禁止页面级回弹 */
|
||||
}
|
||||
|
||||
.scroll-area {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain; /* 禁止滚动内容回弹 */
|
||||
-webkit-overflow-scrolling: touch; /* 保留 iOS 惯性滚动 */
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user