1
我創建了一個包煎茶「共同」使用煎茶命令工作區包:Extjs6依賴問題與
sencha generate package common
,並放置在文件工作區/包/本地/稱爲「mytext.js」 SRC:
Ext.define('Common.mytext',{
extend: 'Ext.form.field.Text',
xtype: 'mytext',
initComponent: function(){
Ext.apply(this,{
onBlur: function(){
//Set The corrected value for the field
}
});
this.callParent(arguments);
}
});
在我的主應用程序中,我在我的app.json文件中包含了「common」的要求。
當我做了sencha app refresh
我得到以下相關性錯誤:
[ERR] Failed to resolve dependency Ext.form.field.Text for file Common.mytext
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.form.field.Text
[ERR]
[ERR] Total time: 1 second
[ERR] The following error occurred while executing this line:
/home/xxxxxxxxx/bin/Sencha/Cmd/6.0.2.14/plugins/ext/current/plugin.xml:427: The following error occurred while executing this line:
/var/www/xxxxxx/apps/client/.sencha/app/build-impl.xml:381: The following error occurred while executing this line:
/var/www/xxxxxx/apps/client/.sencha/app/init-impl.xml:382: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.form.field.Text
我錯過了一些配置?謝謝。
是'workspace/packages/local/common/src'中的文件嗎? –
CD。感謝您的迴應。是的,這是我放置文件的地方。 – user1532602
你使用'現代'工具包嗎? 「現代」工具包沒有這樣的類... –