Kendo UI 类型脚本问题
Kendo UI Type Script Issue
我已经从包管理器控制台安装了 Kendo UI 的最新类型定义文件,并将该文件包含在类型脚本中:
/// <reference path="../scripts/typings/kendo-ui/kendo-ui.d.ts" />
我也尝试安装以前的版本,但遇到了同样的问题:
drillDownDataSource: any = new kendo.data.TreeListDataSource({
transport: {
read: {
url: 'StatutoryIncome/GetStatutoryIncomeStatementView/',
dataType: "json",
type: "POST",
async: true,
cache: true,
autoBind: true, // This property is not accessible
data: function() {},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {
models: kendo.stringify(options.models)
};
}
}
}
},
}
}
正如我在上面的代码中提到的,自动绑定 属性 不可访问,即使我删除了 auto-bind 属性 parameterMap 函数给出错误。
另外 kendoTreelist 的功能如 content 不可访问
基于 KendoUI docs,parameterMap
应该嵌套在 transport
下,而不是在 transport.read
下。
据我所知 autobind
在 DataSource
配置中不存在,这个配置元素通常在组件本身上可用。 (例如参见 [=16=])
我已经从包管理器控制台安装了 Kendo UI 的最新类型定义文件,并将该文件包含在类型脚本中:
/// <reference path="../scripts/typings/kendo-ui/kendo-ui.d.ts" />
我也尝试安装以前的版本,但遇到了同样的问题:
drillDownDataSource: any = new kendo.data.TreeListDataSource({
transport: {
read: {
url: 'StatutoryIncome/GetStatutoryIncomeStatementView/',
dataType: "json",
type: "POST",
async: true,
cache: true,
autoBind: true, // This property is not accessible
data: function() {},
parameterMap: function(options, operation) {
if (operation !== "read" && options.models) {
return {
models: kendo.stringify(options.models)
};
}
}
}
},
}
}
正如我在上面的代码中提到的,自动绑定 属性 不可访问,即使我删除了 auto-bind 属性 parameterMap 函数给出错误。 另外 kendoTreelist 的功能如 content 不可访问
基于 KendoUI docs,parameterMap
应该嵌套在 transport
下,而不是在 transport.read
下。
据我所知 autobind
在 DataSource
配置中不存在,这个配置元素通常在组件本身上可用。 (例如参见 [=16=])