docs: 添加注释
Former-commit-id: b726f6e74c670f8f819684f62dfe20f4fbe752a3
This commit is contained in:
@@ -132,11 +132,13 @@ const options = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
// 图表初始化
|
||||||
const chart = echarts.init(
|
const chart = echarts.init(
|
||||||
document.getElementById(props.id) as HTMLDivElement
|
document.getElementById(props.id) as HTMLDivElement
|
||||||
);
|
);
|
||||||
chart.setOption(options);
|
chart.setOption(options);
|
||||||
|
|
||||||
|
// 大小自适应
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
chart.resize();
|
chart.resize();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user