🐛 [Bug]: TinyChart在TinyModal中无法显示
Version
3.22
Vue Version
latest
Link to minimal reproduction
none
Step to reproduce
弹窗默认值没打开, 图表在弹窗中无法显示
附上重现的demo代码: demo.txt
What is expected
No response
What is actually happening
No response
What is your project name
TInyEngine
Any additional comments (optional)
No response
Bot detected the issue body's language is not English, translate it automatically.
Title: 🐛 [Bug]: TinyChart cannot be displayed in TinyModal
这个问题是因为,图表默认会取图表的宽度,如果没有设置宽高的话会去取父级的宽高,modal没有显示的时候宽高为0,解决方法为监听modal的打开,打开后在nextTick中调用组件的resize事件
Bot detected the issue body's language is not English, translate it automatically.
This problem is because the chart will take the width of the chart by default. If the width and height are not set, the width and height of the parent will be taken. When the modal is not displayed, the width and height are 0. The solution is to listen to the opening of the modal. After opening it, call the component's resize event in nextTick.