Javascript vuejs-如何根据条件设置标记参数
我用这种方式展示了一个例子:Javascript vuejs-如何根据条件设置标记参数,javascript,vue.js,Javascript,Vue.js,我用这种方式展示了一个例子: <label v-tippy content="My content text"> 它工作正常,但我现在需要根据一个条件显示它show\u tip==true 如何执行此操作?在本例中,使用as-component而不是as-directive进行条件呈现: <tippy v-if="show_tip" content=""My content text" >
<label v-tippy content="My content text">
它工作正常,但我现在需要根据一个条件显示它show\u tip==true
如何执行此操作?在本例中,使用as-component而不是as-directive进行条件呈现:
<tippy v-if="show_tip" content=""My content text" >
<label slot="trigger" >Label text</label>
</tippy>
标签文本
您能给我一个该指令的链接吗libhere it is:it show this error:装载组件失败:未定义模板或渲染函数。在-->
中找到,我想是的,因为它正在研究另一种方法。我已经导入了.min.js文件并挂载了组件Vue.component(“tippy”,VueTippy)代码>尝试使用“vue tippy”中的import{tippy}将其导入组件中代码>然后将其添加到组件选项
<tippy :visible="show_tip" content=""My content text" >
<label slot="trigger" >Label text</label>
</tippy>