hy-dispatch-ui-v3 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -0
- package/dist/tailwind.css +349 -4
- package/es/components/appAudioPlayer/appAudioPlayer.vue.mjs +462 -0
- package/es/components/appAudioPlayer/index.mjs +6 -0
- package/es/components/appAudioPlayer/js/index.mjs +327 -0
- package/es/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
- package/es/components/appButton/style/appButton.scss +0 -1
- package/es/components/appConfigProvider/appConfigProvider.vue.mjs +22 -1
- package/es/components/appCutter/appCutter.vue.mjs +202 -129
- package/es/components/appDatePicker/appDatePicker.vue.mjs +1 -1
- package/es/components/appForm/appForm.vue.mjs +132 -209
- package/es/components/appForm/cpns/appFormItem.vue.mjs +312 -0
- package/es/components/appForm/cpns/arrayItem.vue.mjs +305 -0
- package/es/components/appForm/cpns/extraItem.vue.mjs +140 -0
- package/es/components/appForm/js/index.mjs +46 -24
- package/es/components/appForm/js/useAppForm.mjs +30 -6
- package/es/components/appForm/style/appForm.scss +53 -0
- package/es/components/appIcon/appIcon.vue.mjs +2 -1
- package/es/components/appIconBox/style/appIconBox.scss +0 -1
- package/es/components/appInput/appInput.vue.mjs +99 -0
- package/es/components/appInput/index.mjs +6 -0
- package/es/components/appMenu/appMenu.vue.mjs +129 -0
- package/es/components/appMenu/index.mjs +6 -0
- package/es/components/appMenu/style/appMenu.scss +145 -0
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs +14 -10
- package/es/components/appSearch/appSearch.vue.mjs +55 -211
- package/es/components/appSearch/cpns/appSearchItem.vue.mjs +238 -0
- package/es/components/appSearch/js/index.mjs +20 -8
- package/es/components/appSearch/js/useAppSearch.mjs +10 -5
- package/es/components/appSearch/style/appSearch.scss +10 -0
- package/es/components/appTable/appTable.vue.mjs +312 -158
- package/es/components/appTable/cpns/columnSelect.vue.mjs +151 -156
- package/es/components/appTable/cpns/columnSelectItem.vue2.mjs +104 -110
- package/es/components/appTable/cpns/headerItem.vue.mjs +98 -0
- package/es/components/appTable/cpns/virtualTable.vue.mjs +560 -0
- package/es/components/appTable/js/index.mjs +46 -20
- package/es/components/appTable/js/search.mjs +1 -2
- package/es/components/appTable/js/useAppTable.mjs +58 -14
- package/es/components/appTable/style/appTable.scss +16 -0
- package/es/components/appTooltip/appTooltip.vue.mjs +24 -13
- package/es/components/appTree/appTree.vue.mjs +304 -0
- package/es/components/appTree/index.mjs +6 -0
- package/es/components/appTree/js/index.mjs +531 -0
- package/es/components/appUserAvatar/appUserAvatar.vue.mjs +9 -8
- package/es/components/appUserAvatar/style/appUserAvatar.scss +0 -1
- package/es/components/appVideoPlayer/appVideoPlayer.vue.mjs +647 -0
- package/es/components/appVideoPlayer/cpns/mediaLoading.vue.mjs +35 -0
- package/es/components/appVideoPlayer/index.mjs +6 -0
- package/es/components/appVideoPlayer/js/index.mjs +426 -0
- package/es/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
- package/es/components/appVideoPlayer/style/mediaLoading.scss +62 -0
- package/es/components/index.mjs +5 -0
- package/es/hooks/index.mjs +3 -0
- package/es/hooks/useApi.mjs +4 -4
- package/es/hooks/useAudioPlayerConfig.mjs +12 -0
- package/es/hooks/useGlobalConfig.mjs +18 -7
- package/es/hooks/useLocale.mjs +3 -11
- package/es/hooks/useMixins.mjs +1 -1
- package/es/hooks/usePermissionMap.mjs +12 -0
- package/es/hooks/useUserAvatarMap.mjs +2 -3
- package/es/hooks/useVideoPlayerConfig.mjs +12 -0
- package/es/index.mjs +14 -4
- package/es/locale/en.mjs +52 -3
- package/es/locale/zh_CN.mjs +48 -3
- package/es/make-installer.mjs +2 -0
- package/es/static/hy-svg-icons.js +462 -0
- package/es/static/protocolcheck.js +247 -0
- package/es/style/element/element.scss +9 -0
- package/es/style/element/index.scss +6 -3
- package/es/style/index.scss +11 -0
- package/es/style/theme.scss +73 -0
- package/es/utils/date.mjs +25 -1
- package/es/utils/file.mjs +5 -4
- package/es/utils/form.mjs +52 -0
- package/es/utils/handler.mjs +22 -2
- package/es/utils/index.mjs +6 -4
- package/es/utils/is.mjs +23 -2
- package/es/utils/loadScript.mjs +33 -0
- package/es/version.mjs +1 -1
- package/lib/components/appAudioPlayer/appAudioPlayer.vue.js +466 -0
- package/lib/components/appAudioPlayer/index.js +11 -0
- package/lib/components/appAudioPlayer/js/index.js +329 -0
- package/lib/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
- package/lib/components/appButton/style/appButton.scss +0 -1
- package/lib/components/appConfigProvider/appConfigProvider.vue.js +22 -1
- package/lib/components/appCutter/appCutter.vue.js +201 -128
- package/lib/components/appDatePicker/appDatePicker.vue.js +1 -1
- package/lib/components/appForm/appForm.vue.js +129 -206
- package/lib/components/appForm/cpns/appFormItem.vue.js +316 -0
- package/lib/components/appForm/cpns/arrayItem.vue.js +309 -0
- package/lib/components/appForm/cpns/extraItem.vue.js +144 -0
- package/lib/components/appForm/js/index.js +48 -23
- package/lib/components/appForm/js/useAppForm.js +30 -6
- package/lib/components/appForm/style/appForm.scss +53 -0
- package/lib/components/appIcon/appIcon.vue.js +2 -1
- package/lib/components/appIconBox/style/appIconBox.scss +0 -1
- package/lib/components/appInput/appInput.vue.js +103 -0
- package/lib/components/appInput/index.js +11 -0
- package/lib/components/appMenu/appMenu.vue.js +133 -0
- package/lib/components/appMenu/index.js +11 -0
- package/lib/components/appMenu/style/appMenu.scss +145 -0
- package/lib/components/appOrgCascader/appOrgCascader.vue.js +14 -10
- package/lib/components/appSearch/appSearch.vue.js +51 -207
- package/lib/components/appSearch/cpns/appSearchItem.vue.js +242 -0
- package/lib/components/appSearch/js/index.js +20 -7
- package/lib/components/appSearch/js/useAppSearch.js +10 -5
- package/lib/components/appSearch/style/appSearch.scss +10 -0
- package/lib/components/appTable/appTable.vue.js +319 -165
- package/lib/components/appTable/cpns/columnSelect.vue.js +151 -156
- package/lib/components/appTable/cpns/columnSelectItem.vue2.js +105 -111
- package/lib/components/appTable/cpns/headerItem.vue.js +102 -0
- package/lib/components/appTable/cpns/virtualTable.vue.js +564 -0
- package/lib/components/appTable/js/index.js +47 -19
- package/lib/components/appTable/js/search.js +1 -2
- package/lib/components/appTable/js/useAppTable.js +57 -13
- package/lib/components/appTable/style/appTable.scss +16 -0
- package/lib/components/appTooltip/appTooltip.vue.js +23 -12
- package/lib/components/appTree/appTree.vue.js +308 -0
- package/lib/components/appTree/index.js +11 -0
- package/lib/components/appTree/js/index.js +533 -0
- package/lib/components/appUserAvatar/appUserAvatar.vue.js +9 -8
- package/lib/components/appUserAvatar/style/appUserAvatar.scss +0 -1
- package/lib/components/appVideoPlayer/appVideoPlayer.vue.js +651 -0
- package/lib/components/appVideoPlayer/cpns/mediaLoading.vue.js +39 -0
- package/lib/components/appVideoPlayer/index.js +11 -0
- package/lib/components/appVideoPlayer/js/index.js +429 -0
- package/lib/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
- package/lib/components/appVideoPlayer/style/mediaLoading.scss +62 -0
- package/lib/components/index.js +42 -32
- package/lib/hooks/index.js +9 -0
- package/lib/hooks/useApi.js +4 -4
- package/lib/hooks/useAudioPlayerConfig.js +15 -0
- package/lib/hooks/useGlobalConfig.js +18 -7
- package/lib/hooks/useLocale.js +3 -11
- package/lib/hooks/useMixins.js +1 -1
- package/lib/hooks/usePermissionMap.js +15 -0
- package/lib/hooks/useUserAvatarMap.js +1 -2
- package/lib/hooks/useVideoPlayerConfig.js +15 -0
- package/lib/index.js +62 -33
- package/lib/locale/en.js +52 -3
- package/lib/locale/zh_CN.js +48 -3
- package/lib/make-installer.js +2 -0
- package/lib/static/hy-svg-icons.js +459 -8
- package/lib/static/protocolcheck.js +249 -0
- package/lib/style/element/element.scss +9 -0
- package/lib/style/element/index.scss +6 -3
- package/lib/style/index.scss +11 -0
- package/lib/style/theme.scss +73 -0
- package/lib/utils/date.js +25 -0
- package/lib/utils/file.js +4 -4
- package/lib/utils/form.js +57 -0
- package/lib/utils/handler.js +22 -1
- package/lib/utils/index.js +11 -1
- package/lib/utils/is.js +23 -1
- package/lib/utils/loadScript.js +37 -0
- package/lib/version.js +1 -1
- package/package.json +12 -10
- package/es/config/index.mjs +0 -1
- package/es/static/hy-svg-icons.mjs +0 -11
- package/lib/config/index.js +0 -2
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* 动效组件保持不变 */
|
|
2
|
+
.tech-loader {
|
|
3
|
+
position: relative;
|
|
4
|
+
z-index: 2;
|
|
5
|
+
&::before {
|
|
6
|
+
content: '';
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
bottom: 0;
|
|
12
|
+
border-radius: 50%;
|
|
13
|
+
border: 2px solid rgba(0, 255, 255, 0.1);
|
|
14
|
+
}
|
|
15
|
+
&::after {
|
|
16
|
+
content: '';
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: -2px;
|
|
19
|
+
left: -2px;
|
|
20
|
+
right: -2px;
|
|
21
|
+
bottom: -2px;
|
|
22
|
+
border-radius: 50%;
|
|
23
|
+
border: 2px solid transparent;
|
|
24
|
+
border-top-color: #00ffff;
|
|
25
|
+
border-right-color: #00ffff;
|
|
26
|
+
box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
|
|
27
|
+
animation: spin 1s linear infinite;
|
|
28
|
+
}
|
|
29
|
+
.tech-center-dot {
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 50%;
|
|
32
|
+
left: 50%;
|
|
33
|
+
transform: translate(-50%, -50%);
|
|
34
|
+
width: 6px;
|
|
35
|
+
height: 6px;
|
|
36
|
+
background-color: #00ffff;
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
box-shadow: 0 0 10px #00ffff;
|
|
39
|
+
animation: pulse 1.5s ease-in-out infinite;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@keyframes spin {
|
|
44
|
+
0% {
|
|
45
|
+
transform: rotate(0deg);
|
|
46
|
+
}
|
|
47
|
+
100% {
|
|
48
|
+
transform: rotate(360deg);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes pulse {
|
|
53
|
+
0%,
|
|
54
|
+
100% {
|
|
55
|
+
opacity: 0.5;
|
|
56
|
+
scale: 1;
|
|
57
|
+
}
|
|
58
|
+
50% {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
scale: 1.2;
|
|
61
|
+
}
|
|
62
|
+
}
|
package/lib/components/index.js
CHANGED
|
@@ -1,43 +1,53 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$
|
|
4
|
-
var index$
|
|
5
|
-
var index$
|
|
6
|
-
var index$
|
|
7
|
-
var index$
|
|
8
|
-
var index$
|
|
9
|
-
var index$
|
|
10
|
-
var index$
|
|
11
|
-
var index$
|
|
12
|
-
var index$
|
|
13
|
-
var index = require('./appButton/index.js');
|
|
14
|
-
var index$
|
|
15
|
-
var index$
|
|
16
|
-
var index$
|
|
17
|
-
var index$
|
|
18
|
-
var index$
|
|
3
|
+
var index$e = require('./appOrgCascader/index.js');
|
|
4
|
+
var index$3 = require('./appConfirmDialog/index.js');
|
|
5
|
+
var index$5 = require('./appDatePicker/index.js');
|
|
6
|
+
var index$7 = require('./appForm/index.js');
|
|
7
|
+
var index$8 = require('./appIcon/index.js');
|
|
8
|
+
var index$9 = require('./appIconBox/index.js');
|
|
9
|
+
var index$f = require('./appSearch/index.js');
|
|
10
|
+
var index$g = require('./appTable/index.js');
|
|
11
|
+
var index$h = require('./appTooltip/index.js');
|
|
12
|
+
var index$2 = require('./appConfigProvider/index.js');
|
|
13
|
+
var index$1 = require('./appButton/index.js');
|
|
14
|
+
var index$j = require('./appUserAvatar/index.js');
|
|
15
|
+
var index$c = require('./appNoPermissions/index.js');
|
|
16
|
+
var index$d = require('./appNoPermissionsMap/index.js');
|
|
17
|
+
var index$4 = require('./appCutter/index.js');
|
|
18
|
+
var index$6 = require('./appDialog/index.js');
|
|
19
|
+
var index$b = require('./appMenu/index.js');
|
|
20
|
+
var index$i = require('./appTree/index.js');
|
|
21
|
+
var index$k = require('./appVideoPlayer/index.js');
|
|
22
|
+
var index = require('./appAudioPlayer/index.js');
|
|
23
|
+
var index$a = require('./appInput/index.js');
|
|
19
24
|
var useAppForm = require('./appForm/js/useAppForm.js');
|
|
20
25
|
var useAppSearch = require('./appSearch/js/useAppSearch.js');
|
|
21
26
|
var useAppTable = require('./appTable/js/useAppTable.js');
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
|
|
25
|
-
exports.AppOrgCascader = index$
|
|
26
|
-
exports.AppConfirmDialog = index$
|
|
27
|
-
exports.AppDatePicker = index$
|
|
28
|
-
exports.AppForm = index$
|
|
29
|
-
exports.AppIcon = index$
|
|
30
|
-
exports.AppIconBox = index$
|
|
31
|
-
exports.AppSearch = index$
|
|
32
|
-
exports.AppTable = index$
|
|
33
|
-
exports.AppTooltip = index$
|
|
34
|
-
exports.AppConfigProvider = index$
|
|
35
|
-
exports.AppButton = index.AppButton;
|
|
36
|
-
exports.AppUserAvatar = index$
|
|
37
|
-
exports.AppNoPermissions = index$
|
|
38
|
-
exports.AppNoPermissionsMap = index$
|
|
39
|
-
exports.AppCutter = index$
|
|
40
|
-
exports.AppDialog = index$
|
|
30
|
+
exports.AppOrgCascader = index$e.AppOrgCascader;
|
|
31
|
+
exports.AppConfirmDialog = index$3.AppConfirmDialog;
|
|
32
|
+
exports.AppDatePicker = index$5.AppDatePicker;
|
|
33
|
+
exports.AppForm = index$7.AppForm;
|
|
34
|
+
exports.AppIcon = index$8.AppIcon;
|
|
35
|
+
exports.AppIconBox = index$9.AppIconBox;
|
|
36
|
+
exports.AppSearch = index$f.AppSearch;
|
|
37
|
+
exports.AppTable = index$g.AppTable;
|
|
38
|
+
exports.AppTooltip = index$h.AppTooltip;
|
|
39
|
+
exports.AppConfigProvider = index$2.AppConfigProvider;
|
|
40
|
+
exports.AppButton = index$1.AppButton;
|
|
41
|
+
exports.AppUserAvatar = index$j.AppUserAvatar;
|
|
42
|
+
exports.AppNoPermissions = index$c.AppNoPermissions;
|
|
43
|
+
exports.AppNoPermissionsMap = index$d.AppNoPermissionsMap;
|
|
44
|
+
exports.AppCutter = index$4.AppCutter;
|
|
45
|
+
exports.AppDialog = index$6.AppDialog;
|
|
46
|
+
exports.AppMenu = index$b.AppMenu;
|
|
47
|
+
exports.AppTree = index$i.AppTree;
|
|
48
|
+
exports.AppVideoPlayer = index$k.AppVideoPlayer;
|
|
49
|
+
exports.AppAudioPlayer = index.AppAudioPlayer;
|
|
50
|
+
exports.AppInput = index$a.AppInput;
|
|
41
51
|
exports.useAppForm = useAppForm.useAppForm;
|
|
42
52
|
exports.useAppSearch = useAppSearch.useAppSearch;
|
|
43
53
|
exports.useAppTable = useAppTable.useAppTable;
|
package/lib/hooks/index.js
CHANGED
|
@@ -4,8 +4,11 @@ var useApi = require('./useApi.js');
|
|
|
4
4
|
var useLocale = require('./useLocale.js');
|
|
5
5
|
var useGlobalConfig = require('./useGlobalConfig.js');
|
|
6
6
|
var useMixins = require('./useMixins.js');
|
|
7
|
+
var usePermissionMap = require('./usePermissionMap.js');
|
|
7
8
|
var useUserAvatarMap = require('./useUserAvatarMap.js');
|
|
8
9
|
var useResizeHandler = require('./useResizeHandler.js');
|
|
10
|
+
var useAudioPlayerConfig = require('./useAudioPlayerConfig.js');
|
|
11
|
+
var useVideoPlayerConfig = require('./useVideoPlayerConfig.js');
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -22,6 +25,12 @@ exports.configProviderContextKey = useGlobalConfig.configProviderContextKey;
|
|
|
22
25
|
exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
|
|
23
26
|
exports.useGlobalConfig = useGlobalConfig.useGlobalConfig;
|
|
24
27
|
exports.useMixins = useMixins.useMixins;
|
|
28
|
+
exports.localPermissionMapKey = usePermissionMap.localPermissionMapKey;
|
|
29
|
+
exports.usePermissionMap = usePermissionMap.usePermissionMap;
|
|
25
30
|
exports.localUserAvatarMapKey = useUserAvatarMap.localUserAvatarMapKey;
|
|
26
31
|
exports.useUserAvatarMap = useUserAvatarMap.useUserAvatarMap;
|
|
27
32
|
exports.useResizeHandler = useResizeHandler.useResizeHandler;
|
|
33
|
+
exports.localAudioPlayerConfigKey = useAudioPlayerConfig.localAudioPlayerConfigKey;
|
|
34
|
+
exports.useAudioPlayerConfig = useAudioPlayerConfig.useAudioPlayerConfig;
|
|
35
|
+
exports.localVideoPlayerConfigKey = useVideoPlayerConfig.localVideoPlayerConfigKey;
|
|
36
|
+
exports.useVideoPlayerConfig = useVideoPlayerConfig.useVideoPlayerConfig;
|
package/lib/hooks/useApi.js
CHANGED
|
@@ -14,7 +14,7 @@ const defaultAxios = vue.ref(
|
|
|
14
14
|
);
|
|
15
15
|
defaultAxios.value.interceptors.response.use(
|
|
16
16
|
(response) => {
|
|
17
|
-
const data = response
|
|
17
|
+
const data = response?.data;
|
|
18
18
|
return Promise.resolve(data);
|
|
19
19
|
},
|
|
20
20
|
(error) => {
|
|
@@ -22,10 +22,10 @@ defaultAxios.value.interceptors.response.use(
|
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
const useApi = () => {
|
|
25
|
-
var _a;
|
|
26
25
|
const api = vue.inject(localApiKey, vue.ref());
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
return {
|
|
27
|
+
api: vue.unref(api) ? api : vue.unref(useGlobalConfig.useGlobalConfig())?.api || defaultAxios
|
|
28
|
+
};
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
exports.defaultAxios = defaultAxios;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var useGlobalConfig = require('./useGlobalConfig.js');
|
|
5
|
+
|
|
6
|
+
const localAudioPlayerConfigKey = /* @__PURE__ */ Symbol("useAudioPlayerConfig");
|
|
7
|
+
const useAudioPlayerConfig = () => {
|
|
8
|
+
const audioPlayerConfig = vue.inject(localAudioPlayerConfigKey, vue.ref());
|
|
9
|
+
return {
|
|
10
|
+
audioPlayerConfig: vue.unref(audioPlayerConfig) ? audioPlayerConfig : vue.unref(useGlobalConfig.useGlobalConfig()).audioPlayer || vue.ref(/* @__PURE__ */ new Map())
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.localAudioPlayerConfigKey = localAudioPlayerConfigKey;
|
|
15
|
+
exports.useAudioPlayerConfig = useAudioPlayerConfig;
|
|
@@ -5,6 +5,9 @@ var index = require('../locale/index.js');
|
|
|
5
5
|
var useLocale = require('./useLocale.js');
|
|
6
6
|
var useApi = require('./useApi.js');
|
|
7
7
|
var useUserAvatarMap = require('./useUserAvatarMap.js');
|
|
8
|
+
var usePermissionMap = require('./usePermissionMap.js');
|
|
9
|
+
var useAudioPlayerConfig = require('./useAudioPlayerConfig.js');
|
|
10
|
+
var useVideoPlayerConfig = require('./useVideoPlayerConfig.js');
|
|
8
11
|
var zh_CN = require('../locale/zh_CN.js');
|
|
9
12
|
|
|
10
13
|
const globalConfig = vue.ref();
|
|
@@ -20,19 +23,15 @@ const configProviderContextKey = /* @__PURE__ */ Symbol("configProviderContextKe
|
|
|
20
23
|
function useGlobalConfig(key, defaultValue = void 0) {
|
|
21
24
|
const config = vue.getCurrentInstance() ? vue.inject(configProviderContextKey, globalConfig) : globalConfig;
|
|
22
25
|
if (key) {
|
|
23
|
-
return vue.computed(() =>
|
|
24
|
-
var _a, _b;
|
|
25
|
-
return (_b = (_a = config.value) == null ? void 0 : _a[key]) != null ? _b : defaultValue;
|
|
26
|
-
});
|
|
26
|
+
return vue.computed(() => config.value?.[key] ?? defaultValue);
|
|
27
27
|
} else {
|
|
28
28
|
return config;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
const provideGlobalConfig = (config, app, global = false) => {
|
|
32
|
-
var _a;
|
|
33
32
|
const inSetup = !!vue.getCurrentInstance();
|
|
34
33
|
const oldConfig = inSetup ? useGlobalConfig() : void 0;
|
|
35
|
-
const provideFn =
|
|
34
|
+
const provideFn = app?.provide ?? (inSetup ? vue.provide : void 0);
|
|
36
35
|
if (!provideFn) {
|
|
37
36
|
console.warn(
|
|
38
37
|
"provideGlobalConfig",
|
|
@@ -42,7 +41,7 @@ const provideGlobalConfig = (config, app, global = false) => {
|
|
|
42
41
|
}
|
|
43
42
|
const context = vue.computed(() => {
|
|
44
43
|
const cfg = vue.unref(config);
|
|
45
|
-
if (!
|
|
44
|
+
if (!oldConfig?.value) return cfg;
|
|
46
45
|
return mergeConfig(oldConfig.value, cfg);
|
|
47
46
|
});
|
|
48
47
|
provideFn(configProviderContextKey, context);
|
|
@@ -58,6 +57,18 @@ const provideGlobalConfig = (config, app, global = false) => {
|
|
|
58
57
|
useUserAvatarMap.localUserAvatarMapKey,
|
|
59
58
|
vue.computed(() => context.value.userAvatarMap)
|
|
60
59
|
);
|
|
60
|
+
provideFn(
|
|
61
|
+
usePermissionMap.localPermissionMapKey,
|
|
62
|
+
vue.computed(() => context.value.permissionMap)
|
|
63
|
+
);
|
|
64
|
+
provideFn(
|
|
65
|
+
useAudioPlayerConfig.localAudioPlayerConfigKey,
|
|
66
|
+
vue.computed(() => context.value.audioPlayer)
|
|
67
|
+
);
|
|
68
|
+
provideFn(
|
|
69
|
+
useVideoPlayerConfig.localVideoPlayerConfigKey,
|
|
70
|
+
vue.computed(() => context.value.videoPlayer)
|
|
71
|
+
);
|
|
61
72
|
if (global || !globalConfig.value) {
|
|
62
73
|
globalConfig.value = context.value;
|
|
63
74
|
}
|
package/lib/hooks/useLocale.js
CHANGED
|
@@ -9,10 +9,7 @@ var zh_CN = require('../locale/zh_CN.js');
|
|
|
9
9
|
const buildTranslator = (locale) => (path, option) => translate(path, option, vue.unref(locale));
|
|
10
10
|
const translate = (path, option, locale) => lodashUnified.get(locale, path, path).replace(
|
|
11
11
|
/\{(\w+)\}/g,
|
|
12
|
-
(_, key) => {
|
|
13
|
-
var _a;
|
|
14
|
-
return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
|
|
15
|
-
}
|
|
12
|
+
(_, key) => `${option?.[key] ?? `{${key}}`}`
|
|
16
13
|
);
|
|
17
14
|
const buildLocaleContext = (locale, conifg) => {
|
|
18
15
|
const lang = vue.computed(() => vue.unref(locale).name);
|
|
@@ -25,19 +22,14 @@ const buildLocaleContext = (locale, conifg) => {
|
|
|
25
22
|
};
|
|
26
23
|
const localeContextKey = /* @__PURE__ */ Symbol("localeContextKey");
|
|
27
24
|
const getLanguage = (localeOverrides) => {
|
|
28
|
-
var _a;
|
|
29
25
|
const locale = localeOverrides || vue.inject(localeContextKey, vue.ref());
|
|
30
|
-
return
|
|
26
|
+
return vue.unref(locale)?.name || Chinese?.name;
|
|
31
27
|
};
|
|
32
28
|
const useLocale = (localeOverrides) => {
|
|
33
29
|
const locale = localeOverrides || vue.inject(localeContextKey, vue.ref());
|
|
34
|
-
const globalConfig = useGlobalConfig.useGlobalConfig();
|
|
35
30
|
return buildLocaleContext(
|
|
36
31
|
vue.computed(
|
|
37
|
-
() =>
|
|
38
|
-
var _a;
|
|
39
|
-
return vue.unref(locale) || index[(_a = vue.unref(globalConfig)) == null ? void 0 : _a.locale] || zh_CN.default;
|
|
40
|
-
}
|
|
32
|
+
() => vue.unref(locale) || index[vue.unref(useGlobalConfig.useGlobalConfig())?.locale] || zh_CN.default
|
|
41
33
|
)
|
|
42
34
|
);
|
|
43
35
|
};
|
package/lib/hooks/useMixins.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var useGlobalConfig = require('./useGlobalConfig.js');
|
|
5
|
+
|
|
6
|
+
const localPermissionMapKey = /* @__PURE__ */ Symbol("permissionMap");
|
|
7
|
+
const usePermissionMap = () => {
|
|
8
|
+
const permissionMap = vue.inject(localPermissionMapKey, vue.ref());
|
|
9
|
+
return {
|
|
10
|
+
permissionMap: vue.unref(permissionMap) ? permissionMap : vue.unref(useGlobalConfig.useGlobalConfig()).permissionMap || vue.ref(/* @__PURE__ */ new Map())
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.localPermissionMapKey = localPermissionMapKey;
|
|
15
|
+
exports.usePermissionMap = usePermissionMap;
|
|
@@ -6,9 +6,8 @@ var useGlobalConfig = require('./useGlobalConfig.js');
|
|
|
6
6
|
const localUserAvatarMapKey = /* @__PURE__ */ Symbol("userAvatarMap");
|
|
7
7
|
const useUserAvatarMap = () => {
|
|
8
8
|
const userAvatarMap = vue.inject(localUserAvatarMapKey, vue.ref());
|
|
9
|
-
const globalConfig = useGlobalConfig.useGlobalConfig();
|
|
10
9
|
return {
|
|
11
|
-
userAvatarMap: unref(userAvatarMap) ? userAvatarMap : unref(
|
|
10
|
+
userAvatarMap: vue.unref(userAvatarMap) ? userAvatarMap : vue.unref(useGlobalConfig.useGlobalConfig()).userAvatarMap || vue.ref(/* @__PURE__ */ new Map())
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
13
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var useGlobalConfig = require('./useGlobalConfig.js');
|
|
5
|
+
|
|
6
|
+
const localVideoPlayerConfigKey = /* @__PURE__ */ Symbol("useVideoPlayerConfig");
|
|
7
|
+
const useVideoPlayerConfig = () => {
|
|
8
|
+
const videoPlayerConfig = vue.inject(localVideoPlayerConfigKey, vue.ref());
|
|
9
|
+
return {
|
|
10
|
+
videoPlayerConfig: vue.unref(videoPlayerConfig) ? videoPlayerConfig : vue.unref(useGlobalConfig.useGlobalConfig()).videoPlayer || vue.ref(/* @__PURE__ */ new Map())
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.localVideoPlayerConfigKey = localVideoPlayerConfigKey;
|
|
15
|
+
exports.useVideoPlayerConfig = useVideoPlayerConfig;
|
package/lib/index.js
CHANGED
|
@@ -3,33 +3,43 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var makeInstaller = require('./make-installer.js');
|
|
6
|
-
var index = require('./components/
|
|
7
|
-
var index$1 = require('./components/
|
|
8
|
-
var index$2 = require('./components/
|
|
9
|
-
var index$3 = require('./components/
|
|
10
|
-
var index$4 = require('./components/
|
|
11
|
-
var index$5 = require('./components/
|
|
12
|
-
var index$6 = require('./components/
|
|
13
|
-
var index$7 = require('./components/
|
|
14
|
-
var index$8 = require('./components/
|
|
15
|
-
var index$9 = require('./components/
|
|
16
|
-
var index$a = require('./components/
|
|
17
|
-
var index$b = require('./components/
|
|
18
|
-
var index$c = require('./components/
|
|
19
|
-
var index$d = require('./components/
|
|
20
|
-
var index$e = require('./components/
|
|
21
|
-
var index$f = require('./components/
|
|
6
|
+
var index = require('./components/appAudioPlayer/index.js');
|
|
7
|
+
var index$1 = require('./components/appButton/index.js');
|
|
8
|
+
var index$2 = require('./components/appConfigProvider/index.js');
|
|
9
|
+
var index$3 = require('./components/appConfirmDialog/index.js');
|
|
10
|
+
var index$4 = require('./components/appCutter/index.js');
|
|
11
|
+
var index$5 = require('./components/appDatePicker/index.js');
|
|
12
|
+
var index$6 = require('./components/appDialog/index.js');
|
|
13
|
+
var index$7 = require('./components/appForm/index.js');
|
|
14
|
+
var index$8 = require('./components/appIcon/index.js');
|
|
15
|
+
var index$9 = require('./components/appIconBox/index.js');
|
|
16
|
+
var index$a = require('./components/appInput/index.js');
|
|
17
|
+
var index$b = require('./components/appMenu/index.js');
|
|
18
|
+
var index$c = require('./components/appNoPermissions/index.js');
|
|
19
|
+
var index$d = require('./components/appNoPermissionsMap/index.js');
|
|
20
|
+
var index$e = require('./components/appOrgCascader/index.js');
|
|
21
|
+
var index$f = require('./components/appSearch/index.js');
|
|
22
|
+
var index$g = require('./components/appTable/index.js');
|
|
23
|
+
var index$h = require('./components/appTooltip/index.js');
|
|
24
|
+
var index$i = require('./components/appTree/index.js');
|
|
25
|
+
var index$j = require('./components/appUserAvatar/index.js');
|
|
26
|
+
var index$k = require('./components/appVideoPlayer/index.js');
|
|
22
27
|
var crypto = require('./utils/crypto.js');
|
|
23
28
|
var file = require('./utils/file.js');
|
|
24
29
|
var useLocale = require('./hooks/useLocale.js');
|
|
25
30
|
var bus = require('./utils/bus.js');
|
|
31
|
+
var form = require('./utils/form.js');
|
|
26
32
|
var handler = require('./utils/handler.js');
|
|
27
33
|
var useGlobalConfig = require('./hooks/useGlobalConfig.js');
|
|
28
34
|
var useApi = require('./hooks/useApi.js');
|
|
29
35
|
var date = require('./utils/date.js');
|
|
30
36
|
var is = require('./utils/is.js');
|
|
37
|
+
var useAudioPlayerConfig = require('./hooks/useAudioPlayerConfig.js');
|
|
38
|
+
var usePermissionMap = require('./hooks/usePermissionMap.js');
|
|
31
39
|
var useUserAvatarMap = require('./hooks/useUserAvatarMap.js');
|
|
40
|
+
var useVideoPlayerConfig = require('./hooks/useVideoPlayerConfig.js');
|
|
32
41
|
var adaptive = require('./utils/adaptive.js');
|
|
42
|
+
var loadScript = require('./utils/loadScript.js');
|
|
33
43
|
var useAppForm = require('./components/appForm/js/useAppForm.js');
|
|
34
44
|
var useAppSearch = require('./components/appSearch/js/useAppSearch.js');
|
|
35
45
|
var useAppTable = require('./components/appTable/js/useAppTable.js');
|
|
@@ -40,27 +50,31 @@ import "./style/index.scss";
|
|
|
40
50
|
|
|
41
51
|
|
|
42
52
|
exports.default = makeInstaller.default;
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
53
|
+
exports.AppAudioPlayer = index.AppAudioPlayer;
|
|
54
|
+
exports.AppButton = index$1.AppButton;
|
|
55
|
+
exports.AppConfigProvider = index$2.AppConfigProvider;
|
|
56
|
+
exports.AppConfirmDialog = index$3.AppConfirmDialog;
|
|
57
|
+
exports.AppCutter = index$4.AppCutter;
|
|
58
|
+
exports.AppDatePicker = index$5.AppDatePicker;
|
|
59
|
+
exports.AppDialog = index$6.AppDialog;
|
|
60
|
+
exports.AppForm = index$7.AppForm;
|
|
61
|
+
exports.AppIcon = index$8.AppIcon;
|
|
62
|
+
exports.AppIconBox = index$9.AppIconBox;
|
|
63
|
+
exports.AppInput = index$a.AppInput;
|
|
64
|
+
exports.AppMenu = index$b.AppMenu;
|
|
65
|
+
exports.AppNoPermissions = index$c.AppNoPermissions;
|
|
66
|
+
exports.AppNoPermissionsMap = index$d.AppNoPermissionsMap;
|
|
67
|
+
exports.AppOrgCascader = index$e.AppOrgCascader;
|
|
68
|
+
exports.AppSearch = index$f.AppSearch;
|
|
69
|
+
exports.AppTable = index$g.AppTable;
|
|
70
|
+
exports.AppTooltip = index$h.AppTooltip;
|
|
71
|
+
exports.AppTree = index$i.AppTree;
|
|
72
|
+
exports.AppUserAvatar = index$j.AppUserAvatar;
|
|
73
|
+
exports.AppVideoPlayer = index$k.AppVideoPlayer;
|
|
59
74
|
exports.base64Decrypt = crypto.base64Decrypt;
|
|
60
75
|
exports.encryptToBase64 = crypto.encryptToBase64;
|
|
61
76
|
exports.generateRandomCode = crypto.generateRandomCode;
|
|
62
77
|
exports.blobToDataURL = file.blobToDataURL;
|
|
63
|
-
exports.directTransmission = file.directTransmission;
|
|
64
78
|
exports.fileFormUpload = file.fileFormUpload;
|
|
65
79
|
exports.fileJsonUplaod = file.fileJsonUplaod;
|
|
66
80
|
exports.fileUpload = file.fileUpload;
|
|
@@ -73,7 +87,12 @@ exports.localeContextKey = useLocale.localeContextKey;
|
|
|
73
87
|
exports.translate = useLocale.translate;
|
|
74
88
|
exports.useLocale = useLocale.useLocale;
|
|
75
89
|
exports.bus = bus.bus;
|
|
90
|
+
exports.clearSpace = form.clearSpace;
|
|
91
|
+
exports.genValueByProp = form.genValueByProp;
|
|
92
|
+
exports.getValueByProp = form.getValueByProp;
|
|
93
|
+
exports.setValueByProp = form.setValueByProp;
|
|
76
94
|
exports.cloneDeep = handler.cloneDeep;
|
|
95
|
+
exports.copyText = handler.copyText;
|
|
77
96
|
exports.createUniqueId = handler.createUniqueId;
|
|
78
97
|
exports.funRunHandler = handler.funRunHandler;
|
|
79
98
|
exports.mergeDeep = handler.mergeDeep;
|
|
@@ -84,6 +103,7 @@ exports.useGlobalConfig = useGlobalConfig.useGlobalConfig;
|
|
|
84
103
|
exports.defaultAxios = useApi.defaultAxios;
|
|
85
104
|
exports.localApiKey = useApi.localApiKey;
|
|
86
105
|
exports.useApi = useApi.useApi;
|
|
106
|
+
exports.formatDuration = date.formatDuration;
|
|
87
107
|
exports.getDefaultValueFormatByType = date.getDefaultValueFormatByType;
|
|
88
108
|
exports.isArray = is.isArray;
|
|
89
109
|
exports.isBoolean = is.isBoolean;
|
|
@@ -95,15 +115,24 @@ exports.isNumber = is.isNumber;
|
|
|
95
115
|
exports.isObject = is.isObject;
|
|
96
116
|
exports.isOverflowing = is.isOverflowing;
|
|
97
117
|
exports.isString = is.isString;
|
|
118
|
+
exports.isSupportH265 = is.isSupportH265;
|
|
98
119
|
exports.isSymbol = is.isSymbol;
|
|
99
120
|
exports.isUndefined = is.isUndefined;
|
|
100
121
|
exports.isVueProxy = is.isVueProxy;
|
|
122
|
+
exports.localAudioPlayerConfigKey = useAudioPlayerConfig.localAudioPlayerConfigKey;
|
|
123
|
+
exports.useAudioPlayerConfig = useAudioPlayerConfig.useAudioPlayerConfig;
|
|
124
|
+
exports.localPermissionMapKey = usePermissionMap.localPermissionMapKey;
|
|
125
|
+
exports.usePermissionMap = usePermissionMap.usePermissionMap;
|
|
101
126
|
exports.localUserAvatarMapKey = useUserAvatarMap.localUserAvatarMapKey;
|
|
102
127
|
exports.useUserAvatarMap = useUserAvatarMap.useUserAvatarMap;
|
|
128
|
+
exports.localVideoPlayerConfigKey = useVideoPlayerConfig.localVideoPlayerConfigKey;
|
|
129
|
+
exports.useVideoPlayerConfig = useVideoPlayerConfig.useVideoPlayerConfig;
|
|
103
130
|
exports.parseRem = adaptive.parseRem;
|
|
104
131
|
exports.pxTorem = adaptive.pxTorem;
|
|
105
132
|
exports.remToPx = adaptive.remToPx;
|
|
106
133
|
exports.vwToPx = adaptive.vwToPx;
|
|
134
|
+
exports.protocolcheckLoad = loadScript.protocolcheckLoad;
|
|
135
|
+
exports.svgIconLoad = loadScript.svgIconLoad;
|
|
107
136
|
exports.useAppForm = useAppForm.useAppForm;
|
|
108
137
|
exports.useAppSearch = useAppSearch.useAppSearch;
|
|
109
138
|
exports.useAppTable = useAppTable.useAppTable;
|
package/lib/locale/en.js
CHANGED
|
@@ -33,10 +33,15 @@ var en = {
|
|
|
33
33
|
years: "Years",
|
|
34
34
|
noData: "No Data",
|
|
35
35
|
confirm: "Confirm",
|
|
36
|
-
loading: "Loading"
|
|
36
|
+
loading: "Loading",
|
|
37
|
+
copySuccessfully: "Copy Successfully"
|
|
37
38
|
},
|
|
38
39
|
form: {
|
|
39
|
-
department: "Department"
|
|
40
|
+
department: "Department",
|
|
41
|
+
additionalInformationTip: "Editor's Supplementary Information (Optional)",
|
|
42
|
+
additionalInformationHoverTip: "Click To Expand And View More Detailed Information. (This Is An Optional Field)",
|
|
43
|
+
dynamicFormItem: "Dynamic Form Item",
|
|
44
|
+
addFormItem: "Add Form Item"
|
|
40
45
|
},
|
|
41
46
|
table: {
|
|
42
47
|
hideFilter: "Hide filter",
|
|
@@ -48,12 +53,15 @@ var en = {
|
|
|
48
53
|
notShown: "Not Shown",
|
|
49
54
|
theColumnsDisplayedInTheTableCannotBeLeftBlank: "The Columns Displayed In The Table Cannot Be Left Blank",
|
|
50
55
|
aTotalOfPiecesOfData: "A total of {0} pieces of data",
|
|
56
|
+
more: "More",
|
|
51
57
|
moreOperations: "More Operations",
|
|
52
58
|
nonsupport: "Nonsupport",
|
|
53
59
|
editColumn: "Edit Column",
|
|
54
60
|
Index: "\u5E8F\u53F7",
|
|
55
61
|
searchFor: "Search For {0}",
|
|
56
|
-
|
|
62
|
+
searchByInput: 'Search by input <span class="text-theme font-bold">{0}</span>',
|
|
63
|
+
example: "Example",
|
|
64
|
+
operator: "Operator"
|
|
57
65
|
},
|
|
58
66
|
dialog: {
|
|
59
67
|
content: "Secondary Confirmation Operation",
|
|
@@ -82,6 +90,47 @@ var en = {
|
|
|
82
90
|
uploadPictures: "Upload Picture",
|
|
83
91
|
uploadPictureLimit: "The Image Upload Failed. The File Size Cannot Exceed {0}",
|
|
84
92
|
imageSegmentation: "Image Segmentation"
|
|
93
|
+
},
|
|
94
|
+
videoPlayer: {
|
|
95
|
+
clickPlay: "Click To Play",
|
|
96
|
+
videoResourcesAreLoading: "Video Resources Are Loading",
|
|
97
|
+
theVideoCannotBePlayed: "The Video Cannot Be Played",
|
|
98
|
+
fileLoadingFailed: "File Loading Failed",
|
|
99
|
+
pleaseCheckWhetherTheCollectionStationIsOnlineAndWhetherTheFileExists: "Please Check Whether The Collection Station Is Online And Whether The File Exists",
|
|
100
|
+
toDownloadVlc: "Go To Download VLC Player",
|
|
101
|
+
yourBrowserDoesNotSupportHTMLVideoPlayback: "Your Browser Does Not Support HTML5 Video Playback.",
|
|
102
|
+
multiples: "Multiples",
|
|
103
|
+
stopAfterPlayback: "Stop After Playback",
|
|
104
|
+
continuousPlayback: "Continuous Playback",
|
|
105
|
+
loopPlayback: "Loop Playback",
|
|
106
|
+
adjustPlaybackVolume: "Adjust Playback Volume",
|
|
107
|
+
currentIsTheFirstItem: "Current Is The First Item",
|
|
108
|
+
currentIsTheLastItem: "Current Is The Last Item",
|
|
109
|
+
fileCompressionPackage_: "File Compression Package_",
|
|
110
|
+
fileDownload: "File Download",
|
|
111
|
+
downloadFile: "Download File",
|
|
112
|
+
startDownloading: "Start Downloading",
|
|
113
|
+
downloadFailed: "Download Failed",
|
|
114
|
+
vlcPlayerTip: "The Video Format Needs To Be Played By VLC Media Player",
|
|
115
|
+
notInstallVlcTips: "You Haven't Installed VLC Media Player. Please Click To Download And Install",
|
|
116
|
+
operationSuccessful: "Operation Successful",
|
|
117
|
+
theCurrentBrowserBlocksTheOpeningOfNewWindows: "The Current Browser Blocks The Opening Of New Windows",
|
|
118
|
+
pleaseGoToTheBrowserSettingsAndClickOnTheDownloadOrCopyLinkToOpenInTheBrowser: "Please Go To The Browser Settings And Click On The Download Or Copy Link To Open In The Browser",
|
|
119
|
+
copyLink: "Copy Link",
|
|
120
|
+
fullScreenSwitch: "Full Screen Switch",
|
|
121
|
+
pleaseConfigureTheAddressForDownloadingVLC: "Please Configure The Address For Downloading VLC"
|
|
122
|
+
},
|
|
123
|
+
audioPlayer: {
|
|
124
|
+
clickPlay: "Click To Play",
|
|
125
|
+
audioResourcesAreLoading: "Audio Resources Are Loading",
|
|
126
|
+
multiples: "Multiples",
|
|
127
|
+
stopAfterPlayback: "Stop After Playback",
|
|
128
|
+
continuousPlayback: "Continuous Playback",
|
|
129
|
+
loopPlayback: "Loop Playback",
|
|
130
|
+
adjustPlaybackVolume: "Adjust Playback Volume",
|
|
131
|
+
currentIsTheFirstItem: "Current Is The First Item",
|
|
132
|
+
currentIsTheLastItem: "Current Is The Last Item",
|
|
133
|
+
downloadFile: "Download File"
|
|
85
134
|
}
|
|
86
135
|
};
|
|
87
136
|
|