From f801e876d292b7ed48789843db7f32396e3580cc Mon Sep 17 00:00:00 2001 From: ikju1223 Date: Fri, 22 Aug 2025 14:01:30 +0900 Subject: [PATCH] =?UTF-8?q?tab,=20component,=20popup=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 114 +++++++++++++- components/{ => base}/AppButton.vue | 0 components/{ => base}/ToastGrid.vue | 3 + components/base/customPopup.vue | 28 ++++ components/{ => layout}/AppHeader.vue | 0 components/{ => layout}/ContentsWrapper.vue | 0 components/layout/PopupWrapper.vue | 81 ++++++++++ composables/popupManager.ts | 15 ++ layouts/default.vue | 166 ++++++++++++-------- nuxt.config.ts | 5 +- pages/{ => [tabId]}/admin/codes.vue | 0 pages/{ => [tabId]}/admin/logs.vue | 0 pages/{ => [tabId]}/admin/programs.vue | 0 pages/{ => [tabId]}/admin/resource.vue | 2 +- pages/[tabId]/index.vue | 123 +++++++++++++++ pages/[tabId]/sampleList.vue | 20 +++ pages/{ => [tabId]}/tui.vue | 2 +- pages/index.vue | 8 + pages/popup/addSamplePopup.vue | 38 +++++ stores/router.client.ts | 7 + stores/tab.ts | 76 ++++++--- stores/user.ts | 82 ++++------ 22 files changed, 625 insertions(+), 145 deletions(-) rename components/{ => base}/AppButton.vue (100%) rename components/{ => base}/ToastGrid.vue (91%) create mode 100644 components/base/customPopup.vue rename components/{ => layout}/AppHeader.vue (100%) rename components/{ => layout}/ContentsWrapper.vue (100%) create mode 100644 components/layout/PopupWrapper.vue create mode 100644 composables/popupManager.ts rename pages/{ => [tabId]}/admin/codes.vue (100%) rename pages/{ => [tabId]}/admin/logs.vue (100%) rename pages/{ => [tabId]}/admin/programs.vue (100%) rename pages/{ => [tabId]}/admin/resource.vue (88%) create mode 100644 pages/[tabId]/index.vue create mode 100644 pages/[tabId]/sampleList.vue rename pages/{ => [tabId]}/tui.vue (94%) create mode 100644 pages/popup/addSamplePopup.vue create mode 100644 stores/router.client.ts diff --git a/README.md b/README.md index b7c180f..908fa49 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,25 @@ - compnenets 아래의 .vue는 자동 인식(template 내부에서만, 별도 script에서 필요시 선언 필요) -## 공통 페이지 구성 +# 구성 요소 +## components 구성 +``` +components + |- base // 기본 요소(button, input, grid, popup) + |- layout // 레이아웃 요소(header, footer, sidebar, wrapper) + |- module // 특정 기능 단위(card, form, list) + |- pages // 특정 페이지 전용 +``` +## page 구성 +``` +pages // 단일 화면(비 탭 요소) +|- [tabId] // 탭 요소 + |- admin // 관리자 페이지 +``` + +# page(페이지) 생성 요소 +## 공통 페이지 구성 ``` diff --git a/components/base/customPopup.vue b/components/base/customPopup.vue new file mode 100644 index 0000000..5d3f600 --- /dev/null +++ b/components/base/customPopup.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/components/AppHeader.vue b/components/layout/AppHeader.vue similarity index 100% rename from components/AppHeader.vue rename to components/layout/AppHeader.vue diff --git a/components/ContentsWrapper.vue b/components/layout/ContentsWrapper.vue similarity index 100% rename from components/ContentsWrapper.vue rename to components/layout/ContentsWrapper.vue diff --git a/components/layout/PopupWrapper.vue b/components/layout/PopupWrapper.vue new file mode 100644 index 0000000..a67fdc5 --- /dev/null +++ b/components/layout/PopupWrapper.vue @@ -0,0 +1,81 @@ + + + + + + diff --git a/composables/popupManager.ts b/composables/popupManager.ts new file mode 100644 index 0000000..49149b0 --- /dev/null +++ b/composables/popupManager.ts @@ -0,0 +1,15 @@ +import { ref } from 'vue' + +let baseZIndex = 1000; + +++baseZIndex; + +const currentZ = ref(baseZIndex) + +export function usePopupZIndex() { + function nextZIndex() { + currentZ.value += 1 + return currentZ.value + } + return { nextZIndex } +} \ No newline at end of file diff --git a/layouts/default.vue b/layouts/default.vue index cbe5228..9813f46 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,52 +1,95 @@ + diff --git a/pages/[tabId]/sampleList.vue b/pages/[tabId]/sampleList.vue new file mode 100644 index 0000000..c7b3179 --- /dev/null +++ b/pages/[tabId]/sampleList.vue @@ -0,0 +1,20 @@ + + \ No newline at end of file diff --git a/pages/tui.vue b/pages/[tabId]/tui.vue similarity index 94% rename from pages/tui.vue rename to pages/[tabId]/tui.vue index d344eb2..0b1e8b8 100644 --- a/pages/tui.vue +++ b/pages/[tabId]/tui.vue @@ -1,5 +1,5 @@