* [bug#152264,doing,0.5h] add showDependencyConfirm.

This commit is contained in:
sunguangming
2025-11-11 06:33:52 +00:00
parent 28861c3c5e
commit 53124c3472
+25 -1
View File
@@ -113,4 +113,28 @@ function setModuleState(moduleName, checked)
function isModuleEnabled(moduleName)
{
return $('[name="module[' + moduleName + ']"]').prop('checked');
}
}
/**
* 显示依赖关系确认对话框
* @param {string} message - 确认消息
* @param {Function} onConfirm - 确认回调
* @param {Function} onCancel - 取消回调
*/
function showDependencyConfirm(message, onConfirm, onCancel)
{
zui.Modal.confirm(
{
message: message,
icon: 'icon-exclamation-sign',
iconClass: 'warning-pale rounded-full icon-2x'
}).then((res) =>
{
if(res)
{
if(onConfirm) onConfirm();
return false;
}
if(onCancel) onCancel();
});
}