如何将GeoExt3添加到Extjs 6 MVVM架构? [英] How can I add GeoExt3 to Extjs 6 MVVM architecture?
问题描述
我想使用<$ c开发 Extjs 6 应用程序$ c> 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).
要生成包,您通常首先创建一个sencha 工作区
通过发布
To generate a package you usually first create a sencha workspace
by issuing
sencha -sdk / path / to / ext-nnn生成工作区/路径/工作区
sencha -sdk /path/to/ext-n.n.n generate workspace /path/to/workspace
在工作区内将 geoext3
存储库复制到包
子文件夹:
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 package build
$ 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 then package build
$ sencha config --prop workspace.config.dir=/path/to/workspace/.sencha/workspace then package build
将GeoExt添加到本地sencha存储库
创建当地的GeoExt Contributor资源库:
Adding GeoExt to a local sencha repository
Initalize the local "GeoExt Contributors" repository:
$ sencha package repo init -nameGeoExt Contributor-emaildev@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应用程序只是一个ddGeoExt到您的app.json中的需要-array
:
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 app build
$ sencha app build
这篇关于如何将GeoExt3添加到Extjs 6 MVVM架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!