fix: make inner wrapper fit to the root size (#761)

This commit is contained in:
Justineo
2024-02-20 10:52:18 +08:00
parent 48a0664c2b
commit 2f1910ec87
2 changed files with 3 additions and 2 deletions

View File

@ -308,7 +308,7 @@ export default defineComponent({
attrs.ref = "root"; attrs.ref = "root";
attrs.class = attrs.class ? ["echarts"].concat(attrs.class) : "echarts"; attrs.class = attrs.class ? ["echarts"].concat(attrs.class) : "echarts";
return h(TAG_NAME, attrs, [ return h(TAG_NAME, attrs, [
h("div", { ref: "inner", class: "echarts-inner" }) h("div", { ref: "inner", class: "vue-echarts-inner" })
]); ]);
} }
}); });

View File

@ -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}