一如文件「Extjs4 ,如何偵測是否點在pop up window 的外面」
一樣,可以考慮在window的mask再加工
如果是全域設定,就直接改 .x-mask css就可以了
但是如果是各別的window (彈吧七彩霓虹window )
就要在show / close事件中加減cls了
----css --------------------------
.seemsNoWinMask.x-mask {
filter: alpha(opacity=0);
opacity: .0;
background:white !important;
}
-----ext js 4------------------------------------
let win = Ext.create('Ext.window.Window', {
listeners: {
show: function (win) {
if (this.modal) {
var dom = Ext.dom.Query.select('.x-mask');
var el = Ext.get(dom[0]);
el.addCls('seemsNoWinMask');
}
},
close: function (win) {
if (this.modal) {
var dom = Ext.dom.Query.select('.x-mask');
var el = Ext.get(dom[0]);
el.removeCls('seemsNoWinMask');
}
}
},
......
....
-----------------------------------------------------
extjs 6.2
--------------------------------------------
listeners: {
show: function (win) {
if (this.modal) {
var dom = Ext.dom.Query.select('.x-mask');
for (var i = 0; i < dom.length; i++) {
Ext.get(dom[i]).addCls('seemsNoWinMask');
}
}
},
close: function (win) {
if (me.modal) {
var dom = Ext.dom.Query.select('.x-mask');
for (var i = 0; i < dom.length; i++) {
Ext.get(dom[i]).removeCls('seemsNoWinMask');
}
}
}
}
...
...
--------------------------------------
以上
(2020了,我還在寫extjs .....)
沒有留言:
張貼留言