Closed lizhen789 closed 2 weeks ago
@lizhen789 is attempting to deploy a commit to the EFE Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
vue-echarts | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 5, 2024 5:56am |
我给线上的 demo 加了一个 loading 切换,没有复现这个问题,切换 theme
的时候会更新 loading-options
,然后你再切换一下 loading
试试。
https://vue-echarts.dev/#polar
通过provide方式不行,因为你对代理对象进行了unref,所以失去了属性的响应式,导致参数改变后realLoadingOptions的值没有更新,你可以试试,我刚试了你的方式,通过props方式是可以。
我找到原因了,自己搞错了,用了shallowRef,而不是直接用的ref。你看看合不合吧,主要原因是shallowRef的问题。
好的,那当前行为是符合预期的,我先关闭了。
修复加载动画参数loadOptions改变后,再次显示loading时,loadOptions参数没有及时更新问题。
具体效果可以查看PolarChart.vue这个demo。