提交 f8324a89 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

Revert "refactor(uni-stat): remove ts-ignore"

上级 395fc4f1
...@@ -227,10 +227,12 @@ export const get_page_name = (routepath : string) : string => { ...@@ -227,10 +227,12 @@ export const get_page_name = (routepath : string) : string => {
let page_now = pages.find((p): boolean => p.route == routepath) let page_now = pages.find((p): boolean => p.route == routepath)
if (page_now == null) { if (page_now == null) {
return '' return ''
} }
// @ts-ignore
page = page_now.vm! page = page_now.vm!
} }
// @ts-ignore
const pageStyle = (page.$page as UniPage).getPageStyle() const pageStyle = (page.$page as UniPage).getPageStyle()
const titleText = pageStyle['navigationBarTitleText'] ?? '' const titleText = pageStyle['navigationBarTitleText'] ?? ''
return titleText as string return titleText as string
...@@ -245,7 +247,8 @@ export const get_page_vm = () : Page | null => { ...@@ -245,7 +247,8 @@ export const get_page_vm = () : Page | null => {
return null return null
} }
let page = pages[pages.length - 1] let page = pages[pages.length - 1]
// TODO 正常来说,调用当前方法的地方只在 生命周期内,数组内最少会有一个页面,所以理论上是不存在获取不到的情况的 // TODO 正常来说,调用当前方法的地方只在 生命周期内,数组内最少会有一个页面,所以理论上是不存在获取不到的情况的
// @ts-ignore
return page.vm return page.vm
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册