ExtJS 6 - 没有 CMD 的枢轴

ExtJS 6 - pivot without CMD

我想使用没有 cmd 的简单测试 html 来评估枢轴网格的功能。
我已经阅读了这些链接中的信息,但我仍然无法安装工作环境
https://docs.sencha.com/extjs/6.0/co...ivot_grid.html
https://www.sencha.com/forum/showthr...out-Sencha-Cmd http://se.sencha.com/setup-guide/

我已经下载了核心框架('ext-6.0.1-trial.zip')
和来自 sencha 站点
的 pivot 插件 ('ext-addons-6.0.1-trial.zip') 并在我的测试网络服务器上解压它们:

www.mydummy.server.org/lib/extjs/ext-6.0.0/ <- 框架 www.mydummy.server.org/lib/extjs/package/ <- 插件

并测试它在 kitchenssink 示例中调用枢轴:
www.mydummy.server.org/lib/extjs/ext-6.0.0/examples/kitchensink/index.html
在这样的设置中,他们开始时没有错误。

插件的目标位置对我来说有点奇怪, 我确定我应该将插件解压到框架的包目录
www.mydummy.server.org/lib/extjs/ext-6.0.0/包/
但是 kitchensink 示例不起作用
(kitchensink 使用 ../../../package/pivot 调用 pivot)

现在我想知道我应该如何在自己的 html 示例中包含框架和插件,
我试过类似的东西:

<link href="www.mydummy.server.org/lib/extjs/ext-6.0.0/build/classic/theme-neptune/resources/theme-neptune-all.css">
<script src="www.mydummy.server.org/lib/extjs/ext-6.0.0/build/ext-all.js"></script>
<link href="www.mydummy.server.org/lib/extjs/packages/pivot/build/neptune/resources/pivot-all.css">
<script src="www.mydummy.server.org/lib/extjs/packages/pivot/build/pivot.js"'></script>
<script src="www.mydummy.server.org/lib/extjs/packages/exporter/build/exporter.js"'></script>

链接正常(无 http 错误)但未呈现简单数据透视表 并且框架无法进一步加载 类:
[Ext.Loader]一些请求的文件加载失败。

没有 cmd 的 extjs 和 pivot 的正确设置是什么?

谢谢, 安妮

这里有一些东西。

对于 KitchenSink,如果您打开 www.mydummy.server.org/lib/extjs/ext-6.0.0/ in your browser you will be shown an index.html. There will be a green button to show the examples which will point to www.mydummy.server.org/lib/extjs/ext-6.0.0/build/examples/index.html (notice the build dir in there). Then if you click on the KitchenSink it will load from www.mydummy.server.org/lib/extjs/ext-6.0.0/build/examples/kitchensink/(再次注意 build 目录)。这是因为 KitchenSink 是一个 Cmd 应用程序,它将构建到 build 目录。 build 目录之外的 examples 目录是应用程序的开发版本,这就是为什么我们仍然提供它作为源代码的原因。

接下来,关于如何在Cmd包之外使用pivot grid的Cmd包。我们构建了 Cmd 包,所以如果你查看包的 build 目录,你应该看到一个内置的 JavaScript 和 CSS 文件,你可以通过 <script><link> 在你的 HTML.

<html>
    <head>
        <title>Pivot Grid Test</title>

        <link href="http://releases/ext/6.0.1.250/build/classic/theme-neptune/resources/theme-neptune-all.css">
        <script src="http://releases/ext/6.0.1.250/build/ext-all.js"></script>

        <link href="http://localhost/ext-addons-6.0.1/packages/pivot/build/neptune/resources/pivot-all.css">
        <script src="http://localhost/ext-addons-6.0.1/packages/exporter/build/exporter.js"></script>
        <script src="http://localhost/ext-addons-6.0.1/packages/pivot/build/pivot.js"></script>
    </head>
    <body></body>
</html>

请注意,我在 pivot.js 之前加载了 exporter.js,这主要是有效的,除了我确实看到了一些我称之为错误的东西。在 pivot.js 中,我们定义 Ext.ux.ajax.PivotSimlet 扩展 Ext.ux.ajax.JsonSimlet (在框架的 ux 包中)。像这样扩展很好,但是只有当你想在你的应用程序中有模拟数据时才需要 PivotSimlet (除非在开发中,否则大多数不会)。有两种方法可以解决这个问题,从 pivot.js 中删除 class 或包含 ux 的 JavaScript/CSS(但是该包包含很多您可能不需要的代码) .

非常感谢您的解释。 我添加了这些 类 以获得一个工作示例:

<script src="http://releases/ext/6.0.1.250/packages/ux/src/ajax/Simlet.js"</script>
<script src="http://releases/ext/6.0.1.250/packages/ux/src/ajax/DataSimlet.js"</script>
<script src="http://releases/ext/6.0.1.250/packages/ux/src/ajax/JsonSimlet.js"</script>