Ext.TabPanel 项目处理程序

发布于 2024-09-26 19:21:23 字数 502 浏览 1 评论 0原文

单击选项卡时是否有可能获得事件?

var buttons = [
    {
        title: 'Home',
        iconCls: 'home'
    }, {
        title: 'Search',
        iconCls: 'search'
    }
];

var panel = new Ext.TabPanel({
        fullscreen: true,
        cls: 'panel',
        ui: 'dark',
        tabBar: {
                    dock: 'bottom',
                    layout: {
                       pack: 'center'
                    },
                },
        items:buttons
    });

PS 谷歌翻译,抱歉。

Is there any possibility to get an event when you click on the tab?

var buttons = [
    {
        title: 'Home',
        iconCls: 'home'
    }, {
        title: 'Search',
        iconCls: 'search'
    }
];

var panel = new Ext.TabPanel({
        fullscreen: true,
        cls: 'panel',
        ui: 'dark',
        tabBar: {
                    dock: 'bottom',
                    layout: {
                       pack: 'center'
                    },
                },
        items:buttons
    });

PS Google Translte, sorry.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终止放荡 2024-10-03 19:21:23

按钮数组中的每个项目都是选项卡,它是按钮的后继者,因此具有“handler”属性:

var buttons = [
    {
        title: 'Home',
        iconCls: 'home',
        handler: function(button, event) {
             alert("Button " + button.getText() + " clicked!");
        }

    }, {
        title: 'Search',
        iconCls: 'search'
    }
];

Each items in buttons array are Tabs which is a Button successor so has "handler" property:

var buttons = [
    {
        title: 'Home',
        iconCls: 'home',
        handler: function(button, event) {
             alert("Button " + button.getText() + " clicked!");
        }

    }, {
        title: 'Search',
        iconCls: 'search'
    }
];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文