我正在做一个完整的日历-角度组件,在其中我有一个自定义按钮叫做过滤器,点击它,模式/对话框/菜单项应该会像下拉菜单一样打开。那么我们如何在customButton点击函数下实现这一点呢?有没有一种添加HTML的方法和方法?如图所示。
calendarOptions:CalendarOptions = {
initialView:'dayGridMonth',
themeSystem:'bootstrap',
nowIndicator:true,
//showNonCurrentDates:false,
fixedWeekCount:false,
customButtons:{
myCustomBtton: {
bootstrapFontAwesome:'fas fa-sliders-h',
click: function(click,element){
//how do i add the code here`enter code here`
},
},
},
headerToolbar:{
left:'prev,next today',
center:'title',
right:'dayGridMonth,dayGridWeek,dayGridDay,listMonth myCustomBtton'
},发布于 2021-04-01 10:34:06
我是Angular的新手,但是我能够通过在eventDidMount钩子之后调用的函数为下拉菜单注入一些超文本标记语言来创建一个下拉列表。
https://fullcalendar.io/docs/event-render-hooks
我很乐意给你一些示例CSS/JS来显示隐藏下拉菜单,如果它对你有用的话。
https://stackoverflow.com/questions/66781776
复制相似问题