From 61f7e8fdd26aed17e59bd5b97ba35288b1766af7 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 07 八月 2025 15:14:01 +0800
Subject: [PATCH] fix: 修改
---
src/utils/common/common.ts | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/utils/common/common.ts b/src/utils/common/common.ts
index b05dfc3..374c3a8 100644
--- a/src/utils/common/common.ts
+++ b/src/utils/common/common.ts
@@ -106,3 +106,12 @@
export function filterNumbersFromString(str: string) {
return str.replace(/\D/g, '');
}
+
+export function formatRoleName(roleName: string) {
+ let lastUnderscoreIndex = roleName.lastIndexOf('_');
+
+ if (lastUnderscoreIndex !== -1) {
+ roleName = roleName.substring(0, lastUnderscoreIndex);
+ }
+ return roleName;
+}
--
Gitblit v1.9.1