ExtJS 6-没有CMD的数据透视 [英] ExtJS 6 - pivot without CMD

查看:87
本文介绍了ExtJS 6-没有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/

I would like to evaluate the features of pivot grid using simple test html without cmd.
I've read the information from those links but I still couldn't install a working environment
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网站上的数据透视插件('ext-addons-6.0.1-trial.zip')
并将它们解压缩到我的测试Web服务器上:

I've downloaded the core framework ('ext-6.0.1-trial.zip')
and pivot addon ('ext-addons-6.0.1-trial.zip') from sencha site
and unpacked them on my test web server:

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

www.mydummy.server.org/lib/extjs/ext-6.0.0/ <- framework www.mydummy.server.org/lib/extjs/package/ <- addon

对其进行了测试,并使用以下命令调用了厨房接收器示例中的枢轴: www.mydummy.server.org/lib/extjs/ext-6.0.0/examples/kitchensink/index.html
在这样的设置中,它们启动时没有错误.

and tested it calling the pivots in kitchensink example with:
www.mydummy.server.org/lib/extjs/ext-6.0.0/examples/kitchensink/index.html
in such setup they start without errors.

插件的目标位置对我来说有点奇怪, 我确定我应该将插件解压缩到框架的package目录中
www.mydummy.server.org/lib/extjs/ext-6.0.0/package/
但后来厨房的例子不起作用
(kitchensink调用../../../package/pivot调用数据透视)

The target location of the addon is a bit strange for me, I was sure I should unpack addon to the package directory of the framework
www.mydummy.server.org/lib/extjs/ext-6.0.0/package/
but then the kitchensink example doesn't work
(kitchensink calls pivot with ../../../package/pivot )

现在,我想知道如何在自己的html示例中包含框架和插件,
我已经尝试过类似的事情:

Now I wonder how should I include framework and addon in own html example,
I've tried something like:

<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]某些请求的文件无法加载.

The links are ok (no http error) but the simple pivot is not rendered and framework couldn't load further classes:
[Ext.Loader] Some requested files failed to load.

没有cmd的extjs和数据透视的正确设置是什么?

What is the correct setup of extjs and pivot without cmd?

谢谢你, 安妮

推荐答案

在此处耦合事物.

对于KitchenSink,如果您打开 www.mydummy.server .org/lib/extjs/ext-6.0.0/在浏览器中,您将看到一个index.html.将有一个绿色按钮显示示例,这些示例将指向 www.mydummy.server.org/lib/extjs/ext-6.0.0/build/examples/index.html (请注意其中的build目录).然后,如果您单击KitchenSink,它将从 www.mydummy.server.org/lib/extjs/ext-6.0.0/build/examples/kitchensink/(再次注意build目录).这是因为KitchenSink是Cmd应用程序,它将构建到该build目录. build目录之外的examples目录是应用程序的开发版本,这就是我们仍然为源提供它的原因.

For the KitchenSink, if you open up 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/ (once again, notice the build dir). This is due to the KitchenSink being a Cmd app which will build to that build dir. The examples dir outside the build dir is the development version of the app which is why we still provide it for the source.

接下来,关于如何在Cmd包之外使用枢轴网格的Cmd包.我们构建了Cmd软件包,因此,如果您查看该软件包的build目录,您应该会看到一个构建的JavaScript和CSS文件,可以通过HTML中的<script><link>加载该文件.

Next, about how to use the pivot grid's Cmd package outside of the Cmd package. we build the Cmd package so if you look in the package's build dir you should see a built JavaScript and CSS file that you can load via <script> and <link> in your 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.JsonSimletExt.ux.ajax.PivotSimlet(位于框架的ux包中).可以像这样进行扩展,但是PivotSimlet仅在您想要在应用程序中具有模拟数据时才需要(除非在dev中,否则大多数情况下不需要).有两种解决方法,可以从pivot.js中删除该类,或者包括ux的JavaScript/CSS(但是该程序包中包含很多您可能不需要的代码).

Notice I have the exporter.js loading before pivot.js and this mostly works except that I do see something that I'd call a bug for us. In pivot.js, we define Ext.ux.ajax.PivotSimlet which extends Ext.ux.ajax.JsonSimlet (which is in the framework's ux package). This is fine to extend like this but PivotSimlet would only be needed if you want to have simulated data in your application (which most wouldn't unless in dev). Two ways you can fix this, remove that class from pivot.js or include the ux's JavaScript/CSS (however that package contains a lot of code that you may not need).

这篇关于ExtJS 6-没有CMD的数据透视的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆