easysoft / zui

ZUI is an HTML5 front UI framework.
https://openzui.com
MIT License
2.71k stars 690 forks source link

zui.calendar.js有致命错误(1.9.1版本) #175

Closed JIMhackKING closed 4 years ago

JIMhackKING commented 4 years ago

第387行:有一个未定义的变量 fasle, 请修改为 false

catouse commented 4 years ago

能贴一下代码吗? 如果你看到的是类似这样的代码,false 此时并不是作为变量来使用的,而是将 false 与后面的表达式进行绝对相等比较:

if(!silence && false === that.$.callComEvent(that, 'beforeAddEvent', {
    newEvent: e,
    data: that.data
})) {
    return;
}
JIMhackKING commented 4 years ago
// 从日历去除
$("#calendar").data('zui.calendar').removeEvents('job_calendar_' + id);

这段代码,是删除日历里面某个事项的,我是跟着文档去写的 image

然后报错就是这个啦:Uncaught ReferenceError: fasle is not defined

其实也很明显啦,是拼写错误,false 写成了 fasle, 在官网下载的文件里面路径为:lib/calendar/zui.calendar.js 第387行 在git文件里面路径为:dist/lib/calendar/zui.calendar.js 第391行

JIMhackKING commented 4 years ago

我提交一个pull request吧,改也很快,审核一下就好了

JIMhackKING commented 4 years ago

176

easysoft commented 4 years ago

谢谢反馈。:)