From ffc2b4a24a50312c2ca5e1bb90857bf9e8f2491e Mon Sep 17 00:00:00 2001 From: sohot8653 Date: Thu, 25 Sep 2025 15:56:20 +0900 Subject: [PATCH] =?UTF-8?q?[README.md=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8]=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=20=EA=B5=AC=EC=A1=B0=20=EB=B0=8F=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=B2=95=20=EC=B6=94=EA=B0=80,=20=EC=9E=90=EB=8F=99=20?= =?UTF-8?q?=EC=9E=84=ED=8F=AC=ED=8A=B8=20=EC=84=A4=EC=A0=95=20=EC=84=A4?= =?UTF-8?q?=EB=AA=85=20=EB=B3=B4=EA=B0=95,=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=20=EA=B5=AC=EC=84=B1=20=EB=B0=8F=20=ED=8C=9D=EC=97=85=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EB=B0=A9=EB=B2=95=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=9C=20=EC=84=B8=EB=B6=80=20=EC=A0=95=EB=B3=B4=20=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 105 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 82 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 5435984..45c6632 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,76 @@ # bio_frontend ## NUXT 3 (VUE 3) 환경 - - data-list 와 dataList는 동일 변수명으로 인식 - - compnenets 아래의 .vue는 자동 인식(template 내부에서만, 별도 script에서 필요시 선언 필요) +- data-list 와 dataList는 동일 변수명으로 인식 +- compnenets 아래의 .vue는 자동 인식(template 내부에서만, 별도 script에서 필요시 선언 필요) # 구성 요소 + ## components 구성 + +### 폴더 구조 + ``` -components - |- base // 기본 요소(button, input, grid, popup) - |- layout // 레이아웃 요소(header, footer, sidebar, wrapper) - |- module // 특정 기능 단위(card, form, list) - |- pages // 특정 페이지 전용 +components/ +├── base/ // 기본 UI 요소 (접두사 없이 사용) +│ ├── button/ +│ │ ├── CommonButton.vue +│ │ └── PermissionButton.vue +│ ├── grid/ +│ │ └── ToastGrid.vue +│ ├── info/ +│ │ └── PageDescription.vue +│ ├── loading/ +│ │ └── GlobalLoading.vue +│ └── popup/ +│ └── CommonPopup.vue +├── layout/ // 레이아웃 요소 (접두사 없이 사용) +│ ├── navigation/ +│ │ ├── AppHeader.vue +│ │ ├── SubMenuBar.vue +│ │ └── TabBar.vue +│ └── wrapper/ +│ ├── ContentsWrapper.vue +│ └── PopupWrapper.vue +└── domain/ // 도메인별 기능 컴포넌트 (@domain/ 접두사 사용) + └── culture-graph/ + ├── BatchGraph.vue + ├── BatchTabs.vue + └── CustomContextMenu.vue ``` +### 자동 임포트 설정 (nuxt.config.ts) + +```typescript +components: [ + { path: "~/components/base", pathPrefix: false }, // @base/ 접두사 제거 + { path: "~/components/layout", pathPrefix: false }, // @layout/ 접두사 제거 + { path: "~/components/domain", pathPrefix: true }, // @domain/ 접두사 유지 +], +``` + +### 컴포넌트 사용법 + +- **base/**, **layout/** 폴더의 컴포넌트\*\*: 접두사 없이 직접 사용 + + ```vue + + ``` + +- **domain/** 폴더의 컴포넌트: `@domain/` 접두사 사용 + ```vue + + ``` + ## page 구성 + ``` pages // 단일 화면(비 탭 요소) |- popup // 팝업 요소 @@ -25,7 +80,9 @@ pages // 단일 화면(비 탭 요소) ``` # page(페이지) 생성 요소 + ## 공통 페이지 구성 + ```