Skip to content

Commit

Permalink
fix: 优化popup等对禁止背景滚动机制
Browse files Browse the repository at this point in the history
  • Loading branch information
jry committed Dec 5, 2024
1 parent 0a77879 commit c6eaac7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"clipboard": "^2.0.11",
"dayjs": "^1.11.8",
"vue": "3.5.13",
"vue-i18n": "9.14.1",
"vue-i18n": "9.1.9",
"vuex": "^4.1.0"
},
"devDependencies": {
Expand Down
14 changes: 9 additions & 5 deletions src/pages/componentsA/popup/popup.nvue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
></image>
</template>
</up-cell>
</up-cell-group>
</up-cell-group>
<view v-for="item in 50">
<view class="u-p-l-10" style="height: 20px;"></view>
</view>
<up-popup
:safeAreaInsetBottom="true"
:safeAreaInsetTop="true"
Expand All @@ -44,16 +47,17 @@
>
<view
class="u-popup-slot"
:style="{
:style="{
padding: '12px',
width: ['bottom', 'top'].includes(popupData.mode) ? '750rpx' : '200px',
marginTop: ['left', 'right'].includes(popupData.mode) ? '480rpx' : '0',
}"
>
<view style="height: 12vh;overflow-y: scroll;margin-bottom: 10px;">
<scroll-view scroll-y enable-flex style="width: 120px;height: 80px;margin-bottom: 10px;">
<view v-for="i in 30">
列表滚动{[i]}
列表滚动{{i}}
</view>
</view>
</scroll-view>
<view>
<up-button
type="success"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:duration="duration"
:custom-style="overlayStyle"
@click="clickHandler"
@touchmove.stop.prevent="noop"
>
<slot />
</u-transition>
Expand Down
2 changes: 1 addition & 1 deletion src/uni_modules/uview-plus/components/u-popup/u-popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<view
class="u-popup__content"
:style="[contentStyle]"
@tap.stop="noop"
@touchmove.stop.prevent="noop"
>
<u-status-bar v-if="safeAreaInsetTop"></u-status-bar>
<slot></slot>
Expand Down

0 comments on commit c6eaac7

Please sign in to comment.