mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
fix(TreeSelect): use scroll-view to prevent page scroll event @rex-zsd (#867)
This commit is contained in:
parent
58c5d2f54d
commit
16b569971f
@ -11,9 +11,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
overflow: scroll;
|
|
||||||
background-color: @white;
|
background-color: @white;
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__nitem {
|
&__nitem {
|
||||||
@ -32,10 +30,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__content {
|
&__content {
|
||||||
|
width: 65%;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
margin-left: 35%;
|
margin-left: 35%;
|
||||||
overflow: scroll;
|
box-sizing: border-box;
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
class="van-tree-select"
|
class="van-tree-select"
|
||||||
style="height: {{ mainHeight }}px"
|
style="height: {{ mainHeight }}px"
|
||||||
>
|
>
|
||||||
<view class="van-tree-select__nav">
|
<scroll-view scroll-y class="van-tree-select__nav">
|
||||||
<view
|
<view
|
||||||
wx:for="{{ items }}"
|
wx:for="{{ items }}"
|
||||||
wx:key="index"
|
wx:key="index"
|
||||||
@ -12,8 +12,9 @@
|
|||||||
>
|
>
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
<view
|
<scroll-view
|
||||||
|
scroll-y
|
||||||
class="van-tree-select__content"
|
class="van-tree-select__content"
|
||||||
style="height: {{ itemHeight }}px"
|
style="height: {{ itemHeight }}px"
|
||||||
>
|
>
|
||||||
@ -31,5 +32,5 @@
|
|||||||
class="van-tree-select__selected"
|
class="van-tree-select__selected"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user