我有一个像这样定义的 YAHOO Panel 对象:
profilesDialog = new YAHOO.widget.Panel("profiles_dialog", {
width: "705px",
height: "609px",
fixedcenter: "contained",
close: true,
draggable: true,
zindex: 2,
autofillheight: "body",
visible: false,
constraintoviewport: true,
modal: true,
zIndex: 1000
});
配置的“close: true”部分会导致在面板中呈现小的关闭按钮。当您单击这个小按钮时,面板将被隐藏。
现在我知道我可以订阅“beforeHideEvent”,这是可取的,但我想知道的是,如果在这个“beforeHideEvent”中满足某些条件,我该如何阻止面板触发它自己的关闭方法。