作者:闪亮登台 | 来源:互联网 | 2023-07-11 19:35
如题页面这样写的时候 界面不显示,未空 如果中间随意插入一些文字, 则列表界面就显示了。 原因一般是因为数据层次太多,render函数没有自动更新,需手动强制刷新。 在完成对数据的更新后,强制Vue更新数据this.$force
如题
页面这样写的时候

界面不显示,未空

如果中间随意插入一些文字,

则列表界面就显示了。

原因一般是因为数据层次太多,render函数没有自动更新,需手动强制刷新。

//在完成对数据的更新后,强制Vue更新数据
this.$forceUpdate();