fix(TreeSelect): support set mainActiveIndex dynamic (#2471)

fix #2444
This commit is contained in:
rex 2019-12-05 10:11:30 +08:00 committed by GitHub
parent fe87464eba
commit 1ad701db23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
style="height: {{ innerHeight }}"
>
<scroll-view scroll-y class="van-tree-select__nav">
<van-sidebar bind:change="onClickNav" custom-class="van-tree-select__nav__inner">
<van-sidebar active-key="{{ mainActiveIndex }}" bind:change="onClickNav" custom-class="van-tree-select__nav__inner">
<van-sidebar-item
wx:for="{{ items }}"
wx:key="index"