hy-dispatch-ui-v3 0.1.6 → 0.2.1

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.
Files changed (160) hide show
  1. package/README.md +47 -0
  2. package/dist/tailwind.css +349 -4
  3. package/es/components/appAudioPlayer/appAudioPlayer.vue.mjs +462 -0
  4. package/es/components/appAudioPlayer/index.mjs +6 -0
  5. package/es/components/appAudioPlayer/js/index.mjs +327 -0
  6. package/es/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
  7. package/es/components/appButton/style/appButton.scss +0 -1
  8. package/es/components/appConfigProvider/appConfigProvider.vue.mjs +22 -1
  9. package/es/components/appCutter/appCutter.vue.mjs +202 -129
  10. package/es/components/appDatePicker/appDatePicker.vue.mjs +1 -1
  11. package/es/components/appForm/appForm.vue.mjs +132 -209
  12. package/es/components/appForm/cpns/appFormItem.vue.mjs +312 -0
  13. package/es/components/appForm/cpns/arrayItem.vue.mjs +305 -0
  14. package/es/components/appForm/cpns/extraItem.vue.mjs +140 -0
  15. package/es/components/appForm/js/index.mjs +46 -24
  16. package/es/components/appForm/js/useAppForm.mjs +30 -6
  17. package/es/components/appForm/style/appForm.scss +53 -0
  18. package/es/components/appIcon/appIcon.vue.mjs +0 -1
  19. package/es/components/appIconBox/style/appIconBox.scss +0 -1
  20. package/es/components/appInput/appInput.vue.mjs +99 -0
  21. package/es/components/appInput/index.mjs +6 -0
  22. package/es/components/appMenu/appMenu.vue.mjs +129 -0
  23. package/es/components/appMenu/index.mjs +6 -0
  24. package/es/components/appMenu/style/appMenu.scss +145 -0
  25. package/es/components/appOrgCascader/appOrgCascader.vue.mjs +14 -10
  26. package/es/components/appSearch/appSearch.vue.mjs +55 -211
  27. package/es/components/appSearch/cpns/appSearchItem.vue.mjs +238 -0
  28. package/es/components/appSearch/js/index.mjs +20 -8
  29. package/es/components/appSearch/js/useAppSearch.mjs +10 -5
  30. package/es/components/appSearch/style/appSearch.scss +10 -0
  31. package/es/components/appTable/appTable.vue.mjs +312 -158
  32. package/es/components/appTable/cpns/columnSelect.vue.mjs +151 -156
  33. package/es/components/appTable/cpns/columnSelectItem.vue2.mjs +104 -110
  34. package/es/components/appTable/cpns/headerItem.vue.mjs +98 -0
  35. package/es/components/appTable/cpns/virtualTable.vue.mjs +560 -0
  36. package/es/components/appTable/js/index.mjs +46 -20
  37. package/es/components/appTable/js/search.mjs +1 -2
  38. package/es/components/appTable/js/useAppTable.mjs +58 -14
  39. package/es/components/appTable/style/appTable.scss +16 -0
  40. package/es/components/appTooltip/appTooltip.vue.mjs +24 -13
  41. package/es/components/appTree/appTree.vue.mjs +304 -0
  42. package/es/components/appTree/index.mjs +6 -0
  43. package/es/components/appTree/js/index.mjs +531 -0
  44. package/es/components/appUserAvatar/appUserAvatar.vue.mjs +9 -8
  45. package/es/components/appUserAvatar/style/appUserAvatar.scss +0 -1
  46. package/es/components/appVideoPlayer/appVideoPlayer.vue.mjs +645 -0
  47. package/es/components/appVideoPlayer/cpns/mediaLoading.vue.mjs +35 -0
  48. package/es/components/appVideoPlayer/index.mjs +6 -0
  49. package/es/components/appVideoPlayer/js/index.mjs +426 -0
  50. package/es/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
  51. package/es/components/appVideoPlayer/style/mediaLoading.scss +62 -0
  52. package/es/components/index.mjs +5 -0
  53. package/es/hooks/index.mjs +3 -0
  54. package/es/hooks/useApi.mjs +4 -4
  55. package/es/hooks/useAudioPlayerConfig.mjs +12 -0
  56. package/es/hooks/useGlobalConfig.mjs +18 -7
  57. package/es/hooks/useLocale.mjs +3 -11
  58. package/es/hooks/useMixins.mjs +1 -1
  59. package/es/hooks/usePermissionMap.mjs +12 -0
  60. package/es/hooks/useUserAvatarMap.mjs +2 -3
  61. package/es/hooks/useVideoPlayerConfig.mjs +12 -0
  62. package/es/index.mjs +13 -4
  63. package/es/locale/en.mjs +52 -3
  64. package/es/locale/zh_CN.mjs +48 -3
  65. package/es/make-installer.mjs +2 -0
  66. package/es/static/hy-svg-icons.js +462 -0
  67. package/es/static/index.js +2 -0
  68. package/es/static/protocolcheck.js +247 -0
  69. package/es/style/element/element.scss +9 -0
  70. package/es/style/element/index.scss +6 -3
  71. package/es/style/index.scss +11 -0
  72. package/es/style/theme.scss +73 -0
  73. package/es/utils/date.mjs +25 -1
  74. package/es/utils/file.mjs +5 -4
  75. package/es/utils/form.mjs +52 -0
  76. package/es/utils/handler.mjs +22 -2
  77. package/es/utils/index.mjs +5 -4
  78. package/es/utils/is.mjs +23 -2
  79. package/es/version.mjs +1 -1
  80. package/lib/components/appAudioPlayer/appAudioPlayer.vue.js +466 -0
  81. package/lib/components/appAudioPlayer/index.js +11 -0
  82. package/lib/components/appAudioPlayer/js/index.js +329 -0
  83. package/lib/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
  84. package/lib/components/appButton/style/appButton.scss +0 -1
  85. package/lib/components/appConfigProvider/appConfigProvider.vue.js +22 -1
  86. package/lib/components/appCutter/appCutter.vue.js +201 -128
  87. package/lib/components/appDatePicker/appDatePicker.vue.js +1 -1
  88. package/lib/components/appForm/appForm.vue.js +129 -206
  89. package/lib/components/appForm/cpns/appFormItem.vue.js +316 -0
  90. package/lib/components/appForm/cpns/arrayItem.vue.js +309 -0
  91. package/lib/components/appForm/cpns/extraItem.vue.js +144 -0
  92. package/lib/components/appForm/js/index.js +48 -23
  93. package/lib/components/appForm/js/useAppForm.js +30 -6
  94. package/lib/components/appForm/style/appForm.scss +53 -0
  95. package/lib/components/appIcon/appIcon.vue.js +0 -1
  96. package/lib/components/appIconBox/style/appIconBox.scss +0 -1
  97. package/lib/components/appInput/appInput.vue.js +103 -0
  98. package/lib/components/appInput/index.js +11 -0
  99. package/lib/components/appMenu/appMenu.vue.js +133 -0
  100. package/lib/components/appMenu/index.js +11 -0
  101. package/lib/components/appMenu/style/appMenu.scss +145 -0
  102. package/lib/components/appOrgCascader/appOrgCascader.vue.js +14 -10
  103. package/lib/components/appSearch/appSearch.vue.js +51 -207
  104. package/lib/components/appSearch/cpns/appSearchItem.vue.js +242 -0
  105. package/lib/components/appSearch/js/index.js +20 -7
  106. package/lib/components/appSearch/js/useAppSearch.js +10 -5
  107. package/lib/components/appSearch/style/appSearch.scss +10 -0
  108. package/lib/components/appTable/appTable.vue.js +319 -165
  109. package/lib/components/appTable/cpns/columnSelect.vue.js +151 -156
  110. package/lib/components/appTable/cpns/columnSelectItem.vue2.js +105 -111
  111. package/lib/components/appTable/cpns/headerItem.vue.js +102 -0
  112. package/lib/components/appTable/cpns/virtualTable.vue.js +564 -0
  113. package/lib/components/appTable/js/index.js +47 -19
  114. package/lib/components/appTable/js/search.js +1 -2
  115. package/lib/components/appTable/js/useAppTable.js +57 -13
  116. package/lib/components/appTable/style/appTable.scss +16 -0
  117. package/lib/components/appTooltip/appTooltip.vue.js +23 -12
  118. package/lib/components/appTree/appTree.vue.js +308 -0
  119. package/lib/components/appTree/index.js +11 -0
  120. package/lib/components/appTree/js/index.js +533 -0
  121. package/lib/components/appUserAvatar/appUserAvatar.vue.js +9 -8
  122. package/lib/components/appUserAvatar/style/appUserAvatar.scss +0 -1
  123. package/lib/components/appVideoPlayer/appVideoPlayer.vue.js +649 -0
  124. package/lib/components/appVideoPlayer/cpns/mediaLoading.vue.js +39 -0
  125. package/lib/components/appVideoPlayer/index.js +11 -0
  126. package/lib/components/appVideoPlayer/js/index.js +429 -0
  127. package/lib/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
  128. package/lib/components/appVideoPlayer/style/mediaLoading.scss +62 -0
  129. package/lib/components/index.js +42 -32
  130. package/lib/hooks/index.js +9 -0
  131. package/lib/hooks/useApi.js +4 -4
  132. package/lib/hooks/useAudioPlayerConfig.js +15 -0
  133. package/lib/hooks/useGlobalConfig.js +18 -7
  134. package/lib/hooks/useLocale.js +3 -11
  135. package/lib/hooks/useMixins.js +1 -1
  136. package/lib/hooks/usePermissionMap.js +15 -0
  137. package/lib/hooks/useUserAvatarMap.js +1 -2
  138. package/lib/hooks/useVideoPlayerConfig.js +15 -0
  139. package/lib/index.js +59 -33
  140. package/lib/locale/en.js +52 -3
  141. package/lib/locale/zh_CN.js +48 -3
  142. package/lib/make-installer.js +2 -0
  143. package/lib/static/hy-svg-icons.js +459 -8
  144. package/lib/static/index.js +5 -0
  145. package/lib/static/protocolcheck.js +249 -0
  146. package/lib/style/element/element.scss +9 -0
  147. package/lib/style/element/index.scss +6 -3
  148. package/lib/style/index.scss +11 -0
  149. package/lib/style/theme.scss +73 -0
  150. package/lib/utils/date.js +25 -0
  151. package/lib/utils/file.js +4 -4
  152. package/lib/utils/form.js +57 -0
  153. package/lib/utils/handler.js +22 -1
  154. package/lib/utils/index.js +8 -1
  155. package/lib/utils/is.js +23 -1
  156. package/lib/version.js +1 -1
  157. package/package.json +25 -9
  158. package/es/config/index.mjs +0 -1
  159. package/es/static/hy-svg-icons.mjs +0 -11
  160. package/lib/config/index.js +0 -2
@@ -0,0 +1,327 @@
1
+ import { ref, computed, nextTick } from 'vue';
2
+ import { ElMessage } from 'element-plus';
3
+ import { useAudioPlayerConfig } from '../../../hooks/useAudioPlayerConfig.mjs';
4
+ import { useLocale } from '../../../hooks/useLocale.mjs';
5
+ import { formatDuration } from '../../../utils/date.mjs';
6
+
7
+ const useAudioPlayer = (hy) => {
8
+ const { props, emits, audioRef } = hy;
9
+ const { t } = useLocale();
10
+ const { audioPlayerConfig } = useAudioPlayerConfig();
11
+ const speed = ref(1);
12
+ const playRules = ref(1);
13
+ const loading = ref(false);
14
+ const audioItem = ref({});
15
+ const audioUrl = ref("");
16
+ const totalTime = ref(0);
17
+ const curTime = ref(0);
18
+ const progress = ref(0);
19
+ const isDrop = ref(false);
20
+ const isFullScreen = ref(false);
21
+ const volumeValue = ref(100);
22
+ const audioState = ref("NO_LOAD");
23
+ const speedList = [
24
+ { value: 0.5, label: "0.5 X" },
25
+ { value: 1, label: "1.0 X" },
26
+ { value: 1.5, label: "1.5 X" },
27
+ { value: 2, label: "2.0 X" },
28
+ { value: 3, label: "3.0 X" }
29
+ ];
30
+ const playRulesList = [
31
+ {
32
+ value: 1,
33
+ label: t("audioPlayer.stopAfterPlayback"),
34
+ svgName: "player-mediaCenter_stopPlaying"
35
+ },
36
+ {
37
+ value: 2,
38
+ label: t("audioPlayer.continuousPlayback"),
39
+ svgName: "player-mediaCenter_autoplay"
40
+ },
41
+ {
42
+ value: 3,
43
+ label: t("audioPlayer.loopPlayback"),
44
+ svgName: "player-mediaCenter_loopPlayback"
45
+ }
46
+ ];
47
+ const isAnalyseType = computed(() => {
48
+ return props.type === "analyse";
49
+ });
50
+ const speedLabel = computed(() => {
51
+ if (speed.value === 1) {
52
+ return t("audioPlayer.multiples");
53
+ } else {
54
+ return speedList.find((item) => item.value === speed.value).label;
55
+ }
56
+ });
57
+ const isCanPlay = computed(() => {
58
+ return audioState.value !== "NO_LOAD" || audioState.value !== "CAN_NOT_PLAY";
59
+ });
60
+ const isPlaying = computed(() => {
61
+ return audioState.value === "PLAYING";
62
+ });
63
+ const currentDuration = computed(() => {
64
+ const time = formatDuration(curTime.value, true);
65
+ if (!time) return "- -";
66
+ return `${time}"`;
67
+ });
68
+ const totalDuration = computed(() => {
69
+ const time = formatDuration(totalTime.value, true);
70
+ if (!time) return "- -";
71
+ return `${time}"`;
72
+ });
73
+ async function initPlayer() {
74
+ await nextTick();
75
+ audioRef.value.addEventListener("canplay", (e) => {
76
+ loading.value = false;
77
+ audioState.value = "IS_LOAD";
78
+ totalTime.value = Math.floor(audioRef.value.duration);
79
+ emits("canplay", e);
80
+ });
81
+ audioRef.value.addEventListener("play", () => {
82
+ audioRef.value.playbackRate = speed.value;
83
+ audioState.value = "PLAYING";
84
+ if (audioUrl.value && audioItem.value) {
85
+ emits("play-start", audioUrl.value, audioItem.value);
86
+ }
87
+ });
88
+ audioRef.value.addEventListener("pause", (e) => {
89
+ audioState.value = "PAUSE";
90
+ });
91
+ audioRef.value.addEventListener("volumechange", () => {
92
+ volumeValue.value = audioRef.value.volume * 100;
93
+ });
94
+ audioRef.value.addEventListener("ended", () => {
95
+ audioState.value = "PLAY_END";
96
+ if (playRules.value === 2) {
97
+ playNext();
98
+ } else if (playRules.value === 3) {
99
+ audioRef.value.load();
100
+ audioRef.value.play();
101
+ }
102
+ emits("play-ended");
103
+ });
104
+ audioRef.value.addEventListener(
105
+ "timeupdate",
106
+ (e) => {
107
+ audioState.value = "PLAYING";
108
+ if (!isDrop.value && audioRef.value) {
109
+ const currentTime = audioRef.value.currentTime;
110
+ if (audioRef.value) {
111
+ curTime.value = Math.floor(currentTime);
112
+ } else {
113
+ setTimeout(() => {
114
+ if (audioRef.value) {
115
+ curTime.value = Math.floor(currentTime);
116
+ }
117
+ }, 1e3);
118
+ }
119
+ progress.value = curTime.value / totalTime.value * 100;
120
+ emits("timeupdate", e);
121
+ }
122
+ },
123
+ false
124
+ );
125
+ audioRef.value.addEventListener("error", (e) => {
126
+ loading.value = false;
127
+ audioState.value = "CAN_NOT_PLAY";
128
+ console.error("error", e);
129
+ audioRef.value = null;
130
+ });
131
+ }
132
+ async function playAudio(filePath, item) {
133
+ if (audioState.value === "CAN_NOT_PLAY") {
134
+ audioState.value = "NO_LOAD";
135
+ await nextTick();
136
+ initPlayer();
137
+ }
138
+ if (item) {
139
+ if (item.id !== audioItem.value.id || !audioRef.value.src) {
140
+ loading.value = true;
141
+ audioItem.value = item;
142
+ audioUrl.value = filePath;
143
+ audioRef.value.src = filePath;
144
+ }
145
+ } else if (audioUrl.value === "") {
146
+ return false;
147
+ }
148
+ if (audioItem.value.playSeconds) {
149
+ jumpDuration(audioItem.value.playSeconds);
150
+ }
151
+ await nextTick();
152
+ audioRef.value.play();
153
+ audioState.value = "PLAYING";
154
+ }
155
+ function pauseAudio() {
156
+ if (audioState.value === "CAN_NOT_PLAY") return;
157
+ audioRef.value && audioRef.value.pause();
158
+ audioState.value = "PAUSE";
159
+ }
160
+ function playPrevious() {
161
+ if (props.type === "default") {
162
+ const index = props.playList.findIndex(
163
+ (item) => item.id === audioItem.value.id
164
+ );
165
+ if (index > 0 && index !== props.playList.length) {
166
+ const item = props.playList[index - 1];
167
+ playAudio(item.filePath, item);
168
+ emits("play-previous");
169
+ } else {
170
+ ElMessage.warning(t("audioPlayer.currentIsTheFirstItem"));
171
+ }
172
+ } else if (isAnalyseType.value) {
173
+ if (!isCanPlay.value) return;
174
+ emits("play-previous");
175
+ }
176
+ }
177
+ function playNext() {
178
+ if (props.type === "default") {
179
+ const index = props.playList.findIndex(
180
+ (item) => item.id === audioItem.value.id
181
+ );
182
+ if (index !== props.playList.length - 1) {
183
+ const item = props.playList[index + 1];
184
+ playAudio(item.filePath, item);
185
+ emits("play-next");
186
+ } else {
187
+ ElMessage.warning(t("audioPlayer.currentIsTheLastItem"));
188
+ }
189
+ } else if (isAnalyseType.value) {
190
+ if (!isCanPlay.value) return;
191
+ emits("play-next");
192
+ }
193
+ }
194
+ function playRulesHandler(value) {
195
+ if (value === 3) {
196
+ playRules.value = 1;
197
+ } else {
198
+ playRules.value = value + 1;
199
+ }
200
+ }
201
+ function speedHandler(value) {
202
+ speed.value = value;
203
+ if (!audioRef.value) return;
204
+ audioRef.value.playbackRate = value;
205
+ }
206
+ function changeVolume() {
207
+ if (!audioRef.value) return;
208
+ audioRef.value.volume = volumeValue.value / 100;
209
+ }
210
+ function getNowWh() {
211
+ curTime.value = totalTime.value * (progress.value / 100);
212
+ audioRef.value.currentTime = curTime.value;
213
+ isDrop.value = false;
214
+ }
215
+ function setAudioCurrentTime(currentTime) {
216
+ if (!audioRef.value || typeof currentTime !== "number") return;
217
+ audioRef.value.currentTime = currentTime;
218
+ }
219
+ function getPercent(num, total) {
220
+ num = parseFloat(num);
221
+ total = parseFloat(total);
222
+ if (isNaN(num) || isNaN(total)) {
223
+ return 0;
224
+ }
225
+ return total <= 0 ? 0 : Math.round(num / total * 1e4) / 100;
226
+ }
227
+ function isCantPlayType(e) {
228
+ if (e.target.error) {
229
+ const { code, message } = e.target.error;
230
+ return code === 4 && !message.includes("Format error") || message.includes("PIPELINE_ERROR_DECODE");
231
+ }
232
+ return false;
233
+ }
234
+ function jumpDuration(s) {
235
+ audioRef.value.currentTime = s;
236
+ }
237
+ function initFullScreenEvent() {
238
+ document.addEventListener("fullscreenchange", fullscreenchangeHandler);
239
+ }
240
+ function destroyFullScreenEvent() {
241
+ document.removeEventListener("fullscreenchange", fullscreenchangeHandler);
242
+ }
243
+ function fullscreenchangeHandler(e) {
244
+ if (document.fullscreenElement) ; else {
245
+ isFullScreen.value = false;
246
+ }
247
+ }
248
+ function onFullScreenHandler() {
249
+ if (isFullScreen.value) {
250
+ const el = document;
251
+ if (el.exitFullscreen) {
252
+ el.exitFullscreen();
253
+ }
254
+ } else {
255
+ const el = document.documentElement;
256
+ if (el.requestFullscreen) {
257
+ isFullScreen.value = true;
258
+ el.requestFullscreen();
259
+ }
260
+ }
261
+ }
262
+ function audioCutting() {
263
+ const canvas = document.createElement("canvas");
264
+ const img = document.getElementById("img");
265
+ const audio = audioRef.value;
266
+ audio.setAttribute("crossOrigin", "anonymous");
267
+ canvas.width = audio.clientWidth;
268
+ canvas.height = audio.clientHeight;
269
+ canvas.getContext("2d").drawImage(audio, 0, 0, canvas.width, canvas.height);
270
+ const dataURL = canvas.toDataURL("image/png");
271
+ img.setAttribute("src", dataURL);
272
+ }
273
+ function onDownloadHandler() {
274
+ if (props.downloadFn) {
275
+ props.downloadFn(audioItem.value, props.playList);
276
+ return;
277
+ }
278
+ if (audioPlayerConfig.value.downloadFn) {
279
+ audioPlayerConfig.value.downloadFn(audioItem.value, props.playList);
280
+ return;
281
+ }
282
+ }
283
+ playRulesHandler(props.playRules);
284
+ speedHandler(props.speed);
285
+ initPlayer();
286
+ return {
287
+ speed,
288
+ playRules,
289
+ loading,
290
+ audioItem,
291
+ audioUrl,
292
+ currentDuration,
293
+ totalDuration,
294
+ progress,
295
+ isDrop,
296
+ isFullScreen,
297
+ volumeValue,
298
+ audioState,
299
+ speedLabel,
300
+ isCanPlay,
301
+ isPlaying,
302
+ isAnalyseType,
303
+ // 配置
304
+ speedList,
305
+ playRulesList,
306
+ // 函数
307
+ playAudio,
308
+ pauseAudio,
309
+ playPrevious,
310
+ playNext,
311
+ playRulesHandler,
312
+ speedHandler,
313
+ changeVolume,
314
+ getNowWh,
315
+ setAudioCurrentTime,
316
+ getPercent,
317
+ isCantPlayType,
318
+ jumpDuration,
319
+ initFullScreenEvent,
320
+ destroyFullScreenEvent,
321
+ onFullScreenHandler,
322
+ audioCutting,
323
+ onDownloadHandler
324
+ };
325
+ };
326
+
327
+ export { useAudioPlayer };
@@ -0,0 +1,319 @@
1
+ .audio-player {
2
+ width: 100%;
3
+ height: 256px;
4
+ display: flex;
5
+ flex-direction: column;
6
+ border: 1px solid rgba(var(--hy-border));
7
+ border-radius: 12px;
8
+ overflow: hidden;
9
+ .audio-play-box {
10
+ width: 100%;
11
+ height: 0;
12
+ flex: 1;
13
+ display: flex;
14
+ justify-content: center;
15
+ align-items: center;
16
+ background: rgba(var(--hy-background-3));
17
+ box-shadow: rgba(var(--hy-dialog-box-shadow));
18
+ border: 1px solid rgba(var(--hy-dialog-border));
19
+ border-radius: rgba(var(--hy-dialog-border-radius))
20
+ rgba(var(--hy-dialog-border-radius)) 0px 0px;
21
+
22
+ .point_area {
23
+ text-align: center;
24
+ position: relative;
25
+ width: 160px;
26
+ height: 160px;
27
+ transition: opacity 0.5s ease-out;
28
+ .point {
29
+ position: absolute !important;
30
+ top: 0;
31
+ left: 0;
32
+ right: 0;
33
+ bottom: 0;
34
+ width: 60%;
35
+ height: 60%;
36
+ margin: auto;
37
+ -webkit-border-radius: 50%;
38
+ -webkit-background-clip: padding-box;
39
+ -moz-border-radius: 50%;
40
+ -moz-background-clip: padding;
41
+ }
42
+ .point_dot {
43
+ width: 96px;
44
+ height: 96px;
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ border-radius: 50%;
49
+ color: rgba(var(--hy-main));
50
+ background-color: rgba(var(--hy-background-2));
51
+ z-index: 1;
52
+ .app-icon {
53
+ width: 58px;
54
+ height: 58px;
55
+ }
56
+ }
57
+ .point_10 {
58
+ width: 100%;
59
+ height: 100%;
60
+ }
61
+ .point_10:after {
62
+ content: '';
63
+ display: block;
64
+ position: absolute;
65
+ top: 0;
66
+ right: 0;
67
+ bottom: 0;
68
+ left: 0;
69
+ border-radius: 50%;
70
+ border: 4px solid rgba(var(--hy-theme));
71
+ opacity: 0;
72
+ -webkit-animation: ripple 4.5s ease-out 225ms infinite;
73
+ animation: ripple 4.5s ease-out 225ms infinite;
74
+ }
75
+ .point_40 {
76
+ width: 100%;
77
+ height: 100%;
78
+ }
79
+ .point_40:after {
80
+ content: '';
81
+ display: block;
82
+ position: absolute;
83
+ top: 0;
84
+ right: 0;
85
+ bottom: 0;
86
+ left: 0;
87
+ border-radius: 50%;
88
+ border: 4px solid rgba(var(--hy-theme));
89
+ opacity: 0;
90
+ -webkit-animation: ripple 4.5s ease-out 0.9s infinite;
91
+ animation: ripple 4.5s ease-out 0.9s infinite;
92
+ }
93
+ .point_80 {
94
+ width: 100%;
95
+ height: 100%;
96
+ }
97
+ .point_80:after {
98
+ content: '';
99
+ display: block;
100
+ position: absolute;
101
+ top: 0;
102
+ right: 0;
103
+ bottom: 0;
104
+ left: 0;
105
+ border-radius: 50%;
106
+ border: 4px solid rgba(var(--hy-theme));
107
+ opacity: 0;
108
+ -webkit-animation: ripple 4.5s ease-out 1.8s infinite;
109
+ animation: ripple 4.5s ease-out 1.8s infinite;
110
+ }
111
+ }
112
+ }
113
+
114
+ .operator-box {
115
+ width: 100%;
116
+ height: 54px;
117
+ display: flex;
118
+ align-items: center;
119
+ justify-content: space-between;
120
+ column-gap: 20px;
121
+ position: relative;
122
+ padding: 0 12px 0;
123
+ color: rgba(var(--hy-main));
124
+ background: #040814;
125
+
126
+ .progress-operator {
127
+ display: flex;
128
+
129
+ input[type='range'] {
130
+ width: 100%;
131
+ height: 4px;
132
+ outline: none;
133
+ border-radius: 20px;
134
+ -webkit-appearance: none; /*清除系统默认样式*/
135
+ background-color: #eaf5f9;
136
+ }
137
+
138
+ input[type='range']::-webkit-slider-thumb {
139
+ -webkit-appearance: none; /*清除系统默认样式*/
140
+ width: 6px;
141
+ height: 6px;
142
+ border-radius: 20px;
143
+ background: rgba(var(--hy-main));
144
+ box-shadow: 0px 0px 6px 3px rgba(var(--hy-theme));
145
+ cursor: pointer;
146
+ }
147
+
148
+ input[type='range']::-ms-fill-lower {
149
+ -webkit-appearance: none;
150
+ }
151
+
152
+ &.progress-analyse {
153
+ width: 100%;
154
+ height: 6px;
155
+ position: absolute;
156
+ left: 0px;
157
+ top: 13px;
158
+ padding: 0 12px;
159
+ }
160
+ &:not(.progress-analyse) {
161
+ width: 0;
162
+ flex: 1;
163
+ flex-direction: column;
164
+ row-gap: 6px;
165
+
166
+ input[type='range'] {
167
+ height: 6px;
168
+ }
169
+
170
+ input[type='range']::-webkit-slider-thumb {
171
+ width: 14px;
172
+ height: 14px;
173
+ }
174
+ }
175
+ }
176
+
177
+ .duration-operator {
178
+ display: flex;
179
+ align-items: center;
180
+ column-gap: 4px;
181
+ font-size: 12px;
182
+ color: rgba(var(--hy-auxiliary));
183
+ white-space: nowrap;
184
+ }
185
+
186
+ .play-operator {
187
+ display: flex;
188
+ align-items: center;
189
+ column-gap: 10px;
190
+ & > div {
191
+ display: flex;
192
+ align-items: center;
193
+ justify-content: center;
194
+ cursor: pointer;
195
+ }
196
+ .app-icon {
197
+ width: 26px;
198
+ height: 26px;
199
+ }
200
+ &.play-analyse {
201
+ position: absolute;
202
+ top: calc(50% + 8px);
203
+ left: 50%;
204
+ transform: translate(-50%, -50%);
205
+ .app-icon {
206
+ &.last-icon,
207
+ &.next-icon {
208
+ width: 22px;
209
+ height: 22px;
210
+ }
211
+ }
212
+ }
213
+ }
214
+
215
+ .tools-operator {
216
+ display: flex;
217
+ align-items: center;
218
+ justify-content: flex-end;
219
+ column-gap: 10px;
220
+ .speed-box {
221
+ min-width: 60px;
222
+ height: 24px;
223
+ font-size: 12px;
224
+ color: rgba(var(--hy-auxiliary));
225
+ display: flex;
226
+ align-items: center;
227
+ justify-content: center;
228
+ cursor: pointer;
229
+ user-select: none;
230
+ padding: 0 6px;
231
+ border: 1px solid rgba(var(--hy-border));
232
+ border-radius: 4px;
233
+ background-color: rgba(var(--hy-background-2));
234
+ }
235
+ .app-icon {
236
+ width: 26px;
237
+ height: 26px;
238
+ cursor: pointer;
239
+ }
240
+ &.tools-analyse {
241
+ .speed-box {
242
+ height: 20px;
243
+ }
244
+ .app-icon {
245
+ width: 20px;
246
+ height: 20px;
247
+ }
248
+ }
249
+ }
250
+
251
+ &.operator-analyse {
252
+ padding-top: 20px;
253
+ }
254
+ }
255
+
256
+ &.audio-player-analyse {
257
+ height: 56px;
258
+ }
259
+ }
260
+
261
+ .popover-volume-slider {
262
+ min-width: auto !important;
263
+ width: 40px !important;
264
+ padding: 16px 0;
265
+ }
266
+
267
+ .popover-speed {
268
+ min-width: auto !important;
269
+ width: 62px !important;
270
+ padding: 0px !important;
271
+ .speed-list {
272
+ width: 100%;
273
+ color: rgba(var(--hy-auxiliary));
274
+ font-size: 12px;
275
+ li {
276
+ transition: 0.5s;
277
+ height: 26px;
278
+ line-height: 26px;
279
+ text-align: center;
280
+ &:after {
281
+ transition: 0s;
282
+ }
283
+ &:hover,
284
+ &.selectBox {
285
+ color: rgba(var(--hy-theme));
286
+ background: rgba(var(--hy-background-3));
287
+ }
288
+ }
289
+ }
290
+ }
291
+
292
+ @-webkit-keyframes ripple {
293
+ 0% {
294
+ opacity: 0;
295
+ -webkit-transform: scale(0.1);
296
+ }
297
+ 5% {
298
+ opacity: 1;
299
+ }
300
+ to {
301
+ opacity: 0;
302
+ -webkit-transform: scale(1);
303
+ }
304
+ }
305
+ @keyframes ripple {
306
+ 0% {
307
+ opacity: 0;
308
+ -webkit-transform: scale(0.1);
309
+ transform: scale(0.1);
310
+ }
311
+ 5% {
312
+ opacity: 1;
313
+ }
314
+ to {
315
+ opacity: 0;
316
+ -webkit-transform: scale(1);
317
+ transform: scale(1);
318
+ }
319
+ }
@@ -7,7 +7,6 @@
7
7
  margin: 0;
8
8
  font: inherit;
9
9
  color: inherit;
10
- box-sizing: border-box;
11
10
  white-space: nowrap;
12
11
  font-size: 14px;
13
12
 
@@ -22,6 +22,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
22
22
  required: false,
23
23
  default: () => /* @__PURE__ */ new Map()
24
24
  },
25
+ permissionMap: {
26
+ type: Map,
27
+ required: false,
28
+ default: () => /* @__PURE__ */ new Map()
29
+ },
25
30
  size: {
26
31
  type: String,
27
32
  required: false,
@@ -58,13 +63,29 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
58
63
  table: {
59
64
  type: Object,
60
65
  required: false
66
+ },
67
+ audioPlayer: {
68
+ type: Object,
69
+ required: false
70
+ },
71
+ videoPlayer: {
72
+ type: Object,
73
+ required: false
61
74
  }
62
75
  },
63
76
  setup(__props) {
64
77
  const props = __props;
65
78
  const globalConfig = provideGlobalConfig(props, null, !unref(useGlobalConfig()));
66
79
  const config = computed(() => {
67
- const { locale, api, userAvatarMap, ...config2 } = globalConfig.value;
80
+ const {
81
+ locale,
82
+ api,
83
+ userAvatarMap,
84
+ permissionMap,
85
+ audioPlayer,
86
+ videoPlayer,
87
+ ...config2
88
+ } = globalConfig.value;
68
89
  return {
69
90
  locale: ElementLocale[locale] || ElementLocale["zhCn"],
70
91
  ...config2