W niej mam buttony.
Chciałbym teraz pod te buttony podpiąć plugin tooltop z Bootstrapa.
Nie bardzo wiem jak się dobrać do html po wygenerowaniu przez Vue.
Mam zdefiniowany event:
Kod
events: {
tooltips: function() {
$('[data-toggle="tooltip"]').tooltip();
}
},
tooltips: function() {
$('[data-toggle="tooltip"]').tooltip();
}
},
i w metodzie pobierającej dane robię tak:
Kod
loadFiles: function() {
this.$http.get('/api/files/' + this.lastIndex, function (data, status, request) {
this.$set('files', data)
this.$emit('tooltips');
}).error(function (data, status, request) {
// handle error
})
},
this.$http.get('/api/files/' + this.lastIndex, function (data, status, request) {
this.$set('files', data)
this.$emit('tooltips');
}).error(function (data, status, request) {
// handle error
})
},
Jednak takie wywołanie nie zawsze da efekt bo może tak być że jquery odpali się szybciej niż wyrenderuje widok.