mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-09 19:20:56 +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;
|
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) {
|
div:nth-child(2) {
|
||||||
|
|
|
||||||
|
|
@ -583,9 +583,13 @@ function freshChart(chartName: string, legendDatas: any, xDatas: any, yDatas: an
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeChartSize() {
|
function changeChartSize() {
|
||||||
|
if (document.getElementById('ioChart') != null) {
|
||||||
echarts.getInstanceByDom(document.getElementById('ioChart') as HTMLElement)?.resize();
|
echarts.getInstanceByDom(document.getElementById('ioChart') as HTMLElement)?.resize();
|
||||||
|
}
|
||||||
|
if (document.getElementById('networkChart') != null) {
|
||||||
echarts.getInstanceByDom(document.getElementById('networkChart') as HTMLElement)?.resize();
|
echarts.getInstanceByDom(document.getElementById('networkChart') as HTMLElement)?.resize();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
onLoadNetworkOptions();
|
onLoadNetworkOptions();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue