我正在尝试使用Ken UI作为我的数据网格样式 但是我在开始的步骤中挣扎,我甚至无法建立一个新的剑道对象 我在BundleConfig
中包含了以下文件bundles.Add(new ScriptBundle("~/Script/kendo/2013.1.319").Include(
"~/Scripts/kendo/2013.1.319/jquery.min.js",
"~/Scripts/kendo/2013.1.319/kendo.web.min.js",
"~/Scripts/kendo/2013.1.319/kendo.grid.min.js",
"~/Scrip`enter code here`ts/kendo/2013.1.319/kendo.calendar.min.js",
"~/Scripts/kendo/2013.1.319/kendo.data.min.js"
));
和布局页面
@Scripts.Render("~/Script/kendo/2013.1.319")
使用上面的代码我仍然可以声明Kendo Object 我想错过要包含的内容吗?
谢谢
答案 0 :(得分:4)
Kendo的文档很好地详细说明了大多数控件的依赖关系,网格除外。您可以在kendo.grid.min.js中查找依赖项,但是您需要在每个文件中查找它们的依赖项。因此,如果您在没有像require.js或system.js(我最喜欢的)这样的资源加载器的帮助下构建您的依赖项,请按顺序列出网格控件的完整列表:
/* Kendo Grid Dependencies */
kendo.core.min.js
kendo.data.min.js
kendo.userevents.min.js
kendo.window.min.js
kendo.draganddrop.min.js
kendo.columnsorter.min.js
kendo.filtermenu.min.js
kendo.columnmenu.min.js
kendo.groupable.min.js
kendo.pager.min.js
kendo.selectable.min.js
kendo.sortable.min.js
kendo.reorderable.min.js
kendo.resizable.min.js
kendo.mobile.actionsheet.min.js
kendo.mobile.pane.min.js
kendo.ooxml.min.js
kendo.excel.min.js
kendo.grid.min.js
答案 1 :(得分:1)
我建议查看显示示例包配置的documentation:
bundles.Add(new ScriptBundle("~/bundles/kendo")
.Include("~/Scripts/kendo/2012.3.1315/kendo.web.*") // or kendo.all.*
.Include("~/Scripts/kendo/2012.3.1315/kendo.aspnetmvc.*")
);
可以在JavaScript Dependencies帮助主题中找到网格所需的JavaScript文件。
答案 2 :(得分:0)
如果您只需要具有所有功能的kendo网格,问题在于它取决于许多较小的组件。它不是一个单独的文件,但是你可以将它们全部组合在同一个文件中,但我不知道它是否违反了法律。无论如何,列表如下;
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.core.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.angular2.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.calendar.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.popup.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.datepicker.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.userevents.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.numerictextbox.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.validator.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.data.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.binder.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.editable.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.draganddrop.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.window.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.list.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.dropdownlist.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.filtermenu.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.menu.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.columnmenu.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.groupable.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.autocomplete.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.filtercell.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.pager.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.selectable.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.reorderable.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.resizable.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.fx.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.mobile.scroller.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.view.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.mobile.view.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.mobile.loader.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.mobile.pane.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.mobile.popover.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.mobile.shim.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.mobile.actionsheet.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.ooxml.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.excel.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.color.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.drawing.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.pdf.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.progressbar.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.columnsorter.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.grid.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.2.714/js/kendo.aspnetmvc.min.js"></script>
我已经在文件列表中包含angular.js和angular2,如果你不需要那些删除它们。总缩小文件为788KB,而kendo.all.min.js为2.7MB。希望它有所帮助。