From d278b635e7185387daf60e6db2db678bf7e34103 Mon Sep 17 00:00:00 2001
From: sohot8653
Date: Wed, 24 Sep 2025 09:08:08 +0900
Subject: [PATCH] =?UTF-8?q?[UI=20=EA=B0=9C=EC=84=A0]=20PermissionButton=20?=
=?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=EB=A5=BC=20=EC=83=88?=
=?UTF-8?q?=EB=A1=9C=20=EC=B6=94=EA=B0=80=ED=95=98=EC=97=AC=20=EA=B6=8C?=
=?UTF-8?q?=ED=95=9C=20=EC=B2=B4=ED=81=AC=20=EB=B0=8F=20=ED=81=B4=EB=A6=AD?=
=?UTF-8?q?=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B2=98=EB=A6=AC=EB=A5=BC=20?=
=?UTF-8?q?=EA=B0=84=EC=86=8C=ED=99=94=ED=95=98=EA=B3=A0,=20=ED=85=8C?=
=?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90?=
=?UTF-8?q?=EC=84=9C=20=EC=82=AC=EC=9A=A9=20=EC=98=88=EC=8B=9C=EB=A5=BC=20?=
=?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/base/PermissionButton.vue | 95 ++++++++++++++
pages/[tabId]/test/permission-test.vue | 173 ++++++++++++++++---------
2 files changed, 205 insertions(+), 63 deletions(-)
create mode 100644 components/base/PermissionButton.vue
diff --git a/components/base/PermissionButton.vue b/components/base/PermissionButton.vue
new file mode 100644
index 0000000..49378fc
--- /dev/null
+++ b/components/base/PermissionButton.vue
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
diff --git a/pages/[tabId]/test/permission-test.vue b/pages/[tabId]/test/permission-test.vue
index fe91f4f..62746f3 100644
--- a/pages/[tabId]/test/permission-test.vue
+++ b/pages/[tabId]/test/permission-test.vue
@@ -143,87 +143,52 @@
-
-
생성 버튼 (권한 없음)
+
-
-
수정 버튼 (권한 없음)
+
-
-
삭제 버튼 (권한 없음)
+
-
-
내보내기 버튼 (권한 없음)
+
-
-
가져오기 버튼 (권한 없음)
+
-
-
보기 버튼 (권한 없음)
+
-
-
다운로드 버튼 (권한 없음)
+
@@ -532,6 +497,73 @@
+
+
+
+ PermissionButton 컴포넌트 사용 예시
+
+
+
+
기본 사용법
+
+
+ 버튼 텍스트는 권한 코드에서 자동으로 가져옵니다.
+
+
+
+
+
+
+
+ 권한이 없는 버튼 (표시되지 않음)
+
+
+
+
↑ 이 버튼은 권한이 없어서 표시되지 않습니다
+
+
+
+
+
@@ -554,6 +586,12 @@
컴포넌트 권한: 버튼 등 UI 컴포넌트의 표시 여부를
제어합니다. 권한이 없으면 컴포넌트가 렌더링되지 않습니다.
+
+ PermissionButton 컴포넌트: 권한 체크와 클릭
+ 이벤트를 자동으로 처리하는 재사용 가능한 버튼 컴포넌트입니다.
+ buttonCode prop으로 권한을 체크하고, 권한이 있을 때만 버튼이
+ 표시됩니다.
+
백엔드 연동: 나중에 백엔드 API가 준비되면
stores/permissions.ts의
@@ -567,6 +605,9 @@