laravel - 如何在 vue 内联模板中使用嵌套组件变量?
问题描述
我在使用 Laravel 后端填充的刀片模板中有类似的内容:
<component-1 inline-template>
<child-component-1 v-show='comps.cc1'></child-component-1>
<child-component-2>
<grandchild-component-1 v-show='subComps.cc1></grandchild-component-1>
<grandchild-component-2 v-show='subComps.cc2></grandchild-component-2>
</child-component-2>
</component-1>
comps对象正在引用来自component-1的变量,这没关系,但subComps对象也试图从component-1引用变量,我希望它引用来自child-component-2的变量。
我怎样才能做到这一点?
提前致谢。
解决方案
推荐阅读
- html - 如何使图像缩小到正常视图?
- python - 将字符串转换为具有特定精度的浮点数的干净方法?
- python - 如何从 python 中的 DOT 代码生成图形图像?
- java - IntelliJ IDEA 错误:无法找到或加载主类 GradleStart
- python - 使用 OpenCV 用另一个图像替换纯绿色区域
- reactjs - 如何通过 Typescript React 应用程序中的脚本访问库?
- angular - 无法匹配任何路由。URL 段:“登录”
- python-3.x - 使用 pandas 数据框根据 A 列和 B 列中的值填充 C 列
- r - R将字符和向量列表转换为data.table of characters
- javascript - 如何格式化值数组以形成谷歌图表直方图的分布?