为了账号安全,请及时绑定邮箱和手机立即绑定

完整日历 4.0 fc-更多(2+ 更多) 弹出窗口在骑行

完整日历 4.0 fc-更多(2+ 更多) 弹出窗口在骑行

开心每一天1111 2022-08-27 14:04:10
我需要与每天单元格块中弹出窗口消失相关的帮助,当一天内事件太多时,将显示一个看起来像“+2更多”的链接。如何避免这个弹出窗口,我的要求是默认的事件Limit:2和接下来,对于剩余的它应该显示一个按钮,然后单击此按钮,它应该导航到类似于上面屏幕截图中的日间模式。
查看完整描述

2 回答

?
皈依舞

TA贡献1851条经验 获得超3个赞

然后使用 fullcalendar.io/docs/eventLimitClick 更改单击该链接时发生的情况。如果您注意到,其中一个选项是“天”。– ADyson 非常感谢 Adyson


查看完整回答
反对 回复 2022-08-27
?
温温酱

TA贡献1752条经验 获得超4个赞

在日历初始化中使用下面的函数,我们可以删除默认的更多链接文本“+n more”。


eventLimitText: function() {

return " ";

}

使用以下CSS(在HTML样式标签中),我们可以插入一个类似外观的按钮,而不是默认文本。


a.fc-more {background-size: contain;cursor: pointer;width: 14px;height: 6px;

letter-spacing: 1px;

background-image: url(dots.png);

background-color: #F0F0F0;

border-top: 1px solid #CCCCCC;

border-right: 1px solid #CCCCCC;

border-bottom: 1px solid #CCCCCC;

border-left: 1px solid #CCCCCC;

border-radius: 4px;

margin-top: 10px;

float: right;

background-position: center;

}

点.png是具有 3 个水平点的图像。在日历实例化中使用以下功能,我们可以单击“更多按钮”以更改为日视图。


eventLimit: 3,

eventLimitClick: function(cellInfo) {

calendar.gotoDate(cellInfo.date);

calendar.changeView('timeGridDay');

}

下图是我的本地日历点击更多按钮视图与悬停文本(点击更多单元格)和悬停css样式为:


a.fc-more:hover:after {

 content: 'Click for more cells';

 font-size: 9px;

 text-align: center;

 position: absolute;

 margin-top: -2px;

 margin-left: 15px;

 line-height: 2em;

 width: 12em;

 border-radius: 0.3em;

 background: #ffffcc;

 display: inline-block;

 }

//img1.sycdn.imooc.com//6309b4170001ec5a05410383.jpg

查看完整回答
反对 回复 2022-08-27
  • 2 回答
  • 0 关注
  • 233 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号