我正在使用很多Kendo UI窗口。有什么方法可以在全球范围内以某种方式指定默认值?或者,也许更现实的版本,我可以创建一些父母预定义的值,然后只是覆盖我需要改变的值?全局设置Kendo UI窗口值
例如,我想同样的错误行为,并为所有窗口的模态参数,所以我想这样做:
$("#parentWindow").kendoWindow({
modal: true,
error: function() {
this.close();
new Notification().error();
}
});
然后使用父窗口为新基地窗户:
$("#newWindow").kendoWindow({
title: "This window should have the options (modal and error) of the parentWindow",
}).??getTheRestOfTheValuesFromParent()??;
或重写一些参数:
$("#newWindow2").kendoWindow({
modal: false,
title: "A window with overwritten modal parameter",
}).??getTheRestOfTheValuesFromParent()??;
是它在某种程度上可能为了达到这个目的,有没有可能像C#继承一样? 也许这是一个愚蠢的问题,但我不熟悉JS。
谢谢你,它看起来非常有用 –