【发布时间】:2021-06-06 07:01:39
【问题描述】:
如何在 vue3 的 setup 中强制更新?
在使用Options Api时,我可以使用this.$forceUpdate()来强制更新。如何在vue3的setup函数中做同样的事情?
【问题讨论】:
-
您能给我们举个例子,在这种情况下您需要 forceUpdate 吗?还有other ways to re-render a component。
-
@wittgenstein 读起来很难,但我喜欢你在 Tractatus 上的工作。
-
这是个好问题,我也在寻找答案