@wfrog/vc-ui 1.1.0 → 1.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 +3 -3
- package/dist/es/chunk/{OEa4tYPF.mjs → -ga82G_B.mjs} +1 -1
- package/dist/es/chunk/B1BnPYNG.mjs +163 -0
- package/dist/es/chunk/{DFOLES4O.mjs → BA2yoAwy.mjs} +403 -502
- package/dist/es/chunk/{BpqBBo4z.mjs → BDyXj_90.mjs} +2 -2
- package/dist/es/chunk/{BI0vrXwX.mjs → BI-fNJhk.mjs} +6 -3
- package/dist/es/chunk/{BsGCX4td.mjs → BK4T_2ha.mjs} +1 -1
- package/dist/es/chunk/{73YgKz3H.mjs → BLLKi_0v.mjs} +1 -1
- package/dist/es/chunk/{DTLPXrjb.mjs → BTsEMnf_.mjs} +1 -1
- package/dist/es/chunk/{B5UQmWXg.mjs → BUf50Y7Y.mjs} +41 -21
- package/dist/es/chunk/{BzedaLtg.mjs → BYVaz5Or.mjs} +2 -2
- package/dist/es/chunk/BaJ7k5Lg.mjs +209 -0
- package/dist/es/chunk/{Bp9jXKX0.mjs → BambM7zX.mjs} +2 -2
- package/dist/es/chunk/{CizMbf5K.mjs → Bl0WQiki.mjs} +1 -1
- package/dist/es/chunk/{CLbj8G-F.mjs → Bnot0Gwc.mjs} +12 -4
- package/dist/es/chunk/{4eyJqDa9.mjs → BoGGHTrJ.mjs} +4 -2
- package/dist/es/chunk/C7Dgjpd1.mjs +242 -0
- package/dist/es/chunk/{D0LB3gF-.mjs → CKbkzlkO.mjs} +104 -72
- package/dist/es/chunk/{DrgvuOYH.mjs → CL5WTCB3.mjs} +4 -2
- package/dist/es/chunk/{XwSiBVsA.mjs → CM_I1FoA.mjs} +2 -2
- package/dist/es/chunk/{DouIsSPi.mjs → CNILa-hz.mjs} +1 -1
- package/dist/es/chunk/{DRoyW749.mjs → CcKUdl3e.mjs} +12 -6
- package/dist/es/chunk/CidLkmft.mjs +188 -0
- package/dist/es/chunk/{HAog8AWU.mjs → CitH0taR.mjs} +816 -539
- package/dist/es/chunk/{Cu6erWl4.mjs → CzqeSQn4.mjs} +73 -38
- package/dist/es/chunk/{CLCfXfvv.mjs → D7JQbDFE.mjs} +154 -118
- package/dist/es/chunk/{DaCDeO95.mjs → D9iEroQw.mjs} +1 -207
- package/dist/es/chunk/{cPBw23yt.mjs → DEPZhJ0Z.mjs} +21 -16
- package/dist/es/chunk/{CPERtDRX.mjs → DHpbQMGk.mjs} +32 -22
- package/dist/es/chunk/{BHsNc7jl.mjs → DKpRXDRE.mjs} +82 -55
- package/dist/es/chunk/{CLMc8GzD.mjs → DMYHOxhk.mjs} +462 -311
- package/dist/es/chunk/{CBSopeeE.mjs → DQHGjqG5.mjs} +9 -4
- package/dist/es/chunk/DTEM_vYZ.mjs +23 -0
- package/dist/es/chunk/{NQBKROII.mjs → DWcIzeMM.mjs} +1 -1
- package/dist/es/chunk/{FHvLvzEB.mjs → DX38FfmL.mjs} +1088 -697
- package/dist/es/chunk/{DZD-YnCt.mjs → Dcm-lOj8.mjs} +4 -4
- package/dist/es/chunk/{09Ec85_u.mjs → DdmNdV7I.mjs} +398 -278
- package/dist/es/chunk/{f0-vIQGp.mjs → DfHTA5LW.mjs} +3 -3
- package/dist/es/chunk/DgFT6snA.mjs +835 -0
- package/dist/es/chunk/{DwKWIlzw.mjs → DgSzI6Fw.mjs} +106 -71
- package/dist/es/chunk/{BcTuAX8r.mjs → Dsye5ZEp.mjs} +5 -3
- package/dist/es/chunk/{BsLJxiSC.mjs → Dw-yyl2m.mjs} +1 -1
- package/dist/es/chunk/{DXPWe_a5.mjs → U13Qpiki.mjs} +19 -13
- package/dist/es/chunk/{axpwSky6.mjs → _8u_XVHh.mjs} +168 -120
- package/dist/es/chunk/egk9EEzo.mjs +66 -0
- package/dist/es/chunk/{BUEEWLrd.mjs → ezK_XQQd.mjs} +15 -6
- package/dist/es/chunk/{Bl2KlMdP.mjs → oW98L-44.mjs} +8 -3
- package/dist/es/chunk/{Dk6Bx0KT.mjs → plK2vnjp.mjs} +8 -5
- package/dist/es/components/awesome-icon/awesome-icon.mjs +2 -1
- package/dist/es/components/backbottom/backbottom.mjs +2 -2
- package/dist/es/components/button/button.mjs +105 -76
- package/dist/es/components/choice/choice.mjs +2 -2
- package/dist/es/components/config-provider/config-provider.d.ts +1 -0
- package/dist/es/components/config-provider/config-provider.mjs +13 -5
- package/dist/es/components/cropper/cropper.mjs +44 -33
- package/dist/es/components/currency/currency.mjs +5 -5
- package/dist/es/components/daterange-picker/daterange-picker.mjs +2267 -1522
- package/dist/es/components/dialog/dialog.mjs +213 -172
- package/dist/es/components/dialog/index.css +1 -1
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +11 -11
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +5 -4
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +495 -314
- package/dist/es/components/dialog-upload-images/index.css +1 -1
- package/dist/es/components/drag-verify/drag-verify.mjs +3 -3
- package/dist/es/components/drawer/drawer.mjs +136 -94
- package/dist/es/components/drawer/index.css +1 -1
- package/dist/es/components/easy-pagination/easy-pagination.mjs +2 -2
- package/dist/es/components/el-icon/el-icon.mjs +1 -1
- package/dist/es/components/el-icon/index.css +3 -2
- package/dist/es/components/flag/flag.mjs +2 -1
- package/dist/es/components/icon/icon.mjs +10 -31
- package/dist/es/components/icon/icon.vue.d.ts +1 -1
- package/dist/es/components/icon/icon2.mjs +1 -1
- package/dist/es/components/icon/index.mjs +2 -2
- package/dist/es/components/icon-picker/components/collections.vue.d.ts +625 -0
- package/dist/es/components/icon-picker/components/panel.vue.d.ts +9 -0
- package/dist/es/components/icon-picker/icon-picker.d.ts +40 -0
- package/dist/es/components/icon-picker/icon-picker.mjs +1375 -0
- package/dist/es/components/icon-picker/icon-picker.vue.d.ts +9 -0
- package/dist/es/components/icon-picker/index.css +121 -0
- package/dist/es/components/icon-picker/index.d.ts +4 -0
- package/dist/es/components/icon-picker/index.mjs +6 -0
- package/dist/es/components/iconify-icon/iconify-icon.d.ts +5 -0
- package/dist/es/components/iconify-icon/iconify-icon.mjs +1860 -0
- package/dist/es/components/iconify-icon/iconify-icon.vue.d.ts +6 -0
- package/dist/es/components/iconify-icon/index.css +11 -0
- package/dist/es/components/iconify-icon/index.d.ts +4 -0
- package/dist/es/components/iconify-icon/index.mjs +6 -0
- package/dist/es/components/image/image.mjs +5 -5
- package/dist/es/components/input/input.mjs +4 -4
- package/dist/es/components/input/input.vue.d.ts +63 -54
- package/dist/es/components/input-number/input-number.mjs +5 -5
- package/dist/es/components/pca-picker/components/c.vue.d.ts +4 -4
- package/dist/es/components/pca-picker/index.css +1 -1
- package/dist/es/components/pca-picker/pca-picker.mjs +154 -160
- package/dist/es/components/pca-picker/pca-picker.vue.d.ts +12 -11
- package/dist/es/components/qr-code/qr-code.mjs +2 -1
- package/dist/es/components/screenfull/screenfull.mjs +6 -5
- package/dist/es/components/scrollbar/index.css +18 -0
- package/dist/es/components/scrollbar/index.d.ts +4 -0
- package/dist/es/components/scrollbar/index.mjs +6 -0
- package/dist/es/components/scrollbar/scrollbar.d.ts +4 -0
- package/dist/es/components/scrollbar/scrollbar.mjs +65 -0
- package/dist/es/components/scrollbar/scrollbar.vue.d.ts +588 -0
- package/dist/es/components/select/select.mjs +7 -7
- package/dist/es/components/single-player/index.css +1 -1
- package/dist/es/components/single-player/single-player.mjs +265 -166
- package/dist/es/components/svg-icon/index.css +3 -2
- package/dist/es/components/svg-icon/svg-icon.mjs +3 -3
- package/dist/es/components/switch/switch.mjs +2 -2
- package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +2 -2
- package/dist/es/components/tags/tags.mjs +9 -9
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +4 -4
- package/dist/es/components/thousand-input/thousand-input.mjs +5 -4
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +126 -108
- package/dist/es/components/tinymce/index.css +1 -1
- package/dist/es/components/tinymce/tinymce.mjs +9 -8
- package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +179 -141
- package/dist/es/components/tree-picker/popover-cascader.css +1 -1
- package/dist/es/components/tree-picker/tree-picker.mjs +10 -10
- package/dist/es/components/tree-picker/tree-picker.vue.d.ts +12 -11
- package/dist/es/components/upload-file/upload-file.mjs +3 -3
- package/dist/es/index.d.ts +3 -0
- package/dist/es/index.mjs +41 -31
- package/dist/global.d.ts +3 -0
- package/dist/index.css +166 -22
- package/package.json +8 -2
- package/dist/es/chunk/BtTIs3tG.mjs +0 -138
- package/dist/es/chunk/C7wQNvSS.mjs +0 -728
- package/dist/es/chunk/Cbhe4I9Z.mjs +0 -16
- package/dist/es/chunk/DihosKp1.mjs +0 -140
- package/dist/es/components/icon/index.css +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as buildProps } from './
|
|
2
|
-
import {
|
|
1
|
+
import { c as buildProps } from './CcKUdl3e.mjs';
|
|
2
|
+
import { g as getNative, q as eq, S as Symbol$1, b as isArray, l as isArguments, o as arrayPush, u as castPath, t as toKey, h as isLength, m as isIndex, i as isObject, d as baseGet } from './DWcIzeMM.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* This method returns the first argument it receives.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getCurrentInstance, inject, computed, unref, ref } from 'vue';
|
|
2
|
-
import { f as isNumber, e as debugWarn } from './
|
|
2
|
+
import { f as isNumber, e as debugWarn } from './CcKUdl3e.mjs';
|
|
3
3
|
import { isClient } from '@vueuse/core';
|
|
4
4
|
|
|
5
5
|
const initial = {
|
|
@@ -23,8 +23,11 @@ const useZIndex = (zIndexOverrides) => {
|
|
|
23
23
|
return currentZIndex.value;
|
|
24
24
|
};
|
|
25
25
|
if (!isClient && !inject(ZINDEX_INJECTION_KEY)) {
|
|
26
|
-
debugWarn(
|
|
27
|
-
|
|
26
|
+
debugWarn(
|
|
27
|
+
"ZIndexInjection",
|
|
28
|
+
`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
|
|
29
|
+
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`
|
|
30
|
+
);
|
|
28
31
|
}
|
|
29
32
|
return {
|
|
30
33
|
initialZIndex,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getCurrentInstance, inject, ref, computed, unref, provide } from 'vue';
|
|
2
|
-
import { u as useNamespace, x as defaultNamespace, e as debugWarn, C as namespaceContextKey } from './
|
|
3
|
-
import { u as useZIndex, d as defaultInitialZIndex, z as zIndexContextKey } from './
|
|
4
|
-
import { u as useLocale, l as localeContextKey } from './
|
|
5
|
-
import { S as SIZE_INJECTION_KEY } from './
|
|
6
|
-
import { e as emptyValuesContextKey } from './
|
|
2
|
+
import { u as useNamespace, x as defaultNamespace, e as debugWarn, C as namespaceContextKey } from './CcKUdl3e.mjs';
|
|
3
|
+
import { u as useZIndex, d as defaultInitialZIndex, z as zIndexContextKey } from './BI-fNJhk.mjs';
|
|
4
|
+
import { u as useLocale, l as localeContextKey } from './plK2vnjp.mjs';
|
|
5
|
+
import { S as SIZE_INJECTION_KEY } from './BK4T_2ha.mjs';
|
|
6
|
+
import { e as emptyValuesContextKey } from './Dsye5ZEp.mjs';
|
|
7
7
|
import { k as keysOf } from './DVNTpOBR.mjs';
|
|
8
8
|
|
|
9
9
|
const configProviderContextKey = Symbol();
|
|
@@ -22,18 +22,23 @@ function useGlobalConfig(key, defaultValue = void 0) {
|
|
|
22
22
|
}
|
|
23
23
|
function useGlobalComponentSettings(block, sizeFallback) {
|
|
24
24
|
const config = useGlobalConfig();
|
|
25
|
-
const ns = useNamespace(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
const ns = useNamespace(
|
|
26
|
+
block,
|
|
27
|
+
computed(() => {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = config.value) == null ? void 0 : _a.namespace) || defaultNamespace;
|
|
30
|
+
})
|
|
31
|
+
);
|
|
29
32
|
const locale = useLocale(computed(() => {
|
|
30
33
|
var _a;
|
|
31
34
|
return (_a = config.value) == null ? void 0 : _a.locale;
|
|
32
35
|
}));
|
|
33
|
-
const zIndex = useZIndex(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
const zIndex = useZIndex(
|
|
37
|
+
computed(() => {
|
|
38
|
+
var _a;
|
|
39
|
+
return ((_a = config.value) == null ? void 0 : _a.zIndex) || defaultInitialZIndex;
|
|
40
|
+
})
|
|
41
|
+
);
|
|
37
42
|
const size = computed(() => {
|
|
38
43
|
var _a;
|
|
39
44
|
return unref(sizeFallback) || ((_a = config.value) == null ? void 0 : _a.size) || "";
|
|
@@ -52,7 +57,10 @@ const provideGlobalConfig = (config, app, global = false) => {
|
|
|
52
57
|
const oldConfig = inSetup ? useGlobalConfig() : void 0;
|
|
53
58
|
const provideFn = (_a = void 0 ) != null ? _a : inSetup ? provide : void 0;
|
|
54
59
|
if (!provideFn) {
|
|
55
|
-
debugWarn(
|
|
60
|
+
debugWarn(
|
|
61
|
+
"provideGlobalConfig",
|
|
62
|
+
"provideGlobalConfig() can only be used inside setup()."
|
|
63
|
+
);
|
|
56
64
|
return;
|
|
57
65
|
}
|
|
58
66
|
const context = computed(() => {
|
|
@@ -62,16 +70,28 @@ const provideGlobalConfig = (config, app, global = false) => {
|
|
|
62
70
|
return mergeConfig(oldConfig.value, cfg);
|
|
63
71
|
});
|
|
64
72
|
provideFn(configProviderContextKey, context);
|
|
65
|
-
provideFn(
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
provideFn(
|
|
74
|
+
localeContextKey,
|
|
75
|
+
computed(() => context.value.locale)
|
|
76
|
+
);
|
|
77
|
+
provideFn(
|
|
78
|
+
namespaceContextKey,
|
|
79
|
+
computed(() => context.value.namespace)
|
|
80
|
+
);
|
|
81
|
+
provideFn(
|
|
82
|
+
zIndexContextKey,
|
|
83
|
+
computed(() => context.value.zIndex)
|
|
84
|
+
);
|
|
68
85
|
provideFn(SIZE_INJECTION_KEY, {
|
|
69
86
|
size: computed(() => context.value.size || "")
|
|
70
87
|
});
|
|
71
|
-
provideFn(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
88
|
+
provideFn(
|
|
89
|
+
emptyValuesContextKey,
|
|
90
|
+
computed(() => ({
|
|
91
|
+
emptyValues: context.value.emptyValues,
|
|
92
|
+
valueOnClear: context.value.valueOnClear
|
|
93
|
+
}))
|
|
94
|
+
);
|
|
75
95
|
if (global || !globalConfig.value) {
|
|
76
96
|
globalConfig.value = context.value;
|
|
77
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isVNode, Fragment, Comment } from 'vue';
|
|
2
|
-
import { i as isArray } from './
|
|
2
|
+
import { i as isArray } from './CcKUdl3e.mjs';
|
|
3
3
|
|
|
4
4
|
var PatchFlags = /* @__PURE__ */ ((PatchFlags2) => {
|
|
5
5
|
PatchFlags2[PatchFlags2["TEXT"] = 1] = "TEXT";
|
|
@@ -46,4 +46,4 @@ const flattedChildren = (children) => {
|
|
|
46
46
|
return result;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
export { PatchFlags as P, isValidElementNode as a, flattedChildren as f, isFragment as i };
|
|
49
|
+
export { PatchFlags as P, isValidElementNode as a, isComment as b, flattedChildren as f, isFragment as i };
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
const isClient = typeof window !== "undefined";
|
|
2
|
+
const defaultWindow = isClient ? window : void 0;
|
|
3
|
+
|
|
4
|
+
function baseCdnUrl() {
|
|
5
|
+
return {
|
|
6
|
+
jsdelivr: "//cdn.jsdelivr.net/npm",
|
|
7
|
+
// jsdelivr.net
|
|
8
|
+
defaultBase: defaultWindow?.VC?.cdn?.host || "//cdn.staticfile.org",
|
|
9
|
+
localCDN: defaultWindow?.VC?.cdn?.path || "/local-cdn"
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const cdnMapping = {
|
|
13
|
+
// 全屏
|
|
14
|
+
screenfull: (version = "5.2.0") => ({
|
|
15
|
+
version,
|
|
16
|
+
instance: () => defaultWindow && defaultWindow.screenfull,
|
|
17
|
+
source: {
|
|
18
|
+
jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/screenfull@${version}`] },
|
|
19
|
+
defaultBase: { js: [`${baseCdnUrl().defaultBase}/screenfull.js/${version}/screenfull.min.js`] },
|
|
20
|
+
localCDN: { js: [`${baseCdnUrl().localCDN}/screenfull/${version}/screenfull.min.js`] }
|
|
21
|
+
}
|
|
22
|
+
}),
|
|
23
|
+
// 复制黏贴
|
|
24
|
+
clipboard: (version = "2.0.8") => ({
|
|
25
|
+
version,
|
|
26
|
+
instance: () => defaultWindow && defaultWindow.ClipboardJS,
|
|
27
|
+
source: {
|
|
28
|
+
jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/clipboard@${version}`] },
|
|
29
|
+
defaultBase: { js: [`${baseCdnUrl().defaultBase}/clipboard.js/${version}/clipboard.min.js`] },
|
|
30
|
+
localCDN: { js: [`${baseCdnUrl().localCDN}/clipboard/${version}/clipboard.min.js`] }
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
// 富文本编辑器
|
|
34
|
+
tinymce: (version = "5.8.1") => ({
|
|
35
|
+
version,
|
|
36
|
+
instance: () => defaultWindow && defaultWindow.tinyMCE,
|
|
37
|
+
source: {
|
|
38
|
+
jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/tinymce@${version}`] },
|
|
39
|
+
defaultBase: { js: [`${baseCdnUrl().defaultBase}/tinymce/${version}/tinymce.min.js`] },
|
|
40
|
+
localCDN: { js: [`${baseCdnUrl().localCDN}/tinymce/${version}/tinymce.min.js`] }
|
|
41
|
+
}
|
|
42
|
+
}),
|
|
43
|
+
// 二维码生成
|
|
44
|
+
QRCode: (version = "1.5.1") => ({
|
|
45
|
+
version,
|
|
46
|
+
instance: () => defaultWindow && defaultWindow.QRCode,
|
|
47
|
+
source: {
|
|
48
|
+
jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/qrcode@${version}/build/qrcode.min.js`] },
|
|
49
|
+
defaultBase: { js: [`${baseCdnUrl().defaultBase}/qrcodejs/${version}/qrcode.min.js`] },
|
|
50
|
+
localCDN: { js: [`${baseCdnUrl().localCDN}/qrcode/${version}/qrcode.min.js`] }
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
// 千分位
|
|
54
|
+
cleave: (version = "1.6.0") => ({
|
|
55
|
+
version,
|
|
56
|
+
instance: () => defaultWindow && defaultWindow.Cleave,
|
|
57
|
+
source: {
|
|
58
|
+
jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/cleave.js@${version}`] },
|
|
59
|
+
defaultBase: { js: [`${baseCdnUrl().defaultBase}/cleave.js/${version}/cleave.min.js`] },
|
|
60
|
+
localCDN: { js: [`${baseCdnUrl().localCDN}/cleave/${version}/cleave.min.js`] }
|
|
61
|
+
}
|
|
62
|
+
}),
|
|
63
|
+
// fontawesome 全量css版本
|
|
64
|
+
fontawesomeCss: (version = "7.1.0") => ({
|
|
65
|
+
version,
|
|
66
|
+
instance: () => window,
|
|
67
|
+
source: {
|
|
68
|
+
jsdelivr: { js: [], css: [`${baseCdnUrl().jsdelivr}/@fortawesome/fontawesome-free@${version}/css/all.min.css`] },
|
|
69
|
+
defaultBase: { js: [], css: [`${baseCdnUrl().defaultBase}/font-awesome/${version}/css/all.min.css`] },
|
|
70
|
+
localCDN: { js: [], css: [`${baseCdnUrl().localCDN}/font-awesome/${version}/css/all.min.css`] }
|
|
71
|
+
}
|
|
72
|
+
}),
|
|
73
|
+
// fontawesome 全量js版本
|
|
74
|
+
fontawesomeJs: (version = "7.1.0") => ({
|
|
75
|
+
version,
|
|
76
|
+
instance: () => window,
|
|
77
|
+
source: {
|
|
78
|
+
jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/@fortawesome/fontawesome-free@${version}/js/all.min.js`] },
|
|
79
|
+
defaultBase: { js: [`${baseCdnUrl().defaultBase}/font-awesome/${version}/js/all.min.js`] },
|
|
80
|
+
localCDN: { js: [`${baseCdnUrl().localCDN}/font-awesome/${version}/js/all.min.js`] }
|
|
81
|
+
}
|
|
82
|
+
}),
|
|
83
|
+
cropper: (version = "1.5.12") => ({
|
|
84
|
+
version,
|
|
85
|
+
instance: () => defaultWindow && defaultWindow.Cropper,
|
|
86
|
+
source: {
|
|
87
|
+
jsdelivr: { js: [`${baseCdnUrl().jsdelivr}/cropperjs@${version}`], css: [`${baseCdnUrl().jsdelivr}/cropperjs@${version}/dist/cropper.min.css`] },
|
|
88
|
+
defaultBase: { js: [`${baseCdnUrl().defaultBase}/cropperjs/${version}/cropper.min.js`], css: [`${baseCdnUrl().defaultBase}/cropperjs/${version}/cropper.min.css`] },
|
|
89
|
+
localCDN: { js: [`${baseCdnUrl().localCDN}/cropperjs/${version}/cropper.min.js`], css: [`${baseCdnUrl().localCDN}/cropperjs/${version}/cropper.min.css`] }
|
|
90
|
+
}
|
|
91
|
+
}),
|
|
92
|
+
// flagIcons
|
|
93
|
+
flagIcons: (version = "6.6.6") => ({
|
|
94
|
+
version,
|
|
95
|
+
instance: () => window,
|
|
96
|
+
source: {
|
|
97
|
+
jsdelivr: { js: [], css: [`${baseCdnUrl().jsdelivr}/flag-icons@${version}/css/flag-icons.min.css`] },
|
|
98
|
+
defaultBase: { js: [], css: [`${baseCdnUrl().defaultBase}/flag-icons/${version}/css/flag-icons.min.css`] },
|
|
99
|
+
localCDN: { js: [], css: [`${baseCdnUrl().localCDN}/flag-icons/${version}/css/flag-icons.min.css`] }
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
};
|
|
103
|
+
function cdnSource(name, version) {
|
|
104
|
+
const cdnName = defaultWindow?.VC?.cdn?.name || "jsdelivr";
|
|
105
|
+
const resource = cdnMapping[name];
|
|
106
|
+
if (!resource) {
|
|
107
|
+
const defaultResource = {
|
|
108
|
+
instance: () => ({}),
|
|
109
|
+
js: [`${baseCdnUrl().defaultBase}/${cdnName}.js/${version}/${cdnName}.min.js`],
|
|
110
|
+
css: [`${baseCdnUrl().defaultBase}/${cdnName}/${version}/${cdnName}.min.css`]
|
|
111
|
+
};
|
|
112
|
+
return defaultResource;
|
|
113
|
+
}
|
|
114
|
+
const item = resource(version);
|
|
115
|
+
return Object.assign({ instance: void 0, js: [], css: [], version: "" }, { ...item.source[cdnName], instance: item.instance, version: item.version });
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const FLAG_LOADEED = "yes";
|
|
119
|
+
function isScriptLoaded(url) {
|
|
120
|
+
const script = url && document.querySelector(`script[src="${url}"]`);
|
|
121
|
+
return !!(script && script.dataset.loader === FLAG_LOADEED);
|
|
122
|
+
}
|
|
123
|
+
function getScript(url) {
|
|
124
|
+
const script = url && document.querySelector(`script[src="${url}"]`);
|
|
125
|
+
return script && !script.dataset.loader ? script : null;
|
|
126
|
+
}
|
|
127
|
+
const isCssLoaded = (url) => !!(url && document.querySelector(`link[href="${url}"]`));
|
|
128
|
+
function loadScriptSingle(url) {
|
|
129
|
+
return new Promise((resolve, reject) => {
|
|
130
|
+
if (isScriptLoaded(url)) {
|
|
131
|
+
resolve(true);
|
|
132
|
+
} else {
|
|
133
|
+
const myScript = getScript(url);
|
|
134
|
+
if (!myScript) {
|
|
135
|
+
const head = document.getElementsByTagName("head")[0];
|
|
136
|
+
const script = document.createElement("script");
|
|
137
|
+
script.type = "text/javascript";
|
|
138
|
+
script.src = url;
|
|
139
|
+
script.onload = () => {
|
|
140
|
+
script.dataset.loaded = FLAG_LOADEED;
|
|
141
|
+
resolve(true);
|
|
142
|
+
};
|
|
143
|
+
script.onerror = () => {
|
|
144
|
+
head.removeChild(script);
|
|
145
|
+
reject(new Error("load failed"));
|
|
146
|
+
};
|
|
147
|
+
head.appendChild(script);
|
|
148
|
+
} else {
|
|
149
|
+
const timeout = 1e4;
|
|
150
|
+
const interval = 10;
|
|
151
|
+
let times = 0;
|
|
152
|
+
const timer = setInterval(() => {
|
|
153
|
+
times += interval;
|
|
154
|
+
if (times >= timeout) {
|
|
155
|
+
clearInterval(timer);
|
|
156
|
+
reject(new Error("time out!"));
|
|
157
|
+
}
|
|
158
|
+
if (myScript.dataset.loaded === FLAG_LOADEED) {
|
|
159
|
+
clearInterval(timer);
|
|
160
|
+
resolve(true);
|
|
161
|
+
}
|
|
162
|
+
}, interval);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
async function loadScript(urls, options = { sequence: true }) {
|
|
168
|
+
if (options.sequence) {
|
|
169
|
+
try {
|
|
170
|
+
for (let i = 0; i < urls.length; i += 1) {
|
|
171
|
+
await loadScriptSingle(urls[i]);
|
|
172
|
+
}
|
|
173
|
+
return Promise.resolve(true);
|
|
174
|
+
} catch (e) {
|
|
175
|
+
return Promise.reject(e);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return Promise.all(urls.map((url) => loadScriptSingle(url)));
|
|
179
|
+
}
|
|
180
|
+
function loadCss(urls) {
|
|
181
|
+
const head = document.getElementsByTagName("head")[0];
|
|
182
|
+
urls.filter((url) => !isCssLoaded(url)).forEach((url) => {
|
|
183
|
+
const link = document.createElement("link");
|
|
184
|
+
link.type = "text/css";
|
|
185
|
+
link.rel = "stylesheet";
|
|
186
|
+
link.href = url;
|
|
187
|
+
head.appendChild(link);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function loadCdnSingle(name, version) {
|
|
191
|
+
const { js = [], css, instance } = cdnSource(name, version) || {};
|
|
192
|
+
Array.isArray(css) && css.length > 0 && loadCss(css);
|
|
193
|
+
return new Promise((resolve, reject) => {
|
|
194
|
+
loadScript(js).then(() => resolve(instance?.())).catch(() => reject(new Error(`加载 ${name} 失败`)));
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
const loadCdn = (names) => Promise.all(names.map((name) => loadCdnSingle(name)));
|
|
198
|
+
const index = {
|
|
199
|
+
loadScriptSingle,
|
|
200
|
+
loadScript,
|
|
201
|
+
loadCss,
|
|
202
|
+
loadCdnSingle,
|
|
203
|
+
loadCdn,
|
|
204
|
+
baseCdnUrl,
|
|
205
|
+
cdnMapping,
|
|
206
|
+
cdnSource
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
export { index as i };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as root, i as isObject } from './
|
|
2
|
-
import { t as toNumber } from '
|
|
1
|
+
import { r as root, i as isObject } from './DWcIzeMM.mjs';
|
|
2
|
+
import { t as toNumber } from './-ga82G_B.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Gets the timestamp of the number of milliseconds that have elapsed since
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as isNumber, A as isStringNumber, h as isString, e as debugWarn, B as camelize } from './
|
|
1
|
+
import { f as isNumber, A as isStringNumber, h as isString, e as debugWarn, B as camelize } from './CcKUdl3e.mjs';
|
|
2
2
|
import { isClient } from '@vueuse/core';
|
|
3
3
|
|
|
4
4
|
const SCOPE = "utils/dom/style";
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import { isRef, computed, watch, onScopeDispose } from 'vue';
|
|
2
|
-
import { t as throwError, u as useNamespace } from './
|
|
3
|
-
import { h as hasClass, b as addClass, g as getStyle, r as removeClass } from './
|
|
4
|
-
import { e as getScrollBarWidth } from './
|
|
2
|
+
import { t as throwError, u as useNamespace } from './CcKUdl3e.mjs';
|
|
3
|
+
import { h as hasClass, b as addClass, g as getStyle, r as removeClass } from './Bl0WQiki.mjs';
|
|
4
|
+
import { e as getScrollBarWidth } from './oW98L-44.mjs';
|
|
5
5
|
|
|
6
6
|
const useLockscreen = (trigger, options = {}) => {
|
|
7
7
|
if (!isRef(trigger)) {
|
|
8
|
-
throwError(
|
|
8
|
+
throwError(
|
|
9
|
+
"[useLockscreen]",
|
|
10
|
+
"You need to pass a ref param to this function"
|
|
11
|
+
);
|
|
9
12
|
}
|
|
10
13
|
const ns = options.ns || useNamespace("popup");
|
|
11
14
|
const hiddenCls = computed(() => ns.bm("parent", "hidden"));
|
|
12
15
|
let scrollBarWidth = 0;
|
|
13
16
|
let withoutHiddenClass = false;
|
|
14
17
|
let bodyWidth = "0";
|
|
18
|
+
let cleaned = false;
|
|
15
19
|
const cleanup = () => {
|
|
20
|
+
if (cleaned)
|
|
21
|
+
return;
|
|
22
|
+
cleaned = true;
|
|
16
23
|
setTimeout(() => {
|
|
17
24
|
if (typeof document === "undefined")
|
|
18
25
|
return;
|
|
@@ -27,6 +34,7 @@ const useLockscreen = (trigger, options = {}) => {
|
|
|
27
34
|
cleanup();
|
|
28
35
|
return;
|
|
29
36
|
}
|
|
37
|
+
cleaned = false;
|
|
30
38
|
withoutHiddenClass = !hasClass(document.body, hiddenCls.value);
|
|
31
39
|
if (withoutHiddenClass) {
|
|
32
40
|
bodyWidth = document.body.style.width;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as isFunction } from './
|
|
1
|
+
import { j as isFunction } from './CcKUdl3e.mjs';
|
|
2
2
|
|
|
3
3
|
const REPEAT_INTERVAL = 100;
|
|
4
4
|
const REPEAT_DELAY = 600;
|
|
@@ -6,7 +6,9 @@ const SCOPE = "_RepeatClick";
|
|
|
6
6
|
const vRepeatClick = {
|
|
7
7
|
beforeMount(el, binding) {
|
|
8
8
|
const value = binding.value;
|
|
9
|
-
const { interval = REPEAT_INTERVAL, delay = REPEAT_DELAY } = isFunction(
|
|
9
|
+
const { interval = REPEAT_INTERVAL, delay = REPEAT_DELAY } = isFunction(
|
|
10
|
+
value
|
|
11
|
+
) ? {} : value;
|
|
10
12
|
let intervalId;
|
|
11
13
|
let delayId;
|
|
12
14
|
const handler = () => isFunction(value) ? value() : value.handler();
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { e as isObjectLike, f as baseGetTag, d as baseGet, u as castPath, t as toKey, a as arrayMap } from './DWcIzeMM.mjs';
|
|
2
|
+
import { g as getPrototype, c as copyObject, a as getAllKeysIn, b as baseClone } from './DfHTA5LW.mjs';
|
|
3
|
+
import { a as flatRest } from './BDyXj_90.mjs';
|
|
4
|
+
|
|
5
|
+
/** `Object#toString` result references. */
|
|
6
|
+
var objectTag = '[object Object]';
|
|
7
|
+
|
|
8
|
+
/** Used for built-in method references. */
|
|
9
|
+
var funcProto = Function.prototype,
|
|
10
|
+
objectProto$1 = Object.prototype;
|
|
11
|
+
|
|
12
|
+
/** Used to resolve the decompiled source of functions. */
|
|
13
|
+
var funcToString = funcProto.toString;
|
|
14
|
+
|
|
15
|
+
/** Used to check objects for own properties. */
|
|
16
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
17
|
+
|
|
18
|
+
/** Used to infer the `Object` constructor. */
|
|
19
|
+
var objectCtorString = funcToString.call(Object);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
23
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
24
|
+
*
|
|
25
|
+
* @static
|
|
26
|
+
* @memberOf _
|
|
27
|
+
* @since 0.8.0
|
|
28
|
+
* @category Lang
|
|
29
|
+
* @param {*} value The value to check.
|
|
30
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
31
|
+
* @example
|
|
32
|
+
*
|
|
33
|
+
* function Foo() {
|
|
34
|
+
* this.a = 1;
|
|
35
|
+
* }
|
|
36
|
+
*
|
|
37
|
+
* _.isPlainObject(new Foo);
|
|
38
|
+
* // => false
|
|
39
|
+
*
|
|
40
|
+
* _.isPlainObject([1, 2, 3]);
|
|
41
|
+
* // => false
|
|
42
|
+
*
|
|
43
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
44
|
+
* // => true
|
|
45
|
+
*
|
|
46
|
+
* _.isPlainObject(Object.create(null));
|
|
47
|
+
* // => true
|
|
48
|
+
*/
|
|
49
|
+
function isPlainObject(value) {
|
|
50
|
+
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
var proto = getPrototype(value);
|
|
54
|
+
if (proto === null) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
var Ctor = hasOwnProperty$1.call(proto, 'constructor') && proto.constructor;
|
|
58
|
+
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
59
|
+
funcToString.call(Ctor) == objectCtorString;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The base implementation of `_.slice` without an iteratee call guard.
|
|
64
|
+
*
|
|
65
|
+
* @private
|
|
66
|
+
* @param {Array} array The array to slice.
|
|
67
|
+
* @param {number} [start=0] The start position.
|
|
68
|
+
* @param {number} [end=array.length] The end position.
|
|
69
|
+
* @returns {Array} Returns the slice of `array`.
|
|
70
|
+
*/
|
|
71
|
+
function baseSlice(array, start, end) {
|
|
72
|
+
var index = -1,
|
|
73
|
+
length = array.length;
|
|
74
|
+
|
|
75
|
+
if (start < 0) {
|
|
76
|
+
start = -start > length ? 0 : (length + start);
|
|
77
|
+
}
|
|
78
|
+
end = end > length ? length : end;
|
|
79
|
+
if (end < 0) {
|
|
80
|
+
end += length;
|
|
81
|
+
}
|
|
82
|
+
length = start > end ? 0 : ((end - start) >>> 0);
|
|
83
|
+
start >>>= 0;
|
|
84
|
+
|
|
85
|
+
var result = Array(length);
|
|
86
|
+
while (++index < length) {
|
|
87
|
+
result[index] = array[index + start];
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Gets the last element of `array`.
|
|
94
|
+
*
|
|
95
|
+
* @static
|
|
96
|
+
* @memberOf _
|
|
97
|
+
* @since 0.1.0
|
|
98
|
+
* @category Array
|
|
99
|
+
* @param {Array} array The array to query.
|
|
100
|
+
* @returns {*} Returns the last element of `array`.
|
|
101
|
+
* @example
|
|
102
|
+
*
|
|
103
|
+
* _.last([1, 2, 3]);
|
|
104
|
+
* // => 3
|
|
105
|
+
*/
|
|
106
|
+
function last(array) {
|
|
107
|
+
var length = array == null ? 0 : array.length;
|
|
108
|
+
return length ? array[length - 1] : undefined;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Gets the parent value at `path` of `object`.
|
|
113
|
+
*
|
|
114
|
+
* @private
|
|
115
|
+
* @param {Object} object The object to query.
|
|
116
|
+
* @param {Array} path The path to get the parent value of.
|
|
117
|
+
* @returns {*} Returns the parent value.
|
|
118
|
+
*/
|
|
119
|
+
function parent(object, path) {
|
|
120
|
+
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** Used for built-in method references. */
|
|
124
|
+
var objectProto = Object.prototype;
|
|
125
|
+
|
|
126
|
+
/** Used to check objects for own properties. */
|
|
127
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The base implementation of `_.unset`.
|
|
131
|
+
*
|
|
132
|
+
* @private
|
|
133
|
+
* @param {Object} object The object to modify.
|
|
134
|
+
* @param {Array|string} path The property path to unset.
|
|
135
|
+
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
|
136
|
+
*/
|
|
137
|
+
function baseUnset(object, path) {
|
|
138
|
+
path = castPath(path, object);
|
|
139
|
+
|
|
140
|
+
// Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
141
|
+
var index = -1,
|
|
142
|
+
length = path.length;
|
|
143
|
+
|
|
144
|
+
if (!length) {
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
|
|
149
|
+
|
|
150
|
+
while (++index < length) {
|
|
151
|
+
var key = path[index];
|
|
152
|
+
|
|
153
|
+
// skip non-string keys (e.g., Symbols, numbers)
|
|
154
|
+
if (typeof key !== 'string') {
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Always block "__proto__" anywhere in the path if it's not expected
|
|
159
|
+
if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Block "constructor.prototype" chains
|
|
164
|
+
if (key === 'constructor' &&
|
|
165
|
+
(index + 1) < length &&
|
|
166
|
+
typeof path[index + 1] === 'string' &&
|
|
167
|
+
path[index + 1] === 'prototype') {
|
|
168
|
+
|
|
169
|
+
// Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
|
|
170
|
+
if (isRootPrimitive && index === 0) {
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
var obj = parent(object, path);
|
|
179
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
|
|
184
|
+
* objects.
|
|
185
|
+
*
|
|
186
|
+
* @private
|
|
187
|
+
* @param {*} value The value to inspect.
|
|
188
|
+
* @param {string} key The key of the property to inspect.
|
|
189
|
+
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
|
|
190
|
+
*/
|
|
191
|
+
function customOmitClone(value) {
|
|
192
|
+
return isPlainObject(value) ? undefined : value;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Used to compose bitmasks for cloning. */
|
|
196
|
+
var CLONE_DEEP_FLAG = 1,
|
|
197
|
+
CLONE_FLAT_FLAG = 2,
|
|
198
|
+
CLONE_SYMBOLS_FLAG = 4;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* The opposite of `_.pick`; this method creates an object composed of the
|
|
202
|
+
* own and inherited enumerable property paths of `object` that are not omitted.
|
|
203
|
+
*
|
|
204
|
+
* **Note:** This method is considerably slower than `_.pick`.
|
|
205
|
+
*
|
|
206
|
+
* @static
|
|
207
|
+
* @since 0.1.0
|
|
208
|
+
* @memberOf _
|
|
209
|
+
* @category Object
|
|
210
|
+
* @param {Object} object The source object.
|
|
211
|
+
* @param {...(string|string[])} [paths] The property paths to omit.
|
|
212
|
+
* @returns {Object} Returns the new object.
|
|
213
|
+
* @example
|
|
214
|
+
*
|
|
215
|
+
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
216
|
+
*
|
|
217
|
+
* _.omit(object, ['a', 'c']);
|
|
218
|
+
* // => { 'b': '2' }
|
|
219
|
+
*/
|
|
220
|
+
var omit = flatRest(function(object, paths) {
|
|
221
|
+
var result = {};
|
|
222
|
+
if (object == null) {
|
|
223
|
+
return result;
|
|
224
|
+
}
|
|
225
|
+
var isDeep = false;
|
|
226
|
+
paths = arrayMap(paths, function(path) {
|
|
227
|
+
path = castPath(path, object);
|
|
228
|
+
isDeep || (isDeep = path.length > 1);
|
|
229
|
+
return path;
|
|
230
|
+
});
|
|
231
|
+
copyObject(object, getAllKeysIn(object), result);
|
|
232
|
+
if (isDeep) {
|
|
233
|
+
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
|
234
|
+
}
|
|
235
|
+
var length = paths.length;
|
|
236
|
+
while (length--) {
|
|
237
|
+
baseUnset(result, paths[length]);
|
|
238
|
+
}
|
|
239
|
+
return result;
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
export { omit as o };
|