![](/img/trans.png)
[英]How to declare component props on html <template> tag on Vue.js
[英]How to pass html template as props to Vue component
我有一个包含html tag
的textarea
组件,我希望在此组件中以编辑模式获取html
。 我使用Laravel
生成html。
<template>
<div>
<textarea
:value="content"
:name="name"
:id="id">
<slot></slot>
</textarea>
</div>
</template>
在刀片页面我习惯了这个组件:
<my-component>
<p class="textbox">hello world</p>
</my-component>
当我把这个组件放在页面中时,在textarea中显示标签<slot></slot>
。 我该怎么办? 你对我的需求有什么解决方案吗?
谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.