From a60467b01ce63ac849b9b3b86102c904362fa5a7 Mon Sep 17 00:00:00 2001 From: vince Date: Fri, 5 Jul 2024 23:51:50 +0800 Subject: [PATCH] feat: Improve the front-end permission access logic and sample code --- .../demos/access/frontend/button-control.vue | 110 +++++++++++++++++- .../src/views/demos/access/frontend/index.vue | 6 +- .../business/access/src/code-authority.vue | 29 +++++ packages/business/access/src/index.ts | 1 + .../business/access/src/role-authority.vue | 13 ++- packages/business/access/src/use-access.ts | 15 ++- 6 files changed, 163 insertions(+), 11 deletions(-) create mode 100644 packages/business/access/src/code-authority.vue diff --git a/apps/web-antd/src/views/demos/access/frontend/button-control.vue b/apps/web-antd/src/views/demos/access/frontend/button-control.vue index 49a0dfcc..cdc0bc66 100644 --- a/apps/web-antd/src/views/demos/access/frontend/button-control.vue +++ b/apps/web-antd/src/views/demos/access/frontend/button-control.vue @@ -1,9 +1,115 @@ diff --git a/apps/web-antd/src/views/demos/access/frontend/index.vue b/apps/web-antd/src/views/demos/access/frontend/index.vue index 3501f591..bd88ed29 100644 --- a/apps/web-antd/src/views/demos/access/frontend/index.vue +++ b/apps/web-antd/src/views/demos/access/frontend/index.vue @@ -49,7 +49,7 @@ async function changeAccount(role: string) {