tiny-vue icon indicating copy to clipboard operation
tiny-vue copied to clipboard

🐛 [Bug]: TinyChart在TinyModal中无法显示

Open stwflyfox opened this issue 7 months ago • 3 comments

Version

3.22

Vue Version

latest

Link to minimal reproduction

none

Step to reproduce

弹窗默认值没打开, 图表在弹窗中无法显示 Image

附上重现的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

stwflyfox avatar May 11 '25 05:05 stwflyfox

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: TinyChart cannot be displayed in TinyModal

Issues-translate-bot avatar May 11 '25 05:05 Issues-translate-bot

这个问题是因为,图表默认会取图表的宽度,如果没有设置宽高的话会去取父级的宽高,modal没有显示的时候宽高为0,解决方法为监听modal的打开,打开后在nextTick中调用组件的resize事件

Davont avatar May 29 '25 07:05 Davont

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.

Issues-translate-bot avatar May 29 '25 07:05 Issues-translate-bot