hy-dispatch-ui-v3 0.2.66 → 0.2.68
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 +257 -21
- 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 +169 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.mjs +318 -0
- package/es/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.mjs +123 -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/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/hyBatchUploadDialog/batchUploadDialog.vue.mjs +174 -142
- package/es/components/hyButton/button.vue.mjs +18 -5
- package/es/components/hyButton/style/button.scss +50 -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 +149 -69
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
- package/es/components/hyForm/form.vue.mjs +74 -28
- package/es/components/hyForm/js/index.mjs +4 -8
- package/es/components/hyForm/js/useAppForm.mjs +4 -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 +35 -10
- package/es/components/hyMap/map.vue.mjs +30 -6
- 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 +31 -12
- 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 +409 -324
- package/es/components/hySearch/js/index.mjs +1 -4
- package/es/components/hySearch/js/useAppSearch.mjs +5 -10
- package/es/components/hySearch/search.vue.mjs +23 -20
- package/es/components/hySearch/style/search.scss +9 -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 +43 -34
- package/es/components/hyTable/js/index.mjs +67 -64
- package/es/components/hyTable/js/search.mjs +25 -1
- 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 +68 -53
- package/es/components/hyTableActionButton/tableActionButton.vue.mjs +13 -6
- package/es/components/hyTableForm/batchTableForm.vue.mjs +26 -9
- package/es/components/hyTableForm/js/index.mjs +2 -8
- package/es/components/hyTableForm/js/useAppTableForm.mjs +3 -8
- 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 +160 -70
- package/es/components/hyTimePicker/timePicker.vue.mjs +4 -5
- package/es/components/hyTree/js/index.mjs +113 -72
- package/es/components/hyTree/style/index.css +1 -1
- package/es/components/hyTree/tree.vue.mjs +21 -18
- 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} +79 -4
- package/es/locale/index.mjs +2 -2
- package/es/locale/zh_CN.mjs +79 -2
- package/es/style/index.scss +0 -1
- package/es/style/tailwind.scss +7 -4
- package/es/utils/adaptive.mjs +1 -3
- package/es/utils/form.mjs +7 -10
- package/es/utils/handler.mjs +4 -8
- package/es/utils/input.mjs +8 -9
- package/es/utils/is.mjs +3 -1
- package/es/utils/map/hook/bigMap.mjs +16 -53
- package/es/utils/map/hook/gaode.mjs +53 -33
- package/es/utils/map/hook/leafletjs.mjs +38 -82
- package/es/utils/map/index.mjs +3 -9
- 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 +173 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersDialog.vue.js +322 -0
- package/lib/bussiness/hyElectronicFence/cpns/electronicFenceAssociatedUsersDialog/electronicFenceAssociatedUsersItem.vue.js +127 -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/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/hyBatchUploadDialog/batchUploadDialog.vue.js +173 -141
- package/lib/components/hyButton/button.vue.js +17 -4
- package/lib/components/hyButton/style/button.scss +50 -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 +148 -68
- package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
- package/lib/components/hyForm/form.vue.js +69 -23
- package/lib/components/hyForm/js/index.js +3 -7
- package/lib/components/hyForm/js/useAppForm.js +4 -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 +34 -9
- package/lib/components/hyMap/map.vue.js +29 -5
- 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 +29 -10
- 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 +407 -322
- package/lib/components/hySearch/js/index.js +1 -4
- package/lib/components/hySearch/js/useAppSearch.js +5 -10
- package/lib/components/hySearch/search.vue.js +23 -20
- package/lib/components/hySearch/style/search.scss +9 -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 +41 -32
- package/lib/components/hyTable/js/index.js +65 -61
- package/lib/components/hyTable/js/search.js +25 -1
- 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 +67 -52
- package/lib/components/hyTableActionButton/tableActionButton.vue.js +13 -6
- package/lib/components/hyTableForm/batchTableForm.vue.js +26 -9
- package/lib/components/hyTableForm/js/index.js +2 -8
- package/lib/components/hyTableForm/js/useAppTableForm.js +3 -8
- 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 +159 -69
- package/lib/components/hyTimePicker/timePicker.vue.js +3 -4
- package/lib/components/hyTree/js/index.js +113 -72
- package/lib/components/hyTree/style/index.css +1 -1
- package/lib/components/hyTree/tree.vue.js +21 -18
- 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} +79 -4
- package/lib/locale/index.js +3 -3
- package/lib/locale/zh_CN.js +79 -2
- package/lib/style/index.scss +0 -1
- package/lib/style/tailwind.scss +7 -4
- package/lib/utils/adaptive.js +1 -3
- package/lib/utils/form.js +6 -9
- package/lib/utils/handler.js +3 -7
- package/lib/utils/input.js +7 -8
- package/lib/utils/is.js +5 -3
- package/lib/utils/map/hook/bigMap.js +16 -53
- package/lib/utils/map/hook/gaode.js +53 -33
- package/lib/utils/map/hook/leafletjs.js +38 -82
- package/lib/utils/map/index.js +3 -9
- package/lib/utils/map/js/webgis.js +12 -12
- package/lib/version.js +1 -1
- package/package.json +3 -2
|
@@ -4,53 +4,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
|
-
var
|
|
7
|
+
var zh_CN = require('element-plus/es/locale/lang/zh-cn');
|
|
8
|
+
var en_US = require('element-plus/es/locale/lang/en');
|
|
8
9
|
require('../../hooks/index.js');
|
|
9
10
|
var useGlobalConfig = require('../../hooks/useGlobalConfig.js');
|
|
10
|
-
|
|
11
|
-
function _interopNamespaceDefault(e) {
|
|
12
|
-
var n = Object.create(null);
|
|
13
|
-
if (e) {
|
|
14
|
-
Object.keys(e).forEach(function (k) {
|
|
15
|
-
if (k !== 'default') {
|
|
16
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return e[k]; }
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
n.default = e;
|
|
25
|
-
return Object.freeze(n);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var ElementLocale__namespace = /*#__PURE__*/_interopNamespaceDefault(ElementLocale);
|
|
11
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
29
12
|
|
|
30
13
|
const __default__ = vue.defineComponent({
|
|
31
14
|
name: "HyConfigProvider"
|
|
32
15
|
});
|
|
33
16
|
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
34
17
|
props: {
|
|
35
|
-
locale: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: false,
|
|
38
|
-
default: "zhCn"
|
|
39
|
-
},
|
|
40
|
-
api: {
|
|
41
|
-
type: [Object, Function],
|
|
42
|
-
required: false
|
|
43
|
-
},
|
|
44
|
-
userAvatarMap: {
|
|
45
|
-
type: Map,
|
|
46
|
-
required: false,
|
|
47
|
-
default: () => /* @__PURE__ */ new Map()
|
|
48
|
-
},
|
|
49
|
-
permissionMap: {
|
|
50
|
-
type: Map,
|
|
51
|
-
required: false,
|
|
52
|
-
default: () => /* @__PURE__ */ new Map()
|
|
53
|
-
},
|
|
54
18
|
size: {
|
|
55
19
|
type: String,
|
|
56
20
|
required: false,
|
|
@@ -88,22 +52,45 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
88
52
|
type: Object,
|
|
89
53
|
required: false
|
|
90
54
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
55
|
+
/**
|
|
56
|
+
* @param {
|
|
57
|
+
* locale: 'zh_CN' | 'en_US'
|
|
58
|
+
* api: object | function
|
|
59
|
+
* userAvatarMap: Map<string, string>,
|
|
60
|
+
* permissionMap: Map<string, boolean>,
|
|
61
|
+
* audioPlayer: {
|
|
62
|
+
type: 'default' | 'analyse',
|
|
63
|
+
speed: 0.5 | 1.0 | 1.5 | 2.0 | 3.0,
|
|
64
|
+
playRules: 1 | 2 | 3,
|
|
65
|
+
showPlayRules: boolean,
|
|
66
|
+
showPicture: boolean,
|
|
67
|
+
showDownloadFiles: boolean,
|
|
68
|
+
downloadFn: () => void,
|
|
69
|
+
}
|
|
70
|
+
* videoPlayer: {
|
|
71
|
+
type: 'default' | 'analyse',
|
|
72
|
+
speed: 0.5 | 1.0 | 1.5 | 2.0 | 3.0,
|
|
73
|
+
playRules: 1 | 2 | 3,
|
|
74
|
+
showPlayRules: boolean,
|
|
75
|
+
showDownloadFiles: boolean,
|
|
76
|
+
showShrink: boolean,
|
|
77
|
+
vlcProtocol: 'hyvlc',
|
|
78
|
+
vlcAddress: string,
|
|
79
|
+
downloadFn: () => void,
|
|
80
|
+
}
|
|
81
|
+
* ensureHyIcon: (icon: string) => void
|
|
82
|
+
* tooltip: {
|
|
83
|
+
isAlways: boolean,
|
|
84
|
+
overLine: number,
|
|
85
|
+
}
|
|
86
|
+
* mapConfig: object
|
|
87
|
+
* baseMainStore: function
|
|
88
|
+
* currentBus: object
|
|
89
|
+
* } hyConfig
|
|
90
|
+
*/
|
|
91
|
+
hyConfig: {
|
|
96
92
|
type: Object,
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
ensureHyIcon: Function,
|
|
100
|
-
tooltip: {
|
|
101
|
-
type: Object,
|
|
102
|
-
required: false
|
|
103
|
-
},
|
|
104
|
-
mapConfig: {
|
|
105
|
-
type: Object,
|
|
106
|
-
required: false
|
|
93
|
+
default: () => ({})
|
|
107
94
|
}
|
|
108
95
|
},
|
|
109
96
|
setup(__props) {
|
|
@@ -111,7 +98,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
111
98
|
const globalConfig = useGlobalConfig.provideGlobalConfig(props, null, !vue.unref(useGlobalConfig.useGlobalConfig()));
|
|
112
99
|
const config = vue.computed(() => {
|
|
113
100
|
const {
|
|
114
|
-
locale,
|
|
115
101
|
size,
|
|
116
102
|
zIndex,
|
|
117
103
|
button,
|
|
@@ -123,8 +109,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
123
109
|
valueOnClear,
|
|
124
110
|
table
|
|
125
111
|
} = globalConfig.value;
|
|
112
|
+
const locale = globalConfig.value.locale || globalConfig.value.hyConfig && globalConfig.value.hyConfig.locale || "zh_CN";
|
|
126
113
|
return {
|
|
127
|
-
locale:
|
|
114
|
+
locale: locale === "en_US" ? en_US : zh_CN,
|
|
128
115
|
size,
|
|
129
116
|
zIndex,
|
|
130
117
|
button,
|
|
@@ -137,6 +124,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
137
124
|
table
|
|
138
125
|
};
|
|
139
126
|
});
|
|
127
|
+
vue.watch(
|
|
128
|
+
() => props.hyConfig.locale,
|
|
129
|
+
(lang) => {
|
|
130
|
+
useLocale.setLang(lang);
|
|
131
|
+
},
|
|
132
|
+
{ immediate: true }
|
|
133
|
+
);
|
|
140
134
|
return (_ctx, _cache) => {
|
|
141
135
|
return vue.openBlock(), vue.createBlock(
|
|
142
136
|
vue.unref(elementPlus.ElConfigProvider),
|
|
@@ -6,9 +6,9 @@ var vue = require('vue');
|
|
|
6
6
|
var elementPlus = require('element-plus');
|
|
7
7
|
require('../../hooks/index.js');
|
|
8
8
|
require('../index.js');
|
|
9
|
-
var useLocale = require('../../hooks/useLocale.js');
|
|
10
9
|
var index = require('../hyIcon/index.js');
|
|
11
10
|
var index$1 = require('../hyButton/index.js');
|
|
11
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
12
12
|
|
|
13
13
|
const __default__ = vue.defineComponent({
|
|
14
14
|
name: "HyConfirmDialog"
|
|
@@ -61,6 +61,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
61
61
|
type: String,
|
|
62
62
|
default: "rgb(var(--hy-main))"
|
|
63
63
|
},
|
|
64
|
+
buttonList: {
|
|
65
|
+
type: Array,
|
|
66
|
+
default: () => []
|
|
67
|
+
},
|
|
64
68
|
onClose: Function,
|
|
65
69
|
onCancel: Function,
|
|
66
70
|
onSubmit: Function
|
|
@@ -72,47 +76,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
72
76
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
73
77
|
const props = __props;
|
|
74
78
|
const emits = __emit;
|
|
75
|
-
const { t } = useLocale.useLocale();
|
|
76
79
|
const visible = vue.useModel(__props, "modelValue");
|
|
77
80
|
const loading = vue.ref(false);
|
|
78
|
-
async function
|
|
79
|
-
if (loading.value) return;
|
|
80
|
-
loading.value = true;
|
|
81
|
-
if (props.onSubmit) {
|
|
82
|
-
try {
|
|
83
|
-
await props.onSubmit();
|
|
84
|
-
} catch (err) {
|
|
85
|
-
console.error(err);
|
|
86
|
-
loading.value = false;
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
visible.value = false;
|
|
91
|
-
loading.value = false;
|
|
92
|
-
emits("hide");
|
|
93
|
-
}
|
|
94
|
-
async function onCancelHandler() {
|
|
95
|
-
if (loading.value) return;
|
|
96
|
-
loading.value = true;
|
|
97
|
-
if (props.onCancel) {
|
|
98
|
-
try {
|
|
99
|
-
await props.onCancel();
|
|
100
|
-
} catch (err) {
|
|
101
|
-
console.error(err);
|
|
102
|
-
loading.value = false;
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
visible.value = false;
|
|
107
|
-
loading.value = false;
|
|
108
|
-
emits("hide");
|
|
109
|
-
}
|
|
110
|
-
async function onCloseHandler() {
|
|
81
|
+
async function onFunHandler(callback) {
|
|
111
82
|
if (loading.value) return;
|
|
112
83
|
loading.value = true;
|
|
113
|
-
if (
|
|
84
|
+
if (callback) {
|
|
114
85
|
try {
|
|
115
|
-
await
|
|
86
|
+
await callback();
|
|
116
87
|
} catch (err) {
|
|
117
88
|
console.error(err);
|
|
118
89
|
loading.value = false;
|
|
@@ -151,26 +122,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
151
122
|
vue.createElementVNode(
|
|
152
123
|
"span",
|
|
153
124
|
{ class: "text-sm text-main font-bold" },
|
|
154
|
-
vue.toDisplayString(__props.dialogTitle || vue.unref(t)("dialog.prompt")),
|
|
125
|
+
vue.toDisplayString(__props.dialogTitle || vue.unref(useLocale.$t)("dialog.prompt")),
|
|
155
126
|
1
|
|
156
127
|
/* TEXT */
|
|
157
128
|
),
|
|
158
|
-
__props.showClose ? (vue.openBlock(), vue.createElementBlock(
|
|
159
|
-
|
|
160
|
-
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"class-name": "!w-[18px] !h-[18px]"
|
|
169
|
-
})
|
|
170
|
-
],
|
|
171
|
-
2
|
|
172
|
-
/* CLASS */
|
|
173
|
-
)) : vue.createCommentVNode("v-if", true)
|
|
129
|
+
__props.showClose ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
130
|
+
key: 0,
|
|
131
|
+
class: vue.normalizeClass(["flex items-center clickBox", { "cursor-not-allowed": loading.value }]),
|
|
132
|
+
onClick: ($event) => onFunHandler(__props.onClose)
|
|
133
|
+
}, [
|
|
134
|
+
vue.createVNode(vue.unref(index.HyIcon), {
|
|
135
|
+
"svg-name": "layout-dialog-close-v2",
|
|
136
|
+
"class-name": "!w-[18px] !h-[18px]"
|
|
137
|
+
})
|
|
138
|
+
], 10, ["onClick"])) : vue.createCommentVNode("v-if", true)
|
|
174
139
|
], 8, ["onClick"])
|
|
175
140
|
]),
|
|
176
141
|
default: vue.withCtx(() => [
|
|
@@ -191,7 +156,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
191
156
|
/* TEXT, CLASS */
|
|
192
157
|
),
|
|
193
158
|
vue.createElementVNode("div", {
|
|
194
|
-
class: "px-[40px] text-smword-break text-center break-all",
|
|
159
|
+
class: "px-[40px] text-smword-break text-center break-all box-border",
|
|
195
160
|
innerHTML: __props.content
|
|
196
161
|
}, null, 8, ["innerHTML"])
|
|
197
162
|
]),
|
|
@@ -204,35 +169,65 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
204
169
|
type: __props.cancelType,
|
|
205
170
|
disabled: loading.value,
|
|
206
171
|
class: "min-w-[120px]",
|
|
207
|
-
onClick:
|
|
172
|
+
onClick: ($event) => onFunHandler(__props.onCancel)
|
|
208
173
|
}, {
|
|
209
174
|
default: vue.withCtx(() => [
|
|
210
175
|
vue.createTextVNode(
|
|
211
|
-
vue.toDisplayString(__props.cancelText || vue.unref(t)("dialog.cancel")),
|
|
176
|
+
vue.toDisplayString(__props.cancelText || vue.unref(useLocale.$t)("dialog.cancel")),
|
|
212
177
|
1
|
|
213
178
|
/* TEXT */
|
|
214
179
|
)
|
|
215
180
|
]),
|
|
216
181
|
_: 1
|
|
217
182
|
/* STABLE */
|
|
218
|
-
}, 8, ["type", "disabled"])) : vue.createCommentVNode("v-if", true),
|
|
183
|
+
}, 8, ["type", "disabled", "onClick"])) : vue.createCommentVNode("v-if", true),
|
|
219
184
|
__props.showSubmit ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyButton), {
|
|
220
185
|
key: 1,
|
|
221
186
|
type: __props.submitType,
|
|
222
187
|
loading: loading.value,
|
|
223
188
|
class: "min-w-[120px]",
|
|
224
|
-
onClick:
|
|
189
|
+
onClick: ($event) => onFunHandler(__props.onSubmit)
|
|
225
190
|
}, {
|
|
226
191
|
default: vue.withCtx(() => [
|
|
227
192
|
vue.createTextVNode(
|
|
228
|
-
vue.toDisplayString(__props.submitText || vue.unref(t)("dialog.confirm")),
|
|
193
|
+
vue.toDisplayString(__props.submitText || vue.unref(useLocale.$t)("dialog.confirm")),
|
|
229
194
|
1
|
|
230
195
|
/* TEXT */
|
|
231
196
|
)
|
|
232
197
|
]),
|
|
233
198
|
_: 1
|
|
234
199
|
/* STABLE */
|
|
235
|
-
}, 8, ["type", "loading"])) : vue.createCommentVNode("v-if", true)
|
|
200
|
+
}, 8, ["type", "loading", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
201
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
202
|
+
__props.buttonList && __props.buttonList.length ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
203
|
+
key: 1,
|
|
204
|
+
class: "flex flex-wrap justify-center pt-[32px]"
|
|
205
|
+
}, [
|
|
206
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
207
|
+
vue.Fragment,
|
|
208
|
+
null,
|
|
209
|
+
vue.renderList(__props.buttonList, (item, index) => {
|
|
210
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$1.HyButton), {
|
|
211
|
+
key: index,
|
|
212
|
+
type: item.type,
|
|
213
|
+
disabled: loading.value,
|
|
214
|
+
class: vue.normalizeClass(["min-w-[120px]", item.class]),
|
|
215
|
+
onClick: ($event) => onFunHandler(item.callback)
|
|
216
|
+
}, {
|
|
217
|
+
default: vue.withCtx(() => [
|
|
218
|
+
vue.createTextVNode(
|
|
219
|
+
vue.toDisplayString(item.label),
|
|
220
|
+
1
|
|
221
|
+
/* TEXT */
|
|
222
|
+
)
|
|
223
|
+
]),
|
|
224
|
+
_: 2
|
|
225
|
+
/* DYNAMIC */
|
|
226
|
+
}, 1032, ["type", "disabled", "class", "onClick"]);
|
|
227
|
+
}),
|
|
228
|
+
128
|
|
229
|
+
/* KEYED_FRAGMENT */
|
|
230
|
+
))
|
|
236
231
|
])) : vue.createCommentVNode("v-if", true)
|
|
237
232
|
])
|
|
238
233
|
]),
|
|
@@ -22,11 +22,7 @@ function appConfirmMethod(config) {
|
|
|
22
22
|
let confirmDialogInstance = null;
|
|
23
23
|
function render(props) {
|
|
24
24
|
const globalConfig = useGlobalConfig.useGlobalConfig();
|
|
25
|
-
const {
|
|
26
|
-
locale = "zhCn",
|
|
27
|
-
api = useApi.defaultAxios,
|
|
28
|
-
...args
|
|
29
|
-
} = vue.unref(globalConfig) || {};
|
|
25
|
+
const { locale = "zh_CN", api = useApi.defaultAxios, ...args } = vue.unref(globalConfig) || {};
|
|
30
26
|
const vm = vue.createVNode(confirmDialog.default, props);
|
|
31
27
|
const configProvider = vue.createVNode(
|
|
32
28
|
index.HyConfigProvider,
|
|
@@ -56,46 +52,52 @@ function appConfirmMethod(config) {
|
|
|
56
52
|
return destroy;
|
|
57
53
|
}
|
|
58
54
|
confirmDialog.default.tip = (props) => {
|
|
59
|
-
const { t } = useLocale.useLocale();
|
|
60
55
|
return appConfirmMethod({
|
|
61
|
-
dialogTitle: t("dialog.prompt"),
|
|
62
|
-
title: t("dialog.prompt"),
|
|
63
|
-
content: t("dialog.content"),
|
|
56
|
+
dialogTitle: useLocale.$t("dialog.prompt"),
|
|
57
|
+
title: useLocale.$t("dialog.prompt"),
|
|
58
|
+
content: useLocale.$t("dialog.content"),
|
|
64
59
|
showCancel: false,
|
|
65
60
|
...props
|
|
66
61
|
});
|
|
67
62
|
};
|
|
68
63
|
confirmDialog.default.confirm = (props) => {
|
|
69
|
-
const { t } = useLocale.useLocale();
|
|
70
64
|
return appConfirmMethod({
|
|
71
|
-
dialogTitle: t("dialog.prompt"),
|
|
72
|
-
title: t("dialog.prompt"),
|
|
73
|
-
content: t("dialog.content"),
|
|
65
|
+
dialogTitle: useLocale.$t("dialog.prompt"),
|
|
66
|
+
title: useLocale.$t("dialog.prompt"),
|
|
67
|
+
content: useLocale.$t("dialog.content"),
|
|
74
68
|
...props
|
|
75
69
|
});
|
|
76
70
|
};
|
|
77
71
|
confirmDialog.default.warning = (props) => {
|
|
78
|
-
const { t } = useLocale.useLocale();
|
|
79
72
|
return appConfirmMethod({
|
|
80
|
-
dialogTitle: t("dialog.riskWarning"),
|
|
81
|
-
title: t("dialog.prompt"),
|
|
73
|
+
dialogTitle: useLocale.$t("dialog.riskWarning"),
|
|
74
|
+
title: useLocale.$t("dialog.prompt"),
|
|
82
75
|
titleClass: "text-warning",
|
|
83
|
-
content: t("dialog.content"),
|
|
76
|
+
content: useLocale.$t("dialog.content"),
|
|
84
77
|
iconColor: "rgb(var(--hy-warning))",
|
|
85
78
|
...props
|
|
86
79
|
});
|
|
87
80
|
};
|
|
88
81
|
confirmDialog.default.danger = (props) => {
|
|
89
|
-
const { t } = useLocale.useLocale();
|
|
90
82
|
return appConfirmMethod({
|
|
91
|
-
dialogTitle: t("dialog.dangerousOperation"),
|
|
83
|
+
dialogTitle: useLocale.$t("dialog.dangerousOperation"),
|
|
92
84
|
titleClass: "text-danger-2",
|
|
93
|
-
title: t("dialog.prompt"),
|
|
94
|
-
content: t("dialog.content"),
|
|
85
|
+
title: useLocale.$t("dialog.prompt"),
|
|
86
|
+
content: useLocale.$t("dialog.content"),
|
|
95
87
|
submitType: "danger",
|
|
96
88
|
iconColor: "rgb(var(--hy-danger-2))",
|
|
97
89
|
...props
|
|
98
90
|
});
|
|
99
91
|
};
|
|
92
|
+
confirmDialog.default.custom = (props) => {
|
|
93
|
+
return appConfirmMethod({
|
|
94
|
+
dialogTitle: useLocale.$t("dialog.prompt"),
|
|
95
|
+
title: useLocale.$t("dialog.prompt"),
|
|
96
|
+
content: useLocale.$t("dialog.content"),
|
|
97
|
+
showSubmit: false,
|
|
98
|
+
showCancel: false,
|
|
99
|
+
...props
|
|
100
|
+
});
|
|
101
|
+
};
|
|
100
102
|
|
|
101
103
|
exports.default = confirmDialog.default;
|
|
@@ -28,8 +28,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
28
28
|
// 上传文本
|
|
29
29
|
type: String,
|
|
30
30
|
default: () => {
|
|
31
|
-
|
|
32
|
-
return t("cutter.uploadPicture");
|
|
31
|
+
return useLocale.$t("cutter.uploadPicture");
|
|
33
32
|
}
|
|
34
33
|
},
|
|
35
34
|
showUpload: { type: Boolean, default: true },
|
|
@@ -84,7 +83,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
84
83
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
85
84
|
const props = __props;
|
|
86
85
|
const emits = __emit;
|
|
87
|
-
const { t } = useLocale.useLocale();
|
|
88
86
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
89
87
|
const cropperRef = vue.useTemplateRef("cropperRef");
|
|
90
88
|
const uploadRef = vue.useTemplateRef("uploadRef");
|
|
@@ -135,9 +133,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
135
133
|
async function beforeAvatarUpload(file$1) {
|
|
136
134
|
const limit = file$1.size < props.maxSize;
|
|
137
135
|
if (!limit) {
|
|
138
|
-
elementPlus.ElMessage.error(
|
|
139
|
-
t("cutter.uploadPictureLimit", [file.sizeToTextHandler(props.maxSize)])
|
|
140
|
-
);
|
|
136
|
+
elementPlus.ElMessage.error(useLocale.$t("cutter.uploadPictureLimit", [file.sizeToTextHandler(props.maxSize)]));
|
|
141
137
|
return false;
|
|
142
138
|
}
|
|
143
139
|
const result = await file.blobToDataURL(file$1);
|
|
@@ -161,12 +157,10 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
161
157
|
return new Promise((resolve, reject) => {
|
|
162
158
|
cropperRef.value.getCropBlob(async (data) => {
|
|
163
159
|
data.name = fileInfo.value.name;
|
|
164
|
-
const res = await file.fileUpload(data, props.directTransmission).catch(
|
|
165
|
-
(res2
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
);
|
|
160
|
+
const res = await file.fileUpload(data, props.directTransmission).catch((res2) => {
|
|
161
|
+
elementPlus.ElMessage.error(res2.msg || res2);
|
|
162
|
+
reject();
|
|
163
|
+
});
|
|
170
164
|
if (res.code === 200) {
|
|
171
165
|
const url = await file.blobToDataURL(data);
|
|
172
166
|
const key = res.data?.key || res.data?.url || res.data;
|
|
@@ -202,15 +196,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
202
196
|
}
|
|
203
197
|
__expose({
|
|
204
198
|
open: async (params) => {
|
|
205
|
-
const {
|
|
206
|
-
url,
|
|
207
|
-
fileName = "img.png",
|
|
208
|
-
options: options2,
|
|
209
|
-
file: file$1,
|
|
210
|
-
onSubmit,
|
|
211
|
-
onCancel,
|
|
212
|
-
onClose
|
|
213
|
-
} = params || {};
|
|
199
|
+
const { url, fileName = "img.png", options: options2, file: file$1, onSubmit, onCancel, onClose } = params || {};
|
|
214
200
|
if (file$1) {
|
|
215
201
|
const result = await file.blobToDataURL(file$1);
|
|
216
202
|
openCutter(result, file$1.name);
|
|
@@ -339,7 +325,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
339
325
|
vue.createVNode(vue.unref(index.HyDialog), vue.mergeProps({
|
|
340
326
|
modelValue: visible.value,
|
|
341
327
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
342
|
-
title: vue.unref(t)("cutter.imageSegmentation")
|
|
328
|
+
title: vue.unref(useLocale.$t)("cutter.imageSegmentation")
|
|
343
329
|
}, _ctx.$attrs, {
|
|
344
330
|
onClose: onCloseHandler,
|
|
345
331
|
onCancel: onCancelHandler,
|
|
@@ -50,7 +50,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
50
50
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
51
51
|
const props = __props;
|
|
52
52
|
const emits = __emit;
|
|
53
|
-
const { t } = useLocale.useLocale();
|
|
54
53
|
const appDatePicker = vue.useTemplateRef("appDatePicker");
|
|
55
54
|
const dateValue = vue.useModel(__props, "modelValue");
|
|
56
55
|
const startValue = vue.useModel(__props, "start");
|
|
@@ -61,13 +60,13 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
61
60
|
}
|
|
62
61
|
switch (props.type) {
|
|
63
62
|
case "daterange":
|
|
64
|
-
return t("datePicker.startDate");
|
|
63
|
+
return useLocale.$t("datePicker.startDate");
|
|
65
64
|
case "datetimerange":
|
|
66
|
-
return t("datePicker.startDateTime");
|
|
65
|
+
return useLocale.$t("datePicker.startDateTime");
|
|
67
66
|
case "monthrange":
|
|
68
|
-
return t("datePicker.startMonth");
|
|
67
|
+
return useLocale.$t("datePicker.startMonth");
|
|
69
68
|
case "yearrange":
|
|
70
|
-
return t("datePicker.startYear");
|
|
69
|
+
return useLocale.$t("datePicker.startYear");
|
|
71
70
|
}
|
|
72
71
|
return null;
|
|
73
72
|
});
|
|
@@ -77,22 +76,20 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
77
76
|
}
|
|
78
77
|
switch (props.type) {
|
|
79
78
|
case "daterange":
|
|
80
|
-
return t("datePicker.endDate");
|
|
79
|
+
return useLocale.$t("datePicker.endDate");
|
|
81
80
|
case "datetimerange":
|
|
82
|
-
return t("datePicker.endDateTime");
|
|
81
|
+
return useLocale.$t("datePicker.endDateTime");
|
|
83
82
|
case "monthrange":
|
|
84
|
-
return t("datePicker.endMonth");
|
|
83
|
+
return useLocale.$t("datePicker.endMonth");
|
|
85
84
|
case "yearrange":
|
|
86
|
-
return t("datePicker.endYear");
|
|
85
|
+
return useLocale.$t("datePicker.endYear");
|
|
87
86
|
}
|
|
88
87
|
return null;
|
|
89
88
|
});
|
|
90
89
|
vue.watch(
|
|
91
90
|
() => [startValue.value, endValue.value],
|
|
92
91
|
([start, end]) => {
|
|
93
|
-
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
94
|
-
props.type
|
|
95
|
-
) && props.isRange) {
|
|
92
|
+
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(props.type) && props.isRange) {
|
|
96
93
|
if (start && end) {
|
|
97
94
|
dateValue.value = [start, end];
|
|
98
95
|
} else {
|
|
@@ -109,9 +106,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
109
106
|
function onChangeHandler(value) {
|
|
110
107
|
const { timeRangeFill } = props;
|
|
111
108
|
const isFill = timeRangeFill && ["daterange"].includes(props.type);
|
|
112
|
-
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(
|
|
113
|
-
props.type
|
|
114
|
-
) && props.isRange) {
|
|
109
|
+
if (["datetimerange", "daterange", "monthrange", "yearrange"].includes(props.type) && props.isRange) {
|
|
115
110
|
value = is.isArray(value) ? value : [];
|
|
116
111
|
startValue.value = value[0] ? `${value[0]}${isFill ? " 00:00:00" : ""}` : null;
|
|
117
112
|
endValue.value = value[1] ? `${value[1]}${isFill ? " 23:59:59" : ""}` : null;
|
|
@@ -149,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
149
144
|
format: dateFormHandler(__props.format),
|
|
150
145
|
valueFormat: dateFormHandler(__props.valueFormat),
|
|
151
146
|
"start-placeholder": startPlaceholder.value,
|
|
152
|
-
"range-separator": vue.unref(t)("datePicker.to"),
|
|
147
|
+
"range-separator": vue.unref(useLocale.$t)("datePicker.to"),
|
|
153
148
|
"end-placeholder": endPlaceholder.value,
|
|
154
149
|
onChange: onChangeHandler
|
|
155
150
|
}), vue.createSlots({
|
|
@@ -7,8 +7,8 @@ var elementPlus = require('element-plus');
|
|
|
7
7
|
require('../index.js');
|
|
8
8
|
require('../../hooks/index.js');
|
|
9
9
|
require('../../utils/index.js');
|
|
10
|
-
var useLocale = require('../../hooks/useLocale.js');
|
|
11
10
|
var index = require('../hyButton/index.js');
|
|
11
|
+
var useLocale = require('../../hooks/useLocale.js');
|
|
12
12
|
var is = require('../../utils/is.js');
|
|
13
13
|
var index$1 = require('../hyIcon/index.js');
|
|
14
14
|
|
|
@@ -101,7 +101,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
101
101
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
102
102
|
const props = __props;
|
|
103
103
|
const emits = __emit;
|
|
104
|
-
const { t } = useLocale.useLocale();
|
|
105
104
|
const visible = vue.useModel(__props, "modelValue");
|
|
106
105
|
const loading = vue.useModel(__props, "loading");
|
|
107
106
|
const dialogTypeRight = vue.computed(() => {
|
|
@@ -292,7 +291,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
292
291
|
vue.createElementVNode(
|
|
293
292
|
"div",
|
|
294
293
|
{ class: "flex-shrink-0 font-bold" },
|
|
295
|
-
vue.toDisplayString(basicInfoItem.label) + "\uFF1A
|
|
294
|
+
vue.toDisplayString(basicInfoItem.label) + "\uFF1A",
|
|
296
295
|
1
|
|
297
296
|
/* TEXT */
|
|
298
297
|
),
|
|
@@ -304,10 +303,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
304
303
|
/* TEXT */
|
|
305
304
|
)
|
|
306
305
|
])), [
|
|
307
|
-
[
|
|
308
|
-
vue.vShow,
|
|
309
|
-
vue.unref(is.isFunction)(basicInfoItem.show) ? basicInfoItem.show() : true
|
|
310
|
-
]
|
|
306
|
+
[vue.vShow, vue.unref(is.isFunction)(basicInfoItem.show) ? basicInfoItem.show() : true]
|
|
311
307
|
]);
|
|
312
308
|
}),
|
|
313
309
|
128
|
|
@@ -382,7 +378,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
382
378
|
}, {
|
|
383
379
|
default: vue.withCtx(() => [
|
|
384
380
|
vue.createTextVNode(
|
|
385
|
-
vue.toDisplayString(__props.cancelText || vue.unref(t)("dialog.cancel")),
|
|
381
|
+
vue.toDisplayString(__props.cancelText || vue.unref(useLocale.$t)("dialog.cancel")),
|
|
386
382
|
1
|
|
387
383
|
/* TEXT */
|
|
388
384
|
)
|
|
@@ -399,7 +395,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
|
399
395
|
}, {
|
|
400
396
|
default: vue.withCtx(() => [
|
|
401
397
|
vue.createTextVNode(
|
|
402
|
-
vue.toDisplayString(__props.submitText || vue.unref(t)("dialog.confirm")),
|
|
398
|
+
vue.toDisplayString(__props.submitText || vue.unref(useLocale.$t)("dialog.confirm")),
|
|
403
399
|
1
|
|
404
400
|
/* TEXT */
|
|
405
401
|
)
|
|
@@ -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
|
+
}
|