Button 如何关闭extjs中的父容器
我试图用this.up.close关闭extjs中的父窗口,但未定义此.$className。 我正在寻找一个不使用Ext.getCmp的解决方案Button 如何关闭extjs中的父容器,button,extjs,Button,Extjs,我试图用this.up.close关闭extjs中的父窗口,但未定义此.$className。 我正在寻找一个不使用Ext.getCmp的解决方案 你的范围错了。您为元素提供了应用程序的范围,这就是此.up无法工作的原因。如果删除作用域:这应该可以使用this.up获取父容器 我用你的sencha小提琴做了个叉子 您的范围是错误的。您为元素提供了应用程序的范围,这就是此.up无法工作的原因。如果删除作用域:这应该可以使用this.up获取父容器 我用你的sencha小提琴做了个叉子 无论如何,不
你的范围错了。您为元素提供了应用程序的范围,这就是此.up无法工作的原因。如果删除作用域:这应该可以使用this.up获取父容器 我用你的sencha小提琴做了个叉子
您的范围是错误的。您为元素提供了应用程序的范围,这就是此.up无法工作的原因。如果删除作用域:这应该可以使用this.up获取父容器 我用你的sencha小提琴做了个叉子
无论如何,不确定要隐藏什么:
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.Container', {
renderTo: Ext.getBody(),
items: [{
xtype: 'panel',
title: 'my Panel',
html: "Some text.",
width: 350
}, {
xtype: 'box',
html: '<a href="#" class="link-forgot-password"> Close window</a>',
listeners: {
render: function () {
this.getEl().on('click', function () {
//this.up('container').hide(); // Hide wrapper container
this.previousSibling().hide(); // Hide previous Panel
}, this);
}
}
}]
});
}
});
无论如何,不确定要隐藏什么:
Ext.application({
name: 'Fiddle',
launch: function () {
Ext.create('Ext.Container', {
renderTo: Ext.getBody(),
items: [{
xtype: 'panel',
title: 'my Panel',
html: "Some text.",
width: 350
}, {
xtype: 'box',
html: '<a href="#" class="link-forgot-password"> Close window</a>',
listeners: {
render: function () {
this.getEl().on('click', function () {
//this.up('container').hide(); // Hide wrapper container
this.previousSibling().hide(); // Hide previous Panel
}, this);
}
}
}]
});
}
});