From 168d49fe0b21aaf1d06512a2896959120beec312 Mon Sep 17 00:00:00 2001 From: abbfun <819589789@qq.com> Date: 星期一, 08 八月 2022 09:46:08 +0800 Subject: [PATCH] 优化表格上右侧工具条(搜索按钮显隐&右侧样式凸出) 无搜索条件时可通过search隐藏搜索按钮,工具条组右侧样式超出5px(相对于底部表格),其父节点gutter代码生成默认10,此处也默认10,使工具组样式左右一致 --- ruoyi-common/src/main/java/com/ruoyi/common/enums/UserType.java | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/UserType.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/UserType.java index 9c3b531..ec6510d 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/enums/UserType.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/UserType.java @@ -1,11 +1,12 @@ package com.ruoyi.common.enums; +import com.ruoyi.common.utils.StringUtils; import lombok.AllArgsConstructor; import lombok.Getter; /** * 璁惧绫诲瀷 - * 閽堝涓ゅ 鐢ㄦ埛浣撶郴 + * 閽堝澶氬 鐢ㄦ埛浣撶郴 * * @author Lion Li */ @@ -16,12 +17,21 @@ /** * pc绔� */ - SYS_USER("sys_user:"), + SYS_USER("sys_user"), /** * app绔� */ - APP_USER("app_user:"); + APP_USER("app_user"); private final String userType; + + public static UserType getUserType(String str) { + for (UserType value : values()) { + if (StringUtils.contains(str, value.getUserType())) { + return value; + } + } + throw new RuntimeException("'UserType' not found By " + str); + } } -- Gitblit v1.9.3