我正在使用Vue软件包,它没有选项来更改其模板。 因此,现在我以JavaScript方式操作DOM,并且想知道是否存在Vue方式。
createNotetakerButton(args){
var self = this;
var contentDiv = args.element.getElementsByClassName('e-popup-content')[0];
var minutesDiv = document.createElement("div");
minutesDiv.className = "e-description";
var minutesIconDiv = document.createElement("div");
minutesIconDiv.className = "minutesIcon fa fa-keyboard-o e-icons";
var minutesNotetakerDiv = document.createElement("div");
minutesNotetakerDiv.className = "e-date-time-wrapper e-text-ellipsis";
var minutesNotetakerNameDiv = document.createElement("div");
minutesNotetakerNameDiv.className = "startMinutes e-date-time-details e-text-ellipsis";
minutesNotetakerNameDiv.innerText = args.data.noteTaker.users.fullname
minutesNotetakerDiv.appendChild(minutesNotetakerNameDiv);
minutesDiv.appendChild(minutesIconDiv);
minutesDiv.appendChild(minutesNotetakerDiv);
contentDiv.appendChild(minutesDiv);
if(args.data.noteTaker.user_id == this.user.id){
minutesNotetakerNameDiv.innerText = args.data.noteTaker.users.fullname + ' - Notuleren'
minutesNotetakerDiv.addEventListener("click", function(){
self.currentMeeting = args.data;
self.checkDateMeeting = true;
});
$('.startMinutes').css('cursor', 'pointer');
}
},