我正在使用很多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。
謝謝你,它看起來非常有用 –