更新 依赖
This commit is contained in:
parent
ccb2791fe7
commit
b2879dbb89
@ -8,6 +8,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.4.2",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||
"autoprefixer": "^10.4.14",
|
||||
@ -18,7 +19,6 @@
|
||||
"vite": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "^15.14.9",
|
||||
"@vueuse/core": "^10.2.1",
|
||||
"echarts": "^5.4.2",
|
||||
"element-plus": "^2.3.7",
|
||||
|
0
app/wails/frontend/src/utils/system/memory.ts
Normal file
0
app/wails/frontend/src/utils/system/memory.ts
Normal file
@ -12,12 +12,16 @@ let network = reactive({
|
||||
rate: {
|
||||
recv: -1,
|
||||
sent: -1,
|
||||
max: {
|
||||
recv: 0,
|
||||
sent: 0
|
||||
}
|
||||
},
|
||||
data: <IOCountersStat>{
|
||||
bytesRecv: -1,
|
||||
bytesSent: -1
|
||||
},
|
||||
interval: <any>undefined
|
||||
interval: <NodeJS.Timeout|undefined>undefined,
|
||||
}
|
||||
})
|
||||
|
||||
@ -32,11 +36,17 @@ function loopNetworkSumCounter(){
|
||||
network.sumCounter.data.bytesRecv = network.sumCounter.data.bytesRecv == -1?recv:network.sumCounter.data.bytesRecv
|
||||
network.sumCounter.data.bytesSent = network.sumCounter.data.bytesSent == -1?sent:network.sumCounter.data.bytesSent
|
||||
|
||||
// 实时网速
|
||||
network.sumCounter.rate.recv = recv - network.sumCounter.data.bytesRecv
|
||||
network.sumCounter.rate.sent = sent - network.sumCounter.data.bytesSent
|
||||
|
||||
network.sumCounter.rate.max.recv = Math.max(network.sumCounter.rate.max.recv, network.sumCounter.rate.recv)
|
||||
network.sumCounter.rate.max.sent = Math.max(network.sumCounter.rate.max.sent, network.sumCounter.rate.sent)
|
||||
|
||||
network.sumCounter.data = result[0]
|
||||
})
|
||||
|
||||
// 每秒调用一次
|
||||
network.sumCounter.interval = setTimeout(()=>{
|
||||
loop()
|
||||
},1000)
|
||||
|
@ -505,10 +505,10 @@
|
||||
resolved "https://registry.npmmirror.com/@types/lodash/-/lodash-4.14.195.tgz#bafc975b252eb6cea78882ce8a7b6bf22a6de632"
|
||||
integrity sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==
|
||||
|
||||
"@types/node@^15.14.9":
|
||||
version "15.14.9"
|
||||
resolved "https://registry.npmmirror.com/@types/node/-/node-15.14.9.tgz#bc43c990c3c9be7281868bbc7b8fdd6e2b57adfa"
|
||||
integrity sha512-qjd88DrCxupx/kJD5yQgZdcYKZKSIGBVDIBE1/LTGcNm3d2Np/jxojkdePDdfnBHJc5W7vSMpbJ1aB7p/Py69A==
|
||||
"@types/node@^20.4.2":
|
||||
version "20.4.2"
|
||||
resolved "https://registry.npmmirror.com/@types/node/-/node-20.4.2.tgz#129cc9ae69f93824f92fac653eebfb4812ab4af9"
|
||||
integrity sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==
|
||||
|
||||
"@types/web-bluetooth@^0.0.16":
|
||||
version "0.0.16"
|
||||
|
Loading…
Reference in New Issue
Block a user