0
我在我的流星应用程序中使用完整日历。对于响应式设计,我希望它切换到较小屏幕尺寸的列表视图。更改为列表视图给我以下错误:fullcalendar listview failed
Exception from Tracker afterFlush function
TypeError: spec.class is not a constructor
at Calendar_constructor.instantiateView (fullcalendar_fullcalendar.js?hash=19f7a11…:9324)
at renderView (fullcalendar_fullcalendar.js?hash=19f7a11…:9739)
at initialRender (fullcalendar_fullcalendar.js?hash=19f7a11…:9676)
at Calendar_constructor.render (fullcalendar_fullcalendar.js?hash=19f7a11…:9644)
at HTMLDivElement.<anonymous> (fullcalendar_fullcalendar.js?hash=19f7a11…:87)
at Function.each (jquery.js?hash=c57b3cf…:442)
at jQuery.fn.init.each (jquery.js?hash=c57b3cf…:194)
at jQuery.fn.init.$.fn.fullCalendar (fullcalendar_fullcalendar.js?hash=19f7a11…:66)
at Blaze.TemplateInstance.<anonymous> (calendar.js:90)
at blaze.js?hash=983d07a…:3341
'agendaweek'视图和其他工作就像一个魅力。只是列表视图没有。
这里是一个最小的例子。我使用流星1.4.2.3,并且在流星创建后只添加了fullcalendar:fullcalendar软件包。
main.html中
<head>
<title>testFC</title>
</head>
<body>
<h1>Welcome to Meteor!</h1>
{{> calendar}}
</body>
calendar.html
<template name="calendar">
<div id="events-calendar"></div>
</template>
calendar.js
let options = {
firstDay: 1,
defaultView: 'listWeek',
}
Template.calendar.onRendered(() => {
$('#events-calendar').fullCalendar(options);
});
可能是什么问题呢? 非常感谢您的帮助 best s。