调整判断逻辑

This commit is contained in:
LJH-rgsze
2026-01-05 16:51:09 +08:00
parent 341ed22370
commit 4c550245db
+1 -1
View File
@@ -123,7 +123,7 @@ export default {
this.isSearching = true;
this.isLoading = true;
// 检测MAC地址格式:包含4个冒号
const isMac = /(:.*?){4}/.test(keyword);
const isMac = /^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$/.test(keyword)
const searchType = isMac ? 'mac' : 'name';
Api.agent.searchAgent(keyword, searchType, ({ data }) => {
if (data?.data) {