Skip to content

Commit 259f958

Browse files
committed
refactor(combined-tabs): 将js文件中的==改为===
1 parent 5600133 commit 259f958

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

dist/combined-tabs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/dist/combined-tabs/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Component({
7474
let activeKey = val,
7575
currentIndex = this.data.currentIndex;
7676
this.data.tabList.forEach((item, index) => {
77-
activeKey = !val && index == 0 ? item.key : activeKey;
77+
activeKey = !val && index === 0 ? item.key : activeKey;
7878
currentIndex = item.key === activeKey ? index : currentIndex;
7979
});
8080
this.setData({
@@ -127,7 +127,7 @@ Component({
127127
source,
128128
current
129129
} = e.detail;
130-
if (source == 'touch') {
130+
if (source === 'touch') {
131131
const currentIndex = current;
132132
const activeKey = this.data.tabList[current].key;
133133
const subCurrentIndex = this.data.tabList[currentIndex].subCurrentIndex;
@@ -145,7 +145,7 @@ Component({
145145
source,
146146
current
147147
} = e.detail;
148-
if (source == 'touch') {
148+
if (source === 'touch') {
149149
const {
150150
currentIndex,
151151
activeKey
@@ -261,4 +261,4 @@ Component({
261261
});
262262
}
263263
}
264-
});
264+
});

src/combined-tabs/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,4 +261,4 @@ Component({
261261
});
262262
}
263263
}
264-
});
264+
});

0 commit comments

Comments
 (0)