getOSInfo
获取操作系统、设备架构、系统偏好相关信息
引入版本
0.115.0
Demo
ts
import { getOSInfo } from '@wyfex/iutils'
console.log(getOSInfo())
// {
// "raw": {
// "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36",
// "platform": "Win32",
// "uaBrands": [
// {
// "brand": "Google Chrome",
// "version": "153"
// },
// {
// "brand": "Not_A Brand",
// "version": "8"
// },
// {
// "brand": "Chromium",
// "version": "153"
// }
// ],
// "uaMobile": false
// },
// "操作系统类型": "Windows",
// "操作系统版本": "Windows 11",
// "设备类型": "Desktop",
// "CPU架构": "x86_64",
// "是否64位系统": true,
// "是否国产操作系统": false,
// "是否系统暗色模式": true
// }