收藏
回答

skyline模式下用scroll-view的custom无法进行滑动是什么问题?

<scroll-view
  type="custom"
  scroll-y="true"
  show-scrollbar="{{true}}"
  scroll-into-view="{{intoView}}"
  class="scroll-view"
  bindscrolltolower="bindscrolltolower"
  style="margin-top: {{menuTop}}px;"
>
<grid-view type="masonry" cross-axis-count="{{crossAxisCount}}" cross-axis-gap="{{crossAxisGap}}" main-axis-gap="{{mainAxisGap}}">
      <view wx:for="{{list}}" class="grid-box">
        <image src="{{item.image_url}}" mode="widthFix" binderror="binderror"></image>
        <view class="content-box">
          <text>这里的风景好美~</text>
          <view class="profile-text">
            <view class="left">
              <image class="icon" src="https://res.wx.qq.com/op_res/lS41C5Xp6y6mfUbelCW8PArEcMwWRuhSohPO46vAiELbhAf56_CwONEDgM2vIVxOlT5KDcSxCkV8xIJ6cg3x2Q"></image>
              <text>binnie</text>
            </view>
            <view class="right">
              <image class="icon-collection" src="https://res.wx.qq.com/community/dist/community/images/disagree_icon_fab2b7.svg"></image>
              <text>666</text>
            </view>
          </view>
        </view>
      </view>
    </grid-view>
</scroll-view>

代码片段如下:

https://developers.weixin.qq.com/s/xUAMS9mv7OIz

回答关注问题邀请回答
收藏

1 个回答

  • 黄思程
    黄思程
    2023-05-15

    scroll-view 要给高度,加个 height: 100vh 试试

    2023-05-15
    有用
    回复
登录 后发表内容