docs: 添加注释

Former-commit-id: b726f6e74c670f8f819684f62dfe20f4fbe752a3
This commit is contained in:
haoxr
2023-02-19 23:55:18 +08:00
parent c7669cea0f
commit 43e5702b2a

View File

@@ -132,11 +132,13 @@ const options = {
};
onMounted(() => {
// 图表初始化
const chart = echarts.init(
document.getElementById(props.id) as HTMLDivElement
);
chart.setOption(options);
// 大小自适应
window.addEventListener('resize', () => {
chart.resize();
});