hy-dispatch-ui-v3 0.2.67 → 0.2.69
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/tailwind.css +232 -20
- package/es/api/device.mjs +2 -3
- package/es/api/exportExcel.mjs +57 -0
- package/es/api/index.mjs +27 -16
- package/es/api/mapRail.mjs +31 -0
- package/es/api/organization.mjs +17 -9
- package/es/api/rule.mjs +30 -0
- package/es/api/sypct.mjs +2 -3
- package/es/api/task.mjs +2 -3
- package/es/bussiness/hyAddDepartmentType/addDepartmentType.vue.mjs +18 -19
- package/es/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
- package/es/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.mjs +511 -0
- package/es/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.mjs +178 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.mjs +316 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.mjs +119 -0
- package/es/bussiness/hyElectronicFence/electronicFence.vue.mjs +358 -0
- package/es/bussiness/hyElectronicFence/index.mjs +13 -0
- package/es/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
- package/es/bussiness/hyElectronicFence/style/electronicFenceAssociatedUsersDialog.scss +25 -0
- package/es/bussiness/hyMapAearchPlace/js/index.mjs +1 -1
- package/es/bussiness/hyMapAearchPlace/mapAearchPlace.vue.mjs +4 -6
- package/es/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
- package/es/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.mjs +270 -0
- package/es/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.mjs +251 -0
- package/es/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.mjs +251 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.mjs +395 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.mjs +651 -0
- package/es/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.mjs +357 -0
- package/es/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.mjs +261 -0
- package/es/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.mjs +360 -0
- package/es/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.mjs +240 -0
- package/es/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.mjs +258 -0
- package/es/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.mjs +240 -0
- package/es/bussiness/hyRuleSetting/index.mjs +15 -0
- package/es/bussiness/hyRuleSetting/js/ruleSetting.mjs +65 -0
- package/es/bussiness/hyRuleSetting/ruleSetting.vue.mjs +129 -0
- package/es/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
- package/es/bussiness/index.mjs +2 -0
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -13
- package/es/components/hyAudioPlayer/js/index.mjs +9 -14
- package/es/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
- package/es/components/hyButton/button.vue.mjs +2 -2
- package/es/components/hyButton/style/button.scss +48 -74
- package/es/components/hyCheckboxGroup/checkboxGroup.vue.mjs +119 -0
- package/es/components/hyCheckboxGroup/index.mjs +7 -0
- package/es/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
- package/es/components/hyConfigProvider/configProvider.vue.mjs +51 -38
- package/es/components/hyConfirmDialog/confirmDialog.vue.mjs +57 -62
- package/es/components/hyConfirmDialog/confirmMethod.mjs +24 -22
- package/es/components/hyCutter/cutter.vue.mjs +9 -23
- package/es/components/hyDatePicker/datePicker.vue.mjs +12 -17
- package/es/components/hyDialog/dialog.vue.mjs +5 -9
- package/es/components/hyDialog/style/dialog.scss +12 -13
- package/es/components/hyDrawer/drawer.vue.mjs +100 -0
- package/es/components/hyDrawer/index.mjs +7 -0
- package/es/components/hyDrawer/style/drawer.scss +0 -0
- package/es/components/hyForm/cpns/arrayItem.vue.mjs +10 -28
- package/es/components/hyForm/cpns/arrayItem2.vue.mjs +198 -0
- package/es/components/hyForm/cpns/extraItem.vue.mjs +2 -3
- package/es/components/hyForm/cpns/formItem.vue.mjs +75 -37
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
- package/es/components/hyForm/form.vue.mjs +58 -24
- package/es/components/hyForm/js/index.mjs +4 -8
- package/es/components/hyForm/js/useAppForm.mjs +5 -9
- package/es/components/hyForm/style/form.scss +4 -13
- package/es/components/hyIcon/icon.vue.mjs +3 -3
- package/es/components/hyIconBox/style/iconBox.scss +2 -6
- package/es/components/hyInput/inputSearch.vue.mjs +8 -11
- package/es/components/hyInput/style/inputSearch.scss +3 -0
- package/es/components/hyLoading/index.mjs +3 -5
- package/es/components/hyMap/js/index.mjs +29 -4
- package/es/components/hyMap/map.vue.mjs +17 -3
- package/es/components/hyMenu/style/menu.scss +5 -15
- package/es/components/hyNoPermissions/noPermissions.vue.mjs +3 -4
- package/es/components/hyNoPermissionsMap/noPermissionsMap.vue.mjs +3 -6
- package/es/components/hyOrgCascader/js/index.mjs +1 -5
- package/es/components/hyOrgCascader/orgCascader.vue.mjs +25 -11
- package/es/components/hyOrgCascader/style/orgCascader.scss +7 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +48 -41
- package/es/components/hyRadioGroup/style/radioGroup.scss +9 -0
- package/es/components/hySearch/cpns/searchItem.vue.mjs +33 -20
- package/es/components/hySearch/js/index.mjs +1 -4
- package/es/components/hySearch/js/useAppSearch.mjs +6 -10
- package/es/components/hySearch/search.vue.mjs +9 -16
- package/es/components/hySearch/style/search.scss +2 -0
- package/es/components/hyStatus/index.mjs +7 -0
- package/es/components/hyStatus/status.vue.mjs +110 -0
- package/es/components/hyStatus/style/status.scss +0 -0
- package/es/components/hyTable/cpns/columnSelect.vue.mjs +24 -28
- package/es/components/hyTable/cpns/columnSelectItem.vue.mjs +8 -9
- package/es/components/hyTable/cpns/headerItem.vue.mjs +2 -2
- package/es/components/hyTable/cpns/virtualTable.vue.mjs +18 -28
- package/es/components/hyTable/js/index.mjs +56 -59
- package/es/components/hyTable/js/useAppTable.mjs +3 -4
- package/es/components/hyTable/style/table.scss +8 -0
- package/es/components/hyTable/table.vue.mjs +35 -41
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +4 -4
- package/es/components/hyTableForm/batchTableForm.vue.mjs +3 -7
- package/es/components/hyTableForm/js/index.mjs +3 -11
- package/es/components/hyTableForm/js/useAppTableForm.mjs +2 -7
- package/es/components/hyTableForm/style/batchTableForm.scss +26 -54
- package/es/components/hyTableForm/style/tableForm.scss +3 -2
- package/es/components/hyTableForm/tableForm.vue.mjs +90 -46
- package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
- package/es/components/hyTree/js/index.mjs +13 -40
- package/es/components/hyTree/style/index.css +1 -1
- package/es/components/hyTree/tree.vue.mjs +17 -16
- package/es/components/hyUserAvatar/userAvatar.vue.mjs +3 -6
- package/es/components/hyVideoPlayer/js/index.mjs +14 -23
- package/es/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +16 -26
- package/es/components/index.mjs +3 -0
- package/es/hooks/index.mjs +6 -2
- package/es/hooks/useAudioPlayerConfig.mjs +1 -3
- package/es/hooks/useBaseMainStore.mjs +29 -0
- package/es/hooks/useCurrentBus.mjs +20 -0
- package/es/hooks/useDialog.mjs +327 -0
- package/es/hooks/useExportFile.mjs +133 -0
- package/es/hooks/useGlobalConfig.mjs +10 -6
- package/es/hooks/useLocale.mjs +22 -12
- package/es/hooks/usePermissionMap.mjs +1 -3
- package/es/hooks/useResizeHandler.mjs +1 -4
- package/es/hooks/useResizeObserver.mjs +3 -1
- package/es/hooks/useSubscribe.mjs +2 -2
- package/es/hooks/useUserAvatarMap.mjs +1 -3
- package/es/hooks/useVideoPlayerConfig.mjs +1 -3
- package/es/index.mjs +11 -2
- package/es/locale/{en.mjs → en_US.mjs} +81 -5
- package/es/locale/index.mjs +2 -2
- package/es/locale/zh_CN.mjs +81 -3
- package/es/style/tailwind.scss +7 -3
- package/es/utils/adaptive.mjs +1 -3
- package/es/utils/form.mjs +19 -12
- package/es/utils/handler.mjs +4 -8
- package/es/utils/input.mjs +8 -9
- package/es/utils/map/hook/bigMap.mjs +14 -53
- package/es/utils/map/hook/gaode.mjs +5 -20
- package/es/utils/map/hook/leafletjs.mjs +23 -79
- package/es/utils/map/index.mjs +2 -8
- package/es/utils/map/js/webgis.mjs +12 -12
- package/es/version.mjs +1 -1
- package/lib/api/device.js +2 -3
- package/lib/api/exportExcel.js +62 -0
- package/lib/api/index.js +27 -16
- package/lib/api/mapRail.js +34 -0
- package/lib/api/organization.js +17 -8
- package/lib/api/rule.js +33 -0
- package/lib/api/sypct.js +2 -3
- package/lib/api/task.js +2 -3
- package/lib/bussiness/hyAddDepartmentType/addDepartmentType.vue.js +17 -18
- package/lib/bussiness/hyAddDepartmentType/style/addDepartmentType.scss +28 -28
- package/lib/bussiness/hyElectronicFence/cpns/addElectronicFenceDialog/addElectronicFenceDialog.vue.js +515 -0
- package/lib/bussiness/hyElectronicFence/cpns/batchSetElectronicFenceUserDialog/batchSetElectronicFenceUserDialog.vue.js +182 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.js +320 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.js +123 -0
- package/lib/bussiness/hyElectronicFence/electronicFence.vue.js +362 -0
- package/lib/bussiness/hyElectronicFence/index.js +21 -0
- package/lib/bussiness/hyElectronicFence/style/electronicFence.scss +0 -0
- package/lib/bussiness/hyElectronicFence/style/electronicFenceAssociatedUsersDialog.scss +25 -0
- package/lib/bussiness/hyMapAearchPlace/js/index.js +1 -1
- package/lib/bussiness/hyMapAearchPlace/mapAearchPlace.vue.js +4 -6
- package/lib/bussiness/hyMapAearchPlace/style/mapAearchPlace.scss +4 -3
- package/lib/bussiness/hyRuleSetting/cpns/gatheringPeople/gatheringPeople.vue.js +274 -0
- package/lib/bussiness/hyRuleSetting/cpns/missionInRule/missionInRule.vue.js +255 -0
- package/lib/bussiness/hyRuleSetting/cpns/missionOutRule/missionOutRule.vue.js +255 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleAssignDialog/ruleAssignDialog.vue.js +399 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleFenceDialog/ruleFenceDialog.vue.js +655 -0
- package/lib/bussiness/hyRuleSetting/cpns/ruleSettingDialog/ruleSettingDialog.vue.js +361 -0
- package/lib/bussiness/hyRuleSetting/cpns/sedentary/sedentary.vue.js +265 -0
- package/lib/bussiness/hyRuleSetting/cpns/setRuleAggregationAlarmDialog/setRuleAggregationAlarmDialog.vue.js +364 -0
- package/lib/bussiness/hyRuleSetting/cpns/timedVideo/timedVideo.vue.js +244 -0
- package/lib/bussiness/hyRuleSetting/cpns/timerCamera/timerCamera.vue.js +262 -0
- package/lib/bussiness/hyRuleSetting/cpns/timingReturn/timingReturn.vue.js +244 -0
- package/lib/bussiness/hyRuleSetting/index.js +24 -0
- package/lib/bussiness/hyRuleSetting/js/ruleSetting.js +68 -0
- package/lib/bussiness/hyRuleSetting/ruleSetting.vue.js +133 -0
- package/lib/bussiness/hyRuleSetting/style/ruleSetting.scss +0 -0
- package/lib/bussiness/index.js +21 -10
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -13
- package/lib/components/hyAudioPlayer/js/index.js +9 -14
- package/lib/components/hyAudioPlayer/style/audioPlayer.scss +7 -2
- package/lib/components/hyButton/button.vue.js +2 -2
- package/lib/components/hyButton/style/button.scss +48 -74
- package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +123 -0
- package/lib/components/hyCheckboxGroup/index.js +12 -0
- package/lib/components/hyCheckboxGroup/style/checkboxGroup.scss +58 -0
- package/lib/components/hyConfigProvider/configProvider.vue.js +50 -56
- package/lib/components/hyConfirmDialog/confirmDialog.vue.js +56 -61
- package/lib/components/hyConfirmDialog/confirmMethod.js +23 -21
- package/lib/components/hyCutter/cutter.vue.js +8 -22
- package/lib/components/hyDatePicker/datePicker.vue.js +11 -16
- package/lib/components/hyDialog/dialog.vue.js +5 -9
- package/lib/components/hyDialog/style/dialog.scss +12 -13
- package/lib/components/hyDrawer/drawer.vue.js +104 -0
- package/lib/components/hyDrawer/index.js +12 -0
- package/lib/components/hyDrawer/style/drawer.scss +0 -0
- package/lib/components/hyForm/cpns/arrayItem.vue.js +9 -27
- package/lib/components/hyForm/cpns/arrayItem2.vue.js +202 -0
- package/lib/components/hyForm/cpns/extraItem.vue.js +2 -3
- package/lib/components/hyForm/cpns/formItem.vue.js +76 -38
- package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
- package/lib/components/hyForm/form.vue.js +53 -19
- package/lib/components/hyForm/js/index.js +3 -7
- package/lib/components/hyForm/js/useAppForm.js +5 -9
- package/lib/components/hyForm/style/form.scss +4 -13
- package/lib/components/hyIcon/icon.vue.js +3 -3
- package/lib/components/hyIconBox/style/iconBox.scss +2 -6
- package/lib/components/hyInput/inputSearch.vue.js +7 -10
- package/lib/components/hyInput/style/inputSearch.scss +3 -0
- package/lib/components/hyLoading/index.js +2 -4
- package/lib/components/hyMap/js/index.js +29 -4
- package/lib/components/hyMap/map.vue.js +17 -3
- package/lib/components/hyMenu/style/menu.scss +5 -15
- package/lib/components/hyNoPermissions/noPermissions.vue.js +3 -4
- package/lib/components/hyNoPermissionsMap/noPermissionsMap.vue.js +3 -6
- package/lib/components/hyOrgCascader/js/index.js +1 -5
- package/lib/components/hyOrgCascader/orgCascader.vue.js +23 -9
- package/lib/components/hyOrgCascader/style/orgCascader.scss +7 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +47 -40
- package/lib/components/hyRadioGroup/style/radioGroup.scss +9 -0
- package/lib/components/hySearch/cpns/searchItem.vue.js +33 -20
- package/lib/components/hySearch/js/index.js +1 -4
- package/lib/components/hySearch/js/useAppSearch.js +6 -10
- package/lib/components/hySearch/search.vue.js +9 -16
- package/lib/components/hySearch/style/search.scss +2 -0
- package/lib/components/hyStatus/index.js +12 -0
- package/lib/components/hyStatus/status.vue.js +114 -0
- package/lib/components/hyStatus/style/status.scss +0 -0
- package/lib/components/hyTable/cpns/columnSelect.vue.js +22 -26
- package/lib/components/hyTable/cpns/columnSelectItem.vue.js +7 -8
- package/lib/components/hyTable/cpns/headerItem.vue.js +2 -2
- package/lib/components/hyTable/cpns/virtualTable.vue.js +17 -27
- package/lib/components/hyTable/js/index.js +54 -57
- package/lib/components/hyTable/js/useAppTable.js +2 -3
- package/lib/components/hyTable/style/table.scss +8 -0
- package/lib/components/hyTable/table.vue.js +35 -41
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +4 -4
- package/lib/components/hyTableForm/batchTableForm.vue.js +3 -7
- package/lib/components/hyTableForm/js/index.js +3 -11
- package/lib/components/hyTableForm/js/useAppTableForm.js +2 -7
- package/lib/components/hyTableForm/style/batchTableForm.scss +26 -54
- package/lib/components/hyTableForm/style/tableForm.scss +3 -2
- package/lib/components/hyTableForm/tableForm.vue.js +89 -45
- package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
- package/lib/components/hyTree/js/index.js +13 -40
- package/lib/components/hyTree/style/index.css +1 -1
- package/lib/components/hyTree/tree.vue.js +17 -16
- package/lib/components/hyUserAvatar/userAvatar.vue.js +3 -6
- package/lib/components/hyVideoPlayer/js/index.js +14 -23
- package/lib/components/hyVideoPlayer/style/videoPlayer.scss +5 -7
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +16 -26
- package/lib/components/index.js +46 -40
- package/lib/hooks/index.js +17 -0
- package/lib/hooks/useAudioPlayerConfig.js +1 -3
- package/lib/hooks/useBaseMainStore.js +32 -0
- package/lib/hooks/useCurrentBus.js +23 -0
- package/lib/hooks/useDialog.js +331 -0
- package/lib/hooks/useExportFile.js +135 -0
- package/lib/hooks/useGlobalConfig.js +10 -6
- package/lib/hooks/useLocale.js +25 -11
- package/lib/hooks/usePermissionMap.js +1 -3
- package/lib/hooks/useResizeHandler.js +1 -4
- package/lib/hooks/useResizeObserver.js +3 -1
- package/lib/hooks/useSubscribe.js +2 -1
- package/lib/hooks/useUserAvatarMap.js +1 -3
- package/lib/hooks/useVideoPlayerConfig.js +1 -3
- package/lib/index.js +107 -73
- package/lib/locale/{en.js → en_US.js} +81 -5
- package/lib/locale/index.js +3 -3
- package/lib/locale/zh_CN.js +81 -3
- package/lib/style/tailwind.scss +7 -3
- package/lib/utils/adaptive.js +1 -3
- package/lib/utils/form.js +17 -10
- package/lib/utils/handler.js +3 -7
- package/lib/utils/input.js +7 -8
- package/lib/utils/map/hook/bigMap.js +14 -53
- package/lib/utils/map/hook/gaode.js +5 -20
- package/lib/utils/map/hook/leafletjs.js +23 -79
- package/lib/utils/map/index.js +2 -8
- package/lib/utils/map/js/webgis.js +12 -12
- package/lib/version.js +1 -1
- package/package.json +3 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent, useModel, ref, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, createVNode, normalizeStyle, normalizeClass, toDisplayString, createElementBlock, createTextVNode, createCommentVNode, withModifiers, mergeModels } from 'vue';
|
|
1
|
+
import { defineComponent, useModel, ref, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, createVNode, normalizeStyle, normalizeClass, toDisplayString, createElementBlock, createTextVNode, createCommentVNode, Fragment, renderList, withModifiers, mergeModels } from 'vue';
|
|
2
2
|
import { ElDialog } from 'element-plus';
|
|
3
3
|
import '../../hooks/index.mjs';
|
|
4
4
|
import '../index.mjs';
|
|
5
|
-
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
6
5
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
7
6
|
import { HyButton } from '../hyButton/index.mjs';
|
|
7
|
+
import { $t } from '../../hooks/useLocale.mjs';
|
|
8
8
|
|
|
9
9
|
const __default__ = defineComponent({
|
|
10
10
|
name: "HyConfirmDialog"
|
|
@@ -57,6 +57,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
57
57
|
type: String,
|
|
58
58
|
default: "rgb(var(--hy-main))"
|
|
59
59
|
},
|
|
60
|
+
buttonList: {
|
|
61
|
+
type: Array,
|
|
62
|
+
default: () => []
|
|
63
|
+
},
|
|
60
64
|
onClose: Function,
|
|
61
65
|
onCancel: Function,
|
|
62
66
|
onSubmit: Function
|
|
@@ -68,47 +72,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
68
72
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
69
73
|
const props = __props;
|
|
70
74
|
const emits = __emit;
|
|
71
|
-
const { t } = useLocale();
|
|
72
75
|
const visible = useModel(__props, "modelValue");
|
|
73
76
|
const loading = ref(false);
|
|
74
|
-
async function
|
|
75
|
-
if (loading.value) return;
|
|
76
|
-
loading.value = true;
|
|
77
|
-
if (props.onSubmit) {
|
|
78
|
-
try {
|
|
79
|
-
await props.onSubmit();
|
|
80
|
-
} catch (err) {
|
|
81
|
-
console.error(err);
|
|
82
|
-
loading.value = false;
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
visible.value = false;
|
|
87
|
-
loading.value = false;
|
|
88
|
-
emits("hide");
|
|
89
|
-
}
|
|
90
|
-
async function onCancelHandler() {
|
|
91
|
-
if (loading.value) return;
|
|
92
|
-
loading.value = true;
|
|
93
|
-
if (props.onCancel) {
|
|
94
|
-
try {
|
|
95
|
-
await props.onCancel();
|
|
96
|
-
} catch (err) {
|
|
97
|
-
console.error(err);
|
|
98
|
-
loading.value = false;
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
visible.value = false;
|
|
103
|
-
loading.value = false;
|
|
104
|
-
emits("hide");
|
|
105
|
-
}
|
|
106
|
-
async function onCloseHandler() {
|
|
77
|
+
async function onFunHandler(callback) {
|
|
107
78
|
if (loading.value) return;
|
|
108
79
|
loading.value = true;
|
|
109
|
-
if (
|
|
80
|
+
if (callback) {
|
|
110
81
|
try {
|
|
111
|
-
await
|
|
82
|
+
await callback();
|
|
112
83
|
} catch (err) {
|
|
113
84
|
console.error(err);
|
|
114
85
|
loading.value = false;
|
|
@@ -147,26 +118,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
147
118
|
createElementVNode(
|
|
148
119
|
"span",
|
|
149
120
|
{ class: "text-sm text-main font-bold" },
|
|
150
|
-
toDisplayString(__props.dialogTitle || unref(t)("dialog.prompt")),
|
|
121
|
+
toDisplayString(__props.dialogTitle || unref($t)("dialog.prompt")),
|
|
151
122
|
1
|
|
152
123
|
/* TEXT */
|
|
153
124
|
),
|
|
154
|
-
__props.showClose ? (openBlock(), createElementBlock(
|
|
155
|
-
|
|
156
|
-
{
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"class-name": "!w-[18px] !h-[18px]"
|
|
165
|
-
})
|
|
166
|
-
],
|
|
167
|
-
2
|
|
168
|
-
/* CLASS */
|
|
169
|
-
)) : createCommentVNode("v-if", true)
|
|
125
|
+
__props.showClose ? (openBlock(), createElementBlock("div", {
|
|
126
|
+
key: 0,
|
|
127
|
+
class: normalizeClass(["flex items-center clickBox", { "cursor-not-allowed": loading.value }]),
|
|
128
|
+
onClick: ($event) => onFunHandler(__props.onClose)
|
|
129
|
+
}, [
|
|
130
|
+
createVNode(unref(HyIcon), {
|
|
131
|
+
"svg-name": "layout-dialog-close-v2",
|
|
132
|
+
"class-name": "!w-[18px] !h-[18px]"
|
|
133
|
+
})
|
|
134
|
+
], 10, ["onClick"])) : createCommentVNode("v-if", true)
|
|
170
135
|
], 8, ["onClick"])
|
|
171
136
|
]),
|
|
172
137
|
default: withCtx(() => [
|
|
@@ -187,7 +152,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
187
152
|
/* TEXT, CLASS */
|
|
188
153
|
),
|
|
189
154
|
createElementVNode("div", {
|
|
190
|
-
class: "px-[40px] text-smword-break text-center break-all",
|
|
155
|
+
class: "px-[40px] text-smword-break text-center break-all box-border",
|
|
191
156
|
innerHTML: __props.content
|
|
192
157
|
}, null, 8, ["innerHTML"])
|
|
193
158
|
]),
|
|
@@ -200,35 +165,65 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
200
165
|
type: __props.cancelType,
|
|
201
166
|
disabled: loading.value,
|
|
202
167
|
class: "min-w-[120px]",
|
|
203
|
-
onClick:
|
|
168
|
+
onClick: ($event) => onFunHandler(__props.onCancel)
|
|
204
169
|
}, {
|
|
205
170
|
default: withCtx(() => [
|
|
206
171
|
createTextVNode(
|
|
207
|
-
toDisplayString(__props.cancelText || unref(t)("dialog.cancel")),
|
|
172
|
+
toDisplayString(__props.cancelText || unref($t)("dialog.cancel")),
|
|
208
173
|
1
|
|
209
174
|
/* TEXT */
|
|
210
175
|
)
|
|
211
176
|
]),
|
|
212
177
|
_: 1
|
|
213
178
|
/* STABLE */
|
|
214
|
-
}, 8, ["type", "disabled"])) : createCommentVNode("v-if", true),
|
|
179
|
+
}, 8, ["type", "disabled", "onClick"])) : createCommentVNode("v-if", true),
|
|
215
180
|
__props.showSubmit ? (openBlock(), createBlock(unref(HyButton), {
|
|
216
181
|
key: 1,
|
|
217
182
|
type: __props.submitType,
|
|
218
183
|
loading: loading.value,
|
|
219
184
|
class: "min-w-[120px]",
|
|
220
|
-
onClick:
|
|
185
|
+
onClick: ($event) => onFunHandler(__props.onSubmit)
|
|
221
186
|
}, {
|
|
222
187
|
default: withCtx(() => [
|
|
223
188
|
createTextVNode(
|
|
224
|
-
toDisplayString(__props.submitText || unref(t)("dialog.confirm")),
|
|
189
|
+
toDisplayString(__props.submitText || unref($t)("dialog.confirm")),
|
|
225
190
|
1
|
|
226
191
|
/* TEXT */
|
|
227
192
|
)
|
|
228
193
|
]),
|
|
229
194
|
_: 1
|
|
230
195
|
/* STABLE */
|
|
231
|
-
}, 8, ["type", "loading"])) : createCommentVNode("v-if", true)
|
|
196
|
+
}, 8, ["type", "loading", "onClick"])) : createCommentVNode("v-if", true)
|
|
197
|
+
])) : createCommentVNode("v-if", true),
|
|
198
|
+
__props.buttonList && __props.buttonList.length ? (openBlock(), createElementBlock("div", {
|
|
199
|
+
key: 1,
|
|
200
|
+
class: "flex flex-wrap justify-center pt-[32px]"
|
|
201
|
+
}, [
|
|
202
|
+
(openBlock(true), createElementBlock(
|
|
203
|
+
Fragment,
|
|
204
|
+
null,
|
|
205
|
+
renderList(__props.buttonList, (item, index) => {
|
|
206
|
+
return openBlock(), createBlock(unref(HyButton), {
|
|
207
|
+
key: index,
|
|
208
|
+
type: item.type,
|
|
209
|
+
disabled: loading.value,
|
|
210
|
+
class: normalizeClass(["min-w-[120px]", item.class]),
|
|
211
|
+
onClick: ($event) => onFunHandler(item.callback)
|
|
212
|
+
}, {
|
|
213
|
+
default: withCtx(() => [
|
|
214
|
+
createTextVNode(
|
|
215
|
+
toDisplayString(item.label),
|
|
216
|
+
1
|
|
217
|
+
/* TEXT */
|
|
218
|
+
)
|
|
219
|
+
]),
|
|
220
|
+
_: 2
|
|
221
|
+
/* DYNAMIC */
|
|
222
|
+
}, 1032, ["type", "disabled", "class", "onClick"]);
|
|
223
|
+
}),
|
|
224
|
+
128
|
|
225
|
+
/* KEYED_FRAGMENT */
|
|
226
|
+
))
|
|
232
227
|
])) : createCommentVNode("v-if", true)
|
|
233
228
|
])
|
|
234
229
|
]),
|
|
@@ -5,7 +5,7 @@ import '../index.mjs';
|
|
|
5
5
|
import _sfc_main from './confirmDialog.vue.mjs';
|
|
6
6
|
import { useGlobalConfig } from '../../hooks/useGlobalConfig.mjs';
|
|
7
7
|
import { HyConfigProvider } from '../hyConfigProvider/index.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { $t } from '../../hooks/useLocale.mjs';
|
|
9
9
|
|
|
10
10
|
function appConfirmMethod(config) {
|
|
11
11
|
let container = document.createDocumentFragment();
|
|
@@ -18,11 +18,7 @@ function appConfirmMethod(config) {
|
|
|
18
18
|
let confirmDialogInstance = null;
|
|
19
19
|
function render$1(props) {
|
|
20
20
|
const globalConfig = useGlobalConfig();
|
|
21
|
-
const {
|
|
22
|
-
locale = "zhCn",
|
|
23
|
-
api = defaultAxios,
|
|
24
|
-
...args
|
|
25
|
-
} = unref(globalConfig) || {};
|
|
21
|
+
const { locale = "zh_CN", api = defaultAxios, ...args } = unref(globalConfig) || {};
|
|
26
22
|
const vm = createVNode(_sfc_main, props);
|
|
27
23
|
const configProvider = createVNode(
|
|
28
24
|
HyConfigProvider,
|
|
@@ -52,46 +48,52 @@ function appConfirmMethod(config) {
|
|
|
52
48
|
return destroy;
|
|
53
49
|
}
|
|
54
50
|
_sfc_main.tip = (props) => {
|
|
55
|
-
const { t } = useLocale();
|
|
56
51
|
return appConfirmMethod({
|
|
57
|
-
dialogTitle: t("dialog.prompt"),
|
|
58
|
-
title: t("dialog.prompt"),
|
|
59
|
-
content: t("dialog.content"),
|
|
52
|
+
dialogTitle: $t("dialog.prompt"),
|
|
53
|
+
title: $t("dialog.prompt"),
|
|
54
|
+
content: $t("dialog.content"),
|
|
60
55
|
showCancel: false,
|
|
61
56
|
...props
|
|
62
57
|
});
|
|
63
58
|
};
|
|
64
59
|
_sfc_main.confirm = (props) => {
|
|
65
|
-
const { t } = useLocale();
|
|
66
60
|
return appConfirmMethod({
|
|
67
|
-
dialogTitle: t("dialog.prompt"),
|
|
68
|
-
title: t("dialog.prompt"),
|
|
69
|
-
content: t("dialog.content"),
|
|
61
|
+
dialogTitle: $t("dialog.prompt"),
|
|
62
|
+
title: $t("dialog.prompt"),
|
|
63
|
+
content: $t("dialog.content"),
|
|
70
64
|
...props
|
|
71
65
|
});
|
|
72
66
|
};
|
|
73
67
|
_sfc_main.warning = (props) => {
|
|
74
|
-
const { t } = useLocale();
|
|
75
68
|
return appConfirmMethod({
|
|
76
|
-
dialogTitle: t("dialog.riskWarning"),
|
|
77
|
-
title: t("dialog.prompt"),
|
|
69
|
+
dialogTitle: $t("dialog.riskWarning"),
|
|
70
|
+
title: $t("dialog.prompt"),
|
|
78
71
|
titleClass: "text-warning",
|
|
79
|
-
content: t("dialog.content"),
|
|
72
|
+
content: $t("dialog.content"),
|
|
80
73
|
iconColor: "rgb(var(--hy-warning))",
|
|
81
74
|
...props
|
|
82
75
|
});
|
|
83
76
|
};
|
|
84
77
|
_sfc_main.danger = (props) => {
|
|
85
|
-
const { t } = useLocale();
|
|
86
78
|
return appConfirmMethod({
|
|
87
|
-
dialogTitle: t("dialog.dangerousOperation"),
|
|
79
|
+
dialogTitle: $t("dialog.dangerousOperation"),
|
|
88
80
|
titleClass: "text-danger-2",
|
|
89
|
-
title: t("dialog.prompt"),
|
|
90
|
-
content: t("dialog.content"),
|
|
81
|
+
title: $t("dialog.prompt"),
|
|
82
|
+
content: $t("dialog.content"),
|
|
91
83
|
submitType: "danger",
|
|
92
84
|
iconColor: "rgb(var(--hy-danger-2))",
|
|
93
85
|
...props
|
|
94
86
|
});
|
|
95
87
|
};
|
|
88
|
+
_sfc_main.custom = (props) => {
|
|
89
|
+
return appConfirmMethod({
|
|
90
|
+
dialogTitle: $t("dialog.prompt"),
|
|
91
|
+
title: $t("dialog.prompt"),
|
|
92
|
+
content: $t("dialog.content"),
|
|
93
|
+
showSubmit: false,
|
|
94
|
+
showCancel: false,
|
|
95
|
+
...props
|
|
96
|
+
});
|
|
97
|
+
};
|
|
96
98
|
|
|
97
99
|
export { _sfc_main as default };
|
|
@@ -5,7 +5,7 @@ import { User, Delete } from '@element-plus/icons-vue';
|
|
|
5
5
|
import '../../utils/index.mjs';
|
|
6
6
|
import '../index.mjs';
|
|
7
7
|
import '../../hooks/index.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { $t } from '../../hooks/useLocale.mjs';
|
|
9
9
|
import { sizeToTextHandler, blobToDataURL, fileUpload } from '../../utils/file.mjs';
|
|
10
10
|
import { HyDialog } from '../hyDialog/index.mjs';
|
|
11
11
|
|
|
@@ -24,8 +24,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
24
24
|
// 上传文本
|
|
25
25
|
type: String,
|
|
26
26
|
default: () => {
|
|
27
|
-
|
|
28
|
-
return t("cutter.uploadPicture");
|
|
27
|
+
return $t("cutter.uploadPicture");
|
|
29
28
|
}
|
|
30
29
|
},
|
|
31
30
|
showUpload: { type: Boolean, default: true },
|
|
@@ -80,7 +79,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
80
79
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
81
80
|
const props = __props;
|
|
82
81
|
const emits = __emit;
|
|
83
|
-
const { t } = useLocale();
|
|
84
82
|
const modelValue = useModel(__props, "modelValue");
|
|
85
83
|
const cropperRef = useTemplateRef("cropperRef");
|
|
86
84
|
const uploadRef = useTemplateRef("uploadRef");
|
|
@@ -131,9 +129,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
131
129
|
async function beforeAvatarUpload(file) {
|
|
132
130
|
const limit = file.size < props.maxSize;
|
|
133
131
|
if (!limit) {
|
|
134
|
-
ElMessage.error(
|
|
135
|
-
t("cutter.uploadPictureLimit", [sizeToTextHandler(props.maxSize)])
|
|
136
|
-
);
|
|
132
|
+
ElMessage.error($t("cutter.uploadPictureLimit", [sizeToTextHandler(props.maxSize)]));
|
|
137
133
|
return false;
|
|
138
134
|
}
|
|
139
135
|
const result = await blobToDataURL(file);
|
|
@@ -157,12 +153,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
157
153
|
return new Promise((resolve, reject) => {
|
|
158
154
|
cropperRef.value.getCropBlob(async (data) => {
|
|
159
155
|
data.name = fileInfo.value.name;
|
|
160
|
-
const res = await fileUpload(data, props.directTransmission).catch(
|
|
161
|
-
(res2
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
);
|
|
156
|
+
const res = await fileUpload(data, props.directTransmission).catch((res2) => {
|
|
157
|
+
ElMessage.error(res2.msg || res2);
|
|
158
|
+
reject();
|
|
159
|
+
});
|
|
166
160
|
if (res.code === 200) {
|
|
167
161
|
const url = await blobToDataURL(data);
|
|
168
162
|
const key = res.data?.key || res.data?.url || res.data;
|
|
@@ -198,15 +192,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
198
192
|
}
|
|
199
193
|
__expose({
|
|
200
194
|
open: async (params) => {
|
|
201
|
-
const {
|
|
202
|
-
url,
|
|
203
|
-
fileName = "img.png",
|
|
204
|
-
options: options2,
|
|
205
|
-
file,
|
|
206
|
-
onSubmit,
|
|
207
|
-
onCancel,
|
|
208
|
-
onClose
|
|
209
|
-
} = params || {};
|
|
195
|
+
const { url, fileName = "img.png", options: options2, file, onSubmit, onCancel, onClose } = params || {};
|
|
210
196
|
if (file) {
|
|
211
197
|
const result = await blobToDataURL(file);
|
|
212
198
|
openCutter(result, file.name);
|
|
@@ -335,7 +321,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
335
321
|
createVNode(unref(HyDialog), mergeProps({
|
|
336
322
|
modelValue: visible.value,
|
|
337
323
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
338
|
-
title: unref(t)("cutter.imageSegmentation")
|
|
324
|
+
title: unref($t)("cutter.imageSegmentation")
|
|
339
325
|
}, _ctx.$attrs, {
|
|
340
326
|
onClose: onCloseHandler,
|
|
341
327
|
onCancel: onCancelHandler,
|
|
@@ -2,7 +2,7 @@ import { defineComponent, useTemplateRef, useModel, computed, watch, unref, open
|
|
|
2
2
|
import { ElDatePicker } from 'element-plus';
|
|
3
3
|
import '../../utils/index.mjs';
|
|
4
4
|
import '../../hooks/index.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { $t } from '../../hooks/useLocale.mjs';
|
|
6
6
|
import { getDefaultValueFormatByType } from '../../utils/date.mjs';
|
|
7
7
|
import { isArray } from '../../utils/is.mjs';
|
|
8
8
|
|
|
@@ -46,7 +46,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
46
46
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
47
47
|
const props = __props;
|
|
48
48
|
const emits = __emit;
|
|
49
|
-
const { t } = useLocale();
|
|
50
49
|
const appDatePicker = useTemplateRef("appDatePicker");
|
|
51
50
|
const dateValue = useModel(__props, "modelValue");
|
|
52
51
|
const startValue = useModel(__props, "start");
|
|
@@ -57,13 +56,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
57
56
|
}
|
|
58
57
|
switch (props.type) {
|
|
59
58
|
case "daterange":
|
|
60
|
-
return t("datePicker.startDate");
|
|
59
|
+
return $t("datePicker.startDate");
|
|
61
60
|
case "datetimerange":
|
|
62
|
-
return t("datePicker.startDateTime");
|
|
61
|
+
return $t("datePicker.startDateTime");
|
|
63
62
|
case "monthrange":
|
|
64
|
-
return t("datePicker.startMonth");
|
|
63
|
+
return $t("datePicker.startMonth");
|
|
65
64
|
case "yearrange":
|
|
66
|
-
return t("datePicker.startYear");
|
|
65
|
+
return $t("datePicker.startYear");
|
|
67
66
|
}
|
|
68
67
|
return null;
|
|
69
68
|
});
|
|
@@ -73,22 +72,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
73
72
|
}
|
|
74
73
|
switch (props.type) {
|
|
75
74
|
case "daterange":
|
|
76
|
-
return t("datePicker.endDate");
|
|
75
|
+
return $t("datePicker.endDate");
|
|
77
76
|
case "datetimerange":
|
|
78
|
-
return t("datePicker.endDateTime");
|
|
77
|
+
return $t("datePicker.endDateTime");
|
|
79
78
|
case "monthrange":
|
|
80
|
-
return t("datePicker.endMonth");
|
|
79
|
+
return $t("datePicker.endMonth");
|
|
81
80
|
case "yearrange":
|
|
82
|
-
return t("datePicker.endYear");
|
|
81
|
+
return $t("datePicker.endYear");
|
|
83
82
|
}
|
|
84
83
|
return null;
|
|
85
84
|
});
|
|
86
85
|
watch(
|
|
87
86
|
() => [startValue.value, endValue.value],
|
|
88
87
|
([start, end]) => {
|
|
89
|
-
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
90
|
-
props.type
|
|
91
|
-
) && props.isRange) {
|
|
88
|
+
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(props.type) && props.isRange) {
|
|
92
89
|
if (start && end) {
|
|
93
90
|
dateValue.value = [start, end];
|
|
94
91
|
} else {
|
|
@@ -105,9 +102,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
105
102
|
function onChangeHandler(value) {
|
|
106
103
|
const { timeRangeFill } = props;
|
|
107
104
|
const isFill = timeRangeFill && ["daterange"].includes(props.type);
|
|
108
|
-
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
109
|
-
props.type
|
|
110
|
-
) && props.isRange) {
|
|
105
|
+
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(props.type) && props.isRange) {
|
|
111
106
|
value = isArray(value) ? value : [];
|
|
112
107
|
startValue.value = value[0] ? `${value[0]}${isFill ? " 00:00:00" : ""}` : null;
|
|
113
108
|
endValue.value = value[1] ? `${value[1]}${isFill ? " 23:59:59" : ""}` : null;
|
|
@@ -145,7 +140,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
145
140
|
format: dateFormHandler(__props.format),
|
|
146
141
|
valueFormat: dateFormHandler(__props.valueFormat),
|
|
147
142
|
"start-placeholder": startPlaceholder.value,
|
|
148
|
-
"range-separator": unref(t)("datePicker.to"),
|
|
143
|
+
"range-separator": unref($t)("datePicker.to"),
|
|
149
144
|
"end-placeholder": endPlaceholder.value,
|
|
150
145
|
onChange: onChangeHandler
|
|
151
146
|
}), createSlots({
|
|
@@ -3,8 +3,8 @@ import { ElDialog, ElPopover } from 'element-plus';
|
|
|
3
3
|
import '../index.mjs';
|
|
4
4
|
import '../../hooks/index.mjs';
|
|
5
5
|
import '../../utils/index.mjs';
|
|
6
|
-
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
7
6
|
import { HyButton } from '../hyButton/index.mjs';
|
|
7
|
+
import { $t } from '../../hooks/useLocale.mjs';
|
|
8
8
|
import { isFunction } from '../../utils/is.mjs';
|
|
9
9
|
import { HyIcon } from '../hyIcon/index.mjs';
|
|
10
10
|
|
|
@@ -97,7 +97,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
97
97
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
98
98
|
const props = __props;
|
|
99
99
|
const emits = __emit;
|
|
100
|
-
const { t } = useLocale();
|
|
101
100
|
const visible = useModel(__props, "modelValue");
|
|
102
101
|
const loading = useModel(__props, "loading");
|
|
103
102
|
const dialogTypeRight = computed(() => {
|
|
@@ -288,7 +287,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
288
287
|
createElementVNode(
|
|
289
288
|
"div",
|
|
290
289
|
{ class: "flex-shrink-0 font-bold" },
|
|
291
|
-
toDisplayString(basicInfoItem.label) + "\uFF1A
|
|
290
|
+
toDisplayString(basicInfoItem.label) + "\uFF1A",
|
|
292
291
|
1
|
|
293
292
|
/* TEXT */
|
|
294
293
|
),
|
|
@@ -300,10 +299,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
300
299
|
/* TEXT */
|
|
301
300
|
)
|
|
302
301
|
])), [
|
|
303
|
-
[
|
|
304
|
-
vShow,
|
|
305
|
-
unref(isFunction)(basicInfoItem.show) ? basicInfoItem.show() : true
|
|
306
|
-
]
|
|
302
|
+
[vShow, unref(isFunction)(basicInfoItem.show) ? basicInfoItem.show() : true]
|
|
307
303
|
]);
|
|
308
304
|
}),
|
|
309
305
|
128
|
|
@@ -378,7 +374,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
378
374
|
}, {
|
|
379
375
|
default: withCtx(() => [
|
|
380
376
|
createTextVNode(
|
|
381
|
-
toDisplayString(__props.cancelText || unref(t)("dialog.cancel")),
|
|
377
|
+
toDisplayString(__props.cancelText || unref($t)("dialog.cancel")),
|
|
382
378
|
1
|
|
383
379
|
/* TEXT */
|
|
384
380
|
)
|
|
@@ -395,7 +391,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
395
391
|
}, {
|
|
396
392
|
default: withCtx(() => [
|
|
397
393
|
createTextVNode(
|
|
398
|
-
toDisplayString(__props.submitText || unref(t)("dialog.confirm")),
|
|
394
|
+
toDisplayString(__props.submitText || unref($t)("dialog.confirm")),
|
|
399
395
|
1
|
|
400
396
|
/* TEXT */
|
|
401
397
|
)
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
.hy-dialog-app-shrink {
|
|
2
|
-
transform-origin: 100% 100%;
|
|
3
|
-
transition:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
will-change: transform, opacity;
|
|
7
|
-
&.hy-dialog-is-minimized {
|
|
8
|
-
transform: translate(calc(50vw - 100%), calc(100vh - 0px - 100%))
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
1
|
+
.hy-dialog-app-shrink {
|
|
2
|
+
transform-origin: 100% 100%;
|
|
3
|
+
transition:
|
|
4
|
+
transform 0.7s cubic-bezier(0.65, 0, 0.35, 1),
|
|
5
|
+
opacity 0.7s ease;
|
|
6
|
+
will-change: transform, opacity;
|
|
7
|
+
&.hy-dialog-is-minimized {
|
|
8
|
+
transform: translate(calc(50vw - 100%), calc(100vh - 0px - 100%)) scale(0.01) !important;
|
|
9
|
+
opacity: 0.95;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { defineComponent, useModel, ref, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, createElementBlock, renderSlot, createTextVNode, toDisplayString, createVNode, createCommentVNode, mergeModels } from 'vue';
|
|
2
|
+
import { ElDrawer } from 'element-plus';
|
|
3
|
+
import '../index.mjs';
|
|
4
|
+
import { HyIcon } from '../hyIcon/index.mjs';
|
|
5
|
+
|
|
6
|
+
import "./style/drawer.scss";
|
|
7
|
+
|
|
8
|
+
const __default__ = defineComponent({
|
|
9
|
+
name: "HyDrawer"
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
12
|
+
props: /* @__PURE__ */ mergeModels({
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "\u6807\u9898"
|
|
16
|
+
},
|
|
17
|
+
direction: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "rtl"
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "90vw"
|
|
24
|
+
},
|
|
25
|
+
withHeader: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
"modelValue": { type: Boolean, default: false },
|
|
31
|
+
"modelModifiers": {}
|
|
32
|
+
}),
|
|
33
|
+
emits: /* @__PURE__ */ mergeModels([], ["update:modelValue"]),
|
|
34
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const emits = __emit;
|
|
37
|
+
const drawer = useModel(__props, "modelValue");
|
|
38
|
+
const dragLevelIndex = ref(null);
|
|
39
|
+
function setDragLevelIndex(initDragLevelIndex) {
|
|
40
|
+
dragLevelIndex.value = initDragLevelIndex;
|
|
41
|
+
}
|
|
42
|
+
function onCloseHandler() {
|
|
43
|
+
drawer.value = false;
|
|
44
|
+
}
|
|
45
|
+
__expose({
|
|
46
|
+
setDragLevelIndex
|
|
47
|
+
});
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return openBlock(), createBlock(unref(ElDrawer), mergeProps({
|
|
50
|
+
modelValue: drawer.value,
|
|
51
|
+
"onUpdate:modelValue": ($event) => drawer.value = $event,
|
|
52
|
+
"append-to-body": "",
|
|
53
|
+
"lock-scroll": "",
|
|
54
|
+
"close-on-click-modal": false,
|
|
55
|
+
"close-on-press-escape": false,
|
|
56
|
+
"destroy-on-close": "",
|
|
57
|
+
direction: __props.direction,
|
|
58
|
+
"show-close": false,
|
|
59
|
+
size: __props.size,
|
|
60
|
+
"with-header": false,
|
|
61
|
+
"body-class": "!p-0"
|
|
62
|
+
}, _ctx.$attrs, { "z-index": dragLevelIndex.value }), {
|
|
63
|
+
default: withCtx(() => [
|
|
64
|
+
createElementVNode("div", { class: "h-full flex flex-col items-center" }, [
|
|
65
|
+
__props.withHeader ? (openBlock(), createElementBlock("div", {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: "w-full py-5 px-4 flex justify-between items-center relative box-border"
|
|
68
|
+
}, [
|
|
69
|
+
createElementVNode("div", { class: "w-0 flex-grow leading-[1] text-main font-bold size-[18px] mr-2" }, [
|
|
70
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
71
|
+
createTextVNode(
|
|
72
|
+
toDisplayString(__props.title),
|
|
73
|
+
1
|
|
74
|
+
/* TEXT */
|
|
75
|
+
)
|
|
76
|
+
])
|
|
77
|
+
]),
|
|
78
|
+
createElementVNode("div", { class: "text-lg cursor-pointer" }, [
|
|
79
|
+
renderSlot(_ctx.$slots, "title-operate-box"),
|
|
80
|
+
createVNode(unref(HyIcon), {
|
|
81
|
+
"svg-name": "layout-dialog-close-v2",
|
|
82
|
+
class: "!w-[20px] !h-[20px] ml-2 text-danger-2",
|
|
83
|
+
onClick: onCloseHandler
|
|
84
|
+
})
|
|
85
|
+
])
|
|
86
|
+
])) : createCommentVNode("v-if", true),
|
|
87
|
+
createElementVNode("div", { class: "w-full h-0 flex-1 pt-2.5 pb-4 px-4 overflow-y-auto relative box-border" }, [
|
|
88
|
+
renderSlot(_ctx.$slots, "default")
|
|
89
|
+
]),
|
|
90
|
+
renderSlot(_ctx.$slots, "footer")
|
|
91
|
+
])
|
|
92
|
+
]),
|
|
93
|
+
_: 3
|
|
94
|
+
/* FORWARDED */
|
|
95
|
+
}, 16, ["modelValue", "onUpdate:modelValue", "direction", "size", "z-index"]);
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export { _sfc_main as default };
|
|
File without changes
|