@wfrog/vc-ui 1.0.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 +95 -0
- package/dist/es/chunk/-EkpfdcW.mjs +1100 -0
- package/dist/es/chunk/8rLUmOVR.mjs +29 -0
- package/dist/es/chunk/B-rxnVJv.mjs +3 -0
- package/dist/es/chunk/BAGoDD49.mjs +36 -0
- package/dist/es/chunk/BAtns-Mc.mjs +96 -0
- package/dist/es/chunk/BJS5Pdfp.mjs +55 -0
- package/dist/es/chunk/BMzd-IS6.mjs +900 -0
- package/dist/es/chunk/BWcCXRRK.mjs +229 -0
- package/dist/es/chunk/BX-Ogf7p.mjs +3743 -0
- package/dist/es/chunk/B_tU9Nax.mjs +49 -0
- package/dist/es/chunk/BdDihk0t.mjs +3420 -0
- package/dist/es/chunk/C2LgraHx.mjs +489 -0
- package/dist/es/chunk/C5hWsUfD.mjs +64 -0
- package/dist/es/chunk/C7iSSBUr.mjs +303 -0
- package/dist/es/chunk/CD98REcR.mjs +666 -0
- package/dist/es/chunk/CEClY-_T.mjs +445 -0
- package/dist/es/chunk/CEm0brzD.mjs +35 -0
- package/dist/es/chunk/CMABHk8B.mjs +1942 -0
- package/dist/es/chunk/CS4VKsqy.mjs +19 -0
- package/dist/es/chunk/CVlj9F0I.mjs +291 -0
- package/dist/es/chunk/CZ4ggqDE.mjs +140 -0
- package/dist/es/chunk/CaTfZePA.mjs +533 -0
- package/dist/es/chunk/Ce9ApjrT.mjs +201 -0
- package/dist/es/chunk/ClZGuAIb.mjs +10 -0
- package/dist/es/chunk/Coex0GxM.mjs +450 -0
- package/dist/es/chunk/Ct6q2FXg.mjs +5 -0
- package/dist/es/chunk/CyxEcbcy.mjs +29 -0
- package/dist/es/chunk/D389hx_T.mjs +35 -0
- package/dist/es/chunk/D3DXeVfC.mjs +1171 -0
- package/dist/es/chunk/D3uV7vm-.mjs +45 -0
- package/dist/es/chunk/D5259bwd.mjs +50 -0
- package/dist/es/chunk/DMHNh_tw.mjs +49 -0
- package/dist/es/chunk/DVNTpOBR.mjs +4 -0
- package/dist/es/chunk/DZACQ9LT.mjs +95 -0
- package/dist/es/chunk/De_EXLIy.mjs +22 -0
- package/dist/es/chunk/Dh4jaUSg.mjs +89 -0
- package/dist/es/chunk/DhhdKtyu.mjs +439 -0
- package/dist/es/chunk/DqUIKX7f.mjs +2039 -0
- package/dist/es/chunk/Dqz1zvKN.mjs +59 -0
- package/dist/es/chunk/Dvi7RsXg.mjs +727 -0
- package/dist/es/chunk/DyDMGLoF.mjs +123 -0
- package/dist/es/chunk/E_WRn0OP.mjs +449 -0
- package/dist/es/chunk/Fo0dZYnz.mjs +128 -0
- package/dist/es/chunk/HSv8BL8o.mjs +72 -0
- package/dist/es/chunk/JCIyOUEY.mjs +105 -0
- package/dist/es/chunk/O-uhUKF4.mjs +43 -0
- package/dist/es/chunk/Spa-JKB4.mjs +1046 -0
- package/dist/es/chunk/VAdRxe-1.mjs +16 -0
- package/dist/es/chunk/VCrtRnxt.mjs +1477 -0
- package/dist/es/chunk/ViP2SEY4.mjs +211 -0
- package/dist/es/chunk/aibQ9WSZ.mjs +249 -0
- package/dist/es/chunk/nWBcrYxV.mjs +690 -0
- package/dist/es/chunk/pcqpp-6-.mjs +9 -0
- package/dist/es/chunk/qY9OvNHY.mjs +283 -0
- package/dist/es/chunk/su2Zrql0.mjs +53 -0
- package/dist/es/chunk/zfg5SOj1.mjs +138 -0
- package/dist/es/components/awesome-icon/awesome-icon.d.ts +6 -0
- package/dist/es/components/awesome-icon/awesome-icon.mjs +41 -0
- package/dist/es/components/awesome-icon/awesome-icon.vue.d.ts +5 -0
- package/dist/es/components/awesome-icon/index.d.ts +4 -0
- package/dist/es/components/awesome-icon/index.mjs +6 -0
- package/dist/es/components/backbottom/backbottom.d.ts +7 -0
- package/dist/es/components/backbottom/backbottom.mjs +172 -0
- package/dist/es/components/backbottom/backbottom.vue.d.ts +7 -0
- package/dist/es/components/backbottom/components/child.vue.d.ts +30 -0
- package/dist/es/components/backbottom/index.d.ts +4 -0
- package/dist/es/components/backbottom/index.mjs +6 -0
- package/dist/es/components/button/button.d.ts +18 -0
- package/dist/es/components/button/button.mjs +313 -0
- package/dist/es/components/button/button.vue.d.ts +33 -0
- package/dist/es/components/button/index.css +9 -0
- package/dist/es/components/button/index.d.ts +4 -0
- package/dist/es/components/button/index.mjs +6 -0
- package/dist/es/components/cdn-tag.vue.d.ts +5 -0
- package/dist/es/components/chat-container/chat-container.d.ts +9 -0
- package/dist/es/components/chat-container/chat-container.mjs +77 -0
- package/dist/es/components/chat-container/chat-container.vue.d.ts +29 -0
- package/dist/es/components/chat-container/index.css +9 -0
- package/dist/es/components/chat-container/index.d.ts +4 -0
- package/dist/es/components/chat-container/index.mjs +6 -0
- package/dist/es/components/choice/choice.d.ts +6 -0
- package/dist/es/components/choice/choice.mjs +53 -0
- package/dist/es/components/choice/choice.vue.d.ts +5 -0
- package/dist/es/components/choice/index.css +7 -0
- package/dist/es/components/choice/index.d.ts +4 -0
- package/dist/es/components/choice/index.mjs +6 -0
- package/dist/es/components/choice-boolean/choice-boolean.d.ts +5 -0
- package/dist/es/components/choice-boolean/choice-boolean.mjs +32 -0
- package/dist/es/components/choice-boolean/choice-boolean.vue.d.ts +10 -0
- package/dist/es/components/choice-boolean/index.d.ts +4 -0
- package/dist/es/components/choice-boolean/index.mjs +6 -0
- package/dist/es/components/config-provider/config-provider.d.ts +16 -0
- package/dist/es/components/config-provider/config-provider.mjs +29 -0
- package/dist/es/components/config-provider/config-provider.vue.d.ts +18 -0
- package/dist/es/components/config-provider/config-provider2.mjs +6 -0
- package/dist/es/components/config-provider/index.d.ts +4 -0
- package/dist/es/components/config-provider/index.mjs +6 -0
- package/dist/es/components/cropper/cropper.d.ts +12 -0
- package/dist/es/components/cropper/cropper.mjs +333 -0
- package/dist/es/components/cropper/cropper.vue.d.ts +32 -0
- package/dist/es/components/cropper/index.css +4 -0
- package/dist/es/components/cropper/index.d.ts +4 -0
- package/dist/es/components/cropper/index.mjs +6 -0
- package/dist/es/components/currency/currency.d.ts +21 -0
- package/dist/es/components/currency/currency.mjs +185 -0
- package/dist/es/components/currency/currency.vue.d.ts +14 -0
- package/dist/es/components/currency/index.css +8 -0
- package/dist/es/components/currency/index.d.ts +4 -0
- package/dist/es/components/currency/index.mjs +6 -0
- package/dist/es/components/daterange-picker/daterange-picker.d.ts +6 -0
- package/dist/es/components/daterange-picker/daterange-picker.mjs +5550 -0
- package/dist/es/components/daterange-picker/daterange-picker.vue.d.ts +13 -0
- package/dist/es/components/daterange-picker/index.d.ts +4 -0
- package/dist/es/components/daterange-picker/index.mjs +6 -0
- package/dist/es/components/dialog/dialog.d.ts +13 -0
- package/dist/es/components/dialog/dialog.mjs +537 -0
- package/dist/es/components/dialog/dialog.vue.d.ts +38 -0
- package/dist/es/components/dialog/index.css +87 -0
- package/dist/es/components/dialog/index.d.ts +4 -0
- package/dist/es/components/dialog/index.mjs +6 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.d.ts +33 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.mjs +412 -0
- package/dist/es/components/dialog-camera-upload/dialog-camera-upload.vue.d.ts +23 -0
- package/dist/es/components/dialog-camera-upload/index.css +66 -0
- package/dist/es/components/dialog-camera-upload/index.d.ts +4 -0
- package/dist/es/components/dialog-camera-upload/index.mjs +6 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.d.ts +9 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.mjs +183 -0
- package/dist/es/components/dialog-map-point/dialog-map-point.vue.d.ts +22 -0
- package/dist/es/components/dialog-map-point/index.css +11 -0
- package/dist/es/components/dialog-map-point/index.d.ts +4 -0
- package/dist/es/components/dialog-map-point/index.mjs +6 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.d.ts +16 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.mjs +1391 -0
- package/dist/es/components/dialog-upload-images/dialog-upload-images.vue.d.ts +19 -0
- package/dist/es/components/dialog-upload-images/index.css +62 -0
- package/dist/es/components/dialog-upload-images/index.d.ts +4 -0
- package/dist/es/components/dialog-upload-images/index.mjs +6 -0
- package/dist/es/components/document.vue.d.ts +14 -0
- package/dist/es/components/drawer/drawer.d.ts +7 -0
- package/dist/es/components/drawer/drawer.mjs +412 -0
- package/dist/es/components/drawer/drawer.vue.d.ts +31 -0
- package/dist/es/components/drawer/index.css +56 -0
- package/dist/es/components/drawer/index.d.ts +4 -0
- package/dist/es/components/drawer/index.mjs +6 -0
- package/dist/es/components/easy-pagination/easy-pagination.d.ts +8 -0
- package/dist/es/components/easy-pagination/easy-pagination.mjs +74 -0
- package/dist/es/components/easy-pagination/easy-pagination.vue.d.ts +19 -0
- package/dist/es/components/easy-pagination/index.css +10 -0
- package/dist/es/components/easy-pagination/index.d.ts +4 -0
- package/dist/es/components/easy-pagination/index.mjs +6 -0
- package/dist/es/components/el-icon/el-icon.d.ts +6 -0
- package/dist/es/components/el-icon/el-icon.mjs +46 -0
- package/dist/es/components/el-icon/el-icon.vue.d.ts +6 -0
- package/dist/es/components/el-icon/index.css +7 -0
- package/dist/es/components/el-icon/index.d.ts +4 -0
- package/dist/es/components/el-icon/index.mjs +6 -0
- package/dist/es/components/example-wrapper.vue.d.ts +19 -0
- package/dist/es/components/flag/flag.mjs +44 -0
- package/dist/es/components/flag/flag.vue.d.ts +5 -0
- package/dist/es/components/flag/flags.d.ts +8 -0
- package/dist/es/components/flag/index.d.ts +4 -0
- package/dist/es/components/flag/index.mjs +6 -0
- package/dist/es/components/icon/icon.d.ts +6 -0
- package/dist/es/components/icon/icon.mjs +54 -0
- package/dist/es/components/icon/icon.vue.d.ts +3 -0
- package/dist/es/components/icon/icon2.mjs +27 -0
- package/dist/es/components/icon/index.css +9 -0
- package/dist/es/components/icon/index.d.ts +4 -0
- package/dist/es/components/icon/index.mjs +6 -0
- package/dist/es/components/image/image.d.ts +16 -0
- package/dist/es/components/image/image.mjs +167 -0
- package/dist/es/components/image/image.vue.d.ts +206 -0
- package/dist/es/components/image/index.css +20 -0
- package/dist/es/components/image/index.d.ts +4 -0
- package/dist/es/components/image/index.mjs +6 -0
- package/dist/es/components/input/index.css +9 -0
- package/dist/es/components/input/index.d.ts +4 -0
- package/dist/es/components/input/index.mjs +6 -0
- package/dist/es/components/input/input.d.ts +4 -0
- package/dist/es/components/input/input.mjs +85 -0
- package/dist/es/components/input/input.vue.d.ts +1232 -0
- package/dist/es/components/input-number/index.css +24 -0
- package/dist/es/components/input-number/index.d.ts +4 -0
- package/dist/es/components/input-number/index.mjs +6 -0
- package/dist/es/components/input-number/input-number.d.ts +8 -0
- package/dist/es/components/input-number/input-number.mjs +137 -0
- package/dist/es/components/input-number/input-number.vue.d.ts +35 -0
- package/dist/es/components/pca-picker/components/c.vue.d.ts +123 -0
- package/dist/es/components/pca-picker/components/elevator-item.vue.d.ts +7 -0
- package/dist/es/components/pca-picker/components/filter.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/history.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/hot.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/p.vue.d.ts +2 -0
- package/dist/es/components/pca-picker/components/pca.vue.d.ts +9 -0
- package/dist/es/components/pca-picker/index.css +107 -0
- package/dist/es/components/pca-picker/index.d.ts +4 -0
- package/dist/es/components/pca-picker/index.mjs +6 -0
- package/dist/es/components/pca-picker/pca-picker.d.ts +78 -0
- package/dist/es/components/pca-picker/pca-picker.mjs +1667 -0
- package/dist/es/components/pca-picker/pca-picker.vue.d.ts +583 -0
- package/dist/es/components/qr-code/index.d.ts +4 -0
- package/dist/es/components/qr-code/index.mjs +6 -0
- package/dist/es/components/qr-code/qr-code.d.ts +9 -0
- package/dist/es/components/qr-code/qr-code.mjs +69 -0
- package/dist/es/components/qr-code/qr-code.vue.d.ts +13 -0
- package/dist/es/components/screenfull/index.css +14 -0
- package/dist/es/components/screenfull/index.d.ts +4 -0
- package/dist/es/components/screenfull/index.mjs +6 -0
- package/dist/es/components/screenfull/screenfull.d.ts +4 -0
- package/dist/es/components/screenfull/screenfull.mjs +91 -0
- package/dist/es/components/screenfull/screenfull.vue.d.ts +20 -0
- package/dist/es/components/select/index.css +9 -0
- package/dist/es/components/select/index.d.ts +4 -0
- package/dist/es/components/select/index.mjs +6 -0
- package/dist/es/components/select/select.d.ts +6 -0
- package/dist/es/components/select/select.mjs +63 -0
- package/dist/es/components/select/select.vue.d.ts +6 -0
- package/dist/es/components/single-player/index.css +45 -0
- package/dist/es/components/single-player/index.d.ts +4 -0
- package/dist/es/components/single-player/index.mjs +6 -0
- package/dist/es/components/single-player/single-player.d.ts +4 -0
- package/dist/es/components/single-player/single-player.mjs +1172 -0
- package/dist/es/components/single-player/single-player.vue.d.ts +13 -0
- package/dist/es/components/svg-icon/index.css +9 -0
- package/dist/es/components/svg-icon/index.d.ts +4 -0
- package/dist/es/components/svg-icon/index.mjs +6 -0
- package/dist/es/components/svg-icon/svg-icon.d.ts +5 -0
- package/dist/es/components/svg-icon/svg-icon.mjs +46 -0
- package/dist/es/components/svg-icon/svg-icon.vue.d.ts +18 -0
- package/dist/es/components/switch/index.css +15 -0
- package/dist/es/components/switch/index.d.ts +4 -0
- package/dist/es/components/switch/index.mjs +6 -0
- package/dist/es/components/switch/switch.d.ts +9 -0
- package/dist/es/components/switch/switch.mjs +82 -0
- package/dist/es/components/switch/switch.vue.d.ts +14 -0
- package/dist/es/components/sync-scroll-container/index.css +82 -0
- package/dist/es/components/sync-scroll-container/index.d.ts +4 -0
- package/dist/es/components/sync-scroll-container/index.mjs +6 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.d.ts +6 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.mjs +157 -0
- package/dist/es/components/sync-scroll-container/sync-scroll-container.vue.d.ts +36 -0
- package/dist/es/components/tags/index.css +17 -0
- package/dist/es/components/tags/index.d.ts +4 -0
- package/dist/es/components/tags/index.mjs +6 -0
- package/dist/es/components/tags/tags.d.ts +9 -0
- package/dist/es/components/tags/tags.mjs +296 -0
- package/dist/es/components/tags/tags.vue.d.ts +20 -0
- package/dist/es/components/text-ellipsis/index.css +15 -0
- package/dist/es/components/text-ellipsis/index.d.ts +4 -0
- package/dist/es/components/text-ellipsis/index.mjs +6 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.d.ts +12 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.mjs +137 -0
- package/dist/es/components/text-ellipsis/text-ellipsis.vue.d.ts +41 -0
- package/dist/es/components/thousand-input/index.css +4 -0
- package/dist/es/components/thousand-input/index.d.ts +4 -0
- package/dist/es/components/thousand-input/index.mjs +6 -0
- package/dist/es/components/thousand-input/thousand-input.d.ts +11 -0
- package/dist/es/components/thousand-input/thousand-input.mjs +159 -0
- package/dist/es/components/thousand-input/thousand-input.vue.d.ts +2558 -0
- package/dist/es/components/tinymce/config.d.ts +25 -0
- package/dist/es/components/tinymce/index.css +9 -0
- package/dist/es/components/tinymce/index.d.ts +4 -0
- package/dist/es/components/tinymce/index.mjs +6 -0
- package/dist/es/components/tinymce/tinymce.d.ts +9 -0
- package/dist/es/components/tinymce/tinymce.mjs +176 -0
- package/dist/es/components/tinymce/tinymce.vue.d.ts +20 -0
- package/dist/es/components/tree-picker/components/popover-cascader.d.ts +8 -0
- package/dist/es/components/tree-picker/components/popover-cascader.vue.d.ts +1361 -0
- package/dist/es/components/tree-picker/docs/data.d.ts +2 -0
- package/dist/es/components/tree-picker/index.css +41 -0
- package/dist/es/components/tree-picker/index.d.ts +4 -0
- package/dist/es/components/tree-picker/index.mjs +6 -0
- package/dist/es/components/tree-picker/popover-cascader.css +23 -0
- package/dist/es/components/tree-picker/tree-picker.d.ts +14 -0
- package/dist/es/components/tree-picker/tree-picker.mjs +173 -0
- package/dist/es/components/tree-picker/tree-picker.vue.d.ts +575 -0
- package/dist/es/components/upload-file/index.css +30 -0
- package/dist/es/components/upload-file/index.d.ts +4 -0
- package/dist/es/components/upload-file/index.mjs +6 -0
- package/dist/es/components/upload-file/upload-file.d.ts +39 -0
- package/dist/es/components/upload-file/upload-file.mjs +202 -0
- package/dist/es/components/upload-file/upload-file.vue.d.ts +30 -0
- package/dist/es/directives/cleave/index.d.ts +3 -0
- package/dist/es/directives/focus/index.d.ts +4 -0
- package/dist/es/directives/index.d.ts +3 -0
- package/dist/es/directives/thousand/index.d.ts +3 -0
- package/dist/es/index.d.ts +42 -0
- package/dist/es/index.mjs +122 -0
- package/dist/es/use/useSmallScreen/index.d.ts +4 -0
- package/dist/es/use/useSmallScreen/index.mjs +10 -0
- package/dist/es/use/useStore/index.d.ts +3 -0
- package/dist/es/use/useStore/index.mjs +22 -0
- package/dist/es/utils/index.d.ts +6 -0
- package/dist/es/utils/resolver.d.ts +3 -0
- package/dist/es/utils/resolver.mjs +24 -0
- package/dist/es/utils/typescript.d.ts +6 -0
- package/dist/global.d.ts +42 -0
- package/dist/index.css +869 -0
- package/package.json +58 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { isRef, computed, watch, onScopeDispose } from 'vue';
|
|
2
|
+
import { t as throwError, u as useNamespace } from './E_WRn0OP.mjs';
|
|
3
|
+
import { h as hasClass, b as addClass, g as getStyle, r as removeClass } from './D5259bwd.mjs';
|
|
4
|
+
import { e as getScrollBarWidth } from './DyDMGLoF.mjs';
|
|
5
|
+
|
|
6
|
+
const useLockscreen = (trigger, options = {}) => {
|
|
7
|
+
if (!isRef(trigger)) {
|
|
8
|
+
throwError("[useLockscreen]", "You need to pass a ref param to this function");
|
|
9
|
+
}
|
|
10
|
+
const ns = options.ns || useNamespace("popup");
|
|
11
|
+
const hiddenCls = computed(() => ns.bm("parent", "hidden"));
|
|
12
|
+
let scrollBarWidth = 0;
|
|
13
|
+
let withoutHiddenClass = false;
|
|
14
|
+
let bodyWidth = "0";
|
|
15
|
+
const cleanup = () => {
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
if (typeof document === "undefined")
|
|
18
|
+
return;
|
|
19
|
+
if (withoutHiddenClass && document) {
|
|
20
|
+
document.body.style.width = bodyWidth;
|
|
21
|
+
removeClass(document.body, hiddenCls.value);
|
|
22
|
+
}
|
|
23
|
+
}, 200);
|
|
24
|
+
};
|
|
25
|
+
watch(trigger, (val) => {
|
|
26
|
+
if (!val) {
|
|
27
|
+
cleanup();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
withoutHiddenClass = !hasClass(document.body, hiddenCls.value);
|
|
31
|
+
if (withoutHiddenClass) {
|
|
32
|
+
bodyWidth = document.body.style.width;
|
|
33
|
+
addClass(document.body, hiddenCls.value);
|
|
34
|
+
}
|
|
35
|
+
scrollBarWidth = getScrollBarWidth(ns.namespace.value);
|
|
36
|
+
const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
|
|
37
|
+
const bodyOverflowY = getStyle(document.body, "overflowY");
|
|
38
|
+
if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && withoutHiddenClass) {
|
|
39
|
+
document.body.style.width = `calc(100% - ${scrollBarWidth}px)`;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
onScopeDispose(() => cleanup());
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { useLockscreen as u };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { f as isNumber, I as isStringNumber, h as isString, e as debugWarn, o as isClient, J as camelize } from './E_WRn0OP.mjs';
|
|
2
|
+
|
|
3
|
+
const SCOPE = "utils/dom/style";
|
|
4
|
+
const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
|
|
5
|
+
const hasClass = (el, cls) => {
|
|
6
|
+
if (!el || !cls)
|
|
7
|
+
return false;
|
|
8
|
+
if (cls.includes(" "))
|
|
9
|
+
throw new Error("className should not contain space.");
|
|
10
|
+
return el.classList.contains(cls);
|
|
11
|
+
};
|
|
12
|
+
const addClass = (el, cls) => {
|
|
13
|
+
if (!el || !cls.trim())
|
|
14
|
+
return;
|
|
15
|
+
el.classList.add(...classNameToArray(cls));
|
|
16
|
+
};
|
|
17
|
+
const removeClass = (el, cls) => {
|
|
18
|
+
if (!el || !cls.trim())
|
|
19
|
+
return;
|
|
20
|
+
el.classList.remove(...classNameToArray(cls));
|
|
21
|
+
};
|
|
22
|
+
const getStyle = (element, styleName) => {
|
|
23
|
+
var _a;
|
|
24
|
+
if (!isClient || !element || !styleName)
|
|
25
|
+
return "";
|
|
26
|
+
let key = camelize(styleName);
|
|
27
|
+
if (key === "float")
|
|
28
|
+
key = "cssFloat";
|
|
29
|
+
try {
|
|
30
|
+
const style = element.style[key];
|
|
31
|
+
if (style)
|
|
32
|
+
return style;
|
|
33
|
+
const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, "");
|
|
34
|
+
return computed ? computed[key] : "";
|
|
35
|
+
} catch (e) {
|
|
36
|
+
return element.style[key];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
function addUnit(value, defaultUnit = "px") {
|
|
40
|
+
if (!value && value !== 0)
|
|
41
|
+
return "";
|
|
42
|
+
if (isNumber(value) || isStringNumber(value)) {
|
|
43
|
+
return `${value}${defaultUnit}`;
|
|
44
|
+
} else if (isString(value)) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
debugWarn(SCOPE, "binding value must be a string or number");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { addUnit as a, addClass as b, getStyle as g, hasClass as h, removeClass as r };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, mergeProps, unref, renderSlot } from 'vue';
|
|
2
|
+
import { c as buildProps, d as definePropType, u as useNamespace } from './E_WRn0OP.mjs';
|
|
3
|
+
import { _ as _export_sfc, w as withInstall } from './D389hx_T.mjs';
|
|
4
|
+
import { a as addUnit } from './D5259bwd.mjs';
|
|
5
|
+
|
|
6
|
+
const iconProps = buildProps({
|
|
7
|
+
size: {
|
|
8
|
+
type: definePropType([Number, String])
|
|
9
|
+
},
|
|
10
|
+
color: {
|
|
11
|
+
type: String
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const __default__ = defineComponent({
|
|
16
|
+
name: "ElIcon",
|
|
17
|
+
inheritAttrs: false
|
|
18
|
+
});
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
...__default__,
|
|
21
|
+
props: iconProps,
|
|
22
|
+
setup(__props) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const ns = useNamespace("icon");
|
|
25
|
+
const style = computed(() => {
|
|
26
|
+
const { size, color } = props;
|
|
27
|
+
const fontSize = addUnit(size);
|
|
28
|
+
if (!fontSize && !color)
|
|
29
|
+
return {};
|
|
30
|
+
return {
|
|
31
|
+
fontSize,
|
|
32
|
+
"--color": color
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return openBlock(), createElementBlock("i", mergeProps({
|
|
37
|
+
class: unref(ns).b(),
|
|
38
|
+
style: unref(style)
|
|
39
|
+
}, _ctx.$attrs), [
|
|
40
|
+
renderSlot(_ctx.$slots, "default")
|
|
41
|
+
], 16);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
var Icon = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "icon.vue"]]);
|
|
46
|
+
|
|
47
|
+
const ElIcon = withInstall(Icon);
|
|
48
|
+
|
|
49
|
+
export { ElIcon as E };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { inject, ref, getCurrentInstance, computed, onMounted, watch, toRef, onUnmounted, unref } from 'vue';
|
|
2
|
+
import { b as formContextKey, f as formItemContextKey, u as useId } from './8rLUmOVR.mjs';
|
|
3
|
+
import { a as useGlobalSize } from './CS4VKsqy.mjs';
|
|
4
|
+
|
|
5
|
+
const useFormItem = () => {
|
|
6
|
+
const form = inject(formContextKey, void 0);
|
|
7
|
+
const formItem = inject(formItemContextKey, void 0);
|
|
8
|
+
return {
|
|
9
|
+
form,
|
|
10
|
+
formItem
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
const useFormItemInputId = (props, {
|
|
14
|
+
formItemContext,
|
|
15
|
+
disableIdGeneration,
|
|
16
|
+
disableIdManagement
|
|
17
|
+
}) => {
|
|
18
|
+
if (!disableIdGeneration) {
|
|
19
|
+
disableIdGeneration = ref(false);
|
|
20
|
+
}
|
|
21
|
+
if (!disableIdManagement) {
|
|
22
|
+
disableIdManagement = ref(false);
|
|
23
|
+
}
|
|
24
|
+
const instance = getCurrentInstance();
|
|
25
|
+
const inLabel = () => {
|
|
26
|
+
let parent = instance == null ? void 0 : instance.parent;
|
|
27
|
+
while (parent) {
|
|
28
|
+
if (parent.type.name === "ElFormItem") {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
if (parent.type.name === "ElLabelWrap") {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
parent = parent.parent;
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
};
|
|
38
|
+
const inputId = ref();
|
|
39
|
+
let idUnwatch = void 0;
|
|
40
|
+
const isLabeledByFormItem = computed(() => {
|
|
41
|
+
var _a;
|
|
42
|
+
return !!(!(props.label || props.ariaLabel) && formItemContext && formItemContext.inputIds && ((_a = formItemContext.inputIds) == null ? void 0 : _a.length) <= 1);
|
|
43
|
+
});
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
idUnwatch = watch([toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration2]) => {
|
|
46
|
+
const newId = id != null ? id : !disableIdGeneration2 ? useId().value : void 0;
|
|
47
|
+
if (newId !== inputId.value) {
|
|
48
|
+
if ((formItemContext == null ? void 0 : formItemContext.removeInputId) && !inLabel()) {
|
|
49
|
+
inputId.value && formItemContext.removeInputId(inputId.value);
|
|
50
|
+
if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) {
|
|
51
|
+
formItemContext.addInputId(newId);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
inputId.value = newId;
|
|
55
|
+
}
|
|
56
|
+
}, { immediate: true });
|
|
57
|
+
});
|
|
58
|
+
onUnmounted(() => {
|
|
59
|
+
idUnwatch && idUnwatch();
|
|
60
|
+
if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
|
|
61
|
+
inputId.value && formItemContext.removeInputId(inputId.value);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
isLabeledByFormItem,
|
|
66
|
+
inputId
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const useProp = (name) => {
|
|
71
|
+
const vm = getCurrentInstance();
|
|
72
|
+
return computed(() => {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
return (_b = (_a = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a.$props) == null ? void 0 : _b[name];
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const useFormSize = (fallback, ignore = {}) => {
|
|
79
|
+
const emptyRef = ref(void 0);
|
|
80
|
+
const size = ignore.prop ? emptyRef : useProp("size");
|
|
81
|
+
const globalConfig = ignore.global ? emptyRef : useGlobalSize();
|
|
82
|
+
const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
|
|
83
|
+
const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
|
|
84
|
+
return computed(() => size.value || unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig.value || "");
|
|
85
|
+
};
|
|
86
|
+
const useFormDisabled = (fallback) => {
|
|
87
|
+
const disabled = useProp("disabled");
|
|
88
|
+
const form = inject(formContextKey, void 0);
|
|
89
|
+
return computed(() => {
|
|
90
|
+
var _a, _b, _c;
|
|
91
|
+
return (_c = (_b = (_a = disabled.value) != null ? _a : unref(fallback)) != null ? _b : form == null ? void 0 : form.disabled) != null ? _c : false;
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export { useFormItemInputId as a, useFormDisabled as b, useFormSize as c, useFormItem as u };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { computed, getCurrentInstance } from 'vue';
|
|
2
|
+
import { e as debugWarn, n as fromPairs } from './E_WRn0OP.mjs';
|
|
3
|
+
|
|
4
|
+
const DEFAULT_EXCLUDE_KEYS = ["class", "style"];
|
|
5
|
+
const LISTENER_PREFIX = /^on[A-Z]/;
|
|
6
|
+
const useAttrs = (params = {}) => {
|
|
7
|
+
const { excludeListeners = false, excludeKeys } = params;
|
|
8
|
+
const allExcludeKeys = computed(() => {
|
|
9
|
+
return ((excludeKeys == null ? void 0 : excludeKeys.value) || []).concat(DEFAULT_EXCLUDE_KEYS);
|
|
10
|
+
});
|
|
11
|
+
const instance = getCurrentInstance();
|
|
12
|
+
if (!instance) {
|
|
13
|
+
debugWarn("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function");
|
|
14
|
+
return computed(() => ({}));
|
|
15
|
+
}
|
|
16
|
+
return computed(() => {
|
|
17
|
+
var _a;
|
|
18
|
+
return fromPairs(Object.entries((_a = instance.proxy) == null ? void 0 : _a.$attrs).filter(([key]) => !allExcludeKeys.value.includes(key) && !(excludeListeners && LISTENER_PREFIX.test(key))));
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { useAttrs as u };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { getCurrentInstance, inject, ref, computed, unref, provide } from 'vue';
|
|
2
|
+
import { u as useNamespace, E as defaultNamespace, e as debugWarn, K as namespaceContextKey } from './E_WRn0OP.mjs';
|
|
3
|
+
import { u as useZIndex, d as defaultInitialZIndex, z as zIndexContextKey } from './CEm0brzD.mjs';
|
|
4
|
+
import { u as useLocale, l as localeContextKey } from './aibQ9WSZ.mjs';
|
|
5
|
+
import { S as SIZE_INJECTION_KEY } from './CS4VKsqy.mjs';
|
|
6
|
+
import { e as emptyValuesContextKey } from './C5hWsUfD.mjs';
|
|
7
|
+
import { k as keysOf } from './DVNTpOBR.mjs';
|
|
8
|
+
|
|
9
|
+
const configProviderContextKey = Symbol();
|
|
10
|
+
|
|
11
|
+
const globalConfig = ref();
|
|
12
|
+
function useGlobalConfig(key, defaultValue = void 0) {
|
|
13
|
+
const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
|
|
14
|
+
if (key) {
|
|
15
|
+
return computed(() => {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
return (_b = (_a = config.value) == null ? void 0 : _a[key]) != null ? _b : defaultValue;
|
|
18
|
+
});
|
|
19
|
+
} else {
|
|
20
|
+
return config;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function useGlobalComponentSettings(block, sizeFallback) {
|
|
24
|
+
const config = useGlobalConfig();
|
|
25
|
+
const ns = useNamespace(block, computed(() => {
|
|
26
|
+
var _a;
|
|
27
|
+
return ((_a = config.value) == null ? void 0 : _a.namespace) || defaultNamespace;
|
|
28
|
+
}));
|
|
29
|
+
const locale = useLocale(computed(() => {
|
|
30
|
+
var _a;
|
|
31
|
+
return (_a = config.value) == null ? void 0 : _a.locale;
|
|
32
|
+
}));
|
|
33
|
+
const zIndex = useZIndex(computed(() => {
|
|
34
|
+
var _a;
|
|
35
|
+
return ((_a = config.value) == null ? void 0 : _a.zIndex) || defaultInitialZIndex;
|
|
36
|
+
}));
|
|
37
|
+
const size = computed(() => {
|
|
38
|
+
var _a;
|
|
39
|
+
return unref(sizeFallback) || ((_a = config.value) == null ? void 0 : _a.size) || "";
|
|
40
|
+
});
|
|
41
|
+
provideGlobalConfig(computed(() => unref(config) || {}));
|
|
42
|
+
return {
|
|
43
|
+
ns,
|
|
44
|
+
locale,
|
|
45
|
+
zIndex,
|
|
46
|
+
size
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const provideGlobalConfig = (config, app, global = false) => {
|
|
50
|
+
var _a;
|
|
51
|
+
const inSetup = !!getCurrentInstance();
|
|
52
|
+
const oldConfig = inSetup ? useGlobalConfig() : void 0;
|
|
53
|
+
const provideFn = (_a = void 0 ) != null ? _a : inSetup ? provide : void 0;
|
|
54
|
+
if (!provideFn) {
|
|
55
|
+
debugWarn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const context = computed(() => {
|
|
59
|
+
const cfg = unref(config);
|
|
60
|
+
if (!(oldConfig == null ? void 0 : oldConfig.value))
|
|
61
|
+
return cfg;
|
|
62
|
+
return mergeConfig(oldConfig.value, cfg);
|
|
63
|
+
});
|
|
64
|
+
provideFn(configProviderContextKey, context);
|
|
65
|
+
provideFn(localeContextKey, computed(() => context.value.locale));
|
|
66
|
+
provideFn(namespaceContextKey, computed(() => context.value.namespace));
|
|
67
|
+
provideFn(zIndexContextKey, computed(() => context.value.zIndex));
|
|
68
|
+
provideFn(SIZE_INJECTION_KEY, {
|
|
69
|
+
size: computed(() => context.value.size || "")
|
|
70
|
+
});
|
|
71
|
+
provideFn(emptyValuesContextKey, computed(() => ({
|
|
72
|
+
emptyValues: context.value.emptyValues,
|
|
73
|
+
valueOnClear: context.value.valueOnClear
|
|
74
|
+
})));
|
|
75
|
+
if (global || !globalConfig.value) {
|
|
76
|
+
globalConfig.value = context.value;
|
|
77
|
+
}
|
|
78
|
+
return context;
|
|
79
|
+
};
|
|
80
|
+
const mergeConfig = (a, b) => {
|
|
81
|
+
const keys = [.../* @__PURE__ */ new Set([...keysOf(a), ...keysOf(b)])];
|
|
82
|
+
const obj = {};
|
|
83
|
+
for (const key of keys) {
|
|
84
|
+
obj[key] = b[key] !== void 0 ? b[key] : a[key];
|
|
85
|
+
}
|
|
86
|
+
return obj;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export { useGlobalComponentSettings as a, useGlobalConfig as u };
|