gpt4 book ai didi

javascript - Ext.msg.show() 的定位 - Extjs

转载 作者:行者123 更新时间:2023-12-03 11:34:51 48 4
gpt4 key购买 nike

我正在尝试定位我的消息框,但徒劳无功。
以下是我的盒子代码:

var msg = Ext.Msg.show({     
msg:'<br><br>'+'Enter Valid Quatity',
buttons: Ext.Msg.OK,
modal: false,
animEl: 'mb9',
cls: 'msgbox',
fn: function(btn){
if(btn == 'ok'){
myMasks.hide();
}
}
});

CSS 黑客:

<style type="text/css">
.msgbox{
left: 257px!important;
top: 266px!important;
width: 250px;
height: 110px;
position: absolute;
box-shadow: 0 0px 0px!important;
}
.x-css-shadow{
display:none !important;
}
</style>

当我修改 css 来定位盒子时,阴影是可见的。我再次使用 css 在 Mozilla 中隐藏了这个阴影,但无法在 IE 中执行相同的操作。

我也遵循了 this link 中给出的答案没有用。

谁能给我一个解决方案,直接使用 Extjs 的配置属性定位框或在 IE 中成功隐藏框的阴影吗?

最佳答案

好的,您可以删除 animEl 配置,因为这对于 ExtJS 4 和 5 无效。并使用 setXY() 方法将 MessageBox 放置在您想要的任何位置:

var msg = Ext.Msg.show({     
msg:'<br><br>'+'Enter Valid Quatity',
buttons: Ext.Msg.OK,
//modal: false, */ No need for this because modal defaults to false */
fn: function(btn){
if(btn == 'ok'){
myMasks.hide();
}
}
});
Ext.Msg.setXY([257,266],false); // You can set the second argument to another object if you want the box to animate from it.

关于javascript - Ext.msg.show() 的定位 - Extjs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26561456/

48 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com