Skip to content

Commit 84bdaad

Browse files
committed
fix: correct modal content and title yet again
1 parent b1fa6bd commit 84bdaad

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

index.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,25 @@ export default function vueformPluginToggleConfirm() {
6262
})
6363

6464
const modalContent = computed(() => {
65-
if (!confirmOffText.value && !confirmOnText.value) {
66-
return confirmText.value
67-
} else if (component.value.value && confirmOffText.value) {
68-
return confirmOffText.value
69-
} else {
65+
if (component.value.value && confirmOnText.value && !confirmText.value) {
7066
return confirmOnText.value
7167
}
68+
if (!component.value.value && confirmOffText.value && !confirmText.value) {
69+
return confirmOffText.value
70+
}
71+
72+
return confirmText.value
7273
})
7374

7475
const modalTitle = computed(() => {
75-
if (!confirmOffTitle.value && !confirmOnTitle.value) {
76-
return confirmTitle.value
77-
} else if (component.value.value && confirmOffTitle.value) {
78-
return confirmOffTitle.value
79-
} else {
76+
if (component.value.value && confirmOnTitle.value && !confirmTitle.value) {
8077
return confirmOnTitle.value
8178
}
79+
if (!component.value.value && confirmOffTitle.value && !confirmTitle.value) {
80+
return confirmOffTitle.value
81+
}
82+
83+
return confirmTitle.value
8284
})
8385

8486
const { classes } = useClasses(props, { name: ref('ConfirmModal') }, {

0 commit comments

Comments
 (0)