fix(TreeSelect): use scroll-view to prevent page scroll event @rex-zsd (#867)

This commit is contained in:
rex 2018-11-06 19:11:36 +08:00 committed by neverland
parent 58c5d2f54d
commit 16b569971f
2 changed files with 7 additions and 8 deletions

View File

@ -11,9 +11,7 @@
left: 0;
top: 0;
bottom: 0;
overflow: scroll;
background-color: @white;
-webkit-overflow-scrolling: touch;
}
&__nitem {
@ -32,10 +30,10 @@
}
&__content {
width: 65%;
padding: 0 15px;
margin-left: 35%;
overflow: scroll;
-webkit-overflow-scrolling: touch;
box-sizing: border-box;
}
&__item {

View File

@ -2,7 +2,7 @@
class="van-tree-select"
style="height: {{ mainHeight }}px"
>
<view class="van-tree-select__nav">
<scroll-view scroll-y class="van-tree-select__nav">
<view
wx:for="{{ items }}"
wx:key="index"
@ -12,8 +12,9 @@
>
{{ item.text }}
</view>
</view>
<view
</scroll-view>
<scroll-view
scroll-y
class="van-tree-select__content"
style="height: {{ itemHeight }}px"
>
@ -31,5 +32,5 @@
class="van-tree-select__selected"
/>
</view>
</view>
</scroll-view>
</view>