如何将 GeoExt3 添加到 Extjs 6 MVVM 架构? [英] How can I add GeoExt3 to Extjs 6 MVVM architecture?

查看:17
本文介绍了如何将 GeoExt3 添加到 Extjs 6 MVVM 架构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用 开发一个 Extjs 6 应用程序MVVM 架构.在这个应用程序中,我想使用 GeoExt 3.

I want to develop an Extjs 6 application with MVVM architecture. In this application, I want to use GeoExt 3.

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

I don't know what to do to add GeoExt 3 library to application?

我该怎么做?

推荐答案

您必须使用 GeoExt3 创建一个包.要在 Extjs-6 中打包,请阅读 heer.

You must create a package with GeoExt3. For packaging in Extjs-6 read heer.

从这里安装 sencha cmd(用版本 6,目前仅作为预览).

Install sencha cmd from here (tested with the version 6, only as preview right now).

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

To generate a package you usually first create a sencha workspace by issuing

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

sencha -sdk /path/to/ext-n.n.n generate workspace /path/to/workspace

在工作区内部,将 geoext3 存储库克隆到 packages 子文件夹中:

Inside of the workspace clone the geoext3 repository into the packages subfolder:

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

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

然后你可以发出

$ sencha 包构建

$ sencha package build

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

Alternatively, if your source isn't living inside of a sencha workspace, you can configure the path to a workspace and then build:

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

$ sencha config --prop workspace.config.dir=/path/to/workspace/.sencha/workspace then package build

将 GeoExt 添加到本地 sencha 存储库

初始化本地GeoExt Contributors"存储库:

Adding GeoExt to a local sencha repository

Initalize the local "GeoExt Contributors" repository:

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

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

将包添加到此

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

$ sencha package add D:/xampp/htdocs/ExtProjects/GeoExt3/build/GeoExt/GeoExt.pkg

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

create your app as heer.
To use this package in a sencha app just add "GeoExt" to the "requires"-array in your app.json:

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

最后构建应用程序如下:

and at the end build app as follow:

$ sencha 应用程序构建

$ sencha app build

这篇关于如何将 GeoExt3 添加到 Extjs 6 MVVM 架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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