Encapsulating Echarts into components in Vue, loading problem

wants to encapsulate Echarts as a component in Vue, which can be rendered simply by passing in the configuration through props, but now there is a Loading problem.
is to use the showLoading () display to load when the props has not been passed in, and when the rendering is finished, the closeLoading () closes the loading. But how can you tell if it has been rendered in the component?

Feb.22,2022

you write a loading state in the child component and pass the value through props. When your parent component gets the data, the loading becomes loaded. After obtaining the data, change the loading to false.


echarts has a loading attribute
< IEcharts id= "monthChar": option= "month.option": loading= "month.loading" @ ready= "getSalesMonth" @ click= "showMonthDialog" / >

Menu