我尝试在我的新应用程序中使用标准表单类,但收到错误消息
未捕获错误:[Ext.createByAlias] 无法识别的别名:widget.form
我已经导入了所需的库。这是我的代码:
Ext.define('Xx.view.login.Login', {
extend: 'Ext.window.Window',
requires: [
'Ext.form.Panel',
'Xx.view.login.LoginController',
'Xx.view.login.LoginModel',
'Ext.Button',
'Ext.field.Text',
'Ext.field.ComboBox'
],
viewModel: 'login',
controller: 'login',
bodyPadding: 10,
title: 'Login',
closable: false,
cls: 'login',
items: [{
xtype: 'form',
items: [{
xtype: 'textfield',
name: 'username',
bind: '{username}',
fieldLabel: 'Username',
allowBlank: false,
enableKeyEvents: true,
listeners: {
specialKey: 'onSpecialKey'
}
},
当我更改代码时
xtype: 'form'
到
xtype: 'panel'
UI 呈现。 先谢谢你了