Skip to content

Commit ebc82a8

Browse files
authored
fix(elevator): resolve error while switching index and selection (#3282)
* fix(elevator): resolve error while switching index and selection * fix: test * fix: test * fix: test * fix: test * fix: test * fix: test * fix: test
1 parent 45ba047 commit ebc82a8

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

pnpm-lock.yaml

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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">

src/packages/__VUE/watermark/__tests__/watermark.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'vitest-canvas-mock'
55

66
test('WaterMark: fullPage = true', async () => {
77
const wrapper = mount(() => {
8-
return <Watermark font-color="#fa2c19" content="nut-ui"></Watermark>
8+
return <Watermark fontColor="#fa2c19" content="nut-ui"></Watermark>
99
})
1010
await nextTick()
1111

0 commit comments

Comments
 (0)