gpt4 book ai didi

twitter-bootstrap - 使用 bootstrap.js 从 extjs 应用程序文件夹外部加载 extjs

转载 作者:行者123 更新时间:2023-12-02 01:47:20 26 4
gpt4 key购买 nike

我已经使用 sencha cmd 构建了 extjs 5 应用程序,我想在我的自定义 hmtl 页面中使用它。我有以下结构:

extjsapp
.sencha
app
build
ext
packages
......
bootstrap.js
bootstrap.json
app.js
.......
customapp
index.html
script.js

我想做的是在我的 customapp/index.html 中请求 bootstrap.js,它应该从 extjsapp 文件夹加载所有包和 ext。默认情况下,它会尝试从与使用 boostrap.js 的位置相关的 customapp/ext 加载它们。我如何制作/构建它,以便它从 extjsapp/ext 而不是 customapp/ext 加载 ext。

应该可以从任何位置使用 bootstrap.js 来加载 extjs 框架和 extjs 文件夹中构建的所有必需包。

最佳答案

app.json 文件中,您会看到一个关于类路径的条目。这用于告诉 Sencha Cmd 你的源文件在哪里。

同样在该文件中,您将看到一个关于 indexHtmlPath 的条目。这表示 index.html 文件的位置。

/**
* Comma-separated string with the paths of directories or files to search. Any classes
* declared in these locations will be available in your class "requires" or in calls
* to "Ext.require". The "app.dir" variable below is expanded to the path where the
* application resides (the same folder in which this file is located).
*/
"classpath": "${app.dir}/app",
...
/**
* The file path to this application's front HTML document. This is relative
* to this app.json file.
*/
"indexHtmlPath": "index.html",

更改 ExtJS 库所在的位置涉及编辑隐藏文件 - .sencha/app/sencha.cfg。那里有一个属性 - ext.dir - 您需要更改。

关于twitter-bootstrap - 使用 bootstrap.js 从 extjs 应用程序文件夹外部加载 extjs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24928836/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com