Ext js 6.2,将西面板钉住,以免它崩溃?

时间:2017-12-06 07:24:05

标签: javascript jquery extjs

我正在使用Ext Js v6.2,在我的应用程序中,我有West面板,它可以折叠或展开,但在那我有Pin Tools按钮因此,如果用户点击Pin,面板停留直到用户点击取消固定,我是新手到Ext js,我已尝试使用面板展开或折叠但它没有&#39 ; t帮忙,请解决问题。提前谢谢。

tools: [{
    type: 'pin',
    cls: 'leftPanelPin',
    tooltip: 'Pin Panel',
    handler: function() {
        toggleCollapse: function() {
            if (this.lockedPanel) {
                this[this.collapsed ? 'expand' : 'collapse'](animate);
                return this;
            }
        }
    }
}]

1 个答案:

答案 0 :(得分:1)

您可以使用beforecollapse侦听器检查面板是否已固定并返回false,这样可以防止崩溃。小提琴:

https://fiddle.sencha.com/#view/editor&fiddle/2aj8