mirror of
https://github.com/ThingsGateway/ThingsGateway.git
synced 2026-10-29 12:40:05 +08:00
修复首页刷新线程返回时,option还未赋值成功导致报错问题
This commit is contained in:
@@ -64,9 +64,12 @@ public partial class HardwareInfoPage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region CPU曲线
|
||||
private object hardwareInfoEChartsOption;
|
||||
|
||||
private object hardwareInfoEChartsOption = new();
|
||||
private MECharts hardwareInfoECharts;
|
||||
|
||||
private async Task GetHardwareInfoEChartsOption()
|
||||
{
|
||||
var hisDatas = _hardwareInfoWorker.GetHis();
|
||||
@@ -130,7 +133,6 @@ public partial class HardwareInfoPage
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -166,12 +168,10 @@ public partial class HardwareInfoPage
|
||||
}
|
||||
};
|
||||
await hardwareInfoECharts.SetOption(option, false, false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
await InvokeStateHasChangedAsync();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion CPU曲线
|
||||
}
|
||||
@@ -111,10 +111,11 @@ public partial class Index
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region CPU曲线
|
||||
private object hardwareInfoEChartsOption;
|
||||
|
||||
private object hardwareInfoEChartsOption = new();
|
||||
private MECharts hardwareInfoECharts;
|
||||
|
||||
private async Task GetHardwareInfoEChartsOption()
|
||||
{
|
||||
var hisDatas = _hardwareInfoWorker.GetHis();
|
||||
@@ -178,7 +179,6 @@ public partial class Index
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -214,10 +214,10 @@ public partial class Index
|
||||
}
|
||||
};
|
||||
await hardwareInfoECharts.SetOption(option, false, false);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion CPU曲线
|
||||
|
||||
private void showCollectDeviceChart()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user