cover-view的overflow-y: scroll滚动无效?
发布于 5 年前 作者 yanyi 4244 次浏览 来自 官方Issues

<cover-view class=“content” >

<cover-view class=“chat” id=“chat” sroll-top="{{srollTop}}" >

<cover-view id=“bianjie”>

<cover-view class=“chatItem” wx:for="{{chatList}}" wx:for-item=“chat” wx:key>

<cover-view class=“chatName”>{{chat.name}}:</cover-view>

<cover-view class=“chatContent”>{{chat.content}}</cover-view>

</cover-view>

</cover-view>

</cover-view>

</cover-view>


下面是样式:

.content {

height: 100%;

width: 100%;

display: flex;

}

.chat {

display: flex;

position: absolute;

bottom: 0;

left: 0;

height: 30%;

width: 90%;

border: solid;

overflow-y: scroll;

flex-direction: column-reverse;

}

.chatItem {

display: flex;

overflow: hidden;

width: 100%;

}

.chatName {

width: 10%;

}

.chatContent {

width: 90%;

word-wrap: break-word;

word-break: break-all;

white-space: pre-wrap;

}

预期效果:有滚动条

代码片段:https://developers.weixin.qq.com/s/OgnHG9mo7FbY

3 回复

你好,麻烦具体描述问题流程,提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部