解决h5不触发swiper的change事件

This commit is contained in:
TOP糯米 2023-04-14 14:55:34 +08:00
parent 1003f6f393
commit 0359c880c6
1 changed files with 7 additions and 0 deletions

View File

@ -119,7 +119,14 @@ export default {
this.switchTab(this.tabIndex);
}
if (this.currentOrderTabIndex != this.tabIndex) {
// #ifdef H5
setTimeout(() => {
this.tabIndex = this.currentOrderTabIndex;
}, 10);
// #endif
// #ifndef H5
this.tabIndex = this.currentOrderTabIndex;
// #endif
}
},
onReady() {},