报错:react.development.js:1130 Uncaught Error: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead.

 

 原因:是因为getControl 我用了异步async 的方法。而调用的时候,没有加上await导致的。

 

解决办法:加上await 就可以了

 

posted @ 2024-04-01 14:13  信铁寒胜  阅读(293)  评论(0)    收藏  举报