[英]How to add the Ext.window.window modal positioned inside another grid panel in EXTJS
默認情況下,模態窗口將添加到正文中。 但是,我想在添加按鈕單擊事件時在面板中添加模態窗口。 我必須添加什么代碼。 有人建議一個想法。
模態窗口代碼:
self.sampleWindow = Ext.create("Ext.window.Window", {
title: 'Add Deals',
layout: 'vbox',
closeAction: 'hide',
padding: 10,
cls: 'custom-modal',
constrain:'true',
height: (mq.matches)?"77%":"70%",
width: (mq.matches)?"67%":"60%",
margin:'31 0 0 -36',
scrollable : true,
items: [self.buildSample(),
self.buildSampleGrid()],
listeners:{
hide:function(win){
win.close();
}
}
});
小組代碼:
var panel1 = Ext.create("Ext.panel.Panel",{
id: 'dealInformationblock',
minHeight:10,
padding: 10,
margin:(nq.matches)?'10 30 5 10':'10 10 5 0',
cls: ['innerCard','card-layout-border'],
layout:{
type: 'vbox',
align: 'center'
},
items:[
SampleInformation
]
})
return panel1;
上面的模態窗口應放置在面板1內。
使用showAt( x, [y] )
顯示window.x和y應該是面板內的值。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.