From 5d45e9577e0cd657ae622fa643444ecd372fece6 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 26 Dec 2022 14:10:31 +0800 Subject: [PATCH] refactor: layouts of role editing form (#795) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind improvement /milestone 2.1.x #### What this PR does / why we need it: 重构角色编辑的表单,取消多选项卡的设计。 #### Which issue(s) this PR fixes: Fixes https://github.com/halo-dev/halo/issues/3033 #### Screenshots: ![2022-12-23 12 09 52](https://user-images.githubusercontent.com/21301288/209269275-6cb4f729-1549-423f-bd45-74e3241e68a7.gif) #### Special notes for your reviewer: 测试方式: 1. 测试新建和编辑角色。 2. 检查功能是否符合预期。 #### Does this PR introduce a user-facing change? ```release-note 重构 Console 端角色编辑的表单,取消多选项卡的设计。 ``` --- .../roles/components/RoleEditingModal.vue | 205 ++++++++++-------- 1 file changed, 115 insertions(+), 90 deletions(-) diff --git a/src/modules/system/roles/components/RoleEditingModal.vue b/src/modules/system/roles/components/RoleEditingModal.vue index 22647f71..6cdbdaa2 100644 --- a/src/modules/system/roles/components/RoleEditingModal.vue +++ b/src/modules/system/roles/components/RoleEditingModal.vue @@ -1,7 +1,7 @@ @@ -110,98 +110,123 @@ const handleResetForm = () => { :width="700" @update:visible="onVisibleChange" > - -
-
- +
+
+
+
+ 基本信息 +
+
+
- -
- -
-
-
-
- {{ group.module }} -
-
-
    -
  • -
+
+
+
+
+
+
+
+ 权限 +
+
+
+
+
+
+
{{ group.module }}
+
+ 由 + - -
- - {{ - roleTemplate.metadata.annotations?.[ - rbacAnnotations.DISPLAY_NAME - ] - }} - - - 依赖于 - {{ - JSON.parse( + {{ group.roles[0].metadata.labels?.[pluginLabels.NAME] }} + + 插件提供 +
+
+
+
    +
  • + -
  • -
-
-
-
+ " + class="text-xs text-gray-400" + > + 依赖于 + {{ + JSON.parse( + roleTemplate.metadata.annotations?.[ + rbacAnnotations.DEPENDENCIES + ] + ).join(", ") + }} + +
+ + + + +
+ +