1

我想开发一个具有体系结构的Extjs 6应用程序MVVM。在这个应用程序中,我想使用GeoExt 3

我不知道如何将 GeoExt 3 库添加到应用程序?

我该怎么做?

4

1 回答 1

0

您必须使用 GeoExt3 创建一个包。对于 Extjs-6 中的打包,请阅读此处

如何使用 sencha 命令打包 GeoExt

sencha cmd从这里安装(使用版本 6 进行测试,目前仅作为预览版)。

要生成一个包,您通常首先workspace通过发出

sencha -sdk /path/to/ext-nnn 生成工作空间 /path/to/workspace

在工作区内部将存储库克隆geoext3packages子文件夹中:

$ cd /path/to/workspace/packages
$ git clone https://github.com/KaiVolland/geoext3.git GeoExt3
$ cd GeoExt3

然后你可以发出

$ sencha 包构建

或者,如果您的源不在 sencha 工作空间内,您可以配置工作空间的路径,然后构建:

$ sencha config --prop workspace.config.dir=/path/to/workspace/.sencha/workspace 然后打包构建

将 GeoExt 添加到本地 sencha 存储库

初始化本地“GeoExt Contributors”存储库:

$ sencha package repo init -name "GeoExt Contributors" -email "dev@geoext.org"

将包添加到此

$ sencha 包添加 D:/xampp/htdocs/ExtProjects/GeoExt3/build/GeoExt/GeoExt.pkg

将您的应用程序创建为heer
要在 sencha 应用程序中使用此包,只需将“GeoExt”添加到 app.json 中的“requires”-array 中:

/**
 * The list of required packages (with optional versions; default is "latest").
 *
 * For example,
 *
 *      "requires": [
 *          "charts"
 *      ]
 */
"requires": [
    "GeoExt"
],

最后构建应用程序如下:

$ sencha 应用程序构建

于 2015-07-22T15:37:50.377 回答