Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- doker logs tail
- CrudRepository update
- Spring JPA Specification
- spring JPA DB Connection
- spring @mapper
- spring mapper
- spring repository
- 도커 컨테이너 로그
- NoArgsConstructor
- repository annotation
- mapper annotationo
- JpaRepository update
- Transactions Propagation Option
- 도커 logs
- JPA DB Connection 다중
- Data Annotation
- Vue
- spring DB Connection
- JAVA Exception 종류
- vueslot
- @Builder @NoArgsConstructor
- JPA DB 다중 Connection
- spring JPA DB multi Connection
- docker 로그
- 도커 로그 확인
- Spring
- 자바버그수정
- vuecomponent
- spring mapper annotation
- AllArgsConstructor
Archives
- Today
- Total
개발을 잘하고 싶은 개발자
[Vue] 레이아웃 커스텀 페이지 만들기 본문
참고 https://ko.nuxtjs.org/docs/2.x/directory-structure/layouts
Layouts directory
Layouts are a great help when you want to change the look and feel of your Nux app. Whether you want to include a sidebar or have distinct layouts for mobile and desktop.
ko.nuxtjs.org
기본적인 디폴트 페이지 (default.vue)
이 default 페이지에 아래처럼 <template> 태그로 감싸주고
안에 중요한 메인인 <Nuxt /> 태그를 넣어주면 레이아웃이 자동으로 잡힌다 :)
<template>
<div>
<TheHeader />
<Nuxt />
<TheFooter />
</div>
</template>
이번 글에 소개하고 싶은 커스텀 레이아웃 페이지는 아래와 같다
마찬가지로 Nuxt가 만들어준 layout 디렉터리에
커스텀 하고 싶은 파일을 만들어준다.
디폴트와 비슷한 형식으로 <template>에 <Nuxt>로 위치를 잡아준다
<template>
<div>
<span>팝업 창입니다.</span>
</div>
<div id = "pop_container" class="con_side">
<Nuxt />
</div>
</template>
여기서 끝이 아니다.
이 팝업 레이아웃을 사용할 파일로 가 본다.
이제 이 파일의 레이아웃을 default가 아닌
popup.vue에서 커스텀 한 레이아웃을 사용해보도록 수정한다. 2가지 방법이 있다.
<script>
export default {
layout: 'popup'
}
</script>
// 또는
<script>
export default {
layout (context) {
return 'popup'
}
}
</script>

'Front > Vue' 카테고리의 다른 글
[Vue] slot - 컴포넌트 재사용하기 (0) | 2022.01.16 |
---|---|
[Vue] Naver Map 네이버 지도 구현 Example(in Nuxt) (0) | 2021.07.15 |