Skip to content

Commit 76261f7

Browse files
author
Guillaume Chau
committed
Removed tooltip.js dep (forked) + disable auto dispose with 'null'
Tooltip.js fork fixes some issues
1 parent b70cf25 commit 76261f7

File tree

5 files changed

+580
-213
lines changed

5 files changed

+580
-213
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</p>
1010

1111
<p align="center">
12-
Easy tooltips with <a href="https://github.com/FezVrasta/popper.js#tooltipjs">Tooltip.js</a>
12+
Easy tooltips with <a href="https://github.com/FezVrasta/popper.js">Popper.js</a>
1313
</p>
1414

1515
<br>
@@ -63,11 +63,10 @@ Vue.directive('tooltip', VTooltip)
6363

6464
## Browser
6565

66-
Include [popper.js & tooltip.js](https://popper.js.org/) with [v-tooltip](/dist/v-tooltip.browser.js) in the page.
66+
Include [popper.js](https://popper.js.org/) with [v-tooltip](/dist/v-tooltip.browser.js) in the page.
6767

6868
```html
6969
<script src="https://unpkg.com/popper.js"></script>
70-
<script src="https://unpkg.com/tooltip.js"></script>
7170
<script src="https://unpkg.com/v-tooltip"></script>
7271
```
7372

@@ -158,7 +157,7 @@ Or a reactive property:
158157

159158
- `content` - HTML text to be displayed in the tooltip
160159
- `classes` - *(see above)*
161-
- `delay` - Show/Hide delay (ms)
160+
- `delay` - Show/Hide delay, or object: `{ show: 500, hide: 100 }` (ms)
162161
- `placement` - *(see above)*
163162
- `trigger` - Events triggering the tooltip separated with spaces: `'hover'`, `'click'`, `'focus'` or `'manual'` (`'manual'` can't be combined with any other event)
164163
- `offset` - Offset of the position (px)
@@ -190,7 +189,7 @@ The default global options are:
190189
defaultBoundariesElement: undefined,
191190
defaultPopperOptions: {},
192191
autoHide: true,
193-
// Auto destroy tooltip DOM nodes (ms)
192+
// Auto destroy tooltip DOM nodes (ms), set `null` to disable
194193
disposeTimeout: 5000,
195194
}
196195
```
@@ -248,10 +247,10 @@ VTooltip.enabled = window.innerWidth > 768
248247
margin: 5px;
249248
border-color: black;
250249
}
251-
250+
252251
&[x-placement^="top"] {
253252
margin-bottom: 5px;
254-
253+
255254
.tooltip-arrow {
256255
border-width: 5px 5px 0 5px;
257256
border-left-color: transparent !important;
@@ -263,10 +262,10 @@ VTooltip.enabled = window.innerWidth > 768
263262
margin-bottom: 0;
264263
}
265264
}
266-
265+
267266
&[x-placement^="bottom"] {
268267
margin-top: 5px;
269-
268+
270269
.tooltip-arrow {
271270
border-width: 0 5px 5px 5px;
272271
border-left-color: transparent !important;
@@ -278,7 +277,7 @@ VTooltip.enabled = window.innerWidth > 768
278277
margin-bottom: 0;
279278
}
280279
}
281-
280+
282281
&[x-placement^="right"] {
283282
margin-left: 5px;
284283

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"homepage": "https://github.com/Akryum/vue-tooltip#readme",
3030
"dependencies": {
31-
"tooltip.js": "^1.1.4"
31+
"popper.js": "^1.12.6"
3232
},
3333
"devDependencies": {
3434
"babel-core": "^6.0.0",

0 commit comments

Comments
 (0)