【发布时间】:2018-08-11 19:34:45
【问题描述】:
我正在尝试将 Bootstrap 4 与 VueJS 单页应用程序一起使用,但无法弄清楚如何让 tooltip 工作。 (注意:我知道有一个 Bootstrap-vue 项目,但我不想使用那个......但是)
这是我的简单测试:
<template>
<div>
<span id='tip'>Test link</span>
</div>
</template>
<script>
import $ from 'jquery';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/js/dist/popover.js';
import 'bootstrap/js/dist/tooltip.js';
export default {
name: 'test',
created: function() {
$('#tip').tooltip({
title: 'hello world'
});
}
};
</script>
但是,这只是呈现链接而没有工具提示。
控制台没有错误。那么,我在这里做错了什么?
【问题讨论】:
标签: vuejs2 bootstrap-4 twitter-bootstrap-tooltip