<template>
<view>
<view class="zh-wrapper">
<scroll-view scroll-y style="width: 250rpx;height: 100%;touch-action:none;">
</scroll-view>
<scroll-view scroll-y style="flex: 1;height: 100%;overflow: hidden;background-color: #ffffff;">
<view v-for="(item,index) in list">
<comter></comter>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import comter from './comter.vue'
export default {
data() {
return {
list: [1, 2, 3, 4, 5, 6, 7, 8, 9]
}
},
components: {
comter
}
}
</script>
<template>
<view>
<view @click="$refs.explainPopup.open()"> 11111111</view>
<view @click="$refs.explainPopup.open()"> 11111111</view>
<view @click="$refs.explainPopup.open()"> 11111111</view>
<view @click="$refs.explainPopup.open()"> 11111111</view>
<view @click="$refs.explainPopup.open()"> 11111111</view>
<uni-popup ref="explainPopup" type="center">
<view class="anstistop">
<image class="antistop_title_image" src="/static/app/model/top_banner.png"></image>
<view class="antistop_title_div">
<text class="antistop_title">
提示
</text>
</view>
<view class="antistop_center">
<text class="antistop_center_text">
{{12121212121212121}}
</text>
</view>
<view class="p-btn" @click="close">
<text class="new_antistop_bottom">我知道了</text>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
</script>
<style>
.anstistop {
width: 286px;
padding-bottom: 1px;
background-color: white;
border-radius: 8px;
}
.antistop_title_div {
border-radius: 8px;
position: relative;
justify-content: center;
display: flex;
flex-direction: row;
}
.antistop_title {
padding: 20px 0 9px 0;
text-align: center;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #283040;
}
.antistop_title_image {
position: absolute;
width: 286px;
height: 98rpx;
left: 0;
}
.antistop_center {
/* #ifndef APP-NVUE */
max-height: 335px;
/* #endif */
width: 286px;
padding: 0rpx 28rpx 24rpx 28rpx;
/* margin-bottom: 24rpx; */
}
.scroll_h {
height: 335px;
}
.antistop_center_header {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 12px;
}
.antistop_center_header_left {
width: 4px;
height: 15px;
border-radius: 10px;
background: #1677FF;
margin-right: 6px;
}
.antistop_center_header_text {
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #283040;
}
.antistop_center_text_div {
width: 258px;
}
.antistop_center_text {
/* width: 258px; */
margin-top: 8px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4C5567;
text-align: left !important;
}
.p-btn {
width: 246px;
height: 42px;
background: #1778FF;
border-radius: 4px;
margin: 20px;
justify-content: center;
display: flex;
flex-direction: row;
}
.new_antistop_bottom {
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
text-align: center;
line-height: 42px;
}
</style>
2 个回复
爱豆豆 - 办法总比困难多
可以把uni-popup放到父级页面中
comter组件内点击后触发自定义事件
父级页面监听并打开uni-popup组件
这样就不会被包裹在scroll-view中了
DCloud_UNI_OttoJi - 日常回复 uni-app/x 问题,如果艾特我没看到,请主动私信
这个问题的确奇怪,相同的产物在 ios 上表现不一致,目前看到 ios 中 overflow-y 的表现比较特殊,你给你的 right scroll-view 添加一个 right-view 的 class name