vue3 - 警告 `shallowRef` instead of `ref` - 解决
完整警告
[Vue warn]: Vue received a Component which was made a reactive object. This can lead to unnecessary
performance overhead, and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.
这是因为参数内容有组件,
如
元素是图标组件
因此需要使用
shallowRef 即可
本文来自博客园,作者:岑惜,转载请注明原文链接:https://www.cnblogs.com/c2g5201314/p/17633529.html
响应开源精神相互学习,内容良币驱除劣币