본문 바로가기

2022/02/013

[Nuxt.js] 학습정리 Nuxt ? 파일 기반의 자동 라우팅 생성이 넉스트의 특징. - 디렉터리 구조 설명 [pages] pages 내부에 생성한 main.vue 페이지는 localhost:3000/main 으로 바로 접근이 가능하다. 폴더나 vue파일을 생성하고 서버를 실행하면 .nuxt/router.js 에서 해당 이름들을 확인 할 수 있다. [layouts] error 페이지는 layouts/error.vue 로 작성하면 자동으로 인식해서 존재하지 않는 경로를 요청 할 경우 자동으로 페이지를 넘겨준다. default.vue 공통된 UI들을 보여주고 싶을 때 사용한다. 헤더, 푸터 등 헤더에서 메뉴를 보여주고싶을때 vue에서는 를 사용했지만 nuxt에서는 홈페이지 로 변경하여 사용해준다. 는 는 nuxt에서 REST API.. 2022. 2. 1.
[ESlint] 유용한 ESlint 모음 순서 정렬 해주는 규칙 (ex. asyncData 는 data 위에 위치한다.) { "vue/order-in-components": ["error", { "order": [ "el", "name", "key", "parent", "functional", ["delimiters", "comments"], ["components", "directives", "filters"], "extends", "mixins", ["provide", "inject"], "ROUTER_GUARDS", "layout", "middleware", "validate", "scrollToTop", "transition", "loading", "inheritAttrs", "model", ["props", "propsData"], ".. 2022. 2. 1.
[Nuxt/error] [vue/no-multiple-template-root]The template root requires exactly one element.eslint-plugin-vue The ul element represents a list of items, where the order of the items is not important — that is, where changing the order would not materially change the meaning of the document. [vue/no-multiple-template-root] The template root requires exactly one element.eslint-plugin-vue ul 요소는 항목의 목록을 나타내며, 항목의 순서가 중요하지 않습니다. 즉, 순서를 변경하면 문서의 의미가 크게 변경되지 않습니다. [vue/no-super-root] 템플릿 루트에는 정확히 하나의 요소가 필요합니.. 2022. 2. 1.
반응형