feat(editor): Add prompt to save when leaving with unsaved changes in new canvas (no-changelog) (#9967)

This commit is contained in:
Alex Grozav
2024-07-08 15:57:42 +03:00
committed by GitHub
parent cb1bbf5fd3
commit cc27b57953
3 changed files with 70 additions and 35 deletions

View File

@@ -41,12 +41,12 @@ export function useMessage() {
config?: ElMessageBoxOptions,
) {
const resolvedConfig = {
...(config ?? (typeof configOrTitle === 'object' ? configOrTitle : {})),
cancelButtonClass: 'btn--cancel',
confirmButtonClass: 'btn--confirm',
distinguishCancelAndClose: true,
showClose: config?.showClose ?? false,
closeOnClickModal: false,
...(config ?? (typeof configOrTitle === 'object' ? configOrTitle : {})),
};
if (typeof configOrTitle === 'string') {