我使用ExtJS的6.2未能解决依赖于Ext.ux
我在app.json以下行:
"requires": [
"font-awesome",
"ux"
],
我试图创建一个使用LiveSearchGrid一个简单的文本视图。 JS,所以我在我的APP_NAME = md_registry文件夹md_registry/app/view/main/ListTest.js
如下:
Ext.define('md_registry.view.main.ListTest', {
extend: 'Ext.ux.LiveSearchGridPanel',
//xtype: 'row-expander-grid',
//store: 'Patients',
xtype: 'mainlisttest',
requires: [
'md_registry.store.Patients',
'Ext.ux.LiveSearchGridPanel'
],
当我尝试做一个煎茶应用程序的构建,我得到以下编译器错误: Failed to resolve dependency Ext.ux.LiveSearchGridPanel for file md_registry.view.main.ListTest
我已经验证该文件中存在的路径: md_registry/ext/packages/ux/classic/src
一切从我读过,指定上述要求我app.json应该是足够的,但它显然不是。
您现在正在创建一个通用应用程序,但不会为您的代码使用正确的文件夹。你一定要考虑[创建一个只有经典的应用程序](https://docs.sencha.com/extjs/6.2.1/guides/application_architecture/developing_for_multiple_screens_and_environments.html),或[正确的文件夹结构的通用应用程序] (https://www.sencha.com/blog/how-to-build-a-great-looking-universal-app-with-ext-js-part-2/)。如果你想创建一个通用的应用程序,但不是现在,你可以[只编译经典](https://stackoverflow.com/questions/39074214/universal-app-only-build-classic-toolkit)。 – Alexander
酷!感谢您的链接。现在更有意义。 –
如果您将此作为答案发布,我会选择它。 –