@finema/core 1.4.220 → 2.1.0
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/README.md +79 -60
- package/dist/module.d.mts +4 -24
- package/dist/module.json +4 -3
- package/dist/module.mjs +75 -213
- package/dist/runtime/components/App.vue +27 -0
- package/dist/runtime/components/App.vue.d.ts +12 -0
- package/dist/runtime/components/DevToolsWindow/index.vue +312 -0
- package/dist/runtime/components/DevToolsWindow/index.vue.d.ts +2 -0
- package/dist/runtime/components/Dialog/index.vue +77 -110
- package/dist/runtime/components/Dialog/index.vue.d.ts +10 -0
- package/dist/runtime/components/Empty.vue +33 -18
- package/dist/runtime/components/Empty.vue.d.ts +12 -0
- package/dist/runtime/components/FlexDeck/Base.vue +154 -159
- package/dist/runtime/components/FlexDeck/Base.vue.d.ts +63 -0
- package/dist/runtime/components/FlexDeck/index.vue +67 -68
- package/dist/runtime/components/FlexDeck/index.vue.d.ts +43 -0
- package/dist/runtime/components/Form/FieldWrapper.vue +35 -23
- package/dist/runtime/components/Form/FieldWrapper.vue.d.ts +16 -0
- package/dist/runtime/components/Form/Fields.vue +92 -230
- package/dist/runtime/components/Form/Fields.vue.d.ts +14 -0
- package/dist/runtime/components/Form/InputCheckbox/index.vue +53 -28
- package/dist/runtime/components/Form/InputCheckbox/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputCheckbox/types.d.ts +5 -1
- package/dist/runtime/components/Form/InputDateTime/date_time_field.types.d.ts +1 -1
- package/dist/runtime/components/Form/InputDateTime/index.vue +97 -68
- package/dist/runtime/components/Form/InputDateTime/index.vue.d.ts +4 -0
- package/dist/runtime/components/Form/InputNumber/index.vue +61 -27
- package/dist/runtime/components/Form/InputNumber/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputNumber/types.d.ts +10 -5
- package/dist/runtime/components/Form/InputSelect/index.vue +95 -55
- package/dist/runtime/components/Form/InputSelect/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputSelect/types.d.ts +14 -8
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue +108 -54
- package/dist/runtime/components/Form/InputSelectMultiple/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputSelectMultiple/types.d.ts +9 -8
- package/dist/runtime/components/Form/InputText/index.vue +135 -68
- package/dist/runtime/components/Form/InputText/index.vue.d.ts +5 -0
- package/dist/runtime/components/Form/InputText/types.d.ts +4 -3
- package/dist/runtime/components/Form/InputTextarea/index.vue +57 -25
- package/dist/runtime/components/Form/InputTextarea/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputTextarea/types.d.ts +7 -2
- package/dist/runtime/components/Form/InputToggle/index.vue +51 -27
- package/dist/runtime/components/Form/InputToggle/index.vue.d.ts +3 -0
- package/dist/runtime/components/Form/InputToggle/types.d.ts +5 -1
- package/dist/runtime/components/Form/index.vue +5 -6
- package/dist/runtime/components/Form/index.vue.d.ts +12 -0
- package/dist/runtime/components/Form/types.d.ts +13 -27
- package/dist/runtime/components/Image.vue +51 -36
- package/dist/runtime/components/Image.vue.d.ts +13 -0
- package/dist/runtime/components/Loader.vue +29 -27
- package/dist/runtime/components/Loader.vue.d.ts +22 -0
- package/dist/runtime/components/{LogItem.vue → Log/LogItem.vue} +44 -41
- package/dist/runtime/components/Log/LogItem.vue.d.ts +6 -0
- package/dist/runtime/components/Log/index.vue +28 -0
- package/dist/runtime/components/Log/index.vue.d.ts +7 -0
- package/dist/runtime/components/Table/Base.vue +166 -161
- package/dist/runtime/components/Table/Base.vue.d.ts +47 -0
- package/dist/runtime/components/Table/ColumnDate.vue +14 -16
- package/dist/runtime/components/Table/ColumnDate.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnDateTime.vue +16 -18
- package/dist/runtime/components/Table/ColumnDateTime.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnImage.vue +16 -15
- package/dist/runtime/components/Table/ColumnImage.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnNumber.vue +14 -14
- package/dist/runtime/components/Table/ColumnNumber.vue.d.ts +8 -0
- package/dist/runtime/components/Table/ColumnText.vue +24 -29
- package/dist/runtime/components/Table/ColumnText.vue.d.ts +8 -0
- package/dist/runtime/components/Table/Simple.vue +69 -70
- package/dist/runtime/components/Table/Simple.vue.d.ts +24 -0
- package/dist/runtime/components/Table/index.vue +178 -65
- package/dist/runtime/components/Table/index.vue.d.ts +25 -0
- package/dist/runtime/components/Table/types.d.ts +14 -18
- package/dist/runtime/components/Table/{types.mjs → types.js} +1 -0
- package/dist/runtime/components/TeleportSafe.vue +42 -40
- package/dist/runtime/components/TeleportSafe.vue.d.ts +16 -0
- package/dist/runtime/composables/loaderList.d.ts +2 -2
- package/dist/runtime/composables/loaderList.js +51 -0
- package/dist/runtime/composables/loaderObject.d.ts +1 -1
- package/dist/runtime/composables/loaderObject.js +50 -0
- package/dist/runtime/composables/loaderPage.d.ts +10 -11
- package/dist/runtime/composables/loaderPage.js +243 -0
- package/dist/runtime/composables/useApp.d.ts +4 -9
- package/dist/runtime/composables/{useApp.mjs → useApp.js} +0 -12
- package/dist/runtime/composables/useConfig.d.ts +3 -3
- package/dist/runtime/composables/useConfig.js +12 -0
- package/dist/runtime/composables/useDialog.d.ts +1 -7
- package/dist/runtime/composables/useDialog.js +53 -0
- package/dist/runtime/composables/useFlexDeck.d.ts +1 -1
- package/dist/runtime/composables/{useFlexDeck.mjs → useFlexDeck.js} +5 -5
- package/dist/runtime/composables/useForm.d.ts +5 -2
- package/dist/runtime/composables/useForm.js +37 -0
- package/dist/runtime/composables/useNotification.d.ts +6 -22
- package/dist/runtime/composables/{useNotification.mjs → useNotification.js} +5 -21
- package/dist/runtime/composables/useTable.d.ts +12 -11
- package/dist/runtime/composables/{useTable.mjs → useTable.js} +3 -8
- package/dist/runtime/composables/useUpload.d.ts +2 -2
- package/dist/runtime/composables/{useUpload.mjs → useUpload.js} +1 -1
- package/dist/runtime/helpers/apiBaseHelper.d.ts +29 -0
- package/dist/runtime/helpers/apiBaseHelper.js +63 -0
- package/dist/runtime/helpers/apiListHelper.d.ts +4 -6
- package/dist/runtime/helpers/apiListHelper.js +50 -0
- package/dist/runtime/helpers/apiObjectHelper.d.ts +19 -20
- package/dist/runtime/helpers/apiObjectHelper.js +51 -0
- package/dist/runtime/helpers/apiPageHelper.d.ts +44 -44
- package/dist/runtime/helpers/apiPageHelper.js +287 -0
- package/dist/runtime/helpers/componentHelper.d.ts +11 -12
- package/dist/runtime/helpers/{componentHelper.mjs → componentHelper.js} +2 -7
- package/dist/runtime/i18n/valibot.d.ts +69 -0
- package/dist/runtime/i18n/valibot.js +72 -0
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/plugin.js +12 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/theme/button.d.ts +5 -0
- package/dist/runtime/theme/button.js +1 -0
- package/dist/runtime/theme/dialog.d.ts +31 -0
- package/dist/runtime/theme/dialog.js +21 -0
- package/dist/runtime/theme/empty.d.ts +7 -0
- package/dist/runtime/theme/empty.js +7 -0
- package/dist/runtime/theme/form.d.ts +18 -0
- package/dist/runtime/theme/form.js +16 -0
- package/dist/runtime/theme/index.d.ts +10 -0
- package/dist/runtime/theme/index.js +10 -0
- package/dist/runtime/theme/input.d.ts +8 -0
- package/dist/runtime/theme/input.js +4 -0
- package/dist/runtime/theme/inputNumber.d.ts +8 -0
- package/dist/runtime/theme/inputNumber.js +4 -0
- package/dist/runtime/theme/loader.d.ts +28 -0
- package/dist/runtime/theme/loader.js +18 -0
- package/dist/runtime/theme/selectMenu.d.ts +17 -0
- package/dist/runtime/theme/selectMenu.js +18 -0
- package/dist/runtime/theme/table.d.ts +10 -0
- package/dist/runtime/theme/table.js +10 -0
- package/dist/runtime/theme/textarea.d.ts +5 -0
- package/dist/runtime/theme/textarea.js +1 -0
- package/dist/runtime/types/lib.d.ts +1 -1
- package/dist/runtime/utils/ArrayHelper.d.ts +1 -1
- package/dist/runtime/utils/{ArrayHelper.mjs → ArrayHelper.js} +1 -1
- package/dist/runtime/utils/ObjectHelper.d.ts +3 -3
- package/dist/runtime/utils/{ObjectHelper.mjs → ObjectHelper.js} +3 -3
- package/dist/runtime/utils/ParamHelper.d.ts +1 -1
- package/dist/runtime/utils/{ParamHelper.mjs → ParamHelper.js} +1 -1
- package/dist/types.d.mts +2 -15
- package/package.json +91 -100
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -50
- package/dist/runtime/components/Alert.vue +0 -48
- package/dist/runtime/components/Avatar.vue +0 -27
- package/dist/runtime/components/Badge.vue +0 -11
- package/dist/runtime/components/Breadcrumb.vue +0 -44
- package/dist/runtime/components/Button/Group.vue +0 -37
- package/dist/runtime/components/Button/index.vue +0 -75
- package/dist/runtime/components/Card.vue +0 -38
- package/dist/runtime/components/Core.vue +0 -45
- package/dist/runtime/components/Dropdown/index.vue +0 -70
- package/dist/runtime/components/Dropdown/types.d.ts +0 -2
- package/dist/runtime/components/Dropdown/types.mjs +0 -17
- package/dist/runtime/components/Form/InputDateTimeRange/date_range_time_field.types.d.ts +0 -17
- package/dist/runtime/components/Form/InputDateTimeRange/index.vue +0 -91
- package/dist/runtime/components/Form/InputRadio/index.vue +0 -27
- package/dist/runtime/components/Form/InputRadio/types.d.ts +0 -8
- package/dist/runtime/components/Form/InputStatic/index.vue +0 -16
- package/dist/runtime/components/Form/InputStatic/types.d.ts +0 -4
- package/dist/runtime/components/Form/InputTags/index.vue +0 -141
- package/dist/runtime/components/Form/InputTags/types.d.ts +0 -11
- package/dist/runtime/components/Form/InputTextarea/types.mjs +0 -0
- package/dist/runtime/components/Form/InputToggle/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzone/index.vue +0 -206
- package/dist/runtime/components/Form/InputUploadDropzone/types.d.ts +0 -11
- package/dist/runtime/components/Form/InputUploadDropzone/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/index.vue +0 -362
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.d.ts +0 -23
- package/dist/runtime/components/Form/InputUploadDropzoneAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemUpload.vue +0 -241
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/ItemView.vue +0 -110
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/index.vue +0 -171
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.d.ts +0 -23
- package/dist/runtime/components/Form/InputUploadDropzoneAutoMultiple/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemUpload.vue +0 -161
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/ItemView.vue +0 -64
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/index.vue +0 -178
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.d.ts +0 -21
- package/dist/runtime/components/Form/InputUploadDropzoneImageAutoMultiple/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadFileClassic/index.vue +0 -95
- package/dist/runtime/components/Form/InputUploadFileClassic/types.d.ts +0 -13
- package/dist/runtime/components/Form/InputUploadFileClassic/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/index.vue +0 -151
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.d.ts +0 -18
- package/dist/runtime/components/Form/InputUploadFileClassicAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputUploadImageAuto/index.vue +0 -219
- package/dist/runtime/components/Form/InputUploadImageAuto/types.d.ts +0 -20
- package/dist/runtime/components/Form/InputUploadImageAuto/types.mjs +0 -0
- package/dist/runtime/components/Form/InputWYSIWYG/UploadImageForm.vue +0 -55
- package/dist/runtime/components/Form/InputWYSIWYG/index.vue +0 -230
- package/dist/runtime/components/Form/InputWYSIWYG/types.d.ts +0 -19
- package/dist/runtime/components/Form/InputWYSIWYG/types.mjs +0 -0
- package/dist/runtime/components/Icon.vue +0 -23
- package/dist/runtime/components/Log.vue +0 -22
- package/dist/runtime/components/Modal/index.vue +0 -146
- package/dist/runtime/components/OTPInput.vue +0 -127
- package/dist/runtime/components/QRCode.vue +0 -22
- package/dist/runtime/components/SimplePagination.vue +0 -96
- package/dist/runtime/components/Slideover/index.vue +0 -110
- package/dist/runtime/components/Tabs/index.vue +0 -64
- package/dist/runtime/composables/loaderList.mjs +0 -52
- package/dist/runtime/composables/loaderObject.mjs +0 -52
- package/dist/runtime/composables/loaderPage.mjs +0 -229
- package/dist/runtime/composables/useConfig.mjs +0 -9
- package/dist/runtime/composables/useDialog.mjs +0 -81
- package/dist/runtime/composables/useForm.mjs +0 -18
- package/dist/runtime/core.config.d.ts +0 -14
- package/dist/runtime/core.config.mjs +0 -14
- package/dist/runtime/helpers/apiListHelper.mjs +0 -44
- package/dist/runtime/helpers/apiObjectHelper.mjs +0 -46
- package/dist/runtime/helpers/apiPageHelper.mjs +0 -270
- package/dist/runtime/plugin.mjs +0 -149
- package/dist/runtime/types/common.mjs +0 -0
- package/dist/runtime/types/config.d.ts +0 -1
- package/dist/runtime/types/config.mjs +0 -0
- package/dist/runtime/types/lib.mjs +0 -0
- package/dist/runtime/ui.config/alert.d.ts +0 -3
- package/dist/runtime/ui.config/alert.mjs +0 -6
- package/dist/runtime/ui.config/badge.d.ts +0 -3
- package/dist/runtime/ui.config/badge.mjs +0 -1
- package/dist/runtime/ui.config/breadcrumb.d.ts +0 -1
- package/dist/runtime/ui.config/breadcrumb.mjs +0 -7
- package/dist/runtime/ui.config/button.d.ts +0 -3
- package/dist/runtime/ui.config/button.mjs +0 -8
- package/dist/runtime/ui.config/buttonGroup.d.ts +0 -3
- package/dist/runtime/ui.config/buttonGroup.mjs +0 -1
- package/dist/runtime/ui.config/card.d.ts +0 -1
- package/dist/runtime/ui.config/card.mjs +0 -2
- package/dist/runtime/ui.config/checkbox.d.ts +0 -3
- package/dist/runtime/ui.config/checkbox.mjs +0 -1
- package/dist/runtime/ui.config/formGroup.d.ts +0 -3
- package/dist/runtime/ui.config/formGroup.mjs +0 -5
- package/dist/runtime/ui.config/icon.d.ts +0 -3
- package/dist/runtime/ui.config/icon.mjs +0 -3
- package/dist/runtime/ui.config/index.d.ts +0 -16
- package/dist/runtime/ui.config/index.mjs +0 -16
- package/dist/runtime/ui.config/input.d.ts +0 -3
- package/dist/runtime/ui.config/input.mjs +0 -5
- package/dist/runtime/ui.config/modal.d.ts +0 -1
- package/dist/runtime/ui.config/modal.mjs +0 -34
- package/dist/runtime/ui.config/notification.d.ts +0 -11
- package/dist/runtime/ui.config/notification.mjs +0 -13
- package/dist/runtime/ui.config/notifications.d.ts +0 -3
- package/dist/runtime/ui.config/notifications.mjs +0 -3
- package/dist/runtime/ui.config/pagination.d.ts +0 -3
- package/dist/runtime/ui.config/pagination.mjs +0 -37
- package/dist/runtime/ui.config/select.d.ts +0 -3
- package/dist/runtime/ui.config/select.mjs +0 -5
- package/dist/runtime/ui.config/selectMenu.d.ts +0 -3
- package/dist/runtime/ui.config/selectMenu.mjs +0 -5
- package/dist/runtime/ui.config/slideover.d.ts +0 -1
- package/dist/runtime/ui.config/slideover.mjs +0 -16
- package/dist/runtime/ui.config/table.d.ts +0 -3
- package/dist/runtime/ui.config/table.mjs +0 -47
- package/dist/runtime/ui.config/tabs.d.ts +0 -3
- package/dist/runtime/ui.config/tabs.mjs +0 -4
- package/dist/runtime/ui.config/tags.d.ts +0 -25
- package/dist/runtime/ui.config/tags.mjs +0 -25
- package/dist/runtime/ui.config/textarea.d.ts +0 -3
- package/dist/runtime/ui.config/textarea.mjs +0 -5
- package/dist/runtime/ui.config/toggle.d.ts +0 -3
- package/dist/runtime/ui.config/toggle.mjs +0 -5
- package/dist/runtime/ui.config/uploadDropzoneImage.d.ts +0 -83
- package/dist/runtime/ui.config/uploadDropzoneImage.mjs +0 -26
- package/dist/runtime/ui.config/uploadFileDropzone.d.ts +0 -61
- package/dist/runtime/ui.config/uploadFileDropzone.mjs +0 -61
- package/dist/runtime/ui.config/uploadFileInputClassicAuto.d.ts +0 -8
- package/dist/runtime/ui.config/uploadFileInputClassicAuto.mjs +0 -8
- package/dist/runtime/ui.config/uploadImage.d.ts +0 -34
- package/dist/runtime/ui.config/uploadImage.mjs +0 -36
- package/dist/runtime/ui.css +0 -1
- package/dist/runtime/utils/ArrayHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ArrayHelper.spec.mjs +0 -112
- package/dist/runtime/utils/FileHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/FileHelper.spec.mjs +0 -14
- package/dist/runtime/utils/ObjectHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ObjectHelper.spec.mjs +0 -52
- package/dist/runtime/utils/ParamHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/ParamHelper.spec.mjs +0 -78
- package/dist/runtime/utils/StringHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/StringHelper.spec.mjs +0 -76
- package/dist/runtime/utils/TimeHelper.spec.d.ts +0 -1
- package/dist/runtime/utils/TimeHelper.spec.mjs +0 -79
- package/dist/runtime/utils/TimeHelper.thai.spec.d.ts +0 -1
- package/dist/runtime/utils/TimeHelper.thai.spec.mjs +0 -31
- package/dist/types.d.ts +0 -16
- package/dist/runtime/components/FlexDeck/{types.mjs → types.js} +0 -0
- package/dist/runtime/components/Form/InputCheckbox/{types.mjs → types.js} +0 -0
- package/dist/runtime/components/Form/InputDateTime/{date_time_field.types.mjs → date_time_field.types.js} +0 -0
- package/dist/runtime/components/Form/{InputDateTimeRange/date_range_time_field.types.mjs → InputNumber/types.js} +0 -0
- package/dist/runtime/components/Form/{InputNumber/types.mjs → InputSelect/types.js} +0 -0
- package/dist/runtime/components/Form/{InputRadio/types.mjs → InputSelectMultiple/types.js} +0 -0
- package/dist/runtime/components/Form/{InputSelect/types.mjs → InputText/types.js} +0 -0
- package/dist/runtime/components/Form/{InputSelectMultiple/types.mjs → InputTextarea/types.js} +0 -0
- package/dist/runtime/components/Form/{InputStatic/types.mjs → InputToggle/types.js} +0 -0
- package/dist/runtime/components/Form/{types.mjs → types.js} +0 -0
- package/dist/runtime/composables/{useWatch.mjs → useWatch.js} +0 -0
- package/dist/runtime/lib/{Requester.mjs → Requester.js} +0 -0
- package/dist/runtime/{components/Form/InputTags/types.mjs → types/common.js} +0 -0
- package/dist/runtime/{components/Form/InputText/types.mjs → types/lib.js} +0 -0
- package/dist/runtime/utils/{FileHelper.mjs → FileHelper.js} +0 -0
- package/dist/runtime/utils/{StringHelper.mjs → StringHelper.js} +0 -0
- package/dist/runtime/utils/{TimeHelper.mjs → TimeHelper.js} +1 -1
- /package/dist/runtime/utils/{lodash.mjs → lodash.js} +0 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-show="isShowDevTools"
|
|
4
|
+
ref="devToolsRef"
|
|
5
|
+
class="fixed z-50 overflow-hidden rounded-lg border border-neutral-300 bg-white opacity-80 shadow-2xl"
|
|
6
|
+
:style="devToolsDynamicStyles"
|
|
7
|
+
>
|
|
8
|
+
<!-- Draggable Title Bar -->
|
|
9
|
+
<div class="flex items-center justify-between px-2 py-1 select-none">
|
|
10
|
+
<p
|
|
11
|
+
class="text-sm font-semibold cursor-move flex-grow"
|
|
12
|
+
@mousedown.prevent="handleDragStart"
|
|
13
|
+
>
|
|
14
|
+
Debug Tools
|
|
15
|
+
</p>
|
|
16
|
+
<div class="flex items-center">
|
|
17
|
+
<Button
|
|
18
|
+
icon="i-heroicons-arrow-path"
|
|
19
|
+
size="xs"
|
|
20
|
+
color="neutral"
|
|
21
|
+
variant="ghost"
|
|
22
|
+
class="mr-1"
|
|
23
|
+
title="Reset Position & Size"
|
|
24
|
+
@click.stop="resetDevToolsState"
|
|
25
|
+
/>
|
|
26
|
+
<Button
|
|
27
|
+
icon="i-heroicons-x-mark"
|
|
28
|
+
size="xs"
|
|
29
|
+
color="neutral"
|
|
30
|
+
variant="ghost"
|
|
31
|
+
title="Close DevTools"
|
|
32
|
+
@click.stop="closeDevTools"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<hr class="text-neutral-300" />
|
|
37
|
+
<!-- Content Area Target for Logs -->
|
|
38
|
+
<div
|
|
39
|
+
id="dev-logs"
|
|
40
|
+
class="flex flex-col flex-1 space-y-1 p-2 overflow-auto"
|
|
41
|
+
:style="{ height: `calc(${devToolsHeight} - 40px)` }"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<!-- Resize Handles -->
|
|
45
|
+
<div
|
|
46
|
+
v-if="!isDragging"
|
|
47
|
+
class="resize-handles"
|
|
48
|
+
>
|
|
49
|
+
<div
|
|
50
|
+
class="resize-handle top-left"
|
|
51
|
+
@mousedown.prevent="handleResizeStart('top-left', $event)"
|
|
52
|
+
/>
|
|
53
|
+
<div
|
|
54
|
+
class="resize-handle top-center"
|
|
55
|
+
@mousedown.prevent="handleResizeStart('top', $event)"
|
|
56
|
+
/>
|
|
57
|
+
<div
|
|
58
|
+
class="resize-handle top-right"
|
|
59
|
+
@mousedown.prevent="handleResizeStart('top-right', $event)"
|
|
60
|
+
/>
|
|
61
|
+
<div
|
|
62
|
+
class="resize-handle middle-left"
|
|
63
|
+
@mousedown.prevent="handleResizeStart('left', $event)"
|
|
64
|
+
/>
|
|
65
|
+
<div
|
|
66
|
+
class="resize-handle middle-right"
|
|
67
|
+
@mousedown.prevent="handleResizeStart('right', $event)"
|
|
68
|
+
/>
|
|
69
|
+
<div
|
|
70
|
+
class="resize-handle bottom-left"
|
|
71
|
+
@mousedown.prevent="handleResizeStart('bottom-left', $event)"
|
|
72
|
+
/>
|
|
73
|
+
<div
|
|
74
|
+
class="resize-handle bottom-center"
|
|
75
|
+
@mousedown.prevent="handleResizeStart('bottom', $event)"
|
|
76
|
+
/>
|
|
77
|
+
<div
|
|
78
|
+
class="resize-handle bottom-right"
|
|
79
|
+
@mousedown.prevent="handleResizeStart('bottom-right', $event)"
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<!-- Toggle button for this DevToolsWindow -->
|
|
85
|
+
<div
|
|
86
|
+
class="fixed bottom-1 right-1 z-[99999]"
|
|
87
|
+
>
|
|
88
|
+
<Button
|
|
89
|
+
:icon="isShowDevTools ? 'heroicons:x-mark' : 'heroicons:information-circle'"
|
|
90
|
+
color="info"
|
|
91
|
+
square
|
|
92
|
+
size="sm"
|
|
93
|
+
:ui="{ base: 'rounded-full' }"
|
|
94
|
+
@click="toggleDevTools"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<script setup>
|
|
100
|
+
import { ref, onMounted, watch, onUnmounted, computed } from "vue";
|
|
101
|
+
import { useStorage } from "@vueuse/core";
|
|
102
|
+
const isShowDevTools = useStorage("isShowDevTools", false);
|
|
103
|
+
const DEFAULT_WIDTH = "300px";
|
|
104
|
+
const DEFAULT_HEIGHT = "400px";
|
|
105
|
+
const DEFAULT_POSITION = {
|
|
106
|
+
top: "auto",
|
|
107
|
+
left: "auto",
|
|
108
|
+
bottom: "2.5rem",
|
|
109
|
+
right: "0.5rem"
|
|
110
|
+
};
|
|
111
|
+
const devToolsWidth = useStorage("devToolsWidth", DEFAULT_WIDTH);
|
|
112
|
+
const devToolsHeight = useStorage("devToolsHeight", DEFAULT_HEIGHT);
|
|
113
|
+
const devToolsPosition = useStorage("devToolsPosition", JSON.parse(JSON.stringify(DEFAULT_POSITION)));
|
|
114
|
+
const devToolsRef = ref(null);
|
|
115
|
+
const isDragging = ref(false);
|
|
116
|
+
const dragStartX = ref(0);
|
|
117
|
+
const dragStartY = ref(0);
|
|
118
|
+
const initialDragPosition = ref({
|
|
119
|
+
top: 0,
|
|
120
|
+
left: 0
|
|
121
|
+
});
|
|
122
|
+
const isResizing = ref(false);
|
|
123
|
+
const activeResizeHandle = ref(null);
|
|
124
|
+
const initialResizeState = ref({
|
|
125
|
+
width: 0,
|
|
126
|
+
height: 0,
|
|
127
|
+
top: 0,
|
|
128
|
+
left: 0,
|
|
129
|
+
mouseX: 0,
|
|
130
|
+
mouseY: 0
|
|
131
|
+
});
|
|
132
|
+
const MIN_WIDTH = 150;
|
|
133
|
+
const MIN_HEIGHT = 100;
|
|
134
|
+
const devToolsDynamicStyles = computed(() => {
|
|
135
|
+
const styles = {
|
|
136
|
+
width: devToolsWidth.value,
|
|
137
|
+
height: devToolsHeight.value,
|
|
138
|
+
maxWidth: "100vw",
|
|
139
|
+
maxHeight: "100vh"
|
|
140
|
+
};
|
|
141
|
+
if (devToolsPosition.value.top !== "auto") {
|
|
142
|
+
styles.top = devToolsPosition.value.top;
|
|
143
|
+
styles.bottom = "auto";
|
|
144
|
+
} else {
|
|
145
|
+
styles.bottom = devToolsPosition.value.bottom;
|
|
146
|
+
}
|
|
147
|
+
if (devToolsPosition.value.left !== "auto") {
|
|
148
|
+
styles.left = devToolsPosition.value.left;
|
|
149
|
+
styles.right = "auto";
|
|
150
|
+
} else {
|
|
151
|
+
styles.right = devToolsPosition.value.right;
|
|
152
|
+
}
|
|
153
|
+
return styles;
|
|
154
|
+
});
|
|
155
|
+
const toggleDevTools = () => {
|
|
156
|
+
isShowDevTools.value = !isShowDevTools.value;
|
|
157
|
+
};
|
|
158
|
+
const closeDevTools = () => {
|
|
159
|
+
isShowDevTools.value = false;
|
|
160
|
+
};
|
|
161
|
+
const handleDragStart = (event) => {
|
|
162
|
+
if (!devToolsRef.value || event.button !== 0) return;
|
|
163
|
+
isDragging.value = true;
|
|
164
|
+
const rect = devToolsRef.value.getBoundingClientRect();
|
|
165
|
+
initialDragPosition.value = {
|
|
166
|
+
top: rect.top,
|
|
167
|
+
left: rect.left
|
|
168
|
+
};
|
|
169
|
+
dragStartX.value = event.clientX;
|
|
170
|
+
dragStartY.value = event.clientY;
|
|
171
|
+
document.addEventListener("mousemove", handleDragMove);
|
|
172
|
+
document.addEventListener("mouseup", handleDragEnd);
|
|
173
|
+
};
|
|
174
|
+
const handleDragMove = (event) => {
|
|
175
|
+
if (!isDragging.value || !devToolsRef.value) return;
|
|
176
|
+
const deltaX = event.clientX - dragStartX.value;
|
|
177
|
+
const deltaY = event.clientY - dragStartY.value;
|
|
178
|
+
let newTop = initialDragPosition.value.top + deltaY;
|
|
179
|
+
let newLeft = initialDragPosition.value.left + deltaX;
|
|
180
|
+
const elHeight = devToolsRef.value.offsetHeight;
|
|
181
|
+
const elWidth = devToolsRef.value.offsetWidth;
|
|
182
|
+
newTop = Math.max(0, Math.min(newTop, window.innerHeight - elHeight));
|
|
183
|
+
newLeft = Math.max(0, Math.min(newLeft, window.innerWidth - elWidth));
|
|
184
|
+
devToolsPosition.value = {
|
|
185
|
+
top: `${newTop}px`,
|
|
186
|
+
left: `${newLeft}px`,
|
|
187
|
+
bottom: "auto",
|
|
188
|
+
right: "auto"
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
const handleDragEnd = () => {
|
|
192
|
+
isDragging.value = false;
|
|
193
|
+
document.removeEventListener("mousemove", handleDragMove);
|
|
194
|
+
document.removeEventListener("mouseup", handleDragEnd);
|
|
195
|
+
};
|
|
196
|
+
const handleResizeStart = (handle, event) => {
|
|
197
|
+
if (!devToolsRef.value || event.button !== 0) return;
|
|
198
|
+
isResizing.value = true;
|
|
199
|
+
activeResizeHandle.value = handle;
|
|
200
|
+
const rect = devToolsRef.value.getBoundingClientRect();
|
|
201
|
+
initialResizeState.value = {
|
|
202
|
+
width: rect.width,
|
|
203
|
+
height: rect.height,
|
|
204
|
+
top: rect.top,
|
|
205
|
+
left: rect.left,
|
|
206
|
+
mouseX: event.clientX,
|
|
207
|
+
mouseY: event.clientY
|
|
208
|
+
};
|
|
209
|
+
document.addEventListener("mousemove", handleResizeMove);
|
|
210
|
+
document.addEventListener("mouseup", handleResizeEnd);
|
|
211
|
+
};
|
|
212
|
+
const handleResizeMove = (event) => {
|
|
213
|
+
if (!isResizing.value || !devToolsRef.value || !activeResizeHandle.value) return;
|
|
214
|
+
const {
|
|
215
|
+
width,
|
|
216
|
+
height,
|
|
217
|
+
top,
|
|
218
|
+
left,
|
|
219
|
+
mouseX,
|
|
220
|
+
mouseY
|
|
221
|
+
} = initialResizeState.value;
|
|
222
|
+
const deltaX = event.clientX - mouseX;
|
|
223
|
+
const deltaY = event.clientY - mouseY;
|
|
224
|
+
let newWidth = width;
|
|
225
|
+
let newHeight = height;
|
|
226
|
+
let newTop = top;
|
|
227
|
+
let newLeft = left;
|
|
228
|
+
if (activeResizeHandle.value.includes("right")) {
|
|
229
|
+
newWidth = Math.max(MIN_WIDTH, width + deltaX);
|
|
230
|
+
}
|
|
231
|
+
if (activeResizeHandle.value.includes("bottom")) {
|
|
232
|
+
newHeight = Math.max(MIN_HEIGHT, height + deltaY);
|
|
233
|
+
}
|
|
234
|
+
if (activeResizeHandle.value.includes("left")) {
|
|
235
|
+
newWidth = Math.max(MIN_WIDTH, width - deltaX);
|
|
236
|
+
if (newWidth > MIN_WIDTH) {
|
|
237
|
+
newLeft = left + deltaX;
|
|
238
|
+
} else {
|
|
239
|
+
newLeft = left + (width - MIN_WIDTH);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (activeResizeHandle.value.includes("top")) {
|
|
243
|
+
newHeight = Math.max(MIN_HEIGHT, height - deltaY);
|
|
244
|
+
if (newHeight > MIN_HEIGHT) {
|
|
245
|
+
newTop = top + deltaY;
|
|
246
|
+
} else {
|
|
247
|
+
newTop = top + (height - MIN_HEIGHT);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
if (newTop !== top || newLeft !== left) {
|
|
251
|
+
devToolsPosition.value = {
|
|
252
|
+
top: `${newTop}px`,
|
|
253
|
+
left: `${newLeft}px`,
|
|
254
|
+
bottom: "auto",
|
|
255
|
+
right: "auto"
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
devToolsWidth.value = `${newWidth}px`;
|
|
259
|
+
devToolsHeight.value = `${newHeight}px`;
|
|
260
|
+
};
|
|
261
|
+
const handleResizeEnd = () => {
|
|
262
|
+
isResizing.value = false;
|
|
263
|
+
activeResizeHandle.value = null;
|
|
264
|
+
document.removeEventListener("mousemove", handleResizeMove);
|
|
265
|
+
document.removeEventListener("mouseup", handleResizeEnd);
|
|
266
|
+
};
|
|
267
|
+
const resetDevToolsState = () => {
|
|
268
|
+
devToolsWidth.value = DEFAULT_WIDTH;
|
|
269
|
+
devToolsHeight.value = DEFAULT_HEIGHT;
|
|
270
|
+
devToolsPosition.value = JSON.parse(JSON.stringify(DEFAULT_POSITION));
|
|
271
|
+
if (devToolsRef.value) {
|
|
272
|
+
const newStyles = {
|
|
273
|
+
width: DEFAULT_WIDTH,
|
|
274
|
+
height: DEFAULT_HEIGHT,
|
|
275
|
+
...DEFAULT_POSITION
|
|
276
|
+
};
|
|
277
|
+
Object.keys(newStyles).forEach((key) => {
|
|
278
|
+
devToolsRef.value.style[key] = newStyles[key];
|
|
279
|
+
});
|
|
280
|
+
if (newStyles.top === "auto") {
|
|
281
|
+
devToolsRef.value.style.bottom = newStyles.bottom;
|
|
282
|
+
} else {
|
|
283
|
+
devToolsRef.value.style.bottom = "auto";
|
|
284
|
+
}
|
|
285
|
+
if (newStyles.left === "auto") {
|
|
286
|
+
devToolsRef.value.style.right = newStyles.right;
|
|
287
|
+
} else {
|
|
288
|
+
devToolsRef.value.style.right = "auto";
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
onMounted(() => {
|
|
293
|
+
watch(isShowDevTools, (newValue) => {
|
|
294
|
+
if (newValue && devToolsRef.value) {
|
|
295
|
+
const currentStyle = devToolsDynamicStyles.value;
|
|
296
|
+
Object.keys(currentStyle).forEach((key) => {
|
|
297
|
+
if (devToolsRef.value) {
|
|
298
|
+
devToolsRef.value.style[key] = currentStyle[key];
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}, { immediate: true });
|
|
303
|
+
});
|
|
304
|
+
onUnmounted(() => {
|
|
305
|
+
if (isDragging.value) handleDragEnd();
|
|
306
|
+
if (isResizing.value) handleResizeEnd();
|
|
307
|
+
});
|
|
308
|
+
</script>
|
|
309
|
+
|
|
310
|
+
<style scoped>
|
|
311
|
+
.resize-handles div{height:10px;position:absolute;width:10px;z-index:1}.resize-handle.top-left{cursor:nwse-resize;left:-5px;top:-5px}.resize-handle.top-center{cursor:ns-resize;left:50%;top:-5px;transform:translateX(-50%)}.resize-handle.top-right{cursor:nesw-resize;right:-5px;top:-5px}.resize-handle.middle-left{cursor:ew-resize;left:-5px;top:50%;transform:translateY(-50%)}.resize-handle.middle-right{cursor:ew-resize;right:-5px;top:50%;transform:translateY(-50%)}.resize-handle.bottom-left{bottom:-5px;cursor:nesw-resize;left:-5px}.resize-handle.bottom-center{bottom:-5px;cursor:ns-resize;left:50%;transform:translateX(-50%)}.resize-handle.bottom-right{bottom:-5px;cursor:nwse-resize;right:-5px}#dev-logs{overscroll-behavior:contain}#dev-logs:empty{align-items:center;display:flex;height:100%;justify-content:center}#dev-logs:empty:before{color:#9ca3af;content:"No logs to display.";font-style:italic}
|
|
312
|
+
</style>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -1,110 +1,77 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Modal
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (dialog.meta?.type === DialogType.WARNING) {
|
|
81
|
-
return 'warning'
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return ''
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
const getIcon = computed(() => {
|
|
88
|
-
if (dialog.meta?.isHideIcon) {
|
|
89
|
-
return ''
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (dialog.meta?.type === DialogType.SUCCESS) {
|
|
93
|
-
return 'i-heroicons-check-circle'
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (dialog.meta?.type === DialogType.ERROR) {
|
|
97
|
-
return 'i-heroicons-x-circle'
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (dialog.meta?.type === DialogType.INFO) {
|
|
101
|
-
return 'i-heroicons-information-circle'
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (dialog.meta?.type === DialogType.WARNING) {
|
|
105
|
-
return 'i-heroicons-exclamation-circle'
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return ''
|
|
109
|
-
})
|
|
110
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<Modal
|
|
3
|
+
:dismissible="false"
|
|
4
|
+
:close="false"
|
|
5
|
+
>
|
|
6
|
+
<template #body>
|
|
7
|
+
<div :class="ui.base()">
|
|
8
|
+
<Icon
|
|
9
|
+
v-if="!isHideIcon"
|
|
10
|
+
:name="getIcon"
|
|
11
|
+
:class="ui.icon()"
|
|
12
|
+
/>
|
|
13
|
+
<div :class="ui.wrapper()">
|
|
14
|
+
<p :class="ui.title()">
|
|
15
|
+
{{ title }}
|
|
16
|
+
</p>
|
|
17
|
+
<p
|
|
18
|
+
v-if="description"
|
|
19
|
+
:class="ui.description()"
|
|
20
|
+
>
|
|
21
|
+
{{ description }}
|
|
22
|
+
</p>
|
|
23
|
+
<div :class="ui.buttonGroup()">
|
|
24
|
+
<Button
|
|
25
|
+
v-if="isShowCancelBtn"
|
|
26
|
+
type="button"
|
|
27
|
+
color="neutral"
|
|
28
|
+
variant="outline"
|
|
29
|
+
:class="ui.cancelButton()"
|
|
30
|
+
@click="emits('close', false)"
|
|
31
|
+
>
|
|
32
|
+
{{ cancelText }}
|
|
33
|
+
</Button>
|
|
34
|
+
<Button
|
|
35
|
+
type="button"
|
|
36
|
+
:color="type"
|
|
37
|
+
:class="ui.confirmButton()"
|
|
38
|
+
@click="emits('close', true)"
|
|
39
|
+
>
|
|
40
|
+
{{ confirmText }}
|
|
41
|
+
</Button>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
</Modal>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script setup>
|
|
50
|
+
import { computed } from "vue";
|
|
51
|
+
import { DialogType } from "#core/composables/useDialog";
|
|
52
|
+
import { useUiConfig } from "#core/composables/useConfig";
|
|
53
|
+
import { dialogTheme } from "#core/theme/dialog";
|
|
54
|
+
const emits = defineEmits();
|
|
55
|
+
const props = withDefaults(defineProps(), {
|
|
56
|
+
confirmText: "\u0E15\u0E01\u0E25\u0E07",
|
|
57
|
+
cancelText: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01"
|
|
58
|
+
});
|
|
59
|
+
const getIcon = computed(() => {
|
|
60
|
+
if (props.icon) {
|
|
61
|
+
return props.icon;
|
|
62
|
+
}
|
|
63
|
+
switch (props.type) {
|
|
64
|
+
case DialogType.SUCCESS:
|
|
65
|
+
return "i-heroicons-check-circle";
|
|
66
|
+
case DialogType.ERROR:
|
|
67
|
+
return "i-heroicons-x-circle";
|
|
68
|
+
case DialogType.INFO:
|
|
69
|
+
return "i-heroicons-information-circle";
|
|
70
|
+
case DialogType.WARNING:
|
|
71
|
+
return "i-heroicons-exclamation-circle";
|
|
72
|
+
default:
|
|
73
|
+
return "";
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const ui = computed(() => useUiConfig(dialogTheme, "dialog")({ color: props.type }));
|
|
77
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type IDialogMetaItem } from '#core/composables/useDialog';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<IDialogMetaItem, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
+
close: (args_0: boolean) => any;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<IDialogMetaItem> & Readonly<{
|
|
5
|
+
onClose?: ((args_0: boolean) => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
confirmText: string;
|
|
8
|
+
cancelText: string;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -1,18 +1,33 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="theme.base({
|
|
4
|
+
class: [ui?.base, props.class]
|
|
5
|
+
})"
|
|
6
|
+
>
|
|
7
|
+
<Icon
|
|
8
|
+
:name="icon"
|
|
9
|
+
:class="theme.icon({
|
|
10
|
+
class: [ui?.icon]
|
|
11
|
+
})"
|
|
12
|
+
/>
|
|
13
|
+
<p
|
|
14
|
+
:class="theme.message({
|
|
15
|
+
class: [ui?.message]
|
|
16
|
+
})"
|
|
17
|
+
v-html="message"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import { computed } from "vue";
|
|
24
|
+
import { useUiConfig } from "#core/composables/useConfig";
|
|
25
|
+
import { emptyTheme } from "#core/theme/empty";
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
message: { type: null, required: false, default: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25!" },
|
|
28
|
+
icon: { type: String, required: false, default: "ph:table-thin" },
|
|
29
|
+
ui: { type: null, required: false },
|
|
30
|
+
class: { type: null, required: false }
|
|
31
|
+
});
|
|
32
|
+
const theme = computed(() => useUiConfig(emptyTheme, "empty")());
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { emptyTheme } from '#core/theme/empty';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
message?: any;
|
|
4
|
+
icon?: string;
|
|
5
|
+
ui?: typeof emptyTheme['slots'];
|
|
6
|
+
class?: any;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
|
+
icon: string;
|
|
10
|
+
message: any;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|