페이지 전환 깜빡임 완화 및 레이아웃 통합 (v1.10.50)
- 게시물 상세를 default 레이아웃으로 통합해 홈↔게시물 레이아웃 교체 제거 - CSS 전환 베일·스크롤 정리 플러그인으로 이동 중 깜빡임 완화 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
25
app/router.options.js
Normal file
25
app/router.options.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { setPendingScrollRestore } from '../lib/site-route-transition.js'
|
||||
|
||||
/**
|
||||
* 라우터 스크롤 동작
|
||||
* 클라이언트에서는 scrollBehavior가 직접 스크롤하지 않고,
|
||||
* 전환 베일 뒤에서 `site-page-transition.client.js`가 스크롤을 적용한다.
|
||||
* @type {import('vue-router').RouterScrollBehavior}
|
||||
*/
|
||||
export default (to, from, savedPosition) => {
|
||||
if (import.meta.server) {
|
||||
return { top: 0, left: 0 }
|
||||
}
|
||||
|
||||
if (to.hash) {
|
||||
return {
|
||||
el: to.hash
|
||||
}
|
||||
}
|
||||
|
||||
if (savedPosition) {
|
||||
setPendingScrollRestore(savedPosition)
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user