我有以下观点:
<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>
我的lesson.js文件如下所示:
new 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>)
请帮助
答案 0 :(得分:1)
答案 1 :(得分:0)
实际上,还有另一个版本的vue bootstrap可以正常工作: https://bootstrap-vue.github.io/docs/setup/