게시물 목록 페이지 전환 로딩 수정
This commit is contained in:
@@ -33,6 +33,25 @@ export const shouldUseSiteRouteVeil = (path) => {
|
||||
return !clean.startsWith('/admin')
|
||||
}
|
||||
|
||||
/**
|
||||
* 라우터 이동에서 공개 전환 베일을 시작할지 판별한다.
|
||||
* 같은 페이지 컴포넌트의 query/hash 이동은 Nuxt page finish가 발생하지 않을 수 있어 베일을 쓰지 않는다.
|
||||
* @param {{ fullPath?: string, path?: string }} to - 이동 대상 라우트
|
||||
* @param {{ fullPath?: string, path?: string }} from - 이전 라우트
|
||||
* @returns {boolean} 전환 베일 시작 여부
|
||||
*/
|
||||
export const shouldStartSiteRouteVeilNavigation = (to, from) => {
|
||||
if (to?.fullPath === from?.fullPath) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (to?.path === from?.path) {
|
||||
return false
|
||||
}
|
||||
|
||||
return shouldUseSiteRouteVeil(to?.path) || shouldUseSiteRouteVeil(from?.path)
|
||||
}
|
||||
|
||||
/**
|
||||
* 문서 스크롤을 최상단으로 이동한다.
|
||||
* @returns {void}
|
||||
|
||||
Reference in New Issue
Block a user