uniapp里实现reload无卡顿刷新

export function onReload() {
  let currentPath = getCurrentPages()?.pop()?.$page?.fullPath || ''
  if (currentPath) {
    uni.redirectTo({
      url: currentPath
    })
  } else {
    console.log("刷新失败,未获取到页面路由")
  }
}
posted @ 2023-11-28 09:27  huihuihero  阅读(55)  评论(0编辑  收藏  举报