From a4eab941885110b37022c79eba3f4f752461fba8 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期五, 24 一月 2025 11:17:48 +0800
Subject: [PATCH] fix 修复 选择用户列表数据未清除问题

---
 src/utils/validate.ts |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/utils/validate.ts b/src/utils/validate.ts
index 4d57894..788095c 100644
--- a/src/utils/validate.ts
+++ b/src/utils/validate.ts
@@ -1,4 +1,16 @@
 /**
+ * 璺緞鍖归厤鍣�
+ * @param {string} pattern
+ * @param {string} path
+ * @returns {Boolean}
+ */
+export function isPathMatch(pattern: string, path: string) {
+  const regexPattern = pattern.replace(/\//g, '\\/').replace(/\*\*/g, '.*').replace(/\*/g, '[^\\/]*')
+  const regex = new RegExp(`^${regexPattern}$`)
+  return regex.test(path)
+}
+
+/**
  * 鍒ゆ柇url鏄惁鏄痟ttp鎴杊ttps
  * @returns {Boolean}
  * @param url

--
Gitblit v1.9.3