1 parent 8128650 commit 69f993eCopy full SHA for 69f993e
2 files changed
components/uni-segmented-control/uni-segmented-control.vue
@@ -54,9 +54,10 @@
54
this.currentIndex = this.current
55
},
56
methods: {
57
- _onClick(index) {
+ _onClick(index) {
58
if (this.currentIndex !== index) {
59
- this.currentIndex = index
+ this.currentIndex = index
60
+
61
this.$emit('clickItem', {
62
currentIndex: index
63
})
@@ -117,4 +118,4 @@
117
118
line-height: 20px;
119
text-align: center;
120
}
-</style>
121
+</style>
pages/extUI/segmented-control/segmented-control.nvue
@@ -70,7 +70,8 @@
70
71
72
73
- onClickItem(index) {
+ onClickItem(index) {
74
+ console.log(index);
75
if (this.current !== index) {
76
this.current = index
77
0 commit comments