From 2f1910ec87452085283a5a3510871ae00eb8262f Mon Sep 17 00:00:00 2001 From: Justineo Date: Tue, 20 Feb 2024 10:52:18 +0800 Subject: [PATCH] fix: make inner wrapper fit to the root size (#761) --- src/ECharts.ts | 2 +- src/style.css | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ECharts.ts b/src/ECharts.ts index 5a0b924..9063140 100644 --- a/src/ECharts.ts +++ b/src/ECharts.ts @@ -308,7 +308,7 @@ export default defineComponent({ attrs.ref = "root"; attrs.class = attrs.class ? ["echarts"].concat(attrs.class) : "echarts"; return h(TAG_NAME, attrs, [ - h("div", { ref: "inner", class: "echarts-inner" }) + h("div", { ref: "inner", class: "vue-echarts-inner" }) ]); } }); diff --git a/src/style.css b/src/style.css index 8644945..46ac19d 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,2 @@ -x-vue-echarts,.echarts-inner{display:block;width:100%;height:100%;min-width:0} +x-vue-echarts{display:flex;flex-direction:column;width:100%;height:100%;min-width:0} +.vue-echarts-inner{flex-grow:1;min-width:0}