首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >tab.Panel在tab.Panel里面?

tab.Panel在tab.Panel里面?
EN

Stack Overflow用户
提问于 2014-02-18 17:55:41
回答 1查看 47关注 0票数 0

我正在用家庭标签写一个简单的应用程序,其中应该有3个标签,叫做“早餐”、“午餐”和“晚餐”。然而,标签在家里不起作用。它们显示,但对点击没有反应。

代码:

view/Main.js

代码语言:javascript
运行
复制
Ext.define('MyApp.view.Main', {
extend: 'Ext.tab.Panel',
requires: ['Ext.TitleBar'],
xtype: 'main',
config: {
    tabBarPosition: 'bottom',
    items: [
        {
            xtype: 'menu',
        }
    ]
}

});

视图/Menu.js

代码语言:javascript
运行
复制
Ext.define('MyApp.view.Menu', {
extend: 'Ext.tab.Panel',
requires: ['Ext.TitleBar'],
xtype: 'menu',
config: {
    title: 'Menu',
    iconCls: 'home',
    tabBar: {
        layout: {
            pack: 'center'
        }
    },
    items: [
        {
            title: 'Breakfast',
            items: {
                docked: 'top',
                xtype: 'titlebar',
                title: 'Breakfast Menu'
            },

            html: [
                "Breakfast menu will be here"
            ].join("")
        },
        {
            title: 'Lunch',


            items: {
                docked: 'top',
                xtype: 'titlebar',
                title: 'Lunch Menu'
            }

            html: [
                "Lunch menu will be here"
            ].join("")
        },
        {
            title: 'Dinner',

            items: {
                docked: 'top',
                xtype: 'titlebar',
                title: 'Dinner Menu'
            },

            html: [
                "Dinner menu will be here"
            ].join("")
        },
    ]
}

})

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-02-18 18:10:04

问题解决了..。显然,命名为xtype:‘菜单’导致了问题。不要用通用名称命名xtype!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21861682

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档