debian-mirror-gitlab/app/assets/javascripts/vue_shared/directives/tooltip.js

18 lines
229 B
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
import $ from 'jquery';
2017-09-10 17:25:29 +05:30
export default {
bind(el) {
2018-11-08 19:23:39 +05:30
$(el).tooltip({
trigger: 'hover',
});
2017-09-10 17:25:29 +05:30
},
componentUpdated(el) {
2018-11-08 19:23:39 +05:30
$(el).tooltip('_fixTitle');
2017-09-10 17:25:29 +05:30
},
unbind(el) {
2018-11-08 19:23:39 +05:30
$(el).tooltip('dispose');
2017-09-10 17:25:29 +05:30
},
};