Skip to content

Commit 69f993e

Browse files
committed
fix(uni-ui): 分段选择器报错
1 parent 8128650 commit 69f993e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

components/uni-segmented-control/uni-segmented-control.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@
5454
this.currentIndex = this.current
5555
},
5656
methods: {
57-
_onClick(index) {
57+
_onClick(index) {
5858
if (this.currentIndex !== index) {
59-
this.currentIndex = index
59+
this.currentIndex = index
60+
6061
this.$emit('clickItem', {
6162
currentIndex: index
6263
})
@@ -117,4 +118,4 @@
117118
line-height: 20px;
118119
text-align: center;
119120
}
120-
</style>
121+
</style>

pages/extUI/segmented-control/segmented-control.nvue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
}
7171
},
7272
methods: {
73-
onClickItem(index) {
73+
onClickItem(index) {
74+
console.log(index);
7475
if (this.current !== index) {
7576
this.current = index
7677
}

0 commit comments

Comments
 (0)