我在 Liferay 6.2 中有模式对话框 有没有办法将 destoryOnHide 或 destroyOnClose 设置为对话框,但在渲染过程之后?
最佳答案
如果有Dialog对象的引用,则可以使用set操作。例如:
var dlg = Liferay.Util.Window.getWindow({ id: 'd123', ..your-config-obj.. });
// now it is rendered
dlg.set('destroyOnHide', false);
不幸的是,我没有看到 destroyOnClose 类似的事情,但你可以尝试以同样的方式执行此操作。 如果您没有该对话框的引用,您可以使用(例如)获取一个引用
Liferay.Util.Window.getById('d123');
还要确保您的脚本中依赖于“liferay-util-window”。
关于javascript - 如何将 "destoryOnHide"或 "destroyOnClose"设置为 Liferay 中现有的模式对话框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51303075/