修改了匹配 CPU 核心数的正则表达式。

This commit is contained in:
Kotone Fujita^^ 2024-12-05 17:08:35 +08:00 committed by GitHub
parent 56d8706d29
commit 66318a9429
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,7 +35,7 @@ export function getCPUInfo(text) {
const companyReg = /Intel|AMD|ARM|Qualcomm|Apple|Samsung|IBM|NVIDIA/;
// eslint-disable-next-line max-len, vue/max-len
const modelReg = /Xeon|Threadripper|Athlon|Pentium|Celeron|Opteron|Phenom|Turion|Sempron|FX|A-Series|R-Series|EPYC|Ryzen/;
const coresReg = /(\d+) (Virtual|Physics) Core/;
const coresReg = /(\d+) (Virtual|Physics|Physical) Core/;
const companyMatch = text.match(companyReg);
const modelMatch = text.match(modelReg);
const coresMatch = text.match(coresReg);