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,247 @@
|
|
|
1
|
+
(function (f) {
|
|
2
|
+
if (typeof exports === 'object' && typeof module !== 'undefined') {
|
|
3
|
+
module.exports = f();
|
|
4
|
+
} else if (typeof define === 'function' && define.amd) {
|
|
5
|
+
define([], f);
|
|
6
|
+
} else {
|
|
7
|
+
var g;
|
|
8
|
+
if (typeof window !== 'undefined') {
|
|
9
|
+
g = window;
|
|
10
|
+
} else if (typeof global !== 'undefined') {
|
|
11
|
+
g = global;
|
|
12
|
+
} else if (typeof self !== 'undefined') {
|
|
13
|
+
g = self;
|
|
14
|
+
} else {
|
|
15
|
+
g = this;
|
|
16
|
+
}
|
|
17
|
+
g.protocolCheck = f();
|
|
18
|
+
}
|
|
19
|
+
})(function () {
|
|
20
|
+
return (function e(t, n, r) {
|
|
21
|
+
function s(o, u) {
|
|
22
|
+
if (!n[o]) {
|
|
23
|
+
if (!t[o]) {
|
|
24
|
+
var a = typeof require == 'function' && require;
|
|
25
|
+
if (!u && a) return a(o, true)
|
|
26
|
+
if (i) return i(o, true)
|
|
27
|
+
var f = new Error("Cannot find module '" + o + "'");
|
|
28
|
+
throw ((f.code = 'MODULE_NOT_FOUND'), f)
|
|
29
|
+
}
|
|
30
|
+
var l = (n[o] = { exports: {} });
|
|
31
|
+
t[o][0].call(
|
|
32
|
+
l.exports,
|
|
33
|
+
function (e) {
|
|
34
|
+
var n = t[o][1][e];
|
|
35
|
+
return s(n ? n : e)
|
|
36
|
+
},
|
|
37
|
+
l,
|
|
38
|
+
l.exports,
|
|
39
|
+
e,
|
|
40
|
+
t,
|
|
41
|
+
n,
|
|
42
|
+
r
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
return n[o].exports
|
|
46
|
+
}
|
|
47
|
+
var i = typeof require == 'function' && require;
|
|
48
|
+
for (var o = 0; o < r.length; o++) s(r[o]);
|
|
49
|
+
return s
|
|
50
|
+
})(
|
|
51
|
+
{
|
|
52
|
+
1: [
|
|
53
|
+
function (require, module, exports$1) {
|
|
54
|
+
function _registerEvent(target, eventType, cb) {
|
|
55
|
+
if (target.addEventListener) {
|
|
56
|
+
target.addEventListener(eventType, cb);
|
|
57
|
+
return {
|
|
58
|
+
remove: function () {
|
|
59
|
+
target.removeEventListener(eventType, cb);
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
target.attachEvent(eventType, cb);
|
|
64
|
+
return {
|
|
65
|
+
remove: function () {
|
|
66
|
+
target.detachEvent(eventType, cb);
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function _createHiddenIframe(target, uri) {
|
|
73
|
+
var iframe = document.createElement('iframe');
|
|
74
|
+
iframe.src = uri;
|
|
75
|
+
iframe.id = 'hiddenIframe';
|
|
76
|
+
iframe.style.display = 'none';
|
|
77
|
+
target.appendChild(iframe);
|
|
78
|
+
|
|
79
|
+
return iframe
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function openUriWithHiddenFrame(uri, failCb, successCb) {
|
|
83
|
+
var timeout = setTimeout(function () {
|
|
84
|
+
failCb();
|
|
85
|
+
handler.remove();
|
|
86
|
+
}, 1000);
|
|
87
|
+
|
|
88
|
+
var iframe = document.querySelector('#hiddenIframe');
|
|
89
|
+
if (!iframe) {
|
|
90
|
+
iframe = _createHiddenIframe(document.body, 'about:blank');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
var handler = _registerEvent(window, 'blur', onBlur);
|
|
94
|
+
|
|
95
|
+
function onBlur() {
|
|
96
|
+
clearTimeout(timeout);
|
|
97
|
+
handler.remove();
|
|
98
|
+
successCb();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
iframe.contentWindow.location.href = uri;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function openUriUsingFirefox(uri, failCb, successCb) {
|
|
105
|
+
var iframe = document.querySelector('#hiddenIframe');
|
|
106
|
+
|
|
107
|
+
if (!iframe) {
|
|
108
|
+
iframe = _createHiddenIframe(document.body, 'about:blank');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
iframe.contentWindow.location.href = uri;
|
|
113
|
+
successCb();
|
|
114
|
+
} catch (e) {
|
|
115
|
+
if (e.name == 'NS_ERROR_UNKNOWN_PROTOCOL') {
|
|
116
|
+
failCb();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function openUriUsingIEInOlderWindows(uri, failCb, successCb) {
|
|
122
|
+
if (getInternetExplorerVersion() === 10) {
|
|
123
|
+
openUriUsingIE10InWindows7(uri, failCb, successCb);
|
|
124
|
+
} else if (
|
|
125
|
+
getInternetExplorerVersion() === 9 ||
|
|
126
|
+
getInternetExplorerVersion() === 11
|
|
127
|
+
) {
|
|
128
|
+
openUriWithHiddenFrame(uri, failCb, successCb);
|
|
129
|
+
} else {
|
|
130
|
+
openUriInNewWindowHack(uri, failCb, successCb);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function openUriUsingIE10InWindows7(uri, failCb, successCb) {
|
|
135
|
+
var timeout = setTimeout(failCb, 1000);
|
|
136
|
+
window.addEventListener('blur', function () {
|
|
137
|
+
clearTimeout(timeout);
|
|
138
|
+
successCb();
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
var iframe = document.querySelector('#hiddenIframe');
|
|
142
|
+
if (!iframe) {
|
|
143
|
+
iframe = _createHiddenIframe(document.body, 'about:blank');
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
iframe.contentWindow.location.href = uri;
|
|
147
|
+
} catch (e) {
|
|
148
|
+
failCb();
|
|
149
|
+
clearTimeout(timeout);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function openUriInNewWindowHack(uri, failCb, successCb) {
|
|
154
|
+
var myWindow = window.open('', '', 'width=0,height=0');
|
|
155
|
+
|
|
156
|
+
myWindow.document.write("<iframe src='" + uri + "'></iframe>");
|
|
157
|
+
|
|
158
|
+
setTimeout(function () {
|
|
159
|
+
try {
|
|
160
|
+
myWindow.location.href;
|
|
161
|
+
myWindow.setTimeout('window.close()', 1000);
|
|
162
|
+
successCb();
|
|
163
|
+
} catch (e) {
|
|
164
|
+
myWindow.close();
|
|
165
|
+
failCb();
|
|
166
|
+
}
|
|
167
|
+
}, 1000);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function openUriWithMsLaunchUri(uri, failCb, successCb) {
|
|
171
|
+
navigator.msLaunchUri(uri, successCb, failCb);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function checkBrowser() {
|
|
175
|
+
var isOpera =
|
|
176
|
+
!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
|
|
177
|
+
var ua = navigator.userAgent.toLowerCase();
|
|
178
|
+
return {
|
|
179
|
+
isOpera: isOpera,
|
|
180
|
+
isFirefox: typeof InstallTrigger !== 'undefined',
|
|
181
|
+
isSafari:
|
|
182
|
+
(~ua.indexOf('safari') && !~ua.indexOf('chrome')) ||
|
|
183
|
+
Object.prototype.toString
|
|
184
|
+
.call(window.HTMLElement)
|
|
185
|
+
.indexOf('Constructor') > 0,
|
|
186
|
+
isIOS:
|
|
187
|
+
/iPad|iPhone|iPod/.test(navigator.userAgent) &&
|
|
188
|
+
!window.MSStream,
|
|
189
|
+
isChrome: !!window.chrome && !isOpera,
|
|
190
|
+
isIE: /*@cc_on!@*/ !!document.documentMode, // At least IE6
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function getInternetExplorerVersion() {
|
|
195
|
+
var rv = -1;
|
|
196
|
+
if (navigator.appName === 'Microsoft Internet Explorer') {
|
|
197
|
+
var ua = navigator.userAgent;
|
|
198
|
+
var re = new RegExp('MSIE ([0-9]{1,}[\.0-9]{0,})');
|
|
199
|
+
if (re.exec(ua) != null) rv = parseFloat(RegExp.$1);
|
|
200
|
+
} else if (navigator.appName === 'Netscape') {
|
|
201
|
+
var ua = navigator.userAgent;
|
|
202
|
+
var re = new RegExp('Trident/.*rv:([0-9]{1,}[\.0-9]{0,})');
|
|
203
|
+
if (re.exec(ua) != null) {
|
|
204
|
+
rv = parseFloat(RegExp.$1);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return rv
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
module.exports = function (uri, failCb, successCb, unsupportedCb) {
|
|
211
|
+
function failCallback() {
|
|
212
|
+
failCb && failCb();
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function successCallback() {
|
|
216
|
+
successCb && successCb();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (navigator.msLaunchUri) {
|
|
220
|
+
//for IE and Edge in Win 8 and Win 10
|
|
221
|
+
openUriWithMsLaunchUri(uri, failCb, successCb);
|
|
222
|
+
} else {
|
|
223
|
+
var browser = checkBrowser();
|
|
224
|
+
|
|
225
|
+
if (browser.isFirefox) {
|
|
226
|
+
openUriUsingFirefox(uri, failCallback, successCallback);
|
|
227
|
+
} else if (browser.isChrome || browser.isIOS) {
|
|
228
|
+
// openUriWithTimeoutHack(uri, failCallback, successCallback);
|
|
229
|
+
openUriWithHiddenFrame(uri, failCallback, successCallback);
|
|
230
|
+
} else if (browser.isIE) {
|
|
231
|
+
openUriUsingIEInOlderWindows(uri, failCallback, successCallback);
|
|
232
|
+
} else if (browser.isSafari) {
|
|
233
|
+
openUriWithHiddenFrame(uri, failCallback, successCallback);
|
|
234
|
+
} else {
|
|
235
|
+
unsupportedCb();
|
|
236
|
+
//not supported, implement please
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
},
|
|
241
|
+
{},
|
|
242
|
+
],
|
|
243
|
+
},
|
|
244
|
+
{},
|
|
245
|
+
[1]
|
|
246
|
+
)(1)
|
|
247
|
+
});
|
|
@@ -16311,3 +16311,12 @@
|
|
|
16311
16311
|
overflow: auto;
|
|
16312
16312
|
scrollbar-width: thin;
|
|
16313
16313
|
}
|
|
16314
|
+
|
|
16315
|
+
// 虚拟表格
|
|
16316
|
+
.hy-el-table-v2 {
|
|
16317
|
+
color: rgba(var(--hy-main));
|
|
16318
|
+
}
|
|
16319
|
+
.hy-el-table-v2__header-cell,
|
|
16320
|
+
.hy-el-table-v2__row-cell {
|
|
16321
|
+
padding: 0 12px;
|
|
16322
|
+
}
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
--hy-el-table-index: var(--hy-el-index-normal);
|
|
40
40
|
position: relative;
|
|
41
41
|
overflow: hidden;
|
|
42
|
-
box-sizing: border-box;
|
|
43
42
|
height: -moz-fit-content;
|
|
44
43
|
height: fit-content;
|
|
45
44
|
width: 100%;
|
|
@@ -175,13 +174,12 @@
|
|
|
175
174
|
--hy-el-input-clear-hover-color: var(--hy-el-text-color-secondary);
|
|
176
175
|
--hy-el-input-focus-border-color: rgb(var(--hy-theme));
|
|
177
176
|
--hy-el-input-width: 100%;
|
|
178
|
-
--hy-el-input-height: var(--hy-el-component-size);
|
|
177
|
+
// --hy-el-input-height: var(--hy-el-component-size);
|
|
179
178
|
position: relative;
|
|
180
179
|
font-size: var(--hy-el-font-size-base);
|
|
181
180
|
display: inline-flex;
|
|
182
181
|
width: var(--hy-el-input-width);
|
|
183
182
|
line-height: var(--hy-el-input-height);
|
|
184
|
-
box-sizing: border-box;
|
|
185
183
|
vertical-align: middle;
|
|
186
184
|
}
|
|
187
185
|
|
|
@@ -591,6 +589,7 @@
|
|
|
591
589
|
// 下拉框
|
|
592
590
|
.hy-el-dropdown__popper.hy-el-popper {
|
|
593
591
|
--hy-el-border-color-light: rgb(var(--hy-border));
|
|
592
|
+
--hy-el-dropdown-menuItem-hover-fill: rgb(var(--hy-background-3));
|
|
594
593
|
}
|
|
595
594
|
|
|
596
595
|
.hy-el-dropdown-menu {
|
|
@@ -930,3 +929,7 @@
|
|
|
930
929
|
.hy-el-switch__core .hy-el-switch__inner-wrapper {
|
|
931
930
|
color: rgb(var(--hy-auxiliary));
|
|
932
931
|
}
|
|
932
|
+
|
|
933
|
+
.hy-el-slider {
|
|
934
|
+
--hy-el-slider-runway-bg-color: rgba(var(--hy-background));
|
|
935
|
+
}
|
package/es/style/index.scss
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* {
|
|
4
4
|
margin: 0;
|
|
5
5
|
padding: 0;
|
|
6
|
+
box-sizing: border-box;
|
|
6
7
|
}
|
|
7
8
|
html,
|
|
8
9
|
body,
|
|
@@ -79,3 +80,13 @@ video {
|
|
|
79
80
|
-webkit-box-orient: vertical;
|
|
80
81
|
word-break: break-all;
|
|
81
82
|
}
|
|
83
|
+
|
|
84
|
+
/*禁止选中文本*/
|
|
85
|
+
.user-select-none {
|
|
86
|
+
-webkit-touch-callout: none; /*系统默认菜单被禁用*/
|
|
87
|
+
-webkit-user-select: none; /*webkit浏览器*/
|
|
88
|
+
-khtml-user-select: none; /*早期浏览器*/
|
|
89
|
+
-moz-user-select: none; /*火狐*/
|
|
90
|
+
-ms-user-select: none; /*IE10*/
|
|
91
|
+
user-select: none;
|
|
92
|
+
}
|
package/es/style/theme.scss
CHANGED
|
@@ -19,3 +19,76 @@
|
|
|
19
19
|
--hy-background-4: 16, 38, 59; // 斑马纹备用色
|
|
20
20
|
--hy-border: 54, 93, 132;
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
.search_lightColor {
|
|
24
|
+
min-width: 254px;
|
|
25
|
+
line-height: 32px;
|
|
26
|
+
background: rgba(var(--hy-background), 1);
|
|
27
|
+
border-radius: 8px;
|
|
28
|
+
padding: 4px;
|
|
29
|
+
display: flex;
|
|
30
|
+
border: 1px solid rgba(var(--hy-border), 1);
|
|
31
|
+
transition: 0.3s;
|
|
32
|
+
position: relative;
|
|
33
|
+
z-index: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.search_lightColor:focus,
|
|
37
|
+
.search_lightColor:hover {
|
|
38
|
+
border-color: rgba(var(--hy-theme), 1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.search_lightColor .hy-el-input .hy-el-input__wrapper {
|
|
42
|
+
background: rgba(var(--hy-background), 1);
|
|
43
|
+
border-color: rgba(var(--hy-background), 1);
|
|
44
|
+
box-shadow: none;
|
|
45
|
+
padding: 0 26px 0 10px;
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
color: rgba(var(--hy-main), 1);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.search_lightColor .hy-el-input .hy-el-input__wrapper:focus,
|
|
51
|
+
.search_lightColor .hy-el-input .hy-el-input__wrapper:hover {
|
|
52
|
+
border-color: rgba(var(--hy-background), 1);
|
|
53
|
+
box-shadow: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.search_lightColor .searchBox:active {
|
|
57
|
+
opacity: 0.6;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.search_lightColor .searchBox {
|
|
61
|
+
width: 42px;
|
|
62
|
+
height: 32px;
|
|
63
|
+
background: rgba(var(--hy-background-3), 1);
|
|
64
|
+
border-radius: 8px;
|
|
65
|
+
line-height: 30px;
|
|
66
|
+
text-align: center;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.search_lightColor .searchBox .svgBox {
|
|
74
|
+
width: 18px;
|
|
75
|
+
height: 18px;
|
|
76
|
+
vertical-align: middle;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.deviceType-sos {
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
font-weight: bold;
|
|
82
|
+
color: rgba(var(--hy-danger), 1);
|
|
83
|
+
position: relative;
|
|
84
|
+
top: 2px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.deviceType {
|
|
88
|
+
font-size: 12px;
|
|
89
|
+
font-weight: bold;
|
|
90
|
+
color: rgba(var(--hy-main), 1);
|
|
91
|
+
background: linear-gradient(270deg, #27acff 0%, #2ddbf4 100%);
|
|
92
|
+
-webkit-background-clip: text;
|
|
93
|
+
-webkit-text-fill-color: transparent;
|
|
94
|
+
}
|
package/es/utils/date.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { isNumber } from './is.mjs';
|
|
2
|
+
|
|
1
3
|
function getDefaultValueFormatByType(type = "date") {
|
|
2
4
|
switch (type) {
|
|
3
5
|
case "year":
|
|
@@ -20,5 +22,27 @@ function getDefaultValueFormatByType(type = "date") {
|
|
|
20
22
|
return "YYYY-MM-DD";
|
|
21
23
|
}
|
|
22
24
|
}
|
|
25
|
+
function formatDuration(duration, isSecond = false) {
|
|
26
|
+
if (!duration || !isNumber(duration)) return;
|
|
27
|
+
duration = isSecond ? duration * 1e3 : duration;
|
|
28
|
+
const list = [];
|
|
29
|
+
if (duration > 60 * 60 * 1e3) {
|
|
30
|
+
list.push(Math.floor(duration / (60 * 60 * 1e3)));
|
|
31
|
+
duration = duration % (60 * 60 * 1e3);
|
|
32
|
+
}
|
|
33
|
+
if (duration > 60 * 1e3) {
|
|
34
|
+
list.push(Math.floor(duration / (60 * 1e3)));
|
|
35
|
+
duration = duration % (60 * 1e3);
|
|
36
|
+
} else if (!list.length) {
|
|
37
|
+
list.push(0);
|
|
38
|
+
}
|
|
39
|
+
if (duration > 1e3) {
|
|
40
|
+
list.push(Math.floor(duration / 1e3));
|
|
41
|
+
} else {
|
|
42
|
+
list.push(0);
|
|
43
|
+
}
|
|
44
|
+
if (!list.length) return;
|
|
45
|
+
return list.map((val) => val >= 10 ? val : `0${val}`).join(":");
|
|
46
|
+
}
|
|
23
47
|
|
|
24
|
-
export { getDefaultValueFormatByType };
|
|
48
|
+
export { formatDuration, getDefaultValueFormatByType };
|
package/es/utils/file.mjs
CHANGED
|
@@ -46,10 +46,11 @@ async function fileFormUpload(file) {
|
|
|
46
46
|
return Promise.reject(err);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
49
|
+
async function fileUpload(file, directTransmission = true) {
|
|
50
|
+
if (directTransmission) {
|
|
52
51
|
return await fileJsonUplaod(file);
|
|
52
|
+
} else {
|
|
53
|
+
return await fileFormUpload(file);
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
async function sizeToTextHandler(size) {
|
|
@@ -65,4 +66,4 @@ async function sizeToTextHandler(size) {
|
|
|
65
66
|
return `${Math.floor(size / Math.pow(1024, 4) / 100) * 100}TB`;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
export { blobToDataURL,
|
|
69
|
+
export { blobToDataURL, fileFormUpload, fileJsonUplaod, fileUpload, presignedUrl, sizeToTextHandler };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { isString, isArray } from './is.mjs';
|
|
2
|
+
|
|
3
|
+
function getValueByProp(model, prop) {
|
|
4
|
+
if (isString(prop)) {
|
|
5
|
+
prop = prop.split(".").filter(Boolean);
|
|
6
|
+
}
|
|
7
|
+
if (!isArray(prop) || !prop?.length) return;
|
|
8
|
+
return prop.reduce((o, k) => o?.[k], model);
|
|
9
|
+
}
|
|
10
|
+
function setValueByProp(model, prop, value) {
|
|
11
|
+
let keys = [];
|
|
12
|
+
if (isString(prop)) {
|
|
13
|
+
keys = prop.split(".").filter(Boolean);
|
|
14
|
+
}
|
|
15
|
+
if (!isArray(keys) || !keys?.length) return;
|
|
16
|
+
const lastKey = keys.pop();
|
|
17
|
+
const parent = keys.reduce((o, k) => o?.[k], model);
|
|
18
|
+
if (parent) {
|
|
19
|
+
parent[lastKey] = value;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function genValueByProp(model = {}, prop, value) {
|
|
23
|
+
let keys = [];
|
|
24
|
+
if (isString(prop)) {
|
|
25
|
+
keys = prop.split(".").filter(Boolean);
|
|
26
|
+
}
|
|
27
|
+
if (!isArray(keys) || !keys?.length) return;
|
|
28
|
+
const lastKey = keys.pop();
|
|
29
|
+
const parent = keys.reduce((o, k) => {
|
|
30
|
+
if (!o?.[k]) {
|
|
31
|
+
o[k] = {};
|
|
32
|
+
}
|
|
33
|
+
return o[k];
|
|
34
|
+
}, model);
|
|
35
|
+
parent[lastKey] = value;
|
|
36
|
+
return model;
|
|
37
|
+
}
|
|
38
|
+
function clearSpace(value, type = "between") {
|
|
39
|
+
if (!isString(value)) return value;
|
|
40
|
+
if (type === "between") {
|
|
41
|
+
value = value.replace(/(^ *)|( *$)/g, "");
|
|
42
|
+
} else if (type === "before") {
|
|
43
|
+
value = value.replace(/^ */g, "");
|
|
44
|
+
} else if (type === "after") {
|
|
45
|
+
value = value.replace(/ *$/g, "");
|
|
46
|
+
} else if (type === "all") {
|
|
47
|
+
value = value.replace(/ /g, "");
|
|
48
|
+
}
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { clearSpace, genValueByProp, getValueByProp, setValueByProp };
|
package/es/utils/handler.mjs
CHANGED
|
@@ -4,7 +4,7 @@ function funRunHandler(target, ...args) {
|
|
|
4
4
|
if (isFunction(target)) {
|
|
5
5
|
return target(...args);
|
|
6
6
|
}
|
|
7
|
-
return target;
|
|
7
|
+
return cloneDeep(target);
|
|
8
8
|
}
|
|
9
9
|
const cloneDeep = (target) => {
|
|
10
10
|
if (isVueProxy(target)) {
|
|
@@ -78,5 +78,25 @@ const withInstall = (comp) => {
|
|
|
78
78
|
};
|
|
79
79
|
return comp;
|
|
80
80
|
};
|
|
81
|
+
async function copyText(text) {
|
|
82
|
+
if (navigator.clipboard) {
|
|
83
|
+
try {
|
|
84
|
+
await navigator.clipboard.writeText(text);
|
|
85
|
+
return;
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
const input = document.createElement("textarea");
|
|
91
|
+
input.value = text;
|
|
92
|
+
document.body.appendChild(input);
|
|
93
|
+
input.select();
|
|
94
|
+
document.execCommand("copy");
|
|
95
|
+
document.body.removeChild(input);
|
|
96
|
+
} catch (err) {
|
|
97
|
+
console.error(err);
|
|
98
|
+
return Promise.reject();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
81
101
|
|
|
82
|
-
export { cloneDeep, createUniqueId, funRunHandler, mergeDeep, withInstall };
|
|
102
|
+
export { cloneDeep, copyText, createUniqueId, funRunHandler, mergeDeep, withInstall };
|
package/es/utils/index.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { parseRem, pxTorem, remToPx, vwToPx } from './adaptive.mjs';
|
|
2
2
|
export { bus } from './bus.mjs';
|
|
3
3
|
export { base64Decrypt, encryptToBase64, generateRandomCode } from './crypto.mjs';
|
|
4
|
-
export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isObject, isOverflowing, isString, isSymbol, isUndefined, isVueProxy } from './is.mjs';
|
|
5
|
-
export { cloneDeep, createUniqueId, funRunHandler, mergeDeep, withInstall } from './handler.mjs';
|
|
6
|
-
export { getDefaultValueFormatByType } from './date.mjs';
|
|
7
|
-
export { blobToDataURL,
|
|
4
|
+
export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isObject, isOverflowing, isString, isSupportH265, isSymbol, isUndefined, isVueProxy } from './is.mjs';
|
|
5
|
+
export { cloneDeep, copyText, createUniqueId, funRunHandler, mergeDeep, withInstall } from './handler.mjs';
|
|
6
|
+
export { formatDuration, getDefaultValueFormatByType } from './date.mjs';
|
|
7
|
+
export { blobToDataURL, fileFormUpload, fileJsonUplaod, fileUpload, presignedUrl, sizeToTextHandler } from './file.mjs';
|
|
8
|
+
export { clearSpace, genValueByProp, getValueByProp, setValueByProp } from './form.mjs';
|
|
9
|
+
export { protocolcheckLoad, svgIconLoad } from './loadScript.mjs';
|
package/es/utils/is.mjs
CHANGED
|
@@ -9,7 +9,7 @@ const isBoolean = (e) => typeof e === "boolean";
|
|
|
9
9
|
const isUndefined = (e) => e === void 0;
|
|
10
10
|
const isNull = (e) => e === null;
|
|
11
11
|
const isSymbol = (e) => typeof e === "symbol";
|
|
12
|
-
const isEmpty = (e) => isUndefined(e) || isNull(e) || !isNumber(e) && !e;
|
|
12
|
+
const isEmpty = (e) => !isBoolean(e) && (isUndefined(e) || isNull(e) || !isNumber(e) && !e);
|
|
13
13
|
const isOverflowing = (e) => e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight;
|
|
14
14
|
const isVueProxy = (e) => {
|
|
15
15
|
return isRef(e) || isReactive(e) || isReadonly(e) || isProxy(e);
|
|
@@ -17,5 +17,26 @@ const isVueProxy = (e) => {
|
|
|
17
17
|
const isFile = (e) => {
|
|
18
18
|
return e instanceof File;
|
|
19
19
|
};
|
|
20
|
+
function isSupportH265() {
|
|
21
|
+
const ua = navigator.userAgent.toLocaleLowerCase();
|
|
22
|
+
let isSupport = true;
|
|
23
|
+
let isVersionLow = false;
|
|
24
|
+
const chromeMatch = ua.match(/chrome\/(\d+)/) || ua.match(/chromium\/(\d+)/);
|
|
25
|
+
if (ua.match(/edge\/(\d+)/)) {
|
|
26
|
+
isSupport = false;
|
|
27
|
+
} else if (ua.match(/edg\/(\d+)/)) {
|
|
28
|
+
isSupport = false;
|
|
29
|
+
} else if (chromeMatch) {
|
|
30
|
+
const version2 = parseInt(chromeMatch[1], 10);
|
|
31
|
+
isSupport = true;
|
|
32
|
+
isVersionLow = !version2 || version2 < 104;
|
|
33
|
+
} else if (ua.match(/firefox\/(\d+)/)) {
|
|
34
|
+
isSupport = false;
|
|
35
|
+
} else if (ua.match(/version\/(\d+)/) && ua.indexOf("safari") > -1) {
|
|
36
|
+
version = parseInt(RegExp.$1, 10);
|
|
37
|
+
isSupport = true;
|
|
38
|
+
}
|
|
39
|
+
return { isSupport, isVersionLow };
|
|
40
|
+
}
|
|
20
41
|
|
|
21
|
-
export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isObject, isOverflowing, isString, isSymbol, isUndefined, isVueProxy };
|
|
42
|
+
export { isArray, isBoolean, isEmpty, isFile, isFunction, isNull, isNumber, isObject, isOverflowing, isString, isSupportH265, isSymbol, isUndefined, isVueProxy };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
async function loadPlugins(src) {
|
|
2
|
+
const res = await fetch(src);
|
|
3
|
+
const jsCode = await res.text();
|
|
4
|
+
const runner = new Function(jsCode);
|
|
5
|
+
runner.call(window);
|
|
6
|
+
}
|
|
7
|
+
let isLoadProtocolcheck = false;
|
|
8
|
+
async function protocolcheckLoad() {
|
|
9
|
+
if (window.protocolCheck || isLoadProtocolcheck) return;
|
|
10
|
+
try {
|
|
11
|
+
await loadPlugins(
|
|
12
|
+
new URL("../static/protocolcheck.js", import.meta.url).href
|
|
13
|
+
);
|
|
14
|
+
} catch (err) {
|
|
15
|
+
console.error(err);
|
|
16
|
+
}
|
|
17
|
+
isLoadSvgIcon = false;
|
|
18
|
+
}
|
|
19
|
+
let isLoadSvgIcon = false;
|
|
20
|
+
async function svgIconLoad() {
|
|
21
|
+
if (isLoadSvgIcon) return;
|
|
22
|
+
isLoadSvgIcon = true;
|
|
23
|
+
try {
|
|
24
|
+
await loadPlugins(
|
|
25
|
+
new URL("../static/hy-svg-icons.js", import.meta.url).href
|
|
26
|
+
);
|
|
27
|
+
} catch (err) {
|
|
28
|
+
console.error(err);
|
|
29
|
+
}
|
|
30
|
+
isLoadSvgIcon = false;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { protocolcheckLoad, svgIconLoad };
|
package/es/version.mjs
CHANGED