如何在Vue.js的元素Popover组件中使用HTML标记?
我正在Vue.js中使用元素Popover组件()。popover正在工作,我能够显示文本内容如何在Vue.js的元素Popover组件中使用HTML标记?,vue.js,element-io,Vue.js,Element Io,我正在Vue.js中使用元素Popover组件()。popover正在工作,我能够显示文本内容 <el-popover placement="bottom" title="Title" width="200" trigger="click" content="this is content, this is content, this is content" > <el-button type="primary" slot
<el-popover
placement="bottom"
title="Title"
width="200"
trigger="click"
content="this is content, this is content, this is content"
>
<el-button type="primary" slot="reference" circle style="background-color:white;border-color:white" >
<img src="img/if_Help_1493288.png" alt="Help" height="42" width="42">
</el-button>
</el-popover>
是否可以在popover内容中显示常规html元素,例如
、或 如popover组件描述中所述,内容可以作为字符串或默认值通过content
prop传递
因此,如果未指定插槽名称,则任何内容都将作为默认
插槽传递。以下是您案例的一个示例:
<el-popover
placement="bottom"
title="Title"
width="200"
trigger="click"
>
<el-button type="primary" slot="reference" circle style="background-color:white;border-color:white" >
<img src="img/if_Help_1493288.png" alt="Help" height="42" width="42">
</el-button>
<div>
this is content, <br> <strong>this is content</strong>, <br> this is content
</div>
</el-popover>
这是内容,
这是内容,
这是内容
请注意,content
prop如果通过,将被默认插槽的内容替换。不能同时使用它们。这就是我要找的。非常感谢你的帮助。