mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-23 07:33:53 +08:00
搜索拓展
This commit is contained in:
Generated
+9
@@ -11096,6 +11096,15 @@
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz",
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/validate-npm-package-license": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
|
||||
|
||||
@@ -136,7 +136,15 @@ export default {
|
||||
}
|
||||
|
||||
this.devices = this.originalDevices.filter(device => {
|
||||
return this.searchRegex.test(device.agentName);
|
||||
// 搜索智能体名称
|
||||
if (this.searchRegex.test(device.agentName)) {
|
||||
return true;
|
||||
}
|
||||
// 搜索关联设备的MAC地址
|
||||
if (device.macAddresses && device.macAddresses.length > 0) {
|
||||
return device.macAddresses.some(macAddress => this.searchRegex.test(macAddress));
|
||||
}
|
||||
return false;
|
||||
});
|
||||
},
|
||||
// 搜索更新智能体列表
|
||||
|
||||
Reference in New Issue
Block a user