mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-08 10:41:16 +08:00
fix: 解决首页 echarts 不能自适应的问题
This commit is contained in:
parent
6639192c9a
commit
2ba24dadfb
2 changed files with 6 additions and 16 deletions
|
|
@ -40,20 +40,6 @@ defineProps({
|
|||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
// span:first-child {
|
||||
// background: $primary-color;
|
||||
// border-radius: 7px;
|
||||
// flex: none;
|
||||
// order: 0;
|
||||
// flex-grow: 0;
|
||||
// padding: 3px;
|
||||
// }
|
||||
|
||||
// span:nth-child(2) {
|
||||
// font-size: 18px;
|
||||
// font-weight: 700;
|
||||
// margin-left: 10px;
|
||||
// }
|
||||
}
|
||||
|
||||
div:nth-child(2) {
|
||||
|
|
|
|||
|
|
@ -583,8 +583,12 @@ function freshChart(chartName: string, legendDatas: any, xDatas: any, yDatas: an
|
|||
}
|
||||
|
||||
function changeChartSize() {
|
||||
echarts.getInstanceByDom(document.getElementById('ioChart') as HTMLElement)?.resize();
|
||||
echarts.getInstanceByDom(document.getElementById('networkChart') as HTMLElement)?.resize();
|
||||
if (document.getElementById('ioChart') != null) {
|
||||
echarts.getInstanceByDom(document.getElementById('ioChart') as HTMLElement)?.resize();
|
||||
}
|
||||
if (document.getElementById('networkChart') != null) {
|
||||
echarts.getInstanceByDom(document.getElementById('networkChart') as HTMLElement)?.resize();
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue