@finema/core 2.5.1 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<AlertDialogRoot :open="true">
|
|
3
|
-
<AlertDialogPortal>
|
|
4
|
-
<AlertDialogOverlay :class="ui.overlay()" />
|
|
5
|
-
<AlertDialogContent
|
|
6
|
-
:class="ui.base()"
|
|
7
|
-
>
|
|
8
|
-
<Icon
|
|
9
|
-
v-if="!propsSafe.isHideIcon"
|
|
10
|
-
:name="getIcon"
|
|
11
|
-
:class="ui.icon()"
|
|
12
|
-
/>
|
|
13
|
-
<div :class="ui.wrapper()">
|
|
14
|
-
<AlertDialogTitle :class="ui.title()">
|
|
15
|
-
{{ propsSafe.title }}
|
|
16
|
-
</AlertDialogTitle>
|
|
17
|
-
<AlertDialogDescription
|
|
18
|
-
v-if="propsSafe.description"
|
|
19
|
-
:class="ui.description()"
|
|
20
|
-
>
|
|
21
|
-
{{ propsSafe.description }}
|
|
22
|
-
</AlertDialogDescription>
|
|
23
|
-
|
|
24
|
-
<div :class="ui.buttonGroup()">
|
|
25
|
-
<Button
|
|
26
|
-
v-if="propsSafe.isShowCancelBtn"
|
|
27
|
-
type="button"
|
|
28
|
-
color="neutral"
|
|
29
|
-
variant="outline"
|
|
30
|
-
:class="ui.cancelButton()"
|
|
31
|
-
@click="emits('close', false)"
|
|
32
|
-
>
|
|
33
|
-
{{ propsSafe.cancelText }}
|
|
34
|
-
</Button>
|
|
35
|
-
<Button
|
|
36
|
-
type="button"
|
|
37
|
-
:color="propsSafe.isConfirm ?
|
|
38
|
-
:class="ui.confirmButton()"
|
|
39
|
-
@click="emits('close', true)"
|
|
40
|
-
>
|
|
41
|
-
{{ propsSafe.confirmText }}
|
|
42
|
-
</Button>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</AlertDialogContent>
|
|
46
|
-
</AlertDialogPortal>
|
|
47
|
-
</AlertDialogRoot>
|
|
2
|
+
<AlertDialogRoot :open="true">
|
|
3
|
+
<AlertDialogPortal>
|
|
4
|
+
<AlertDialogOverlay :class="ui.overlay()" />
|
|
5
|
+
<AlertDialogContent
|
|
6
|
+
:class="ui.base()"
|
|
7
|
+
>
|
|
8
|
+
<Icon
|
|
9
|
+
v-if="!propsSafe.isHideIcon"
|
|
10
|
+
:name="getIcon"
|
|
11
|
+
:class="ui.icon()"
|
|
12
|
+
/>
|
|
13
|
+
<div :class="ui.wrapper()">
|
|
14
|
+
<AlertDialogTitle :class="ui.title()">
|
|
15
|
+
{{ propsSafe.title }}
|
|
16
|
+
</AlertDialogTitle>
|
|
17
|
+
<AlertDialogDescription
|
|
18
|
+
v-if="propsSafe.description"
|
|
19
|
+
:class="ui.description()"
|
|
20
|
+
>
|
|
21
|
+
{{ propsSafe.description }}
|
|
22
|
+
</AlertDialogDescription>
|
|
23
|
+
|
|
24
|
+
<div :class="ui.buttonGroup()">
|
|
25
|
+
<Button
|
|
26
|
+
v-if="propsSafe.isShowCancelBtn"
|
|
27
|
+
type="button"
|
|
28
|
+
color="neutral"
|
|
29
|
+
variant="outline"
|
|
30
|
+
:class="ui.cancelButton()"
|
|
31
|
+
@click="emits('close', false)"
|
|
32
|
+
>
|
|
33
|
+
{{ propsSafe.cancelText }}
|
|
34
|
+
</Button>
|
|
35
|
+
<Button
|
|
36
|
+
type="button"
|
|
37
|
+
:color="propsSafe.isConfirm ? dialogConfig.confirmColor : propsSafe.type"
|
|
38
|
+
:class="ui.confirmButton()"
|
|
39
|
+
@click="emits('close', true)"
|
|
40
|
+
>
|
|
41
|
+
{{ propsSafe.confirmText }}
|
|
42
|
+
</Button>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</AlertDialogContent>
|
|
46
|
+
</AlertDialogPortal>
|
|
47
|
+
</AlertDialogRoot>
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script setup>
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
AlertDialogTitle
|
|
58
58
|
} from "reka-ui";
|
|
59
59
|
import { computed, useAttrs } from "vue";
|
|
60
|
-
import { useUiConfig } from "
|
|
60
|
+
import { useUiAllConfig, useUiConfig } from "../../composables/useConfig";
|
|
61
61
|
import { dialogTheme } from "#core/theme/dialog";
|
|
62
62
|
import { DialogType } from "#core/composables/useDialog";
|
|
63
63
|
const emits = defineEmits();
|
|
@@ -66,6 +66,7 @@ const props = withDefaults(defineProps(), {
|
|
|
66
66
|
cancelText: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01"
|
|
67
67
|
});
|
|
68
68
|
const attrs = useAttrs();
|
|
69
|
+
const dialogConfig = useUiAllConfig().dialog.slots;
|
|
69
70
|
const propsSafe = computed(() => {
|
|
70
71
|
if (props.title) {
|
|
71
72
|
return props;
|
|
@@ -81,19 +82,19 @@ const getIcon = computed(() => {
|
|
|
81
82
|
return propsSafe.value.icon;
|
|
82
83
|
}
|
|
83
84
|
if (propsSafe.value.isConfirm) {
|
|
84
|
-
return
|
|
85
|
+
return dialogConfig.iconConfirm;
|
|
85
86
|
}
|
|
86
87
|
switch (propsSafe.value.type) {
|
|
87
88
|
case DialogType.SUCCESS:
|
|
88
|
-
return
|
|
89
|
+
return dialogConfig.iconSuccess;
|
|
89
90
|
case DialogType.ERROR:
|
|
90
|
-
return
|
|
91
|
+
return dialogConfig.iconError;
|
|
91
92
|
case DialogType.INFO:
|
|
92
|
-
return
|
|
93
|
+
return dialogConfig.iconInfo;
|
|
93
94
|
case DialogType.WARNING:
|
|
94
|
-
return
|
|
95
|
+
return dialogConfig.iconWarning;
|
|
95
96
|
default:
|
|
96
|
-
return
|
|
97
|
+
return dialogConfig.iconInfo;
|
|
97
98
|
}
|
|
98
99
|
});
|
|
99
100
|
const ui = computed(() => useUiConfig(dialogTheme, "dialog")({
|