diff --git a/windows/top-window.uvue b/windows/top-window.uvue index c5dcb94dbe271a9745d11fa7a1ce9a8d2156416b..c3558ee5a6d20eda408c23fcc59935c1bf95ca53 100644 --- a/windows/top-window.uvue +++ b/windows/top-window.uvue @@ -15,6 +15,11 @@ type IndexPageItem = { tabBar: string ; index: string ; + } + type OnTabItemTapEvent = { + pagePath: string ; + text: string ; + index: number ; } export default { data() { @@ -68,7 +73,8 @@ } }, methods: { - toSecondMenu(e) { + // UniEvent类型报错,临时处理 + toSecondMenu(e: OnTabItemTapEvent) { const activeTabBar = '/' + e.pagePath for (const item of this.indexPage) { if (activeTabBar === item.tabBar) {