From f8324a8951e0ceec5283fdda2cf19787a11da8a0 Mon Sep 17 00:00:00 2001 From: zhenyuWang <13641039885@163.com> Date: Wed, 11 Sep 2024 17:09:45 +0800 Subject: [PATCH] Revert "refactor(uni-stat): remove ts-ignore" --- uni_modules/uni-stat/utssdk/common/utils/pageInfo.uts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/uni_modules/uni-stat/utssdk/common/utils/pageInfo.uts b/uni_modules/uni-stat/utssdk/common/utils/pageInfo.uts index 76683d7a..5b4d211e 100644 --- a/uni_modules/uni-stat/utssdk/common/utils/pageInfo.uts +++ b/uni_modules/uni-stat/utssdk/common/utils/pageInfo.uts @@ -227,10 +227,12 @@ export const get_page_name = (routepath : string) : string => { let page_now = pages.find((p): boolean => p.route == routepath) if (page_now == null) { return '' - } + } + // @ts-ignore page = page_now.vm! } - + + // @ts-ignore const pageStyle = (page.$page as UniPage).getPageStyle() const titleText = pageStyle['navigationBarTitleText'] ?? '' return titleText as string @@ -245,7 +247,8 @@ export const get_page_vm = () : Page | null => { return null } let page = pages[pages.length - 1] - // TODO 正常来说,调用当前方法的地方只在 生命周期内,数组内最少会有一个页面,所以理论上是不存在获取不到的情况的 + // TODO 正常来说,调用当前方法的地方只在 生命周期内,数组内最少会有一个页面,所以理论上是不存在获取不到的情况的 + // @ts-ignore return page.vm } -- GitLab