在Aurelia Typescript中创建剑道网格
我试图使用typescript在aurelia中使用剑道网格,但在尝试初始化它时,我一直收到一个错误在Aurelia Typescript中创建剑道网格,typescript,kendo-grid,aurelia,Typescript,Kendo Grid,Aurelia,我试图使用typescript在aurelia中使用剑道网格,但在尝试初始化它时,我一直收到一个错误 /// <reference path="../../../../vendors/Kendoui/typescript/kendo.all.d.ts" /> export class Test { attached() { $("#grid").kendoGrid(); } } // 导出类测试 { 附( { $(“#网格”).kendoG
/// <reference path="../../../../vendors/Kendoui/typescript/kendo.all.d.ts" />
export class Test
{
attached()
{
$("#grid").kendoGrid();
}
}
//
导出类测试
{
附(
{
$(“#网格”).kendoGrid();
}
}
我得到的错误是未处理的拒绝类型错误:$(…)。kendoGrid不是一个函数
有人能告诉我我做错了什么吗
编辑:我已经考虑过使用奥雷莉亚剑道桥牌,但出于性能原因,我选择不使用它
谢谢来看看奥雷莉亚·肯杜伊大桥项目: 这是其元件目录中的一个示例:
<template>
<ak-grid k-data-source.bind="datasource"
k-pageable.bind="{ refresh: true, pageSizes: true, buttonCount: 10 }"
k-sortable.bind="true">
<!-- Column definitions in HTML -->
<ak-col k-title="Contact Name" k-field="ContactName">
<ak-template>
<!-- Column templates directly in your markup - where they belong! -->
<div class="customer-photo" style="background-image: url(../content/web/Customers/${CustomerID}.jpg);"></div>
<!-- Use Aurelia binding features like interpolation, value converters and binding behaviors -->
<div class="customer-name">${ContactName}</div>
</ak-template>
</ak-col>
<ak-col k-title="Contact Title" k-field="ContactTitle"></ak-col>
<ak-col k-title="Company Name" k-field="CompanyName"></ak-col>
<ak-col k-field="Country"></ak-col>
</ak-grid>
</template>
根据你最初的问题,你可能没有输入剑道。将导入语句放在viewmodel文件的顶部:
import './path/to/kendo-ui.js';
看看aurelia kendoui大桥项目: 这是其元件目录中的一个示例:
<template>
<ak-grid k-data-source.bind="datasource"
k-pageable.bind="{ refresh: true, pageSizes: true, buttonCount: 10 }"
k-sortable.bind="true">
<!-- Column definitions in HTML -->
<ak-col k-title="Contact Name" k-field="ContactName">
<ak-template>
<!-- Column templates directly in your markup - where they belong! -->
<div class="customer-photo" style="background-image: url(../content/web/Customers/${CustomerID}.jpg);"></div>
<!-- Use Aurelia binding features like interpolation, value converters and binding behaviors -->
<div class="customer-name">${ContactName}</div>
</ak-template>
</ak-col>
<ak-col k-title="Contact Title" k-field="ContactTitle"></ak-col>
<ak-col k-title="Company Name" k-field="CompanyName"></ak-col>
<ak-col k-field="Country"></ak-col>
</ak-grid>
</template>
根据你最初的问题,你可能没有输入剑道。将导入语句放在viewmodel文件的顶部:
import './path/to/kendo-ui.js';
你是怎么进口剑道的?我想使用es2015,systemJS bu后来在我的索引页面中手动导入js文件。我并不需要导入所有的小部件来缩小尺寸。当然,按我的方式做可能意味着剑道库将在需要的时候提前加载。你是如何导入剑道的?我想使用es2015,systemJS bu后来在我的索引页面中手动导入js文件。我并不需要导入所有的小部件来缩小尺寸。当然,按照我的方式做可能意味着剑道库将在需要的时候提前加载。感谢Manuel的建议,我已经看过了,甚至已经开始工作了,但是由于性能问题,我现在不打算使用它。感谢Manuel的建议,我已经看过了,甚至已经开始工作了,但是由于性能问题,我现在不打算使用它。我写了一个博客,可能会让你感兴趣,关于将第三方库集成到Aurelia这里:我写了一个博客,可能会让你感兴趣,关于将第三方库集成到Aurelia这里: