我有以下看法:
<div id="root" class="container">
<template>
<popover trigger="hover" effect="fade" placement="top" title="Title">
<button class="btn btn-default">Popover on bottom</button>
</popover>
</template>
</div>
<script src="https://unpkg.com/vue@2.1.3/dist/vue.js"></script>
<script src="lesson.js"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-strap/1.1.37/vue-strap.min.js"></script>
我的 course.js 文件如下所示:
新的 Vue({ el: "#root",
data: {
content: 'Lorem ipsum dolor sit amet consectetur adipisicing elit, sed do eiusmod',
},
components: {
popover: VueStrap.popover
},
});
但后来我收到以下错误:
[Vue warn]: failed to compile template:
<span v-el:trigger> <slot></slot> <div v-el:popover v-if=show
:class="['popover',placement]" :transition=effect>
<div class=arrow></div> <h3 class=popover-title v-if=title>
<slot name=title>{{title}}</slot>
</h3> <div class=popover-content> <slot name=content>{{{content}}}</slot>
</div> </div> </span>
- invalid expression: {{{content}}}
(found in component <popover>)
请帮忙