Skip to content

Commit 89cf70d

Browse files
committed
fix(elevator): resolve error while switching index and selection
1 parent 45ba047 commit 89cf70d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/packages/__VUE/elevator/index.taro.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
</view>
3333
</nut-scroll-view>
3434
<view v-show="scrollY > 2 && isSticky" class="nut-elevator__list__fixed">
35-
<view class="nut-elevator__list__fixed-title">{{ indexList[currentIndex][acceptKey] }}</view>
35+
<view class="nut-elevator__list__fixed-title">{{ indexList?.[currentIndex]?.[acceptKey] }}</view>
3636
</view>
3737
<view v-show="scrollStart" v-if="indexList.length > 0" class="nut-elevator__code--current">
38-
{{ indexList[codeIndex][acceptKey] }}
38+
{{ indexList?.[codeIndex]?.[acceptKey] }}
3939
</view>
4040
<view class="nut-elevator__bars" @touchstart="touchStart" @touchmove.stop.prevent="touchMove" @touchend="touchEnd">
4141
<view class="nut-elevator__bars__inner">

src/packages/__VUE/elevator/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</view>
2323
<view v-show="scrollStart" v-if="indexList.length" class="nut-elevator__code--current">
2424
{{
25-
indexList[codeIndex][acceptKey]
25+
indexList?.[codeIndex]?.[acceptKey]
2626
}}
2727
</view>
2828
<view class="nut-elevator__bars" @touchstart="touchStart" @touchmove.stop.prevent="touchMove" @touchend="touchEnd">

0 commit comments

Comments
 (0)