gpt4 book ai didi

javascript - 如何向扩展 Kendo 组合框的组合框添加新参数?

转载 作者:行者123 更新时间:2023-11-30 20:07:33 24 4
gpt4 key购买 nike

我有如下代码:

(function () {
"use strict";
function comboBox() {
comboBox.superclass.constructor.apply(this, arguments);
this.params = $.extend(true, {
suggest: true,
highlightFirst: true,
filter: "contains",
minLength: 0,
width: "auto"
}, this.params);

this.tControl = this.fn.kendoComboBox({
change: $.proxy(this.onChange, this),
minLength: this.params.minLength,
filter: this.params.filter,
suggest: this.params.suggest,
highlightFirst: this.params.highlightFirst,
dataSource: this.params.dataSource.data,
dataTextField: this.params.dataTextField || "Text",
dataValueField: this.params.dataValueField || "Value",
template: this.params.template,
clearButton: this.params.clearButton,
width: this.params.width,
readonly: ?
}).data("kendoComboBox");

this.tControl.list.width(this.params.width);
}

extend(comboBox, ui.WrappedControl);

// ?
comboBox.prototype.preventEnteringTextInVatType = function () {
this.childs.vatType.tControl.input.attr("readonly", true);
};

ui.ComboBox = comboBox;
})();

我想将“只读”参数(现在有 ?)与 preventEnteringTextInVatType 函数连接起来。怎么做?

最佳答案

你试过https://www.telerik.com/forums/make-combobox-non-editable的建议了吗? ? http://dojo.telerik.com/@ggkrustev/Axobi 上的链接演示似乎完全按照您的意愿行事。

关于javascript - 如何向扩展 Kendo 组合框的组合框添加新参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52736647/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com