收藏
回答

scroll-view的嵌套,滑动的时候只能接收外层的回掉方法,里面的不响应

问题模块
API和组件

<scroll-view scroll-x="true" style=" white-space: nowrap; display: flex" bindscroll="scroll" >

<!--  display: inline-block-->

  <scroll-view scroll-y="true" style="height: 100%; width:100% ;display: inline-block " bindscroll="sscroll">

    <view style="background: red; width: {{item_width}}px; height: {{item_height}}px" ></view>

    <view style="background: green; width: {{item_width}}px; height: {{item_height}}px"></view>

    <view style="background: blue; width: {{item_width}}px; height: {{item_height}}px"></view>

    <view style="background: yellow; width: {{item_width}}px; height: {{item_height}}px"></view>

</scroll-view>

  <scroll-view scroll-y="true" style="height: 100%; width:100% ;display: inline-block ">

    <view style="background: yellow; width: {{item_width}}px; height: {{item_height}}px" ></view>

    <view style="background: blue; width: {{item_width}}px; height: {{item_height}}px"></view>

    <view style="background: green; width: {{item_width}}px; height: {{item_height}}px"></view>

    <view style="background: red; width: {{item_width}}px; height: {{item_height}}px"></view>

</scroll-view>

<scroll-view scroll-y="true" style="height: 100%; width:100% ;display: inline-block ">

    <view style="background: red; width: {{item_width}}px; height: {{item_height}}px" ></view>

    <view style="background: green; width: {{item_width}}px; height: {{item_height}}px "></view>

    <view style="background: blue; width: {{item_width}}px; height: {{item_height}}px"></view>

    <view style="background: yellow; width: {{item_width}}px; height: {{item_height}}px"></view>

</scroll-view>

<scroll-view scroll-y="true" style="height: 100%; width:100% ;display: inline-block ">

    <view style="background: yellow; width: {{item_width}}px; height: {{item_height}}px" ></view>

    <view style="background: blue; width: {{item_width}}px; height: {{item_height}}px"></view>

    <view style="background: green; width: {{item_width}}px; height: {{item_height}}px"></view>

    <view style="background: red; width: {{item_width}}px; height: {{item_height}}px"></view>

</scroll-view>

</scroll-view>


最后一次编辑于  2017-08-13  (未经腾讯允许,不得转载)
邀请回答
复制链接收藏投诉关注问题回答