Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
710 views
in Technique[技术] by (71.8m points)

angular - What is the type of p-fullCalendar "el" element. how to access it, and how to modify its HTML?

I would like to access the HTML of a p-fullCalendar event in order to modify it. However, when I call console.log on a single p-fullCalendar event, the component that contains the information about the HTML, children etc. is not associated with any type. All other components have a concrete type:

calendar.component.ts:478 {
el: a.fc-daygrid-event.fc-daygrid-block-event.fc-h-event.fc-event,
event: EventApi,
jsEvent: MouseEvent,
view: ViewApi
}

So, how can I access the HTML of the el component of the whole event?

For example, these two attempts fail - an error is thrown.

  handleMouseEnter(hoveredEvent) {
    hoveredEvent.el.find('.div.fc-event-main')
        .append("<div class='desc'>" + "bla" + "</div>");
  }
  handleMouseEnter(hoveredEvent) {
    hoveredEvent.el.html();
  }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...