hy-dispatch-ui-v3 0.2.67 → 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 +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 +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/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 +65 -35
- package/es/components/hyForm/cpns/locationSelect.vue.mjs +26 -26
- package/es/components/hyForm/form.vue.mjs +56 -24
- 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 +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 +5 -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 +2 -8
- 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} +79 -4
- package/es/locale/index.mjs +2 -2
- package/es/locale/zh_CN.mjs +79 -2
- package/es/style/tailwind.scss +7 -3
- 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/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 +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/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 +66 -36
- package/lib/components/hyForm/cpns/locationSelect.vue.js +26 -26
- package/lib/components/hyForm/form.vue.js +51 -19
- 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 +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 +5 -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 +2 -8
- 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} +79 -4
- package/lib/locale/index.js +3 -3
- package/lib/locale/zh_CN.js +79 -2
- package/lib/style/tailwind.scss +7 -3
- 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/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
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
background: rgba(94, 157, 180, 0.32);
|
|
38
38
|
border: 1px solid rgba(94, 157, 180, 1);
|
|
39
39
|
box-shadow: 0px 0px 0px 2px rgba(94, 157, 180, 0.5);
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
.hy-button__border {
|
|
42
42
|
background: linear-gradient(
|
|
43
43
|
90deg,
|
|
@@ -46,27 +46,22 @@
|
|
|
46
46
|
rgba(94, 157, 180, 0.4) 100%
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
|
|
50
50
|
.hy-button__inner {
|
|
51
51
|
background: #003a48;
|
|
52
52
|
box-shadow:
|
|
53
53
|
inset 0 0 5px 1px rgba(0, 138, 157, 0.5),
|
|
54
54
|
inset 0 0 2px 0 rgba(0, 147, 157, 0.5);
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
.hy-button__text {
|
|
58
58
|
color: #fff;
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
.hy-button__mask {
|
|
62
|
-
background: radial-gradient(
|
|
63
|
-
ellipse at center bottom,
|
|
64
|
-
#7ebbd2 0%,
|
|
65
|
-
rgb(17, 108, 114) 30%,
|
|
66
|
-
transparent 60%
|
|
67
|
-
);
|
|
62
|
+
background: radial-gradient(ellipse at center bottom, #7ebbd2 0%, rgb(17, 108, 114) 30%, transparent 60%);
|
|
68
63
|
}
|
|
69
|
-
|
|
64
|
+
|
|
70
65
|
&:hover .hy-button__inner {
|
|
71
66
|
box-shadow:
|
|
72
67
|
inset 0 0 5px 1px rgba(0, 138, 157, 0.5),
|
|
@@ -74,7 +69,7 @@
|
|
|
74
69
|
inset 0 0 5px 1px rgba(0, 138, 157, 0.5),
|
|
75
70
|
inset 0 0 2px 0 rgba(0, 147, 157, 0.5);
|
|
76
71
|
}
|
|
77
|
-
|
|
72
|
+
|
|
78
73
|
&:disabled .hy-button__border,
|
|
79
74
|
&.is-disabled .hy-button__border {
|
|
80
75
|
background: linear-gradient(
|
|
@@ -84,7 +79,7 @@
|
|
|
84
79
|
rgba(94, 157, 180, 0.18) 100%
|
|
85
80
|
);
|
|
86
81
|
}
|
|
87
|
-
|
|
82
|
+
|
|
88
83
|
&:disabled .hy-button__inner,
|
|
89
84
|
&.is-disabled .hy-button__inner {
|
|
90
85
|
background: #3e5a64;
|
|
@@ -92,18 +87,18 @@
|
|
|
92
87
|
inset 0 0 4px 1px rgba(0, 138, 157, 0.2),
|
|
93
88
|
inset 0 0 2px 0 rgba(0, 147, 157, 0.16);
|
|
94
89
|
}
|
|
95
|
-
|
|
90
|
+
|
|
96
91
|
&:disabled .hy-button__text,
|
|
97
92
|
&.is-disabled .hy-button__text {
|
|
98
93
|
color: rgba(255, 255, 255, 0.68);
|
|
99
94
|
}
|
|
100
95
|
}
|
|
101
|
-
|
|
96
|
+
|
|
102
97
|
&.hy-button_function {
|
|
103
98
|
background: rgba(45, 242, 255, 0.32);
|
|
104
99
|
border: 1px solid rgba(45, 242, 255, 1);
|
|
105
100
|
box-shadow: 0px 0px 0px 2px rgba(45, 242, 255, 0.5);
|
|
106
|
-
|
|
101
|
+
|
|
107
102
|
.hy-button__border {
|
|
108
103
|
background: linear-gradient(
|
|
109
104
|
90deg,
|
|
@@ -112,27 +107,22 @@
|
|
|
112
107
|
rgba(45, 242, 255, 0.4) 100%
|
|
113
108
|
);
|
|
114
109
|
}
|
|
115
|
-
|
|
110
|
+
|
|
116
111
|
.hy-button__inner {
|
|
117
112
|
background: #003a48;
|
|
118
113
|
box-shadow:
|
|
119
114
|
inset 0 0 5px 1px rgba(97, 248, 255, 0.5),
|
|
120
115
|
inset 0 0 2px 0 rgba(159, 248, 255, 0.5);
|
|
121
116
|
}
|
|
122
|
-
|
|
117
|
+
|
|
123
118
|
.hy-button__text {
|
|
124
119
|
color: #fff;
|
|
125
120
|
}
|
|
126
|
-
|
|
121
|
+
|
|
127
122
|
.hy-button__mask {
|
|
128
|
-
background: radial-gradient(
|
|
129
|
-
ellipse at center bottom,
|
|
130
|
-
#2df2ff 0%,
|
|
131
|
-
#1798a1 30%,
|
|
132
|
-
transparent 60%
|
|
133
|
-
);
|
|
123
|
+
background: radial-gradient(ellipse at center bottom, #2df2ff 0%, #1798a1 30%, transparent 60%);
|
|
134
124
|
}
|
|
135
|
-
|
|
125
|
+
|
|
136
126
|
&:hover .hy-button__inner {
|
|
137
127
|
box-shadow:
|
|
138
128
|
inset 0 0 5px 1px rgba(97, 248, 255, 0.5),
|
|
@@ -140,7 +130,7 @@
|
|
|
140
130
|
inset 0 0 5px 1px rgba(97, 248, 255, 0.5),
|
|
141
131
|
inset 0 0 2px 0 rgba(159, 248, 255, 0.5);
|
|
142
132
|
}
|
|
143
|
-
|
|
133
|
+
|
|
144
134
|
&:disabled .hy-button__border,
|
|
145
135
|
&.is-disabled .hy-button__border {
|
|
146
136
|
background: linear-gradient(
|
|
@@ -150,7 +140,7 @@
|
|
|
150
140
|
rgba(45, 242, 255, 0.18) 100%
|
|
151
141
|
);
|
|
152
142
|
}
|
|
153
|
-
|
|
143
|
+
|
|
154
144
|
&:disabled .hy-button__inner,
|
|
155
145
|
&.is-disabled .hy-button__inner {
|
|
156
146
|
background: #10575c;
|
|
@@ -158,18 +148,18 @@
|
|
|
158
148
|
inset 0 0 4px 1px rgba(97, 248, 255, 0.2),
|
|
159
149
|
inset 0 0 2px 0 rgba(159, 248, 255, 0.16);
|
|
160
150
|
}
|
|
161
|
-
|
|
151
|
+
|
|
162
152
|
&:disabled .hy-button__text,
|
|
163
153
|
&.is-disabled .hy-button__text {
|
|
164
154
|
color: rgba(255, 255, 255, 0.68);
|
|
165
155
|
}
|
|
166
156
|
}
|
|
167
|
-
|
|
157
|
+
|
|
168
158
|
&.hy-button_addTo {
|
|
169
159
|
background: rgba(44, 232, 152, 0.32);
|
|
170
160
|
border: 1px solid rgba(44, 232, 152, 1);
|
|
171
161
|
box-shadow: 0px 0px 0px 2px rgba(44, 232, 152, 0.5);
|
|
172
|
-
|
|
162
|
+
|
|
173
163
|
.hy-button__border {
|
|
174
164
|
background: linear-gradient(
|
|
175
165
|
90deg,
|
|
@@ -178,27 +168,22 @@
|
|
|
178
168
|
rgba(171, 255, 185, 0.4) 100%
|
|
179
169
|
);
|
|
180
170
|
}
|
|
181
|
-
|
|
171
|
+
|
|
182
172
|
.hy-button__inner {
|
|
183
173
|
background: #004823;
|
|
184
174
|
box-shadow:
|
|
185
175
|
inset 0 0 5px 1px rgba(97, 255, 179, 0.5),
|
|
186
176
|
inset 0 0 2px 0 rgba(159, 255, 209, 0.5);
|
|
187
177
|
}
|
|
188
|
-
|
|
178
|
+
|
|
189
179
|
.hy-button__text {
|
|
190
180
|
color: #fff;
|
|
191
181
|
}
|
|
192
|
-
|
|
182
|
+
|
|
193
183
|
.hy-button__mask {
|
|
194
|
-
background: radial-gradient(
|
|
195
|
-
ellipse at center bottom,
|
|
196
|
-
#20e080 0%,
|
|
197
|
-
#109060 30%,
|
|
198
|
-
transparent 60%
|
|
199
|
-
);
|
|
184
|
+
background: radial-gradient(ellipse at center bottom, #20e080 0%, #109060 30%, transparent 60%);
|
|
200
185
|
}
|
|
201
|
-
|
|
186
|
+
|
|
202
187
|
&:hover .hy-button__inner {
|
|
203
188
|
box-shadow:
|
|
204
189
|
inset 0 0 5px 1px rgba(97, 255, 179, 0.5),
|
|
@@ -206,7 +191,7 @@
|
|
|
206
191
|
inset 0 0 5px 1px rgba(97, 255, 179, 0.5),
|
|
207
192
|
inset 0 0 2px 0 rgba(159, 255, 209, 0.5);
|
|
208
193
|
}
|
|
209
|
-
|
|
194
|
+
|
|
210
195
|
&:disabled .hy-button__border,
|
|
211
196
|
&.is-disabled .hy-button__border {
|
|
212
197
|
background: linear-gradient(
|
|
@@ -216,7 +201,7 @@
|
|
|
216
201
|
rgba(171, 255, 185, 0.18) 100%
|
|
217
202
|
);
|
|
218
203
|
}
|
|
219
|
-
|
|
204
|
+
|
|
220
205
|
&:disabled .hy-button__inner,
|
|
221
206
|
&.is-disabled .hy-button__inner {
|
|
222
207
|
background: #1d3d2d;
|
|
@@ -224,18 +209,18 @@
|
|
|
224
209
|
inset 0 0 4px 1px rgba(97, 255, 179, 0.2),
|
|
225
210
|
inset 0 0 2px 0 rgba(159, 255, 209, 0.16);
|
|
226
211
|
}
|
|
227
|
-
|
|
212
|
+
|
|
228
213
|
&:disabled .hy-button__text,
|
|
229
214
|
&.is-disabled .hy-button__text {
|
|
230
215
|
color: rgba(255, 255, 255, 0.68);
|
|
231
216
|
}
|
|
232
217
|
}
|
|
233
|
-
|
|
218
|
+
|
|
234
219
|
&.hy-button_delete {
|
|
235
220
|
background: rgba(255, 77, 77, 0.32);
|
|
236
221
|
border: 1px solid rgba(255, 77, 77, 1);
|
|
237
222
|
box-shadow: 0px 0px 0px 2px rgba(255, 77, 77, 0.5);
|
|
238
|
-
|
|
223
|
+
|
|
239
224
|
.hy-button__border {
|
|
240
225
|
background: linear-gradient(
|
|
241
226
|
90deg,
|
|
@@ -244,27 +229,22 @@
|
|
|
244
229
|
rgba(255, 77, 77, 0.4) 100%
|
|
245
230
|
);
|
|
246
231
|
}
|
|
247
|
-
|
|
232
|
+
|
|
248
233
|
.hy-button__inner {
|
|
249
234
|
background: #4f0000;
|
|
250
235
|
box-shadow:
|
|
251
236
|
inset 0 0 5px 1px rgba(255, 97, 97, 0.5),
|
|
252
237
|
inset 0 0 2px 0 rgba(255, 159, 159, 0.5);
|
|
253
238
|
}
|
|
254
|
-
|
|
239
|
+
|
|
255
240
|
.hy-button__text {
|
|
256
241
|
color: #fff;
|
|
257
242
|
}
|
|
258
|
-
|
|
243
|
+
|
|
259
244
|
.hy-button__mask {
|
|
260
|
-
background: radial-gradient(
|
|
261
|
-
ellipse at center bottom,
|
|
262
|
-
#ff0000 0%,
|
|
263
|
-
#b41414 30%,
|
|
264
|
-
transparent 60%
|
|
265
|
-
);
|
|
245
|
+
background: radial-gradient(ellipse at center bottom, #ff0000 0%, #b41414 30%, transparent 60%);
|
|
266
246
|
}
|
|
267
|
-
|
|
247
|
+
|
|
268
248
|
&:hover .hy-button__inner {
|
|
269
249
|
box-shadow:
|
|
270
250
|
inset 0 0 5px 1px rgba(255, 97, 97, 0.5),
|
|
@@ -272,7 +252,7 @@
|
|
|
272
252
|
inset 0 0 5px 1px rgba(255, 97, 97, 0.5),
|
|
273
253
|
inset 0 0 2px 0 rgba(255, 159, 159, 0.5);
|
|
274
254
|
}
|
|
275
|
-
|
|
255
|
+
|
|
276
256
|
&:disabled .hy-button__border,
|
|
277
257
|
&.is-disabled .hy-button__border {
|
|
278
258
|
background: linear-gradient(
|
|
@@ -282,7 +262,7 @@
|
|
|
282
262
|
rgba(255, 77, 77, 0.18) 100%
|
|
283
263
|
);
|
|
284
264
|
}
|
|
285
|
-
|
|
265
|
+
|
|
286
266
|
&:disabled .hy-button__inner,
|
|
287
267
|
&.is-disabled .hy-button__inner {
|
|
288
268
|
background: #4b0c0c;
|
|
@@ -290,7 +270,7 @@
|
|
|
290
270
|
inset 0 0 4px 1px rgba(255, 97, 97, 0.2),
|
|
291
271
|
inset 0 0 2px 0 rgba(255, 159, 159, 0.16);
|
|
292
272
|
}
|
|
293
|
-
|
|
273
|
+
|
|
294
274
|
&:disabled .hy-button__text,
|
|
295
275
|
&.is-disabled .hy-button__text {
|
|
296
276
|
color: rgba(255, 255, 255, 0.68);
|
|
@@ -301,7 +281,7 @@
|
|
|
301
281
|
background: rgba(45, 255, 211, 0.32);
|
|
302
282
|
border: 1px solid rgba(45, 255, 211, 1);
|
|
303
283
|
box-shadow: 0px 0px 0px 2px rgba(45, 255, 211, 0.5);
|
|
304
|
-
|
|
284
|
+
|
|
305
285
|
.hy-button__border {
|
|
306
286
|
background: linear-gradient(
|
|
307
287
|
90deg,
|
|
@@ -310,27 +290,22 @@
|
|
|
310
290
|
rgba(45, 255, 211, 0.4) 100%
|
|
311
291
|
);
|
|
312
292
|
}
|
|
313
|
-
|
|
293
|
+
|
|
314
294
|
.hy-button__inner {
|
|
315
295
|
background: #002932;
|
|
316
296
|
box-shadow:
|
|
317
297
|
inset 0 0 5px 1px rgba(45, 255, 211, 0.5),
|
|
318
298
|
inset 0 0 2px 0 rgba(45, 255, 211, 0.5);
|
|
319
299
|
}
|
|
320
|
-
|
|
300
|
+
|
|
321
301
|
.hy-button__text {
|
|
322
302
|
color: #fff;
|
|
323
303
|
}
|
|
324
|
-
|
|
304
|
+
|
|
325
305
|
.hy-button__mask {
|
|
326
|
-
background: radial-gradient(
|
|
327
|
-
ellipse at center bottom,
|
|
328
|
-
#2DFFD3 0%,
|
|
329
|
-
#189177 30%,
|
|
330
|
-
transparent 60%
|
|
331
|
-
);
|
|
306
|
+
background: radial-gradient(ellipse at center bottom, #2dffd3 0%, #189177 30%, transparent 60%);
|
|
332
307
|
}
|
|
333
|
-
|
|
308
|
+
|
|
334
309
|
&:hover .hy-button__inner {
|
|
335
310
|
box-shadow:
|
|
336
311
|
inset 0 0 5px 1px rgba(45, 255, 211, 0.5),
|
|
@@ -338,7 +313,7 @@
|
|
|
338
313
|
inset 0 0 5px 1px rgba(45, 255, 211, 0.5),
|
|
339
314
|
inset 0 0 2px 0 rgba(45, 255, 211, 0.5);
|
|
340
315
|
}
|
|
341
|
-
|
|
316
|
+
|
|
342
317
|
&:disabled .hy-button__border,
|
|
343
318
|
&.is-disabled .hy-button__border {
|
|
344
319
|
background: linear-gradient(
|
|
@@ -348,7 +323,7 @@
|
|
|
348
323
|
rgba(45, 255, 211, 0.18) 100%
|
|
349
324
|
);
|
|
350
325
|
}
|
|
351
|
-
|
|
326
|
+
|
|
352
327
|
&:disabled .hy-button__inner,
|
|
353
328
|
&.is-disabled .hy-button__inner {
|
|
354
329
|
background: #4b0c0c;
|
|
@@ -356,7 +331,7 @@
|
|
|
356
331
|
inset 0 0 4px 1px rgba(45, 255, 211, 0.2),
|
|
357
332
|
inset 0 0 2px 0 rgba(24, 145, 119, 0.16);
|
|
358
333
|
}
|
|
359
|
-
|
|
334
|
+
|
|
360
335
|
&:disabled .hy-button__text,
|
|
361
336
|
&.is-disabled .hy-button__text {
|
|
362
337
|
color: rgba(255, 255, 255, 0.68);
|
|
@@ -364,7 +339,6 @@
|
|
|
364
339
|
}
|
|
365
340
|
}
|
|
366
341
|
|
|
367
|
-
|
|
368
342
|
.hy-button-text {
|
|
369
343
|
--hy-button-text-color: rgba(var(--hy-auxiliary));
|
|
370
344
|
--hy-button-font-size: 14px;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
require('../../utils/index.js');
|
|
7
|
+
var is = require('../../utils/is.js');
|
|
8
|
+
|
|
9
|
+
import "./style/checkboxGroup.scss";
|
|
10
|
+
|
|
11
|
+
const __default__ = vue.defineComponent({
|
|
12
|
+
name: "HycheckboxGroup"
|
|
13
|
+
});
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
15
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
16
|
+
options: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => []
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: () => ({})
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "default"
|
|
27
|
+
},
|
|
28
|
+
columnNum: {
|
|
29
|
+
type: Number,
|
|
30
|
+
default: 4
|
|
31
|
+
},
|
|
32
|
+
disabled: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
"modelValue": { type: Array, default: [] },
|
|
38
|
+
"modelModifiers": {}
|
|
39
|
+
}),
|
|
40
|
+
emits: /* @__PURE__ */ vue.mergeModels(["change"], ["update:modelValue"]),
|
|
41
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
42
|
+
const props = __props;
|
|
43
|
+
const emits = __emit;
|
|
44
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
45
|
+
const checkboxProps = vue.computed(() => {
|
|
46
|
+
return {
|
|
47
|
+
value: "value",
|
|
48
|
+
label: "label",
|
|
49
|
+
disabled: "disabled",
|
|
50
|
+
...props.props || {}
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const selectedMap = vue.ref({});
|
|
54
|
+
async function onSelectedHandler(item) {
|
|
55
|
+
if (item[checkboxProps.value.disabled] || props.disabled) return;
|
|
56
|
+
const value = item[checkboxProps.value.value];
|
|
57
|
+
let list = is.isArray(modelValue.value) ? [...modelValue.value] : [];
|
|
58
|
+
if (selectedMap.value[value]) {
|
|
59
|
+
list = list.filter((v) => v !== value);
|
|
60
|
+
} else {
|
|
61
|
+
list.push(value);
|
|
62
|
+
}
|
|
63
|
+
modelValue.value = [...list];
|
|
64
|
+
emits("change", list);
|
|
65
|
+
}
|
|
66
|
+
vue.watch(
|
|
67
|
+
() => modelValue.value,
|
|
68
|
+
(list) => {
|
|
69
|
+
selectedMap.value = (list || []).reduce((obj, value) => {
|
|
70
|
+
obj[value] = true;
|
|
71
|
+
return obj;
|
|
72
|
+
}, {});
|
|
73
|
+
},
|
|
74
|
+
{ deep: true, immediate: true }
|
|
75
|
+
);
|
|
76
|
+
__expose({});
|
|
77
|
+
return (_ctx, _cache) => {
|
|
78
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
class: "hy-checkbox-group",
|
|
82
|
+
style: vue.normalizeStyle({ "grid-template-columns": `repeat(${__props.columnNum}, minmax(0, 1fr))` })
|
|
83
|
+
},
|
|
84
|
+
[
|
|
85
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
86
|
+
vue.Fragment,
|
|
87
|
+
null,
|
|
88
|
+
vue.renderList(__props.options, (item, index) => {
|
|
89
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
90
|
+
key: index,
|
|
91
|
+
class: vue.normalizeClass(["hy-checkbox-item", [
|
|
92
|
+
__props.size === "large" ? "hy-checkbox-item-large" : __props.size === "small" ? "hy-checkbox-item-small" : "hy-checkbox-item-default",
|
|
93
|
+
{
|
|
94
|
+
"is-selected": selectedMap.value[item[checkboxProps.value.value]],
|
|
95
|
+
"opacity-90 !cursor-not-allowed": item[checkboxProps.value.disabled] || __props.disabled
|
|
96
|
+
}
|
|
97
|
+
]]),
|
|
98
|
+
onClick: ($event) => onSelectedHandler(item)
|
|
99
|
+
}, [
|
|
100
|
+
vue.renderSlot(_ctx.$slots, "default", {
|
|
101
|
+
item,
|
|
102
|
+
index
|
|
103
|
+
}, () => [
|
|
104
|
+
vue.createTextVNode(
|
|
105
|
+
vue.toDisplayString(item[checkboxProps.value.label]),
|
|
106
|
+
1
|
|
107
|
+
/* TEXT */
|
|
108
|
+
)
|
|
109
|
+
])
|
|
110
|
+
], 10, ["onClick"]);
|
|
111
|
+
}),
|
|
112
|
+
128
|
|
113
|
+
/* KEYED_FRAGMENT */
|
|
114
|
+
))
|
|
115
|
+
],
|
|
116
|
+
4
|
|
117
|
+
/* STYLE */
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var checkboxGroup = require('./checkboxGroup.vue.js');
|
|
6
|
+
require('../../utils/index.js');
|
|
7
|
+
var handler = require('../../utils/handler.js');
|
|
8
|
+
|
|
9
|
+
const HyCheckboxGroup = handler.withInstall(checkboxGroup.default);
|
|
10
|
+
|
|
11
|
+
exports.HyCheckboxGroup = HyCheckboxGroup;
|
|
12
|
+
exports.default = HyCheckboxGroup;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.hy-checkbox-group {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: grid;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
row-gap: 4px;
|
|
6
|
+
column-gap: 4px;
|
|
7
|
+
font-size: 12px;
|
|
8
|
+
line-height: 1;
|
|
9
|
+
border: 1px solid rgba(var(--hy-border));
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
padding: 3px;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
.hy-checkbox-item {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
color: rgba(var(--hy-auxiliary));
|
|
18
|
+
border: 1px solid transparent;
|
|
19
|
+
border-radius: 2px;
|
|
20
|
+
background-color: rgba(var(--hy-background-2));
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
position: relative;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
user-select: none;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
&.hy-checkbox-item-large {
|
|
28
|
+
height: 40px;
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
}
|
|
31
|
+
&.hy-checkbox-item-small {
|
|
32
|
+
height: 24px;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
}
|
|
35
|
+
&.hy-checkbox-item-default {
|
|
36
|
+
height: 28px;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
}
|
|
39
|
+
&.is-selected {
|
|
40
|
+
font-weight: bold;
|
|
41
|
+
color: rgba(var(--hy-theme));
|
|
42
|
+
border: 1px solid rgba(var(--hy-theme));
|
|
43
|
+
&::before {
|
|
44
|
+
content: '';
|
|
45
|
+
display: block;
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 0;
|
|
48
|
+
right: 0;
|
|
49
|
+
width: 0;
|
|
50
|
+
height: 0;
|
|
51
|
+
border-top: 6px solid rgba(var(--hy-theme));
|
|
52
|
+
border-left: 6px solid transparent;
|
|
53
|
+
border-bottom: 6px solid transparent;
|
|
54
|
+
text-align: center;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -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),
|