是否可以在子组件中渲染父组件

Is it possible to render a parent component in child component

1.Created 一个名为 .

的组件

2.Created 调用并包含在 .

中的子组件

3.Tried 包含在无限循环的结尾。

DEMO - Circular Dependency

是的,但是你需要非常小心并且确定你在做什么:

我在这里创建了一个关于 'Circular Dependency' 的演示,但使用了特定的数据,因此它不会进入无限循环并在某个级别中断

看看

WORKING DEMO