V2EX › Vue.js
请问有人用 Vue Router 4 出现过提示 ‘Vue received a Component which was made a reactive object’ 吗?
By gzf6 at 2021 年 3 月 10 日 · 3686 次点击Vue3+VueRouter4+Vite2
runtime-core.esm-bundler.js:38 [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`.
Component that was made reactive: {name: "Layout", components: {…}, __scopeId: "data-v-13877386", setup: ƒ, render: ƒ, …}
at <RouterView>
at <App>
2 条回复 • 2021-11-22 17:40:27 +08:00
|
1
gzf6 OP 因为我路由是分模块文件的,应该统一导出一个 layout 给这些模块用,结果我每个模块都各自引入了一个 layout ,笨死了 😄
|
|
2
mashirozx 2021 年 11 月 22 日
|
› Vue.js