From aed76982061e99ed4bf14a8966f77ffd01a7ce1f Mon Sep 17 00:00:00 2001 From: mjking <1406993111@qq.com> Date: Mon, 5 Feb 2024 08:40:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A0=8F=E9=85=8D=E7=BD=AE=E5=85=83=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- annotation-setting.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/annotation-setting.yaml b/annotation-setting.yaml index 76c355b..5fabf6c 100644 --- a/annotation-setting.yaml +++ b/annotation-setting.yaml @@ -147,3 +147,23 @@ spec: label: 关闭 - value: "" label: 跟随默认配置 + +--- + +apiVersion: v1alpha1 +kind: AnnotationSetting +metadata: + generateName: annotation-setting- +spec: + targetRef: + group: "" + kind: MenuItem + formSchema: + - $formkit: "text" + name: "icon" + label: "图标" + placeholder: '请输入菜单图标,支持Remix V3.5.0' + - $formkit: "text" + name: "desc" + label: "描述" + placeholder: '请输入鼠标悬停时描述内容,默认为菜单名' From 7f0a501bbc2d194f25d25004eda39831604932ca Mon Sep 17 00:00:00 2001 From: mjking <1406993111@qq.com> Date: Mon, 5 Feb 2024 08:41:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?peft=EF=BC=9A=E8=B0=83=E6=95=B4=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=8F=8F=E8=BF=B0=E5=85=83=E6=95=B0=E6=8D=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=96=B9=E5=BC=8F=EF=BC=8C=E5=85=83=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E6=97=B6=E6=98=BE=E7=A4=BA=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/common/navbar.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/common/navbar.html b/templates/common/navbar.html index 48f1f38..3d909ca 100644 --- a/templates/common/navbar.html +++ b/templates/common/navbar.html @@ -15,7 +15,8 @@ class="item" th:href="${menuItem.status.href}" th:target="${menuItem.spec.target?.value}" - th:title="${#annotations.getOrDefault(menuItem, 'desc', menuItem.status.displayName)}"> + th:with="desc = ${#annotations.getOrDefault(menuItem, 'desc', menuItem.status.displayName)}" + th:title="${#strings.isEmpty(desc) ? menuItem.status.displayName : desc}"> [[${menuItem.status.displayName}]] @@ -25,7 +26,8 @@ + th:with="desc = ${#annotations.getOrDefault(menuItem, 'desc', menuItem.status.displayName)}" + th:title="${#strings.isEmpty(desc) ? menuItem.status.displayName : desc}"> [[${menuItem.status.displayName}]] @@ -37,7 +39,8 @@ + th:with="desc = ${#annotations.getOrDefault(dropdown, 'desc', dropdown.status.displayName)}" + th:title="${#strings.isEmpty(desc) ? dropdown.status.displayName : desc}"> [[${dropdown.status.displayName}]] @@ -47,7 +50,8 @@ + th:with="desc = ${#annotations.getOrDefault(dropdownChild, 'desc', dropdownChild.status.displayName)}" + th:title="${#strings.isEmpty(desc) ? dropdownChild.status.displayName : desc}"> [[${dropdownChild.status.displayName}]]