UNPKG

uniapp-tracing

Version:

uniapp小程序端埋点

6 lines (5 loc) 282 B
export const currentRoute = () => { const pages = getCurrentPages(); // 某些特殊情况下(比如页面进行redirectTo时的一些时机),pages可能为空数组 return pages.length && pages[pages.length - 1].$page ? pages[pages.length - 1].$page.fullPath : ""; };