<button @click=“onDelete” data-uid=“102”>
Please, what’s the corrected method of retrieving the data attribute of an element using the ‘@click’ - method function.
<button @click=“onDelete” data-uid=“102”>
Please, what’s the corrected method of retrieving the data attribute of an element using the ‘@click’ - method function.
if it is a router component file:
onDelete: function (e) {
var $ = this.$;
var id = $(e.target).attr('data-uid');
...
}
Thanks so much. This solved it.