File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
- /* eslint-disable @typescript-eslint/ban-ts-comment */
2
1
import { Directive , DirectiveBinding } from 'vue'
3
2
import Tooltip from 'bootstrap/js/dist/tooltip'
4
3
@@ -75,15 +74,12 @@ const BTooltip: Directive<HTMLElement> = {
75
74
} ,
76
75
updated ( el ) {
77
76
const title = el . getAttribute ( 'title' )
78
- const originalTitle = el . getAttribute ( 'data-bs-original-title' )
79
- const instance = Tooltip . getInstance ( el )
80
-
81
- el . removeAttribute ( 'title' )
82
77
83
- if ( title && title !== originalTitle ) {
84
- // @ts -ignore
78
+ if ( title ) {
79
+ const instance = Tooltip . getInstance ( el )
85
80
instance ?. setContent ( { '.tooltip-inner' : title } )
86
81
el . setAttribute ( 'data-bs-original-title' , title )
82
+ el . removeAttribute ( 'title' )
87
83
}
88
84
} ,
89
85
unmounted ( el ) {
You can’t perform that action at this time.
0 commit comments