Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
748 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...