[英]how to use twig in vue
i have simple modal window plan.vue with slot我有带插槽的简单模态窗口 plan.vue
...
<div class="plan__content">
<slot></slot>
</div>
...
there is also example.vue where it is used还有使用它的example.vue
<button
@click="showPlan"
>
Show plan
</button>
<plan
v-if="isPlanVisible"
@closePlan="closePlan"
>
</plan>
and i also have twig file plan.html.twig我也有树枝文件 plan.html.twig
{% block field %}
<table id="plan_table">
<caption>
<h2> {{smth.name}} </h2>
</caption>
...
</table>
{% endblock %}
can i add my twig here <plan> </plan>
somehow?我可以在这里添加我的树枝
<plan> </plan>
以某种方式吗? I tried to find a solution but only found how to add vue to twig and not vice versa我试图找到一个解决方案,但只找到了如何将 vue 添加到 twig 而不是反之亦然
You can not embed a twig file inside a Vue component and render it.您不能在 Vue 组件中嵌入 twig 文件并渲染它。 You have two alternative options:
您有两种选择:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.