Skip to content

Commit ad700e1

Browse files
authored
Merge pull request #496 from MrTanoshii/main
[BTooltip] Re-enable typescript
2 parents b58f138 + b96867f commit ad700e1

File tree

2 files changed

+31
-28
lines changed

2 files changed

+31
-28
lines changed

package-lock.json

Lines changed: 29 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/directives/BTooltip.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/ban-ts-comment */
21
import {Directive, DirectiveBinding} from 'vue'
32
import Tooltip from 'bootstrap/js/dist/tooltip'
43

@@ -76,15 +75,13 @@ const BTooltip: Directive<HTMLElement> = {
7675
updated(el) {
7776
const title = el.getAttribute('title')
7877
const originalTitle = el.getAttribute('data-bs-original-title')
79-
const instance = Tooltip.getInstance(el)
80-
81-
el.removeAttribute('title')
8278

8379
if (title && title !== originalTitle) {
84-
// @ts-ignore
80+
const instance = Tooltip.getInstance(el)
8581
instance?.setContent({'.tooltip-inner': title})
8682
el.setAttribute('data-bs-original-title', title)
8783
}
84+
el.removeAttribute('title')
8885
},
8986
unmounted(el) {
9087
const instance = Tooltip.getInstance(el)

0 commit comments

Comments
 (0)