This commit is contained in:
Shikong 2023-07-17 23:32:18 +08:00
parent 2e8f740674
commit f094ac4d39

View File

@ -24,7 +24,7 @@ const props = defineProps({
}, },
maxStep:{ maxStep:{
type: Number, type: Number,
default: 120 default: 600
} }
}) })
const cpuUsage = useCpuUsage() const cpuUsage = useCpuUsage()
@ -115,7 +115,7 @@ onMounted(()=>{
value: [moment().format("HH:mm:ss"), v] value: [moment().format("HH:mm:ss"), v]
}) })
if(data.length > props.maxStep){ if(data.length > props.maxStep){
data.splice(1,1) data.splice(0,1)
} }
chartInst.setOption(chart) chartInst.setOption(chart)
}) })