两个 scroll-view 同时设置了 scroll-y="true" 为什么只有一个滚动条?
发布于 6 年前 作者 daiping 9302 次浏览 来自 官方Issues

请大牛们帮忙研究一下

<view class=“cates”>

<searchinput></searchinput>

<view class=“cates_container”>

<!–左侧菜单栏–>

<scroll-view scroll-y=“true” class=“left_menu”>

<view class=“menu_item {{curNav===item.catId?‘active’:’’}}”

wx:for="{{zongcatList}}"

wx:key="*this"

bindtap=“handleItemTap”

data-index="{{index}}"

data-id="{{item.catId}}"

>

{{item.catName}}

</view>

</scroll-view>

<!–右侧商品内容–>

<scroll-view scroll-y=“true” class=“right_content”>

<view class=“goods_group”

wx:for="{{zongcatList[curindex].rcatlist}}"

wx:for-item=“item1”

wx:key=“index”

>

<view class=“goods_title”>

<text class=“title_name”>{{item1.catName}}</text>

</view>

<view class=“goods_list”>

<navigator

wx:for="{{item1.catList}}"

wx:for-item=“item2”

wx:key=“catId”

>

<image mode=“widthFix” src="{{item2.catUrl}}"></image>

</navigator>

</view>

</view>

</scroll-view>

</view>

</view>

page {

height: 100%;

}

.cates {

height: 100%;

}

.cates_container {

height: clac(100vh - 180rpx);

display: flex;

}

.left_menu {

flex: 2;

}

.menu_item {

height: 80rpx;

display: flex;

justify-content: center;

align-items: center;

font-size: 30rpx;

}

.active{

color: var(–themeColor);

border-left: 5rpx solid currentColor;

background: #F8F8FF;

}

.right_content {

flex: 5;

background: #F8F8FF;

}

.goods_title {

height: 80rpx;

display: flex;

justify-content: center;

padding: 20rpx 0rpx;

}

.title_name{

color:#12f334;

font-size: 12px;

}

.goods_list {

display: flex;

flex-wrap: wrap;

}

.goods_list navigator {

width: 33.33%;

text-align: center;

}

.goods_list navigator image {

width: 50%;

}

回到顶部