繁体   English   中英

使用Ext.create创建时,Sencha Touch表单不可用

[英]Sencha Touch forms not usable when created with Ext.create

我有这个:

my.Settings = {
    id: 'settings',
    xtype: 'panel',
    title: 'Settings',
    iconCls: 'settings',
    layout: 'card',
    items:[
        my.form1,
        my.form2
    ]
};

my.form1是配置对象时,该窗体是可见且可单击的(输入允许输入,选择弹出下拉选项等)。

但是,当我尝试使用Ext.defineExt.create ,该窗体看起来很直观,但是没有任何选择。 如果使用选项卡面板,则这些选项卡不可单击,并且在表单上的输入将不会聚焦或调出键盘,并且似乎根本不会响应输入。

这是我尝试的方法:

Ext.define('my.form1', {
extend: 'Ext.form.Panel'
config:{...}
}

...

items: [
   Ext.create('my.form1',{id: 'myForm1'})
]

第二种方法导致表格损坏呢? 我正在尝试使用requireExt.create进行动态加载,但是如果我无法获得最简单的情况,我将无法执行此操作。

您是否设置了当前活动项目? 因为您使用卡布局:

var panel = Ext.create('Ext.Panel', {
layout: 'card',
items: [
    {
        html: "First Item"
    },
    {
        html: "Second Item"
    },
    {
        html: "Third Item"
    },
    {
        html: "Fourth Item"
    }
]
});
// here we set the active item to show on the screen
panel.getLayout().setActiveItem(1);

有关更多信息,请参见http://docs.sencha.com/touch/2-0/#!/api/Ext.layout.Card

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM