From 00e0dbbf98347b1e47a7e0aedd41baa61f7567ed Mon Sep 17 00:00:00 2001
From: fuyongxin <110568259@qq.com>
Date: Wed, 03 Jun 2026 08:47:03 +0800
Subject: [PATCH] 修改配置nacos,后端gateway端口
---
ruoyi-ui/src/utils/validate.js | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/ruoyi-ui/src/utils/validate.js b/ruoyi-ui/src/utils/validate.js
index 287d518..fddf7ac 100644
--- a/ruoyi-ui/src/utils/validate.js
+++ b/ruoyi-ui/src/utils/validate.js
@@ -1,13 +1,30 @@
/**
+ * 路径匹配器
+ * @param {string} pattern
+ * @param {string} path
+ * @returns {Boolean}
+ */
+export function isPathMatch(pattern, path) {
+ const regexPattern = pattern
+ .replace(/([.+^${}()|\[\]\\])/g, '\\$1')
+ .replace(/\*\*/g, '__DOUBLE_STAR__')
+ .replace(/\*/g, '[^/]*')
+ .replace(/__DOUBLE_STAR__/g, '.*')
+ .replace(/\?/g, '[^/]')
+ const regex = new RegExp(`^${regexPattern}$`)
+ return regex.test(path)
+}
+
+/**
* 判断value字符串是否为空
* @param {string} value
* @returns {Boolean}
*/
export function isEmpty(value) {
if (value == null || value == "" || value == undefined || value == "undefined") {
- return true;
+ return true
}
- return false;
+ return false
}
/**
@@ -87,7 +104,7 @@
* @returns {Boolean}
*/
export function isString(str) {
- return typeof str === 'string' || str instanceof String;
+ return typeof str === 'string' || str instanceof String
}
/**
--
Gitblit v1.9.3