Javascript ExtJS中的评级表
我试图从中复制示例评级表。我不明白为什么会出现这样的错误:Javascript ExtJS中的评级表,javascript,extjs,require,extjs6,Javascript,Extjs,Require,Extjs6,我试图从中复制示例评级表。我不明白为什么会出现这样的错误: [ERR] BUILD FAILED [ERR] com.sencha.exceptions.ExBuild: Failed to find any files for C:\users\Diederiksj\Desktop\FreshApp\classic\src\view\form\RatingForm.js::ClassRequire::Ext.ux.rating.Picker [ERR] at com.sencha.comm
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: Failed to find any files for C:\users\Diederiksj\Desktop\FreshApp\classic\src\view\form\RatingForm.js::ClassRequire::Ext.ux.rating.Picker
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.
[ERR] java:99)
[ERR]
[ERR] Total time: 3 seconds
[ERR] The following error occurred while executing this line:
C:\users\Diederiksj\Desktop\FreshApp\.sencha\app\build-impl.xml:247: The following error occurred while executing this line:
C:\users\Diederiksj\Desktop\FreshApp\.sencha\app\watch-impl.xml:61: The following error occurred while executing this line:
C:\users\Diederiksj\Desktop\FreshApp\.sencha\app\build-impl.xml:380: The following error occurred while executing this line:
C:\users\Diederiksj\Desktop\FreshApp\.sencha\app\init-impl.xml:382: com.sencha.exceptions.ExBuild: Failed to find any files for C:\users\Diederiksj\Desktop\FreshApp\classic\src\view\form\RatingForm.js::ClassRequire::Ext.ux.rating.Picker
当我查看approtDirectory/ext/packages/ux/classic/src/rating时,Picker.js文件就在那里,它是在生成应用程序时由ExtJS自动创建的。下面是我试图要求Picker类的类的摘录:
Ext.define('FreshApp.view.form.RatingForm', {
extend: 'Ext.panel.Panel',
xtype: 'form-rating',
requires: [
'Ext.ux.rating.Picker'
],
title: 'Rating Form',
viewModel: true,
bodyPadding: 10,
width: 520,
height: 500,
minHeight: 400,
resizable: true,
frame: true,
layout: {
type: 'vbox',
align: 'stretch'
},
defaultType: 'textfield',
任何帮助都将不胜感激。谢谢。您需要指定您的应用程序需要ux软件包。您可以通过在app.json中添加以下代码段来实现这一点
"requires": [
"ux"
],
您需要指定您的应用程序需要ux软件包。您可以通过在app.json中添加以下代码段来实现这一点
"requires": [
"ux"
],
你的app.js中是否有类似路径:{'Ext.ux':'path/to/ux/'}你的app.js中是否有类似路径:{'Ext.ux':'path/to/ux/'}我明天才能重试,但我记得,我没有在app.json中添加任何require语句。如果有效的话,我一定会给你们两个+1。谢谢。我在extjs 4.2.2中找不到app.json,如何在extjs 4.2.2中解决这个问题?我明天才能重试,但我记得,我没有在app.json中添加任何require语句。如果有效的话,我一定会给你们两个+1。谢谢。我在extjs 4.2.2中找不到app.json,如何在extjs 4.2.2中解决这个问题?