angularjs - 通过 JS 类销毁的 Fullcalendar 自定义视图会引发错误
问题描述
我已经通过 JS 类引用文档自定义视图来实现 Fullcalendar 自定义视图。它似乎工作正常,但该destroy
方法引发错误:View.prototype.destroy.apply is not function
.
我使用了以下代码:
var FC = $.fullCalendar;
var View = FC.View;
var BlankView;
BlankView = View.extend({
initialize: function() {
// View.prototype.initialize.apply(this, arguments);
},
setHeight: function(height, isAuto) {
},
render: function () {
this.title = this.title || 'TestView';
if (this.el[0].children.length === 0) this.el.addClass('fc-basic-view').html(this.renderHtml());
},
destroyEvents: function() {
// responsible for undoing everything in renderEvents
},
destroy: function() {
View.prototype.destroy.apply(this, arguments);
},
renderHtml: function () {
this.el.html('<div></div>');
},
});
FC.views.blank = BlankView;
destroy
在自定义视图中实现该方法的任何线索?
解决方案
推荐阅读
- r - R - 由于无意义的序列化,函数内的并行化性能很差,如何改进?
- android - 使用 Kotlin 在 Android 中实现 WebSocket
- javascript - Discord Webhook 速率限制
- java - java BufferedReader & Writer 不能按预期工作
- python - 为什么python在算法中只打印一个数据集?
- r - 在 lapply 中使用特定列计算多个回归分析
- python - 我正在尝试使用 python 从 postgressql 中的列中提取一个值。但我总是得到这个错误:
- typescript - 角度反应控制值未正确更新
- c++ - std::vector 中的 C++ 外部类(定义格式错误)
- react-native - 关于 react-native 应用程序中 pptx 文件的问题