1 包裹scroll-view 的view z-index 设置(需设置position属性,否则可能会产生图层移动)
设置 absolute; top;auto;===原先的top位置
z-index生效原则,只对相同有position属性的组件生效,不对staic生效。单独的position
<!-- location content -->
<view style="position: absolute;top: auto; width: 97%;;margin: 0 1.5%;background-color: #DDD;border-radius:0 0 6px 6px;z-index:1000;display: {{displayAdderss}};" >
<scroll-view style="height: 160px;" scroll-y="true" >
<view bindtap='selectAddress' data-index="{{index}}" wx:for="{{choice}}" wx:key="index" style="padding: 5px 10px; border-bottom: 1px solid white;overflow: hidden;text-overflow: ellipsis;font-size: 13px;" >
<text style="white-space: nowrap;display: block;">{{item.name}} {{item.phone}}</text>
<text style="white-space: nowrap;margin-top: 5dp;">{{item.ress}}</text>
</view>
</scroll-view>
</view>