@cldemo/ui-kit 1.1.3 → 1.1.5
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/buildLibs/all/index.cjs +8 -8
- package/buildLibs/all/index.css +1 -1
- package/buildLibs/all/index.js +12158 -12048
- package/buildLibs/common/globalConfig.cjs +1 -1
- package/buildLibs/common/globalConfig.js +29 -15
- package/buildLibs/common/i18n/en.cjs +1 -1
- package/buildLibs/common/i18n/en.js +3 -1
- package/buildLibs/common/i18n/zh_CN.cjs +1 -1
- package/buildLibs/common/i18n/zh_CN.js +3 -1
- package/buildLibs/common/index.cjs +1 -1
- package/buildLibs/common/index.js +26 -24
- package/buildLibs/mobile/index.cjs +5 -5
- package/buildLibs/mobile/index.css +1 -1
- package/buildLibs/mobile/index.js +5903 -5852
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-4TeN_Yn-.js +310 -0
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-DKMVQrVU.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-B-T2hoSW.js} +66 -60
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BOcOO9-n.js → Index.vue_vue_type_script_setup_true_lang-BBjneEVa.js} +386 -375
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-gwA_FyLx.js → Index.vue_vue_type_script_setup_true_lang-BIH4-mgs.js} +1 -1
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-CgdGs-U2.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-BVGrVxFC.js} +68 -60
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-B2Ste7lk.js → Index.vue_vue_type_script_setup_true_lang-Bi8DPjJz.js} +1 -1
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-RRUPY9bd.js → Index.vue_vue_type_script_setup_true_lang-CMfPrFu4.js} +154 -146
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CKoVf-v1.js → Index.vue_vue_type_script_setup_true_lang-D4je4ahg.js} +3 -3
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-XiSSYx4X.js → Index.vue_vue_type_script_setup_true_lang-D7YeNBdk.js} +120 -113
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC1L_0IK.js +2536 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CRKrLCa6.js → Index.vue_vue_type_script_setup_true_lang-DFeBj9IN.js} +209 -201
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-D0g1xGPL.js → Index.vue_vue_type_script_setup_true_lang-DM74NqhN.js} +8 -8
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DPcqZPoO.js +1533 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Bj1vSCM8.js → Index.vue_vue_type_script_setup_true_lang-DPxMsZuy.js} +2 -2
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-C0DgaU5I.js → Index.vue_vue_type_script_setup_true_lang-D_eRjg8p.js} +54 -48
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-G8UXhRvM.js → Index.vue_vue_type_script_setup_true_lang-Df0iiX1E.js} +1 -1
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-DqZBB8fM.js → Index.vue_vue_type_script_setup_true_lang-DjcrAnYd.js} +2 -2
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-Cyi6TkkK.js → Index.vue_vue_type_script_setup_true_lang-UqloO5cR.js} +1 -1
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-6Rsz2dYw.js → Index.vue_vue_type_script_setup_true_lang-ljMopEep.js} +1 -1
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-CIA-Kc0M.js → Index.vue_vue_type_script_setup_true_lang-vizZ7Mti.js} +6 -5
- package/buildLibs/{utils/Shared/Index.vue_vue_type_script_setup_true_lang-Cg_benGj.js → modules/shared/Index.vue_vue_type_script_setup_true_lang-wS3dtCDx.js} +63 -55
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-x7Q4MNNE.js +254 -0
- package/buildLibs/modules/shared/{Index.vue_vue_type_script_setup_true_lang-BbD4hLPT.js → Index.vue_vue_type_script_setup_true_lang-xpySjof2.js} +2 -2
- package/buildLibs/modules/shared/{List.vue_vue_type_script_setup_true_lang-Chy0eAps.js → List.vue_vue_type_script_setup_true_lang-F-n2xPeF.js} +1 -1
- package/buildLibs/modules/shared/{One.vue_vue_type_script_setup_true_lang-BR8b8AgK.js → One.vue_vue_type_script_setup_true_lang-BPQ-99F1.js} +1 -1
- package/buildLibs/modules/shared/{One.vue_vue_type_script_setup_true_lang-bPEj13DH.js → One.vue_vue_type_script_setup_true_lang-CnkGjequ.js} +1 -1
- package/buildLibs/modules/shared/{Validate.vue_vue_type_script_setup_true_lang-3s_3ut9M.js → Validate.vue_vue_type_script_setup_true_lang-D-BFbuqJ.js} +103 -93
- package/buildLibs/modules/ui-kit.css +1 -1
- package/buildLibs/styles/Common/IconFont-base.css +3 -3
- package/buildLibs/styles/Common/Input-base.css +10 -0
- package/buildLibs/styles/Element/ClInputTextarea.css +2 -2
- package/buildLibs/styles/Web/ClDatetime.css +2 -1
- package/buildLibs/styles/Web/ClInputTag.css +4 -3
- package/buildLibs/styles/Web/ClPaginate.css +2 -1
- package/buildLibs/styles/Web/ClSelect.css +2 -1
- package/buildLibs/styles/Web/ClSelectCascade.css +2 -1
- package/buildLibs/styles/Web/ClSelectTree.css +2 -1
- package/buildLibs/styles/Web/ClSelectmove.css +2 -1
- package/buildLibs/styles/Web/ClTable.css +2 -1
- package/buildLibs/styles/Web/ClXeditable.css +4 -3
- package/buildLibs/types/All/index.d.ts +1 -1
- package/buildLibs/types/Common/globalConfig.d.ts +29 -0
- package/buildLibs/types/Common/globalTypes.d.ts +11 -0
- package/buildLibs/types/Common/i18n/en.d.ts +2 -0
- package/buildLibs/types/Common/i18n/zh_CN.d.ts +2 -0
- package/buildLibs/types/Common/index.d.ts +1 -1
- package/buildLibs/types/Element/CheckBox/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/Input/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputNumber/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputNumberStepper/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/InputTextarea/Index.vue.d.ts +9 -0
- package/buildLibs/types/Element/Radio/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/DateTime/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/FileUpload/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/Select/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectCascade/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectMove/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectTag/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/SelectTree/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/Tree/Index.vue.d.ts +9 -0
- package/buildLibs/types/Web/componentsInstalls.d.ts +90 -0
- package/buildLibs/utils/Element/ClButton.cjs +1 -1
- package/buildLibs/utils/Element/ClButton.js +1 -1
- package/buildLibs/utils/Element/ClCheckbox.cjs +1 -1
- package/buildLibs/utils/Element/ClCheckbox.js +1 -1
- package/buildLibs/utils/Element/ClCheckboxOne.cjs +1 -1
- package/buildLibs/utils/Element/ClCheckboxOne.js +1 -1
- package/buildLibs/utils/Element/ClClipboard.cjs +1 -1
- package/buildLibs/utils/Element/ClClipboard.js +1 -1
- package/buildLibs/utils/Element/ClCollapse.cjs +1 -1
- package/buildLibs/utils/Element/ClCollapse.js +1 -1
- package/buildLibs/utils/Element/ClFormValidate.cjs +1 -1
- package/buildLibs/utils/Element/ClFormValidate.js +1 -1
- package/buildLibs/utils/Element/ClIconFont.cjs +1 -1
- package/buildLibs/utils/Element/ClIconFont.js +1 -1
- package/buildLibs/utils/Element/ClInput.cjs +1 -1
- package/buildLibs/utils/Element/ClInput.js +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.cjs +1 -1
- package/buildLibs/utils/Element/ClInputCaptcha.js +1 -1
- package/buildLibs/utils/Element/ClInputNumber.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumber.js +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.cjs +1 -1
- package/buildLibs/utils/Element/ClInputNumberStepper.js +1 -1
- package/buildLibs/utils/Element/ClInputPassword.cjs +1 -1
- package/buildLibs/utils/Element/ClInputPassword.js +2 -2
- package/buildLibs/utils/Element/ClInputSearch.cjs +1 -1
- package/buildLibs/utils/Element/ClInputSearch.js +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.cjs +1 -1
- package/buildLibs/utils/Element/ClInputTextarea.js +1 -1
- package/buildLibs/utils/Element/ClModal.cjs +1 -1
- package/buildLibs/utils/Element/ClModal.js +1 -1
- package/buildLibs/utils/Element/ClRadio.cjs +1 -1
- package/buildLibs/utils/Element/ClRadio.js +1 -1
- package/buildLibs/utils/Element/ClRadioOne.cjs +1 -1
- package/buildLibs/utils/Element/ClRadioOne.js +1 -1
- package/buildLibs/utils/Element/ClTags.cjs +1 -1
- package/buildLibs/utils/Element/ClTags.js +1 -1
- package/buildLibs/utils/Element/__provide__/Validate.cjs +1 -1
- package/buildLibs/utils/Element/__provide__/Validate.js +13 -3
- package/buildLibs/utils/Mobile/ClActionSheet.cjs +1 -1
- package/buildLibs/utils/Mobile/ClActionSheet.js +1 -1
- package/buildLibs/utils/Mobile/ClBackTop.cjs +1 -1
- package/buildLibs/utils/Mobile/ClBackTop.js +1 -1
- package/buildLibs/utils/Mobile/ClBanner.cjs +1 -1
- package/buildLibs/utils/Mobile/ClBanner.js +1 -1
- package/buildLibs/utils/Mobile/ClCalendarM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCalendarM.js +1 -1
- package/buildLibs/utils/Mobile/ClCell.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCell.js +1 -1
- package/buildLibs/utils/Mobile/ClCodeLegendM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCodeLegendM.js +2 -2
- package/buildLibs/utils/Mobile/ClCropperM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClCropperM.js +1 -1
- package/buildLibs/utils/Mobile/ClDropdownMenuMItem.cjs +1 -1
- package/buildLibs/utils/Mobile/ClDropdownMenuMItem.js +1 -1
- package/buildLibs/utils/Mobile/ClGrid.cjs +1 -1
- package/buildLibs/utils/Mobile/ClGrid.js +1 -1
- package/buildLibs/utils/Mobile/ClNavBar.cjs +1 -1
- package/buildLibs/utils/Mobile/ClNavBar.js +1 -1
- package/buildLibs/utils/Mobile/ClNoticeBar.cjs +1 -1
- package/buildLibs/utils/Mobile/ClNoticeBar.js +1 -1
- package/buildLibs/utils/Mobile/ClNotifyM.cjs +1 -1
- package/buildLibs/utils/Mobile/ClNotifyM.js +1 -1
- package/buildLibs/utils/Mobile/ClNumberKeyboard.cjs +1 -1
- package/buildLibs/utils/Mobile/ClNumberKeyboard.js +1 -1
- package/buildLibs/utils/Mobile/ClPickerCascader.cjs +1 -1
- package/buildLibs/utils/Mobile/ClPickerCascader.js +1 -1
- package/buildLibs/utils/Mobile/ClPullToRefresh.cjs +1 -1
- package/buildLibs/utils/Mobile/ClPullToRefresh.js +1 -1
- package/buildLibs/utils/Mobile/ClRate.cjs +1 -1
- package/buildLibs/utils/Mobile/ClRate.js +1 -1
- package/buildLibs/utils/Mobile/ClScrollCard.cjs +1 -1
- package/buildLibs/utils/Mobile/ClScrollCard.js +1 -1
- package/buildLibs/utils/Mobile/ClSharePanel.cjs +1 -1
- package/buildLibs/utils/Mobile/ClSharePanel.js +1 -1
- package/buildLibs/utils/Mobile/ClSidebarSelect.cjs +1 -1
- package/buildLibs/utils/Mobile/ClSidebarSelect.js +1 -1
- package/buildLibs/utils/Mobile/ClSteps.cjs +1 -1
- package/buildLibs/utils/Mobile/ClSteps.js +1 -1
- package/buildLibs/utils/Mobile/ClTabbar.cjs +1 -1
- package/buildLibs/utils/Mobile/ClTabbar.js +1 -1
- package/buildLibs/utils/Mobile/ClToast.cjs +1 -1
- package/buildLibs/utils/Mobile/ClToast.js +1 -1
- package/buildLibs/utils/Mobile/__provide__/NotifyM.cjs +1 -1
- package/buildLibs/utils/Mobile/__provide__/NotifyM.js +1 -1
- package/buildLibs/utils/Mobile/__provide__/Toast.cjs +1 -1
- package/buildLibs/utils/Mobile/__provide__/Toast.js +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C1OgPpoJ.js → Index.vue_vue_type_script_setup_true_lang-0S6ab-Lp.js} +120 -113
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-neC9NxKi.js → Index.vue_vue_type_script_setup_true_lang-2Fe9SkjL.js} +209 -201
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dzm58mMQ.js → Index.vue_vue_type_script_setup_true_lang-2zp0QTNm.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-4I3wTvhS.js +2536 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5WPoXMwr.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5itnjwU_.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BIFHYrzc.js → Index.vue_vue_type_script_setup_true_lang-98sOHlWj.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-B60Rs_ka.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-B-Mbqw1Y.js → Index.vue_vue_type_script_setup_true_lang-B6NmuslZ.js} +1 -1
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-D7bJ5UAn.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-B8YAhRda.js} +63 -55
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BGwsPv0S.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Eczgr-_r.js → Index.vue_vue_type_script_setup_true_lang-BJ_m7Dj5.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BM_FJlr9.js +2 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BN9ybiKv.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_YbdXMB.js → Index.vue_vue_type_script_setup_true_lang-BUscvdlk.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-UydTJByU.js → Index.vue_vue_type_script_setup_true_lang-BXz7Y87Q.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-X8d38eaU.js → Index.vue_vue_type_script_setup_true_lang-BfELTliJ.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C2LGy18j.js → Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js} +6 -5
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BQSP8SA4.js → Index.vue_vue_type_script_setup_true_lang-BwwnFiXJ.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C2zOEwJ1.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D6kK-vM7.js → Index.vue_vue_type_script_setup_true_lang-C6Ou-vmn.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BWeBT0aj.js → Index.vue_vue_type_script_setup_true_lang-C8euOy7Z.js} +2 -2
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C6Evk0-z.js → Index.vue_vue_type_script_setup_true_lang-CAMYF15G.js} +54 -48
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CSqU5Nz6.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ChnRq_PS.js → Index.vue_vue_type_script_setup_true_lang-CWwycVzt.js} +3 -3
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-BO4cal3i.js → Index.vue_vue_type_script_setup_true_lang-Cb8fYSc9.js} +386 -375
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dwkuei2j.js → Index.vue_vue_type_script_setup_true_lang-D3Z2BVYR.js} +2 -2
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-C67qv3YC.js → Index.vue_vue_type_script_setup_true_lang-DB79nPqn.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DDMwfmi3.js +1533 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-Dirpq4z0.js → Index.vue_vue_type_script_setup_true_lang-DPpZ2_Sb.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DUfxwsAA.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CBjEJN0Y.js → Index.vue_vue_type_script_setup_true_lang-Dc4eYcq-.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-O_Nltaue.js → Index.vue_vue_type_script_setup_true_lang-DfAoAIa3.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CsUYHAm8.js → Index.vue_vue_type_script_setup_true_lang-Dg5pJiPZ.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DxYJbPyJ.js → Index.vue_vue_type_script_setup_true_lang-DulzCj86.js} +8 -8
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-DWkYiuK9.js → Index.vue_vue_type_script_setup_true_lang-DvYX7kuB.js} +1 -1
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-CAe8mhTl.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-LeQz80jL.js} +66 -60
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-L4NDsLxm.js → Index.vue_vue_type_script_setup_true_lang-M5y0DMPl.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-OfqQJV8-.js +1 -0
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-OiTdNs2W.js +310 -0
- package/buildLibs/{modules/shared/Index.vue_vue_type_script_setup_true_lang-DdLVG0R0.js → utils/Shared/Index.vue_vue_type_script_setup_true_lang-S9t4A2yy.js} +68 -60
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-SW27GX-g.js +254 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D_XMW7K4.js → Index.vue_vue_type_script_setup_true_lang-VUD3rCg5.js} +154 -146
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-ZNpokp-x.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CYFgnd30.js → Index.vue_vue_type_script_setup_true_lang-kCemr-ml.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-D__hI9ud.js → Index.vue_vue_type_script_setup_true_lang-sGJNOVn3.js} +1 -1
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-CizRrQsH.js → Index.vue_vue_type_script_setup_true_lang-vVnnJuup.js} +1 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-xONe0mSK.js +1 -0
- package/buildLibs/utils/Shared/{Index.vue_vue_type_script_setup_true_lang-ctptavhp.js → Index.vue_vue_type_script_setup_true_lang-yXhOl-Ln.js} +2 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-ywDP-ayG.js +1 -0
- package/buildLibs/utils/Shared/Index22.css +1 -1
- package/buildLibs/utils/Shared/Index8.css +1 -1
- package/buildLibs/utils/Shared/Input.css +1 -1
- package/buildLibs/utils/Shared/List.css +1 -1
- package/buildLibs/utils/Shared/{List.vue_vue_type_script_setup_true_lang-CFCST05R.js → List.vue_vue_type_script_setup_true_lang-B75tAGde.js} +1 -1
- package/buildLibs/utils/Shared/{List.vue_vue_type_script_setup_true_lang-CRkZfB8a.js → List.vue_vue_type_script_setup_true_lang-NrDV8bOV.js} +1 -1
- package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-cviYcHLZ.js → One.vue_vue_type_script_setup_true_lang-BL5CUHVm.js} +1 -1
- package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-HWXEDCZF.js → One.vue_vue_type_script_setup_true_lang-D3hrzxgT.js} +1 -1
- package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-CGNfuoKE.js → One.vue_vue_type_script_setup_true_lang-DHPYObdu.js} +1 -1
- package/buildLibs/utils/Shared/{One.vue_vue_type_script_setup_true_lang-D9zWNf0s.js → One.vue_vue_type_script_setup_true_lang-DxUlP9yq.js} +1 -1
- package/buildLibs/utils/Shared/{Validate.vue_vue_type_script_setup_true_lang-W46p_d7L.js → Validate.vue_vue_type_script_setup_true_lang-BYSnGTWU.js} +1 -1
- package/buildLibs/utils/Shared/{Validate.vue_vue_type_script_setup_true_lang-Jyse_5LL.js → Validate.vue_vue_type_script_setup_true_lang-DPwcfCQb.js} +1 -1
- package/buildLibs/utils/Shared/{index-DgQu20UC.js → index-BjDIq1u8.js} +1 -1
- package/buildLibs/utils/Shared/{index-D-7jSnpf.js → index-CBplKIwJ.js} +2 -2
- package/buildLibs/utils/Web/ClAnchorNav.cjs +1 -1
- package/buildLibs/utils/Web/ClAnchorNav.js +1 -1
- package/buildLibs/utils/Web/ClCalendar.cjs +1 -1
- package/buildLibs/utils/Web/ClCalendar.js +1 -1
- package/buildLibs/utils/Web/ClCodeLegend.cjs +1 -1
- package/buildLibs/utils/Web/ClCodeLegend.js +1 -1
- package/buildLibs/utils/Web/ClColorPicker.cjs +1 -1
- package/buildLibs/utils/Web/ClColorPicker.js +3 -3
- package/buildLibs/utils/Web/ClCropper.cjs +1 -1
- package/buildLibs/utils/Web/ClCropper.js +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.cjs +1 -1
- package/buildLibs/utils/Web/ClCropperPreview.js +4 -4
- package/buildLibs/utils/Web/ClDateTime.cjs +1 -1
- package/buildLibs/utils/Web/ClDateTime.js +1 -1
- package/buildLibs/utils/Web/ClDropdownMenu.cjs +1 -1
- package/buildLibs/utils/Web/ClDropdownMenu.js +1 -1
- package/buildLibs/utils/Web/ClEchartsLineAxisTag.cjs +1 -1
- package/buildLibs/utils/Web/ClEchartsLineAxisTag.js +1 -1
- package/buildLibs/utils/Web/ClFileUpload.cjs +1 -1
- package/buildLibs/utils/Web/ClFileUpload.js +1 -1
- package/buildLibs/utils/Web/ClInputTag.cjs +1 -1
- package/buildLibs/utils/Web/ClInputTag.js +1 -1
- package/buildLibs/utils/Web/ClPaginate.cjs +1 -1
- package/buildLibs/utils/Web/ClPaginate.js +1 -1
- package/buildLibs/utils/Web/ClPreviewExample.cjs +1 -1
- package/buildLibs/utils/Web/ClPreviewExample.js +1 -1
- package/buildLibs/utils/Web/ClSelect.cjs +1 -1
- package/buildLibs/utils/Web/ClSelect.js +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectCascade.js +1 -1
- package/buildLibs/utils/Web/ClSelectMove.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectMove.js +655 -647
- package/buildLibs/utils/Web/ClSelectTag.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTag.js +1 -1
- package/buildLibs/utils/Web/ClSelectTree.cjs +1 -1
- package/buildLibs/utils/Web/ClSelectTree.js +71 -63
- package/buildLibs/utils/Web/ClSideMenu.cjs +1 -1
- package/buildLibs/utils/Web/ClSideMenu.js +1 -1
- package/buildLibs/utils/Web/ClTable.cjs +1 -1
- package/buildLibs/utils/Web/ClTable.js +4 -4
- package/buildLibs/utils/Web/ClTabs.cjs +1 -1
- package/buildLibs/utils/Web/ClTabs.js +1 -1
- package/buildLibs/utils/Web/ClTree.cjs +1 -1
- package/buildLibs/utils/Web/ClTree.js +1 -1
- package/buildLibs/utils/Web/ClXEditable.cjs +1 -1
- package/buildLibs/utils/Web/ClXEditable.js +13 -13
- package/buildLibs/utils/Web/__provide__/Alert.cjs +1 -1
- package/buildLibs/utils/Web/__provide__/Alert.js +2 -2
- package/buildLibs/utils/Web/__provide__/Notify.cjs +1 -1
- package/buildLibs/utils/Web/__provide__/Notify.js +1 -1
- package/buildLibs/utils/Web/__provide__/Preview.cjs +1 -1
- package/buildLibs/utils/Web/__provide__/Preview.js +1 -1
- package/buildLibs/web/index.cjs +7 -7
- package/buildLibs/web/index.css +1 -1
- package/buildLibs/web/index.js +10793 -10685
- package/docs/components/Element/Checkbox.md +2 -1
- package/docs/components/Element/Form.md +15 -0
- package/docs/components/Element/Input.md +2 -1
- package/docs/components/Element/InputNumber.md +2 -1
- package/docs/components/Element/InputNumberStepper.md +2 -1
- package/docs/components/Element/InputTextarea.md +2 -1
- package/docs/components/Element/Radio.md +2 -1
- package/docs/components/Web/DateTime.md +2 -1
- package/docs/components/Web/FileUpload.md +2 -1
- package/docs/components/Web/Select.md +2 -1
- package/docs/components/Web/SelectCascade.md +1 -0
- package/docs/components/Web/SelectMove.md +2 -1
- package/docs/components/Web/SelectTag.md +1 -0
- package/docs/components/Web/SelectTree.md +2 -1
- package/docs/components/Web/Tree.md +2 -1
- package/fonts/iconfont.css +7 -3
- package/fonts/iconfont.ttf +0 -0
- package/fonts/iconfont.woff +0 -0
- package/fonts/iconfont.woff2 +0 -0
- package/package.json +1 -1
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-CiNidFJt.js +0 -246
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-DC6727pS.js +0 -2528
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-EXqjkKwS.js +0 -302
- package/buildLibs/modules/shared/Index.vue_vue_type_script_setup_true_lang-Hg16dgRQ.js +0 -1527
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-5aX79Fcf.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BRvOcf4B.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Ba8Z8fOP.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-BjNP5odR.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CFZ5jK-q.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CQ3RGLek.js +0 -302
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CY5fRV6o.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CYN4r-Mx.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-C_7ArHlU.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CuJjJvft.js +0 -2
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-CwjigRBx.js +0 -2528
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-D6cmq0Tf.js +0 -1527
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-Dbf-3Nik.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-DgD_gHit.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-FowII7_3.js +0 -1
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-c7oxeU_j.js +0 -246
- package/buildLibs/utils/Shared/Index.vue_vue_type_script_setup_true_lang-vLqCsSbV.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),o=require("@cldemo/ui-kit/common/base"),v=require("@cldemo/ui-kit/common/Element"),y=require("./Index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";const e=require("vue"),o=require("@cldemo/ui-kit/common/base"),v=require("@cldemo/ui-kit/common/Element"),y=require("./Index.vue_vue_type_script_setup_true_lang-xONe0mSK.js"),w=require("./Index.vue_vue_type_script_setup_true_lang-9IeuApdh.js"),L=require("./Index.vue_vue_type_script_setup_true_lang-CZNVHUR1.js"),M=["id"],P={class:"previewExample-image-icon"},q={class:"previewExample-video-img previewExample-image"},J=["onClick"],W={key:3,class:"previewExample-label-msg"},K={key:5,class:"previewExample-totalCount"},U=e.defineComponent({name:"ClPreviewExample",__name:"Index",props:{id:String,className:String,classContainer:String,classItem:String,type:{type:String,default:"image",validator:i=>["image","video"].includes(i)},width:{type:[Number,String],default:"auto"},height:{type:Number,required:!0},isWidthFull:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},label:String,previewIconSize:{type:String,default:"large"},isShowLoading:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isShowDelete:{type:Boolean,default:!1},showNum:{type:Number,default:-1},srcValueKey:{type:String,default:"value"},isShowCopy:{type:Boolean,default:!0},isClickImagePreview:{type:Boolean,default:!1},previewCallback:Function},emits:["onDelete"],setup(i,{emit:E}){const n=i,C=E,u=e.inject("$ClGlobals",null),B=`previewexample-${o.getRandom(5)}`,f=n.id,d=e.reactive({totalCount:-1}),p=e.ref([]),S=e.computed(()=>{const{width:t}=n;let l=!1;return(o.isEmpty(t)||typeof t=="string"&&t==="auto"||typeof t=="number"&&t<=0)&&(l=!0),l}),_=e.computed(()=>{let t={"panel-preview-example":!0,"previewExample-width-default":n.isWidthFull,"previewExample-width-auto":!n.isWidthFull};return t=o.getJsonMerge(t,v.getClassNameJson(n.className)),t}),N=e.computed(()=>{let t={"previewExample-container":!0};return t=o.getJsonMerge(t,v.getClassNameJson(n.classContainer)),t}),b=e.computed(()=>{const{type:t,previewIconSize:l}=n;let a={"previewExample-item":!0};return a[`previewExample-${t}`]=!0,a[`previewExample-iconSize-${l}`]=!0,a=o.getJsonMerge(a,v.getClassNameJson(n.classItem)),a}),k=e.computed(()=>{const t={height:`${n.height}px`};if(!S.value){let l=n.width.toString();l.indexOf("%")===-1&&(l=`${n.width}px`),t.width=l}return t}),x=t=>{C("onDelete",t)},h=()=>{const{list:t,showNum:l,srcValueKey:a}=n;let s=o.getListClone(t),r=t.length;l>0&&t.length>=l&&(r=l);const c=[];s.forEach((m,z)=>{if(!o.isEmpty(m)&&z+1<=r)if(o.isString(m))c.push({value:m});else{const D=o.isExistJsonKey(m,a)?m[a]:m.value;c.push({...m,value:D})}}),s=c,d.totalCount=t.length,p.value=s},I=()=>{h()},$=t=>{const l={};return o.isEmpty(t.id)||(l["data-id"]=t.id),o.isEmpty(t.ranId)||(l["data-ran-id"]=t.ranId),l};e.onMounted(()=>{e.nextTick(()=>{I()})}),e.watch(()=>n.list,()=>{h()},{deep:!0});const F=(t,l)=>{n.isClickImagePreview&&g(t,l,"image")},g=(t,l,a)=>{try{if(n.previewCallback)n.previewCallback(a,t,l);else{if(!u||o.isEmpty(u.preview))return;const{list:s}=n;let r;s.length===1?r=t.value:r=s.map(c=>o.isString(c)?c:c.value),u.preview.show({type:a,src:r,showIndex:l,isShowCopy:n.isShowCopy})}}catch{}},V=t=>{x(t)};return(t,l)=>(e.openBlock(),e.createElementBlock("div",{id:e.unref(f),class:e.normalizeClass(_.value)},[e.createElementVNode("div",{class:e.normalizeClass(N.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(a,s)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:`${B}-${s}`,class:b.value,style:k.value},{ref_for:!0},$(a)),[i.type==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(w._sfc_main,{src:a.value,class:e.normalizeClass({"cursor-pointer":i.isClickImagePreview}),onClick:e.withModifiers(r=>F(a,s),["stop"])},null,8,["src","class","onClick"]),e.createElementVNode("div",P,[e.createVNode(y._sfc_main,{title:"预览",name:"search","aria-label":"预览",onClick:e.withModifiers(r=>g(a,s,"image"),["stop"])},null,8,["onClick"]),i.isShowDelete?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,title:"删除",name:"close","aria-label":"删除",onClick:e.withModifiers(r=>V(s),["stop"])},null,8,["onClick"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])],64)):i.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",q,[a.imgUrl&&a.imgUrl.length>0?(e.openBlock(),e.createBlock(w._sfc_main,{key:0,src:a.imgUrl},null,8,["src"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"previewExample-video-icon",onClick:e.withModifiers(r=>g(a,s,"video"),["stop"])},[e.createVNode(y._sfc_main,{name:"play","aria-label":"播放"})],8,J)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[],64)),i.label&&i.label.length>0||a.label&&a.label.length>0?(e.openBlock(),e.createElementBlock("div",W,e.toDisplayString(i.label&&i.label.length>0?i.label:a.label),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64)),i.showNum>-1&&s===p.value.length-1&&d.totalCount>i.showNum?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("span",null,"共"+e.toDisplayString(d.totalCount)+e.toDisplayString(i.type==="image"?"张":"个"),1)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[],64)),e.renderSlot(t.$slots,"extend",{data:a,inx:s})],16))),128)),i.isShowLoading&&i.isLoading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([`previewExample-${i.type}`]),style:e.normalizeStyle(k.value)},[e.createVNode(L._sfc_main,{theme:"circleNotch",size:"large"})],6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2)],10,M))}});exports._sfc_main=U;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),t=require("@cldemo/ui-kit/common/base"),Ee=require("@cldemo/ui-kit/common/globalConfig"),pe=require("@cldemo/ui-kit/common/Element"),ve=require("@cldemo/ui-kit/common/log"),xe=require("./Index.vue_vue_type_script_setup_true_lang-CZNVHUR1.js"),q=require("./Index.vue_vue_type_script_setup_true_lang-xONe0mSK.js"),Se=require("./language-BJ4aVgHI.js"),Be=require("./Index.vue_vue_type_script_setup_true_lang-BUscvdlk.js");;/* empty css */const z={format:{img:["jpg","jpe","jpeg","png","gif","bmp","ico"],video:["mp4","rmvb","3gp","avi","asf","asf","dv","mov","mpg4","mpeg","mpg","wm","wmx","flv","mkv","mp4a","rm","wmv","swf","swfl"],audio:["mp3","ogg","wav","wma","mid","ra","ram"],zip:["rar","zip"],excel:["xls","xlsx","csv"],pdf:["pdf"],txt:["txt"],doc:["doc","docx"]},icon:{img:"image",video:"video",audio:"music",txt:"text",zip:"zip",excel:"excel",pdf:"pdf",doc:"word",default:"file"},suffix:{jpg:["jpg","jpe","jpeg"],jpe:["jpg","jpe","jpeg"],jpeg:["jpg","jpe","jpeg"],png:["png"],gif:["gif"],bmp:["bmp"],ico:["ico"],mp4:["mp4"],rmvb:["rmvb"],"3gp":["3gp"],avi:["avi"],asf:["asf"],dv:["dv"],mov:["mov"],mpg4:["mpg4"],mpeg:["mpeg"],mpg:["mpg"],wm:["wm"],wmx:["wmx"],flv:["flv"],mkv:["mkv"],mp4a:["mp4a"],rm:["rm"],wmv:["wmv"],swf:["swf"],swfl:["swfl"],mp3:["mp3"],ogg:["ogg"],wav:["wav"],wma:["wma"],mid:["mid"],ra:["ra"],ram:["ram"],rar:["rar"],zip:["zip"],txt:["txt"],xls:["xls","xlsx","csv"],xlsx:["xls","xlsx","csv"],csv:["xls","xlsx","csv"],pdf:["pdf"],doc:["doc","docx"]},mime:{jpg:["image/jpg","image/jpeg","image/pjpeg"],jpe:["image/jpg","image/jpeg","image/pjpeg"],jpeg:["image/jpg","image/jpeg","image/pjpeg"],png:["image/png","image/x-png"],gif:["image/gif"],bmp:["image/bmp"],ico:["ico"],mp4:["video/mp4"],rmvb:["audio/x-pn-realaudio"],"3gp":["video/3gpp"],avi:["video/x-msvideo"],asf:["video/x-ms-asf"],dv:["video/x-dv"],mov:["video/quicktime"],mpg4:["video/mp4"],mpeg:["video/mpeg"],mpg:["video/mpeg"],wm:["video/x-ms-wmv"],wmx:["video/x-ms-wmx"],flv:["video/x-flv"],mkv:["video/x-matroska"],mp4a:["audio/mp4"],rm:["audio/x-pn-realaudio"],wmv:["audio/x-ms-wmv"],swf:["application/x-shockwave-flash"],swfl:["application/x-shockwave-flash"],mp3:["audio/mpeg"],ogg:["audio/ogg"],wav:["audio/wav"],wma:["audio/x-ms-wma"],mid:["audio/midi"],ra:["audio/x-pn-realaudio"],ram:["audio/x-pn-realaudio"],rar:["application/x-rar-compressed"],zip:["application/zip","application/x-zip-compressed"],txt:["text/plain"],xls:["application/vnd.ms-excel","application/wps-office.xls"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/wps-office.xlsx"],csv:["text/csv"],pdf:["application/pdf"],doc:["application/msword"],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]},getFormatGroup:n=>{let p=[];return t.isNonEmptyString(n)&&(n.split(",").forEach(i=>{for(const[S,N]of Object.entries(z.format))t.isExistValue(N,i.toLocaleLowerCase())&&p.push(S)}),p=t.getArrUnique(p)),p},getIcon:n=>{let p="";return t.isEmpty(n)?p=z.icon.default:p=t.isExistJsonKey(z.icon,n)?z.icon[n]:z.icon.default,p},getSuffix:n=>{let p=[];return t.isEmpty(n)||(n.forEach(f=>{const i=z.suffix[f.toLocaleLowerCase()];t.isUndefined(i)||(p=p.concat(i))}),t.isEmpty(p)&&(p=n)),p=t.getArrUnique(p),p},getRegexBySuffix:n=>{if(t.isEmpty(n))return null;const p=`\\.(?:${n.join("|")})$`;return new RegExp(p,"i")},getMime:n=>{let p=[];return t.isEmpty(n)||n.forEach(f=>{const i=z.mime[f];t.isUndefined(i)||(p=p.concat(i))}),p=t.getArrUnique(p),p},getRegexByMime:n=>{if(t.isEmpty(n))return null;const p=`^(?:${n.join("|").replace(/\//g,"\\/")})$`;return new RegExp(p,"i")},getImageThumbnail:(n,p,f)=>{let i=null;try{const S=document.createElement("canvas");S.width=p,S.height=f,S.getContext("2d").drawImage(n,0,0,n.width,n.height,0,0,p,f),i=S.toDataURL("image/gif")}catch{i=null}return i}},we=(n,p)=>{let f=n;const i=e.reactive({mime:[],suffix:[],isCheckImgWH:!1});let S=null;const N=r=>{f=t.getJsonMerge(f,r),j()},T=r=>{const g=f.checkMsg;return t.isString(g)&&!t.isEmpty(g)?g:t.isObject(g)&&!t.isEmpty(g[r])?g[r]:p.value[r]},j=()=>{const r=t.isNonEmptyString(f.checkFormat)?z.getSuffix(f.checkFormat.split(",")):[],g=z.getMime(r),w=!t.isEmpty(f.checkWidth)&&!t.isEmpty(f.checkHeight);i.mime=g,i.suffix=r,i.isCheckImgWH=w},P=r=>{const g=z.getIcon(r);return{type:r,icon:g,isImage:r==="img",isVideo:r==="video",isAudio:r==="audio",isTxt:r==="txt",isZip:r==="zip"}},H=(r,g)=>{if(t.isUndefined(S)){S={};for(const[s,a]of Object.entries(z.format)){const E=z.getSuffix(a),k=z.getMime(E),B=z.getRegexBySuffix(E),F=z.getRegexByMime(k);S[s]={suffix:E,mime:k,regSuffix:B,regMime:F}}}let w="";return Object.keys(S).forEach(s=>{if(w.length===0){const a=S[s];(a.regSuffix&&a.regSuffix.test(r)||g&&a.regMime&&a.regMime.test(g))&&(w=s)}}),P(w)},X=r=>{const g=z.getFormatGroup(t.isEmpty(r)?f.checkFormat:r),w=g.length===1?g[0]:"";return P(w)},A=r=>{if(!t.isString(r))return H("");if(r.startsWith("data:")||r.startsWith("blob:")){const w=r.match(/^[a-z]+:([a-zA-Z0-9.+-]+\/[a-zA-Z0-9.+-]+)/);return H("",w?w[1]:"")}const g=r.substring(r.lastIndexOf("/")+1).split("?")[0].split("#")[0];return H(g)},J=(r,g,w,s,a)=>{const E=t.isFinite(w)&&w>0?w:0,k=t.isFinite(s)&&s>0?s:0;let B=a;(B==="height"||B==="contain")&&k===0&&(B="width");let F=1;switch(B){case"height":F=k>0?k/g:1;break;case"contain":F=Math.min(E>0?E/r:1,k>0?k/g:1);break;case"width":default:F=E>0?E/r:1;break}return F>1&&(F=1),{tw:Math.round(r*F),th:Math.round(g*F)}},te=(r,g,w,s)=>new Promise((a,E)=>{const k=document.createElement("img");k.onload=B=>{const F=B.target.width,$=B.target.height,{tw:G,th:W}=J(F,$,g,w,s),I=B.target.src;a({src:I,w:F,h:$,tw:G,th:W,isImage:!0})},k.onerror=()=>{E(new Error("fail: temp create image"))},k.src=r}),ne=(r,g)=>{const w=t.isEmpty(f.checkWidth)?0:parseInt(f.checkWidth,10),s=t.isEmpty(f.checkHeight)?0:parseInt(f.checkHeight,10);if(!t.isFinite(w)||!t.isFinite(s)||w===0||s===0)return!0;let a=!0;switch(f.checkWHType){case"greater":a=r>=w&&g>=s;break;case"less":a=r<=w&&g<=s;break;case"equal":a=r===w&&g===s;break;default:a=!0;break}return a},le=(r,g)=>new Promise((w,s)=>{if(r instanceof File){const a=new FileReader;a.onload=E=>{te(E.target.result,g.maxWidth,g.maxHeight,g.imgFit).then(k=>{(i.isCheckImgWH?ne(k.w,k.h):!0)?w(k):s(new Error(T("checkImageWHLabel")))}).catch(k=>{s(k)})},a.onerror=()=>{s(new Error("fail: new FileReader image onload()"))},a.readAsDataURL(r)}else s(new Error("fail: file is not a File instance"))}),Y=async(r,g)=>{let w=[];const s=[],a=[],E=z.getRegexBySuffix(i.suffix),k=z.getRegexByMime(i.mime),B=W=>{const I=t.isEmpty(W)?NaN:parseInt(W,10);return t.isFinite(I)?I*1024:null},F=B(f.checkMinSize),$=B(f.checkMaxSize),G=r.length;for(let W=0;W<G;W+=1){const I=[],L=r[W],O={suffix:!1,mime:!1,size:!1},u=L.name;E&&!E.test(u)&&(O.suffix=!0);const y=L.type;!t.isEmpty(y)&&k&&!k.test(y)&&(O.mime=!0),F&&L.size<F&&(O.size=!0),$&&L.size>$&&(O.size=!0),(O.suffix||O.mime)&&I.push(T("checkSuffixMimeLabel")),O.size&&I.push(T("checkSizeLabel"));const v=H(u,y);let d=null;v.isImage&&(d=await le(L,g).catch(M=>{I.push(M.message)})),t.isUndefined(d)&&(d={}),d=t.getJsonMerge(d,v),d.fileName=u,d.file=L,I.length===0?(s.push(L),a.push(d)):G===1?w=I.map(M=>`${T("uploadFile")} ${M}`):w.push(`${u}:${I.join(",")}`)}return new Promise(W=>{setTimeout(()=>{W({errorMsg:w,passFiles:s,passFilesInfo:a,original:r})},200)})};return j(),{optBase:i,getTypeByFormat:X,getTypeByUrl:A,createTempImg:te,checkFile:Y,setBaseOptions:N}},ye=()=>({setFileInfo:(p,f)=>{const i=f&&f.fileUrl?f.fileUrl:"";if(!t.isString(i))return{name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0};const S=t.isEmpty(i);let N="";S||i.startsWith("blob:")?N=p.fileName:N=i.substr(i.lastIndexOf("/")+1);let T="",j=0,P=0;return p.isImage&&(T=S?p.src:i,j=p.tw||0,P=p.th||0),{name:N,url:i,imgSrc:T,imgWidth:j,imgHeight:P}}}),be=()=>{const n=(f,i)=>{window.open(f)};return{downloadHref:n,downloadBlob:f=>{if(!t.isEmpty(f)){const i=f.lastIndexOf("/"),S=f.substring(i+1),N=f.replace(/\\/g,"/"),T=new XMLHttpRequest;T.open("GET",N,!0),T.responseType="blob",T.onload=()=>{if(T.status===200){const j=window.URL||window.webkitURL||window,P=new Blob([T.response]),H=document.createElementNS("http://www.w3.org/1999/xhtml","a");H.href=j.createObjectURL(P),H.download=S,H.click(),setTimeout(()=>URL.revokeObjectURL(H.href),1e3)}else n(f)},T.onerror=()=>{n(f)},T.send()}}}},Fe=["name","accept"],Ue=["name"],Te={class:"fileUpload-label"},Me={key:0,class:"fileUpload-img"},Ie={class:"fileUpload-img-container"},Ce=["src","width","height"],_e={key:0,class:"file-complete-img-msg"},Ne=["title"],He=["title"],Re={key:1,class:"fileUpload-video"},We=["src"],Oe=["title"],ze={key:2,class:"fileUpload-file"},Pe=["title"],Le={key:0,class:"fileUpload-load"},je=e.defineComponent({name:"ClFileUploadDefault",__name:"Default",props:{name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},defaultHoverTitle:String,defaultIcon:String,checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal",validator:n=>["equal","greater","less"].includes(n)},imgFit:{type:String,default:"width",validator:n=>["width","height","contain"].includes(n)},isServerCallback:Boolean,isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0},isShowCompleteMsg:{type:Boolean,default:!0}},emits:["onChange","onError","onRemove","onPreview","onSaveFile"],setup(n,{expose:p,emit:f}){const i=n,S=f,{optPageLanguage:N,getPageLanguage:T}=Se.useLanguage();T("fileUpload");const j=e.inject("$FileuploadTop",null);j||ve.warn("FileUpload","Default 主题缺少 $FileuploadTop 注入,使用空校验配置");const{setFileInfo:P}=ye(),H=()=>t.getJsonMerge(j?.getFileCheckInfo()??{},{checkFormat:i.checkFormat,checkWidth:i.checkWidth,checkHeight:i.checkHeight,checkWHType:i.checkWHType,checkMinSize:i.checkMinSize,checkMaxSize:i.checkMaxSize}),{optBase:X,getTypeByFormat:A,getTypeByUrl:J,createTempImg:te,checkFile:ne,setBaseOptions:le}=we(H(),N),{downloadBlob:Y,downloadHref:r}=be(),g=e.useTemplateRef("refElTopParent"),w=()=>{const l=g.value;if(!l)return{maxWidth:0,maxHeight:0};const h=4,C=l.clientWidth>0?Math.max(l.clientWidth-h,0):0;let D=0;if(i.imgFit==="height"||i.imgFit==="contain"){const V=l.parentElement;V&&V.clientHeight>0&&(D=getComputedStyle(V).height==="auto"?0:Math.max(V.clientHeight-h,0))}return{maxWidth:C,maxHeight:D}},s=e.reactive({isImage:!1,isVideo:!1,icon:"",completeMsgTxt:"",isInitFileInput:!0,runOperateType:"init"}),a=e.reactive({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),E={file:null};let k=0,B=null;const F=`fileUpload_${t.getRandom(8)}`,$=e.computed(()=>{let l=i.name;return t.isEmpty(l)&&(l=`fileUpload_${t.getRandom(8)}`),l}),G=e.computed(()=>{let l={"fileUpload-default":!0};return l=t.getJsonMerge(l,pe.getClassNameJson(i.className)),l}),W=e.computed(()=>({"fileUpload-wait":!0,"fileUpload-disabled":i.disabled})),I=e.computed(()=>({"fileUpload-complete":!0,"fileUpload-disabled":i.disabled})),L=l=>{S("onChange",l)},O=l=>{S("onError",l)},u=()=>{S("onRemove")},y=(l,h)=>{S("onPreview",l,h)},v=(l,h)=>{S("onSaveFile",l,h)},d=l=>{s.isImage=l.isImage,s.isVideo=l.isVideo,s.icon=l.icon},M=()=>{const l=A();t.isNonEmptyString(i.defaultIcon)&&(l.icon=i.defaultIcon),d(l)},x=l=>{l!=="load"&&(s.isInitFileInput=!0);let h="";switch(l){case"remove":case"clean":{h="init",M();break}case"fail":{let C=!0;s.isImage?(!t.isEmpty(a.url)||!t.isEmpty(a.imgSrc))&&(C=!1):t.isEmpty(a.url)||(C=!1),h=C?"init":"complete";break}default:h=l}s.runOperateType=h},R=l=>{const h=a;for(const[C,D]of Object.entries(l))t.isUndefined(h[C])||(h[C]=D);E.file=l.file??E.file},K=(l,h)=>{ae(),d(l);const C=P(l,h);R(C),x("complete")},ie=()=>{let l=null;return t.isString(a.url)&&a.url.startsWith("blob:")?l=E.file:t.isEmpty(a.url)?s.isImage&&!t.isEmpty(a.imgSrc)?l=a.imgSrc:l=E.file:l=a.url,t.isUndefined(l)&&(l=""),l},me=l=>{if(l.length>0&&s.runOperateType!=="load"){s.isInitFileInput=!1,x("load"),k+=1;const h={...w(),imgFit:i.imgFit};ne(l,h).then(C=>{if(s.runOperateType==="load")if(C.passFiles.length>0){const D=C.passFiles[0],V=C.passFilesInfo[0];if(V.isImage)i.isServerCallback?(v(D,V),ue()):(K(V,{}),E.file=D,L(V.src));else if(i.isServerCallback)v(D,V),ue();else{const re={};if(V.isVideo){const de=URL.createObjectURL(D);re.fileUrl=de}K(V,re),E.file=D,L(D)}}else x("fail"),C.errorMsg.length>0&&O(C.errorMsg)}).catch(()=>{s.runOperateType==="load"&&(x("fail"),O(["文件校验失败,请重试"]))})}},oe=l=>{if(!t.isNonEmptyString(l)){(t.isString(l)||t.isUndefined(l))&&ge();return}const h=++k,C=J(l);if(s.isImage&&C.isImage){const{maxWidth:D,maxHeight:V}=w();te(l,D,V,i.imgFit).then(re=>{if(h!==k)return;const de=t.getJsonMerge(re,C);K(de,{fileUrl:l})}).catch(()=>{h===k&&(x("fail"),O(["图片加载失败,请检查图片地址"]))})}else K(C,{fileUrl:l})},ae=()=>{t.isString(a.url)&&a.url.startsWith("blob:")&&URL.revokeObjectURL(a.url)},ee=()=>{B&&(clearTimeout(B),B=null)},ue=()=>{ee(),B=setTimeout(()=>{s.runOperateType==="load"&&(x("fail"),O(["服务端保存超时,请重试"]))},6e4)},ge=()=>{k+=1,E.file=null,R({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),x("init")},ce=()=>{if(t.isEmpty(i.value)){M();return}d(J(i.value))},fe=()=>{let l=i.defaultHoverTitle;s.isImage&&X.isCheckImgWH&&t.isEmpty(l)&&(l=`${i.checkWidth}x${i.checkHeight}`),s.completeMsgTxt=l},he=()=>{ce(),fe(),oe(i.value)};e.onMounted(()=>{e.nextTick(()=>{he()})}),e.watch(()=>i.value,(l,h)=>{if(l!==h){const C=ie();l!==C&&(ee(),ce(),oe(l))}}),e.watch([()=>i.checkFormat,()=>i.checkWidth,()=>i.checkHeight,()=>i.checkWHType,()=>i.checkMinSize,()=>i.checkMaxSize],()=>{if(ee(),le(H()),ce(),fe(),s.runOperateType==="load")return;const l=ie();i.value===l&&oe(i.value)});const ke=l=>{l.preventDefault(),l.stopPropagation(),!i.disabled&&l.dataTransfer&&me(l.dataTransfer.files)},o=l=>{i.disabled||me(l.currentTarget.files)},c=()=>{ee(),k+=1,ae(),E.file=null,R({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),x("remove");const l=document.getElementById(F);l&&(l.value=""),u()},m=l=>{const h=t.isEmpty(a.url)?a.imgSrc:a.url;y(h,"image"),l.preventDefault(),l.stopPropagation()},U=l=>{t.isEmpty(a.url)||y(a.url,"video"),l.preventDefault(),l.stopPropagation()},b=l=>{t.isEmpty(a.url)?r(a.imgSrc,a.name):Y(a.url),l.preventDefault(),l.stopPropagation()},_=l=>{if(t.isString(a.url)&&a.url.startsWith("blob:")){const h=document.createElement("a");h.href=a.url,h.download=a.name,h.click()}else Y(a.url);l.preventDefault(),l.stopPropagation()};return p({saveServerCallback:l=>{if(ee(),s.runOperateType!=="load")return;if(!l||!l.res||!t.isBoolean(l.res.success)){x("fail"),O(["文件保存失败,请重试"]);return}if(!l.res.success){x("fail"),O(["文件保存失败,请重试"]);return}if(!l.req){x("fail"),O(["文件保存失败,请重试"]);return}let h="";if(t.isString(l.res.fileUrl)?h=l.res.fileUrl:t.isArray(l.res.fileUrl)&&l.res.fileUrl.length>0&&t.isString(l.res.fileUrl[0])&&(h=l.res.fileUrl[0]),t.isEmpty(h)){E.file=null,R({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),x("init");return}K(l.req,{fileUrl:h}),L(h)},getValue:()=>ie(),cleanReduction:()=>{ee(),k+=1,ae(),E.file=null,R({name:"",url:"",imgSrc:"",imgWidth:0,imgHeight:0}),x("clean")}}),e.onBeforeUnmount(()=>{ee(),ae()}),(l,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(G.value),ref_key:"refElTopParent",ref:g},[e.createElementVNode("div",{class:"fileUpload-default-container",onDrop:ke,onDragover:h[0]||(h[0]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("label",{for:F},[s.isInitFileInput&&!n.disabled?(e.openBlock(),e.createElementBlock("input",{key:0,type:"file",id:F,name:$.value,onChange:o,accept:e.unref(X).mime.join(",")},null,40,Fe)):(e.openBlock(),e.createElementBlock("input",{key:1,id:F,name:$.value,style:{display:"none !important"}},null,8,Ue)),s.runOperateType==="init"?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(W.value)},[e.createVNode(q._sfc_main,{name:s.icon,class:"fileUpload-icon"},null,8,["name"]),e.createElementVNode("span",Te,[e.renderSlot(l.$slots,"label")])],2)):s.runOperateType==="complete"?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(I.value)},[s.isImage?(e.openBlock(),e.createElementBlock("span",Me,[e.createElementVNode("span",Ie,[e.createElementVNode("img",{src:a.imgSrc,width:a.imgWidth,height:a.imgHeight},null,8,Ce)]),n.isShowCompleteMsg?(e.openBlock(),e.createElementBlock("span",_e,e.toDisplayString(s.completeMsgTxt),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowPreview&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:2,class:"preview-icon",title:e.unref(N).common.preview,onClick:e.withModifiers(m,["stop"])},[e.createVNode(q._sfc_main,{name:"search-plus"})],8,Ne)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),n.isShowDownload&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:4,class:"download-icon",title:e.unref(N).common.download,onClick:e.withModifiers(b,["stop"])},[e.createVNode(q._sfc_main,{name:"download"})],8,He)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))])):s.isVideo?(e.openBlock(),e.createElementBlock("span",Re,[e.createElementVNode("video",{src:a.url},null,8,We),n.isShowPreview&&!n.disabled?(e.openBlock(),e.createElementBlock("span",{key:0,class:"preview-icon",onClick:e.withModifiers(U,["stop"])},[e.createVNode(q._sfc_main,{name:"play"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.isShowDownload&&!n.disabled?(e.openBlock(),e.createElementBlock("i",{key:2,class:"download-icon",title:e.unref(N).common.download,onClick:e.withModifiers(_,["stop"])},[e.createVNode(q._sfc_main,{name:"download"})],8,Oe)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))])):(e.openBlock(),e.createElementBlock("span",ze,[e.createVNode(q._sfc_main,{name:s.icon,class:"fileUpload-icon"},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(a.name),1)])),n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64)):(e.openBlock(),e.createElementBlock("a",{key:3,class:"file-complete-remove",href:"javascript:",title:e.unref(N).common.delete,onClick:e.withModifiers(c,["stop"])},[e.createVNode(q._sfc_main,{name:"close"})],8,Pe))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))])],32),s.runOperateType==="load"?(e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(xe._sfc_main,{theme:"circleBubble",size:"large"})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],2))}}),$e=["id","name","multiple","accept"],Ve=["id","name","disabled","accept"],De=["for"],qe={key:0,class:"fileUpload-list"},Ae={key:0,class:"fileUpload-item-icon fileUpload-item-img"},Je=["src"],Ge=["title","onClick"],Xe={key:1,class:"fileUpload-item-icon fileUpload-item-video"},Ke=["src"],Ze=["onClick"],Qe={class:"fileUpload-item-name"},Ye={class:"fileUpload-item-operate"},et=["title","onClick"],tt=["title","onClick"],it=e.defineComponent({name:"ClFileUploadButton",__name:"Button",props:{name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},isMultiple:Boolean,buttonClass:String,buttonLabel:String,buttonIcon:{type:String,default:""},buttonColor:{type:String,default:"default"},checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal",validator:n=>["equal","greater","less"].includes(n)},isServerCallback:Boolean,isShowUploadResult:{type:Boolean,default:!0},isShowUploadIng:{type:Boolean,default:!0},isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0}},emits:["onChange","onError","onRemove","onPreview","onSaveFile"],setup(n,{expose:p,emit:f}){const i=n,S=f,N=`fileupload-${t.getRandom(5)}`,{optPageLanguage:T,getPageLanguage:j}=Se.useLanguage();j("fileUpload");const P=e.inject("$FileuploadTop",null);P||ve.warn("FileUpload","Button 主题缺少 $FileuploadTop 注入,使用空校验配置");const H=()=>t.getJsonMerge(P?.getFileCheckInfo()??{},{checkFormat:i.checkFormat,checkWidth:i.checkWidth,checkHeight:i.checkHeight,checkWHType:i.checkWHType,checkMinSize:i.checkMinSize,checkMaxSize:i.checkMaxSize}),{setFileInfo:X}=ye(),{optBase:A,getTypeByUrl:J,checkFile:te,setBaseOptions:ne}=we(H(),T),{downloadBlob:le,downloadHref:Y}=be(),r=e.useTemplateRef("refElButton"),g=e.useTemplateRef("refElLabel"),w=t.getRandom(8),s=e.reactive({elFileId:`btnFile${w}`,isInitFileInput:!0}),a=e.ref([]),E=e.ref([]);let k=null,B=null,F=null;const $=e.computed(()=>{let o=i.name;return t.isEmpty(o)&&(o=`fileUpload_${t.getRandom(8)}`),o}),G=e.computed(()=>{let o={"fileUpload-button":!0};return o=t.getJsonMerge(o,pe.getClassNameJson(i.className)),o}),W=(o,c)=>{S("onChange",o,c)},I=o=>{S("onError",o)},L=()=>{S("onRemove")},O=(o,c,m)=>{S("onPreview",o,c,m)},u=(o,c)=>{S("onSaveFile",o,c)},y=()=>{v(),k=setTimeout(()=>{k=null,s.isInitFileInput||(M("fail"),I(["服务端保存超时,请重试"]))},6e4)},v=()=>{k&&(clearTimeout(k),k=null)},d=()=>{a.value.forEach(o=>{t.isString(o.url)&&o.url.startsWith("blob:")&&URL.revokeObjectURL(o.url)})},M=o=>{switch(o){case"load":i.isShowUploadIng&&r.value?.loadStart();break;case"fail":case"complete":i.isShowUploadIng&&r.value?.loadStop();break}s.isInitFileInput=o!=="load"},x=(o,c)=>{i.isMultiple||(d(),a.value=[]);const m=[],U=[];a.value.forEach(b=>{m.push(b),U.push(b.rId)});for(let b=0;b<o.length;b++){let _=c.length>b?{fileUrl:c[b]}:{};t.isEmpty(_.fileUrl)&&o[b].isVideo&&o[b].file&&(_={fileUrl:URL.createObjectURL(o[b].file)});let Z=X(o[b],_);Z.rId=t.getRandom(9),Z=t.getJsonMerge(o[b],Z),m.push(Z),U.push(Z.rId)}a.value=m,M("complete"),e.nextTick(()=>{E.value=U})},R=()=>{const o=[];return a.value.forEach(c=>{let m=null;t.isString(c.url)&&c.url.startsWith("blob:")?m=c.file:t.isEmpty(c.url)?c.isImage&&!t.isEmpty(c.imgSrc)?m=c.imgSrc:m=c.file:m=c.url,t.isUndefined(m)||o.push(m)}),o.length===0?"":i.isMultiple?o:o[0]},K=o=>{if(t.isArray(o)){d(),a.value=[];const U=[],b=[];o.forEach(_=>{if(t.isNonEmptyString(_)){const Z=J(_);U.push(Z),b.push(_)}}),x(U,b);return}if(!t.isNonEmptyString(o)){t.isString(o)&&ie();return}d(),a.value=[];const c=[],m=[];o.split(",").filter(U=>t.isNonEmptyString(U)).forEach(U=>{const b=J(U);c.push(b),m.push(U)}),x(c,m)},ie=()=>{d(),M("init"),a.value=[]},me=()=>{K(i.value)};e.onMounted(()=>{e.nextTick(()=>{me()})}),e.onBeforeUnmount(()=>{v(),B&&(clearTimeout(B),B=null),d()}),e.watch(()=>i.value,(o,c)=>{if(o!==c){const m=R();o!==m&&(v(),K(o))}}),e.watch([()=>i.checkFormat,()=>i.checkWidth,()=>i.checkHeight,()=>i.checkWHType,()=>i.checkMinSize,()=>i.checkMaxSize],()=>{s.isInitFileInput&&v(),ne(H())});const oe=o=>{i.disabled||s.isInitFileInput&&o.currentTarget.files.length>0&&(M("load"),te(o.currentTarget.files,{}).then(c=>{if(!s.isInitFileInput){if(c.passFiles.length>0)if(i.isServerCallback){const m=i.isMultiple?c.passFiles:c.passFiles[0],U=i.isMultiple?c.passFilesInfo:c.passFilesInfo[0];u(m,U),y()}else i.isMultiple?(x(c.passFilesInfo,[]),W(c.passFiles,c.passFilesInfo)):(x(c.passFilesInfo,[]),W(c.passFiles[0],c.passFilesInfo[0]));else c.errorMsg.length===0&&(M("fail"),I(["文件校验失败,请重试"]));c.errorMsg.length>0&&(I(c.errorMsg),c.passFiles.length===0&&M("fail"))}}).catch(()=>{s.isInitFileInput||(M("fail"),I(["文件校验失败,请重试"]))}))},ae=(o,c)=>{const m=t.isEmpty(o.url)?o.src:o.url;O(m,"image",c)},ee=(o,c)=>{t.isEmpty(o.url)||O(o.url,"video",c)},ue=o=>{if(F===o)return;F=o,v(),s.isInitFileInput||M("complete");const c=a.value.find(_=>_.rId===o);c&&t.isString(c.url)&&c.url.startsWith("blob:")&&URL.revokeObjectURL(c.url);const m=[],U=[];a.value.forEach(_=>{_.rId!==o&&(m.push(_),U.push(_.rId))}),E.value=U;const b=document.getElementById(s.elFileId);b&&(b.value=""),e.nextTick(()=>{m.length>0?(a.value=m,F=null,L()):B=setTimeout(()=>{B=null,a.value=a.value.filter(_=>_.rId!==o),F=null,L()},500)})},ge=o=>{if(o.isImage&&t.isEmpty(o.url))Y(o.imgSrc,o.name);else if(t.isString(o.url)&&o.url.startsWith("blob:")){const c=document.createElement("a");c.href=o.url,c.download=o.name,c.click()}else if(t.isEmpty(o.url)&&o.file){const c=URL.createObjectURL(o.file),m=document.createElement("a");m.href=c,m.download=o.name,m.click(),setTimeout(()=>{URL.revokeObjectURL(c)},1e3)}else le(o.url)},ce=()=>{g.value?.click()};return p({saveServerCallback:o=>{if(v(),!s.isInitFileInput){if(t.isUndefined(o)||t.isUndefined(o.res)||!t.isBoolean(o.res.success)||t.isUndefined(o.req)){M("fail"),I(["文件保存失败,请重试"]);return}if(o.res.success){let c=[];const m=[];if(t.isNonEmptyString(o.res.fileUrl)?(c.push(o.res.fileUrl),m.push(0)):t.isArray(o.res.fileUrl)&&o.res.fileUrl.forEach((se,Q)=>{t.isNonEmptyString(se)&&(c.push(se),m.push(Q))}),c.length===0){M("complete");return}const U=i.isMultiple?o.req:[o.req];let b=[],_=[];if(!i.isMultiple)b=c,_=U;else{const se=a.value.map(Q=>Q.url).filter(Q=>t.isNonEmptyString(Q));c.forEach((Q,l)=>{const h=m[l];se.indexOf(Q)>-1||t.isUndefined(U[h])||(se.push(Q),b.push(Q),_.push(U[h]))})}if(b.length===0){M("complete");return}x(_,b);const Z=i.isMultiple?b:b[0];W(Z)}else M("fail"),I(["文件保存失败,请重试"])}},getValue:()=>R(),cleanReduction:()=>{v(),ie()}}),(o,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(G.value)},[s.isInitFileInput&&!n.disabled?(e.openBlock(),e.createElementBlock("input",{key:0,type:"file",id:s.elFileId,name:$.value,multiple:n.isMultiple,accept:e.unref(A).mime.join(","),onChange:oe},null,40,$e)):(e.openBlock(),e.createElementBlock("input",{key:1,id:s.elFileId,name:$.value,disabled:n.disabled,accept:e.unref(A).mime.join(","),style:{display:"none !important"},onChange:oe},null,40,Ve)),e.createElementVNode("label",{ref_key:"refElLabel",ref:g,for:s.elFileId},[e.createVNode(Be._sfc_main,{ref_key:"refElButton",ref:r,className:n.buttonClass,isShowBackDrop:!0,disabled:n.disabled,label:n.buttonLabel||e.unref(T).common.upload,iconName:n.buttonIcon,color:n.buttonColor,onOnClick:ce},null,8,["className","disabled","label","iconName","color"])],8,De)],2),e.renderSlot(o.$slots,"label"),a.value.length>0&&n.isShowUploadResult?(e.openBlock(),e.createElementBlock("ul",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(m,U)=>(e.openBlock(),e.createBlock(e.Transition,{key:`${m.rId}-${U}`,name:"fileUploadButton","enter-active-class":"fileupload-anim-in","leave-active-class":"fileupload-anim-out"},{default:e.withCtx(()=>[E.value.indexOf(m.rId)>-1?(e.openBlock(),e.createElementBlock("li",{key:`${N}-${m.rId}-${U}`,class:"fileUpload-item"},[m.isImage?(e.openBlock(),e.createElementBlock("span",Ae,[e.createElementVNode("img",{src:m.imgSrc},null,8,Je),n.isShowPreview?(e.openBlock(),e.createElementBlock("i",{key:0,class:"preview-icon",title:e.unref(T).common.preview,onClick:e.withModifiers(b=>ae(m,U),["stop"])},[e.createVNode(q._sfc_main,{name:"search-plus"})],8,Ge)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):m.isVideo?(e.openBlock(),e.createElementBlock("span",Xe,[e.createElementVNode("video",{src:m.url},null,8,Ke),n.isShowPreview?(e.openBlock(),e.createElementBlock("span",{key:0,class:"preview-icon",onClick:e.withModifiers(b=>ee(m,U),["stop"])},[e.createVNode(q._sfc_main,{name:"play"})],8,Ze)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createBlock(q._sfc_main,{key:2,name:m.icon,class:"fileUpload-item-icon"},null,8,["name"])),e.createElementVNode("span",Qe,e.toDisplayString(m.name),1),e.createElementVNode("span",Ye,[n.isShowDownload?(e.openBlock(),e.createElementBlock("i",{key:0,class:"download-icon",title:e.unref(T).common.download,onClick:e.withModifiers(b=>ge(m),["stop"])},[e.createVNode(q._sfc_main,{name:"download"})],8,et)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),n.disabled?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)):(e.openBlock(),e.createElementBlock("a",{key:2,class:"file-complete-remove",href:"javascript:",title:e.unref(T).common.delete,onClick:e.withModifiers(b=>ue(m.rId),["stop"])},[e.createVNode(q._sfc_main,{name:"close"})],8,tt))])])):e.createCommentVNode("",!0)]),_:2},1024))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))],64))}}),nt=["id"],lt={key:0,class:"cl-plaintext-value"},ot=["src","alt"],at=["src"],st={key:0},ct=e.defineComponent({name:"ClFileUpload",__name:"Index",props:{id:String,name:String,value:[String,Array,Object],className:String,disabled:{type:Boolean,default:!1},theme:{type:String,default:"default",validator:n=>["default","button"].includes(n)},isMultiple:{type:Boolean,default:!1},defaultHoverTitle:String,defaultIcon:String,isShowCompleteMsg:{type:Boolean,default:!0},buttonClass:String,buttonLabel:String,buttonIcon:String,buttonColor:String,checkFormat:String,checkMinSize:[String,Number],checkMaxSize:[String,Number],checkWidth:[String,Number],checkHeight:[String,Number],checkWHType:{type:String,default:"equal"},imgFit:{type:String,default:"width"},isShowPreview:{type:Boolean,default:!0},isShowDownload:{type:Boolean,default:!0},isShowUploadResult:{type:Boolean,default:!0},isShowUploadIng:{type:Boolean,default:!0},serverFileCallback:Function,isPlaintext:{type:Boolean,default:!1},plaintextEmptyText:{type:String,default:void 0},plaintextSeparator:{type:String,default:","}},emits:["update:value","update:modelValue","onChange","onRemove","onError"],setup(n,{expose:p,emit:f}){const i=n,S=f,N=e.inject("$ClGlobals",null),T=e.useAttrs(),j=i.id,P=e.useTemplateRef("refElFileDefault"),H=e.useTemplateRef("refElFileButton");let X=0,A=0;const J=e.computed(()=>t.isFunction(i.serverFileCallback)),te=["jpg","jpeg","png","gif","webp","bmp","svg"],ne=["mp4","webm","ogg","ogv","mov","avi","mkv"],le=u=>{const y=u.split("?")[0].split("#")[0],v=y.split("/"),d=v.length>0?v[v.length-1]:y;return t.isEmpty(d)?u:decodeURIComponent(d)},Y=e.computed(()=>{const u=i.value,y=Array.isArray(u)?u:t.isEmpty(u)?[]:[u],v=[];return y.forEach(d=>{if(t.isString(d)){t.isNonEmptyString(d)&&v.push({url:d,name:le(d),type:"file"});return}d&&t.isNonEmptyString(d.name)&&v.push({url:"",name:d.name,type:"file"})}),v.map(d=>{if(t.isEmpty(d.url))return d;const M=d.name.lastIndexOf("."),x=M>-1?d.name.slice(M+1).toLowerCase():"";let R="file";return te.indexOf(x)>-1?R="image":ne.indexOf(x)>-1&&(R="video"),{...d,type:R}})}),r=e.computed(()=>Y.value.filter(u=>u.type!=="file")),g=e.computed(()=>{const u=t.isString(i.plaintextSeparator)?i.plaintextSeparator:",";return Y.value.filter(y=>y.type==="file").map(y=>y.name).join(u)}),w=e.computed(()=>r.value.length>0?g.value:Ee.getPlaintextOutText("fileUpload",i.plaintextEmptyText,g.value)),s=e.computed(()=>{let u={"panel-file-upload":!0};return u=t.getJsonMerge(u,pe.getClassNameJson(i.className)),u}),a=(u,y,v)=>{S("update:value",u),S("update:modelValue",u),S("onChange",y,v)},E=()=>{S("onRemove")},k=()=>{let u=null;switch(i.theme){case"default":u=P.value?.getValue();break;case"button":u=H.value?.getValue();break}return u},B=(u,y)=>{switch(u){case"default":P.value?.saveServerCallback(y);break;case"button":H.value?.saveServerCallback(y);break}},F=(u,y)=>{const v=k(),d=J.value?v:u;a(v,d,y)},$=u=>{t.isArray(u)&&S("onError",u)},G=()=>{A+=1,E();const u=k();a(u,u)},W=async(u,y,v)=>{const d=N?.preview;d&&await d.show({type:y,src:u,showIndex:v??0})},I=async(u,y)=>{const v=i.theme,d=++X,M=A;let x=!0;if(i.serverFileCallback)try{const K=!i.isMultiple&&t.isObject(y)&&t.isBoolean(y.isImage)?y.isImage:!1,ie=pe.getElementData(T);x=await i.serverFileCallback(u,K,ie)}catch{d===X&&A===M&&i.theme===v&&B(v,{req:y,res:{success:!1}});return}let R={};if(t.isBoolean(x)?R.success=x:t.isUndefined(x)?R.success=!0:t.isString(x)||t.isArray(x)?(R.success=!0,R.fileUrl=x):t.isObject(x)?R=x:R.success=!1,i.theme!==v){S("onError",["保存期间主题已切换,本次保存结果未写入"]);return}d!==X||A!==M||B(v,{req:y,res:R})};return e.provide("$FileuploadTop",e.reactive({getFileCheckInfo:()=>({checkFormat:i.checkFormat,checkWidth:i.checkWidth,checkHeight:i.checkHeight,checkWHType:i.checkWHType,checkMinSize:i.checkMinSize,checkMaxSize:i.checkMaxSize})})),p({getValue:()=>k(),cleanReduction:()=>{switch(i.theme){case"default":P.value?.cleanReduction();break;case"button":H.value?.cleanReduction();break}a("","")}}),(u,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.value),id:e.unref(j)},[n.isPlaintext?(e.openBlock(),e.createElementBlock("div",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(v,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`plain-${d}`},[v.type==="image"?(e.openBlock(),e.createElementBlock("img",{key:0,src:v.url,alt:v.name,class:"cl-plaintext-media"},null,8,ot)):(e.openBlock(),e.createElementBlock("video",{key:1,src:v.url,controls:"",class:"cl-plaintext-media"},null,8,at))],64))),128)),w.value?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(w.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),!n.isPlaintext&&n.theme==="button"?(e.openBlock(),e.createBlock(it,{key:2,ref_key:"refElFileButton",ref:H,value:n.value,name:n.name,disabled:n.disabled,isMultiple:n.isMultiple,buttonClass:n.buttonClass,buttonLabel:n.buttonLabel,buttonIcon:n.buttonIcon,buttonColor:n.buttonColor,checkFormat:n.checkFormat,checkMinSize:n.checkMinSize,checkMaxSize:n.checkMaxSize,checkWidth:n.checkWidth,checkHeight:n.checkHeight,checkWHType:n.checkWHType,isServerCallback:J.value,isShowUploadResult:n.isShowUploadResult,isShowUploadIng:n.isShowUploadIng,isShowPreview:n.isShowPreview,isShowDownload:n.isShowDownload,onOnChange:F,onOnError:$,onOnRemove:G,onOnPreview:W,onOnSaveFile:I},{label:e.withCtx(()=>[e.renderSlot(u.$slots,"label")]),_:3},8,["value","name","disabled","isMultiple","buttonClass","buttonLabel","buttonIcon","buttonColor","checkFormat","checkMinSize","checkMaxSize","checkWidth","checkHeight","checkWHType","isServerCallback","isShowUploadResult","isShowUploadIng","isShowPreview","isShowDownload"])):!n.isPlaintext&&n.theme==="default"?(e.openBlock(),e.createBlock(je,{key:3,ref_key:"refElFileDefault",ref:P,value:n.value,name:n.name,disabled:n.disabled,defaultHoverTitle:n.defaultHoverTitle,defaultIcon:n.defaultIcon,isShowCompleteMsg:n.isShowCompleteMsg,checkFormat:n.checkFormat,checkMinSize:n.checkMinSize,checkMaxSize:n.checkMaxSize,checkWidth:n.checkWidth,checkHeight:n.checkHeight,checkWHType:n.checkWHType,imgFit:n.imgFit,isServerCallback:J.value,isShowPreview:n.isShowPreview,isShowDownload:n.isShowDownload,onOnChange:F,onOnError:$,onOnRemove:G,onOnPreview:W,onOnSaveFile:I},{label:e.withCtx(()=>[e.renderSlot(u.$slots,"label")]),_:3},8,["value","name","disabled","defaultHoverTitle","defaultIcon","isShowCompleteMsg","checkFormat","checkMinSize","checkMaxSize","checkWidth","checkHeight","checkWHType","imgFit","isServerCallback","isShowPreview","isShowDownload"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[],64))],10,nt))}});exports._sfc_main=ct;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as ke, useTemplateRef as Ce, ref as n, computed as d, onMounted as be, onUnmounted as Me, watch as H, openBlock as te, createBlock as Ae, Teleport as Oe, createVNode as ne, Transition as Pe, withCtx as De, createElementBlock as Le, normalizeStyle as ze, normalizeClass as Fe, unref as Ye, createElementVNode as Be, toDisplayString as Re, withModifiers as J, createCommentVNode as Ue, nextTick as $e } from "vue";
|
|
2
2
|
import l from "@cldemo/ui-kit/common/base";
|
|
3
3
|
import qe from "@cldemo/ui-kit/common/Element";
|
|
4
|
-
import { _ as Ve } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as Ve } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
|
|
5
5
|
import { l as We, u as Ze } from "./scrollLock-DQEGK5um.js";
|
|
6
6
|
const He = ["id"], Je = { class: "notifym-text" }, se = 2e3, le = 3e3, Ee = 300, Xe = 6, je = 0.3, xe = 24, Ge = 200, io = /* @__PURE__ */ ke({
|
|
7
7
|
name: "ClNotifyM",
|
|
@@ -2,7 +2,7 @@ import { defineComponent as he, defineAsyncComponent as O, useTemplateRef as ge,
|
|
|
2
2
|
import L from "@cldemo/ui-kit/common/base";
|
|
3
3
|
import ke from "@cldemo/ui-kit/common/Element";
|
|
4
4
|
import { _ as Z } from "./Index.vue_vue_type_script_setup_true_lang-DROYOL5-.js";
|
|
5
|
-
import { _ as De } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as De } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
|
|
6
6
|
const Le = ["id"], be = { class: "ptr-track" }, Me = { class: "ptr-text" }, xe = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "ptr-scroller-wrap"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),n=require("@cldemo/ui-kit/common/base"),K=require("@cldemo/ui-kit/common/Element"),Q=require("./Index.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";const e=require("vue"),n=require("@cldemo/ui-kit/common/base"),K=require("@cldemo/ui-kit/common/Element"),Q=require("./Index.vue_vue_type_script_setup_true_lang-xONe0mSK.js"),W=require("./Index.vue_vue_type_script_setup_true_lang-CZNVHUR1.js"),X=["id"],Y={key:2,class:"panel-toast__text"},E=e.defineComponent({name:"ClToast",__name:"Index",props:{id:String,className:String,show:Boolean,type:{type:String,default:"text",validator:l=>["text","success","fail","loading"].indexOf(l)!==-1},message:String,position:{type:String,default:"middle",validator:l=>["top","middle","bottom"].indexOf(l)!==-1},duration:{type:Number,default:2e3},isOverlay:Boolean,isForbidClick:Boolean,loadingType:{type:String,default:"spinner",validator:l=>["spinner","circular"].indexOf(l)!==-1},icon:String,iconSize:{type:[String,Number],default:36},zIndex:{type:Number,default:2e3},teleportTarget:{type:String,default:""}},emits:["update:show","onOpen","onOpened","onClose","onClosed","onClick"],setup(l,{expose:S,emit:x}){const t=l,r=x,F=t.id,d=e.ref(!1),s=e.ref(t.type),m=e.ref(t.message||""),u=e.ref(t.position),p=e.ref(n.isNumber(t.duration)&&n.isFinite(t.duration)?Math.max(0,Number(t.duration)):0),v=e.ref(t.isOverlay),k=e.ref(t.isForbidClick),b=e.ref(t.loadingType),c=e.ref(t.icon||""),f=e.ref(n.isNumber(t.zIndex)&&n.isFinite(t.zIndex)?Math.max(0,Number(t.zIndex)):2e3);let i=null;const N=e.computed(()=>d.value),M=e.computed(()=>{const a=t.teleportTarget;return a==="self"||!n.isString(a)||n.isEmpty(a.trim())?"body":a}),O=e.computed(()=>t.teleportTarget==="self"),w=e.computed(()=>v.value||k.value),I=e.computed(()=>s.value!=="text"||n.isNonEmptyString(c.value)),L=e.computed(()=>s.value==="loading"),h=e.computed(()=>n.isNonEmptyString(m.value)),q=e.computed(()=>n.isNonEmptyString(c.value)?c.value:s.value==="success"?"check":s.value==="fail"?"close":""),A=e.computed(()=>t.iconSize),D=e.computed(()=>{const a={"panel-toast":!0,"panel-toast--top":u.value==="top","panel-toast--middle":u.value==="middle","panel-toast--bottom":u.value==="bottom","panel-toast--icon-only":I.value&&!h.value};return n.getJsonMerge(a,K.getClassNameJson(t.className))}),P=e.computed(()=>({"panel-toast__icon--success":s.value==="success","panel-toast__icon--fail":s.value==="fail"})),V=e.computed(()=>({zIndex:f.value})),J=e.computed(()=>({zIndex:f.value+1})),y=()=>{i&&(clearTimeout(i),i=null)},z=()=>{y(),p.value>0&&(i=setTimeout(()=>{i=null,r("update:show",!1),i||(i=setTimeout(()=>{i=null,g()},300))},p.value))},g=()=>{y(),d.value=!1},R=()=>{s.value=t.type,m.value=t.message||"",u.value=t.position,p.value=n.isNumber(t.duration)&&n.isFinite(t.duration)?Math.max(0,Number(t.duration)):0,v.value=t.isOverlay,k.value=t.isForbidClick,b.value=t.loadingType,c.value=t.icon||"",f.value=n.isNumber(t.zIndex)&&n.isFinite(t.zIndex)?Math.max(0,Number(t.zIndex)):2e3},_=(a,o,H="text",B)=>{s.value=o&&o.type||H,m.value=n.isNonEmptyString(a)?a:t.message||"",u.value=o&&o.position||t.position;const C=o&&n.isNumber(o.duration)&&n.isFinite(o.duration)?Math.max(0,Number(o.duration)):void 0,T=C!==void 0?C:B!==void 0?Math.max(0,Number(B)):t.duration;p.value=n.isNumber(T)&&n.isFinite(T)?Math.max(0,Number(T)):n.isNumber(t.duration)&&n.isFinite(t.duration)?t.duration:0,v.value=o&&o.overlay!==void 0?o.overlay:t.isOverlay,k.value=o&&o.forbidClick!==void 0?o.forbidClick:t.isForbidClick,b.value=o&&o.loadingType||t.loadingType,c.value=o&&o.icon||t.icon||"",f.value=o&&o.zIndex!==void 0&&n.isNumber(o.zIndex)&&n.isFinite(o.zIndex)?Math.max(0,Number(o.zIndex)):n.isNumber(t.zIndex)&&n.isFinite(t.zIndex)?Math.max(0,Number(t.zIndex)):2e3,d.value=!0,z()};e.onBeforeUnmount(()=>{y()}),e.watch(()=>t.show,a=>{a?(R(),d.value=!0,z()):g()},{immediate:!0});const U=()=>{r("onClick")},Z=()=>{r("onOpen")},$=()=>{r("onOpened")},j=()=>{r("onClose")},G=()=>{r("onClosed")};return S({toast:(a,o)=>{_(a,o,"text")},success:(a,o)=>{_(a,o,"success")},fail:(a,o)=>{_(a,o,"fail")},loading:(a,o)=>{_(a,o,"loading",0)},close:(a=0)=>{n.isFinite(a)&&a>0?(y(),i=setTimeout(()=>{i=null,g()},a)):g()}}),(a,o)=>(e.openBlock(),e.createBlock(e.Teleport,{to:M.value,disabled:O.value},[N.value&&w.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["panel-toast-mask",{"panel-toast-mask--overlay":v.value}]),style:e.normalizeStyle(V.value)},null,6)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createVNode(e.Transition,{name:"toast-fade",onEnter:Z,onAfterEnter:$,onLeave:j,onAfterLeave:G},{default:e.withCtx(()=>[N.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(F),class:e.normalizeClass(D.value),style:e.normalizeStyle(J.value),onClick:U},[I.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["panel-toast__icon",P.value])},[L.value?(e.openBlock(),e.createBlock(W._sfc_main,{key:0,theme:"toastRing","loading-type":b.value,color:"white"},null,8,["loading-type"])):(e.openBlock(),e.createBlock(Q._sfc_main,{key:1,name:q.value,size:A.value,color:"var(--cl-bg, #ffffff)"},null,8,["name","size"]))],2)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),h.value?(e.openBlock(),e.createElementBlock("div",Y,e.toDisplayString(m.value),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64))],14,X)):e.createCommentVNode("",!0)]),_:1})],8,["to","disabled"]))}});exports._sfc_main=E;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as Le, inject as Fe, useTemplateRef as ie, reactive as Ie, ref as de, computed as te, onMounted as Te, nextTick as R, watch as Ee, openBlock as C, createElementBlock as b, withModifiers as Se, normalizeStyle as De, normalizeClass as Ke, createElementVNode as ge, createVNode as X, withDirectives as Re, vShow as je, createBlock as we, Fragment as ee, withKeys as Ve, toRaw as Oe, onBeforeUnmount as Ue, unref as Ce, renderList as We, toDisplayString as ze, provide as qe, withCtx as He } from "vue";
|
|
2
2
|
import t from "@cldemo/ui-kit/common/base";
|
|
3
3
|
import oe from "@cldemo/ui-kit/common/Element";
|
|
4
|
-
import { _ as Ge } from "./List.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as Ge } from "./List.vue_vue_type_script_setup_true_lang-NrDV8bOV.js";
|
|
5
5
|
import { _ as Qe } from "./Index.vue_vue_type_script_setup_true_lang-cOsTL39H.js";
|
|
6
|
-
import { _ as Xe } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as Ye } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as Ze } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as et } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { _ as tt } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { _ as nt } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { _ as Me } from "./One.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { _ as Xe } from "./Index.vue_vue_type_script_setup_true_lang-B8YAhRda.js";
|
|
7
|
+
import { _ as Ye } from "./Index.vue_vue_type_script_setup_true_lang-M5y0DMPl.js";
|
|
8
|
+
import { _ as Ze } from "./Index.vue_vue_type_script_setup_true_lang-VUD3rCg5.js";
|
|
9
|
+
import { _ as et } from "./Index.vue_vue_type_script_setup_true_lang-DvYX7kuB.js";
|
|
10
|
+
import { _ as tt } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
|
|
11
|
+
import { _ as nt } from "./Index.vue_vue_type_script_setup_true_lang-D3Z2BVYR.js";
|
|
12
|
+
import { _ as Me } from "./One.vue_vue_type_script_setup_true_lang-BL5CUHVm.js";
|
|
13
13
|
import { _ as it } from "./Ing.vue_vue_type_script_setup_true_lang-DLgw8gwh.js";
|
|
14
14
|
import { a as at } from "./language-CZZEj4e3.js";
|
|
15
15
|
/* empty css */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as k, reactive as g, computed as w, onMounted as x, nextTick as E, openBlock as l, createElementBlock as u, withKeys as p, withModifiers as m, unref as N, normalizeClass as H, createElementVNode as M, renderSlot as B, createVNode as d, Fragment as I } from "vue";
|
|
2
2
|
import f from "@cldemo/ui-kit/common/base";
|
|
3
3
|
import K from "@cldemo/ui-kit/common/Element";
|
|
4
|
-
import { _ as C } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as C } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
|
|
5
5
|
import L from "../Element/__provide__/Clipboard.js";
|
|
6
6
|
const F = ["id", "onKeydown"], J = { class: "clipboard-btn" }, P = {
|
|
7
7
|
key: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as X, useTemplateRef as Y, ref as T, computed as
|
|
1
|
+
import { defineComponent as X, useTemplateRef as Y, ref as T, computed as S, onMounted as _, watch as F, openBlock as ee, createBlock as te, unref as ne, createSlots as ae, withCtx as x, renderSlot as I, nextTick as B } from "vue";
|
|
2
2
|
import l from "@cldemo/ui-kit/common/base";
|
|
3
|
-
import
|
|
4
|
-
import { _ as w } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import N from "@cldemo/ui-kit/common/Element";
|
|
4
|
+
import { _ as w } from "./Index.vue_vue_type_script_setup_true_lang-VUD3rCg5.js";
|
|
5
5
|
const pe = /* @__PURE__ */ X({
|
|
6
6
|
name: "ClInputNumber",
|
|
7
7
|
components: {
|
|
@@ -87,7 +87,7 @@ const pe = /* @__PURE__ */ X({
|
|
|
87
87
|
type: Number,
|
|
88
88
|
default: 0,
|
|
89
89
|
// desc: 小数位数(-1 为不限制)
|
|
90
|
-
validator: (
|
|
90
|
+
validator: (i) => i >= -1 && i <= 100 && i % 1 === 0
|
|
91
91
|
},
|
|
92
92
|
isThousand: {
|
|
93
93
|
type: Boolean,
|
|
@@ -103,26 +103,31 @@ const pe = /* @__PURE__ */ X({
|
|
|
103
103
|
type: Number,
|
|
104
104
|
default: 200,
|
|
105
105
|
// desc: 变更延迟时间(毫秒)
|
|
106
|
-
validator: (
|
|
106
|
+
validator: (i) => l.isFinite(i) && i >= 0
|
|
107
107
|
},
|
|
108
108
|
isPlaintext: {
|
|
109
109
|
type: Boolean,
|
|
110
110
|
default: !1
|
|
111
111
|
// desc: 是否纯文本只读模式,只渲染显示文本(含千分位与小数位)不挂载输入框
|
|
112
|
+
},
|
|
113
|
+
plaintextEmptyText: {
|
|
114
|
+
type: String,
|
|
115
|
+
default: void 0
|
|
116
|
+
// desc: 纯文本只读模式下值为空时的显示文本(默认 "-",显式传空串则显示空白;未显式传时依次读取组件配置段与 plaintextGlobal 段)
|
|
112
117
|
}
|
|
113
118
|
},
|
|
114
119
|
emits: ["update:value", "update:modelValue", "onChange", "onFocus", "onBlur", "onChangeBlur", "onKeyupEnter", "onClear", "onInit", "onKeydown", "onKeyup", "onChangeDelay"],
|
|
115
|
-
setup(
|
|
116
|
-
const u =
|
|
120
|
+
setup(i, { expose: O, emit: R }) {
|
|
121
|
+
const u = i, m = R, k = u.id, y = Y("refElInput"), c = T(u.value), f = T(u.value), K = S(() => {
|
|
117
122
|
let e = { "panel-input-number": !0 };
|
|
118
|
-
return e = l.getJsonMerge(e,
|
|
119
|
-
}), $ =
|
|
123
|
+
return e = l.getJsonMerge(e, N.getClassNameJson(u.className)), l.getStringByJson(e, " ");
|
|
124
|
+
}), $ = S(() => l.isNonEmptyString(u.inputmode) ? u.inputmode : u.decimal === 0 ? "numeric" : "decimal"), E = (e) => {
|
|
120
125
|
if (e !== f.value) {
|
|
121
126
|
f.value = e;
|
|
122
127
|
const t = d(e);
|
|
123
128
|
m("update:value", t), m("update:modelValue", t), m("onChange", t);
|
|
124
129
|
}
|
|
125
|
-
},
|
|
130
|
+
}, V = (e) => {
|
|
126
131
|
let t = l.isNumber(e);
|
|
127
132
|
if (!t)
|
|
128
133
|
if (l.isNaN(+e))
|
|
@@ -133,11 +138,11 @@ const pe = /* @__PURE__ */ X({
|
|
|
133
138
|
}
|
|
134
139
|
return t;
|
|
135
140
|
}, h = (e, t, n = !0, a = !0) => {
|
|
136
|
-
let
|
|
141
|
+
let s = e;
|
|
137
142
|
if (u.isNumber) {
|
|
138
143
|
let o = l.removeReplace(e);
|
|
139
144
|
if (o.length > 0)
|
|
140
|
-
if (
|
|
145
|
+
if (V(o)) {
|
|
141
146
|
if (o !== "-") {
|
|
142
147
|
const { decimal: r } = u;
|
|
143
148
|
if (n && r !== 0 && (r === -1 || r >= 0 && r <= 100) && r !== -1) {
|
|
@@ -159,27 +164,27 @@ const pe = /* @__PURE__ */ X({
|
|
|
159
164
|
o = t;
|
|
160
165
|
else
|
|
161
166
|
o = "";
|
|
162
|
-
|
|
167
|
+
s = o;
|
|
163
168
|
}
|
|
164
|
-
return
|
|
169
|
+
return s;
|
|
165
170
|
}, D = (e, t) => {
|
|
166
171
|
const n = t.split(""), a = new RegExp(
|
|
167
172
|
"^" + n.map((p) => p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(".*?")
|
|
168
|
-
),
|
|
173
|
+
), s = e.match(a);
|
|
169
174
|
let o;
|
|
170
|
-
return
|
|
175
|
+
return s && (o = s[0].length), o;
|
|
171
176
|
}, L = (e, t, n) => {
|
|
172
|
-
const a =
|
|
173
|
-
let
|
|
174
|
-
|
|
177
|
+
const a = N.getFocusSelection(e);
|
|
178
|
+
let s = t.substring(0, a.start);
|
|
179
|
+
s = l.removeReplace(s);
|
|
175
180
|
const o = t.substring(a.start);
|
|
176
|
-
let p =
|
|
177
|
-
|
|
181
|
+
let p = V(s);
|
|
182
|
+
s.indexOf(".") > -1 && o.indexOf(".") > -1 && (p = !1);
|
|
178
183
|
let r = a.start;
|
|
179
|
-
p ? r = D(n,
|
|
180
|
-
|
|
184
|
+
p ? r = D(n, s) : r = n.lastIndexOf(o), (l.isUndefined(r) || r > n.length || r < 0) && (r = n.length), B(() => {
|
|
185
|
+
N.setFocusSelection(e, r, r);
|
|
181
186
|
});
|
|
182
|
-
},
|
|
187
|
+
}, C = () => {
|
|
183
188
|
const e = c.value;
|
|
184
189
|
if (l.isEmpty(e))
|
|
185
190
|
return e;
|
|
@@ -196,8 +201,8 @@ const pe = /* @__PURE__ */ X({
|
|
|
196
201
|
t = p.indexOf("e") > -1 ? t : p;
|
|
197
202
|
}
|
|
198
203
|
}
|
|
199
|
-
const a = t.split("."),
|
|
200
|
-
a[0] = u.isThousand ? l.getFormatThousands(
|
|
204
|
+
const a = t.split("."), s = l.isEmpty(a[0]) ? "0" : a[0];
|
|
205
|
+
a[0] = u.isThousand ? l.getFormatThousands(s) : s, n === 0 ? t = a[0] : a.length === 2 ? (a[1] = n === -1 ? a[1] : l.getFillZero(a[1], n, "r"), t = a.join(".")) : t = a[0];
|
|
201
206
|
}
|
|
202
207
|
return t;
|
|
203
208
|
}
|
|
@@ -205,12 +210,12 @@ const pe = /* @__PURE__ */ X({
|
|
|
205
210
|
let t = "";
|
|
206
211
|
if (!l.isEmpty(e) && (t = e.toString(), u.isNumber && t !== "-")) {
|
|
207
212
|
const { decimal: n } = u, a = t.split(".");
|
|
208
|
-
let
|
|
213
|
+
let s = l.removeReplace(a[0]);
|
|
209
214
|
if (a.length === 2 && n !== 0) {
|
|
210
215
|
let o = "";
|
|
211
|
-
n === -1 ? o = a[1] : o = l.getFillZero(a[1], n, "r"),
|
|
216
|
+
n === -1 ? o = a[1] : o = l.getFillZero(a[1], n, "r"), s += `.${o}`;
|
|
212
217
|
}
|
|
213
|
-
t =
|
|
218
|
+
t = s;
|
|
214
219
|
}
|
|
215
220
|
return t;
|
|
216
221
|
}, P = () => {
|
|
@@ -223,14 +228,14 @@ const pe = /* @__PURE__ */ X({
|
|
|
223
228
|
};
|
|
224
229
|
_(() => {
|
|
225
230
|
J();
|
|
226
|
-
}),
|
|
231
|
+
}), F(
|
|
227
232
|
() => u.value,
|
|
228
233
|
(e, t) => {
|
|
229
234
|
if (e !== t && e !== c.value) {
|
|
230
235
|
let n = !0;
|
|
231
236
|
if (u.isNumber) {
|
|
232
|
-
const a = l.removeReplace(e),
|
|
233
|
-
o && p ? n = !1 : !o && !p && (n = Number(a) !== Number(
|
|
237
|
+
const a = l.removeReplace(e), s = l.removeReplace(c.value), o = l.isEmpty(a), p = l.isEmpty(s);
|
|
238
|
+
o && p ? n = !1 : !o && !p && (n = Number(a) !== Number(s));
|
|
234
239
|
}
|
|
235
240
|
if (n) {
|
|
236
241
|
const a = h(e, t);
|
|
@@ -238,23 +243,23 @@ const pe = /* @__PURE__ */ X({
|
|
|
238
243
|
}
|
|
239
244
|
}
|
|
240
245
|
}
|
|
241
|
-
),
|
|
246
|
+
), F([() => u.isNumber, () => u.decimal, () => u.isThousand], () => {
|
|
242
247
|
const e = h(c.value, "");
|
|
243
|
-
c.value = e,
|
|
248
|
+
c.value = e, E(e);
|
|
244
249
|
});
|
|
245
250
|
const M = (e) => {
|
|
246
251
|
const t = h(e, f.value, !1, u.isImmediateThousand);
|
|
247
252
|
c.value = t, y.value?.setValue(t), u.isNumber && B(() => {
|
|
248
253
|
const n = y.value?.getInputElement();
|
|
249
254
|
n && c.value === t && L(n, e, String(t));
|
|
250
|
-
}),
|
|
255
|
+
}), E(t);
|
|
251
256
|
}, U = () => {
|
|
252
|
-
const e =
|
|
257
|
+
const e = C();
|
|
253
258
|
c.value = e, f.value = e;
|
|
254
259
|
const t = d(e);
|
|
255
260
|
m("onFocus", t);
|
|
256
261
|
}, j = () => {
|
|
257
|
-
const e =
|
|
262
|
+
const e = C();
|
|
258
263
|
c.value = e, f.value = e;
|
|
259
264
|
const t = d(e);
|
|
260
265
|
m("onBlur", t);
|
|
@@ -272,11 +277,11 @@ const pe = /* @__PURE__ */ X({
|
|
|
272
277
|
m("onInit");
|
|
273
278
|
}, Q = (e) => {
|
|
274
279
|
m("onChangeDelay", d(e));
|
|
275
|
-
},
|
|
280
|
+
}, b = () => d(c.value);
|
|
276
281
|
return O({
|
|
277
|
-
getValue:
|
|
282
|
+
getValue: b,
|
|
278
283
|
getValueData: () => ({
|
|
279
|
-
value:
|
|
284
|
+
value: b(),
|
|
280
285
|
show: l.isEmpty(c.value) ? "" : c.value.toString()
|
|
281
286
|
}),
|
|
282
287
|
setValue: (e, t) => {
|
|
@@ -295,21 +300,22 @@ const pe = /* @__PURE__ */ X({
|
|
|
295
300
|
ref: y,
|
|
296
301
|
id: ne(k),
|
|
297
302
|
value: c.value,
|
|
298
|
-
name:
|
|
303
|
+
name: i.name,
|
|
299
304
|
className: K.value,
|
|
300
|
-
inputType:
|
|
305
|
+
inputType: i.inputType,
|
|
301
306
|
inputmode: $.value,
|
|
302
|
-
autocomplete:
|
|
303
|
-
placeholder:
|
|
304
|
-
label:
|
|
305
|
-
isFloating:
|
|
306
|
-
disabled:
|
|
307
|
-
isReadonly:
|
|
308
|
-
isClean:
|
|
309
|
-
width:
|
|
310
|
-
theme:
|
|
311
|
-
isPlaintext:
|
|
312
|
-
|
|
307
|
+
autocomplete: i.autocomplete,
|
|
308
|
+
placeholder: i.placeholder,
|
|
309
|
+
label: i.label,
|
|
310
|
+
isFloating: i.isFloating,
|
|
311
|
+
disabled: i.disabled,
|
|
312
|
+
isReadonly: i.isReadonly,
|
|
313
|
+
isClean: i.isClean,
|
|
314
|
+
width: i.width,
|
|
315
|
+
theme: i.theme,
|
|
316
|
+
isPlaintext: i.isPlaintext,
|
|
317
|
+
plaintextEmptyText: i.plaintextEmptyText,
|
|
318
|
+
changeDelayTime: i.changeDelayTime,
|
|
313
319
|
onOnChange: M,
|
|
314
320
|
onOnFocus: U,
|
|
315
321
|
onOnBlur: j,
|
|
@@ -323,26 +329,26 @@ const pe = /* @__PURE__ */ X({
|
|
|
323
329
|
}, ae({ _: 2 }, [
|
|
324
330
|
e.$slots.prepend ? {
|
|
325
331
|
name: "prepend",
|
|
326
|
-
fn:
|
|
327
|
-
|
|
332
|
+
fn: x(() => [
|
|
333
|
+
I(e.$slots, "prepend")
|
|
328
334
|
]),
|
|
329
335
|
key: "0"
|
|
330
336
|
} : void 0,
|
|
331
337
|
e.$slots.append ? {
|
|
332
338
|
name: "append",
|
|
333
|
-
fn:
|
|
334
|
-
|
|
339
|
+
fn: x(() => [
|
|
340
|
+
I(e.$slots, "append")
|
|
335
341
|
]),
|
|
336
342
|
key: "1"
|
|
337
343
|
} : void 0,
|
|
338
344
|
e.$slots.suffix ? {
|
|
339
345
|
name: "suffix",
|
|
340
|
-
fn:
|
|
341
|
-
|
|
346
|
+
fn: x(() => [
|
|
347
|
+
I(e.$slots, "suffix")
|
|
342
348
|
]),
|
|
343
349
|
key: "2"
|
|
344
350
|
} : void 0
|
|
345
|
-
]), 1032, ["id", "value", "name", "className", "inputType", "inputmode", "autocomplete", "placeholder", "label", "isFloating", "disabled", "isReadonly", "isClean", "width", "theme", "isPlaintext", "changeDelayTime"]));
|
|
351
|
+
]), 1032, ["id", "value", "name", "className", "inputType", "inputmode", "autocomplete", "placeholder", "label", "isFloating", "disabled", "isReadonly", "isClean", "width", "theme", "isPlaintext", "plaintextEmptyText", "changeDelayTime"]));
|
|
346
352
|
}
|
|
347
353
|
});
|
|
348
354
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as q, ref as _, reactive as G, computed as K, onMounted as Q, nextTick as T, onBeforeUnmount as W, watch as D, openBlock as r, createElementBlock as u, normalizeClass as w, unref as X, renderSlot as Y, Fragment as R, renderList as Z, withModifiers as ee, normalizeStyle as te, toDisplayString as se, createBlock as I, createCommentVNode as L } from "vue";
|
|
2
2
|
import o from "@cldemo/ui-kit/common/base";
|
|
3
3
|
import oe from "@cldemo/ui-kit/common/Element";
|
|
4
|
-
import { _ as N } from "./Index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as N } from "./Index.vue_vue_type_script_setup_true_lang-Bt0l5FYh.js";
|
|
5
5
|
const ne = ["id"], le = ["onClick"], ie = ["innerHTML"], ae = { key: 1 }, ye = /* @__PURE__ */ q({
|
|
6
6
|
name: "ClTags",
|
|
7
7
|
__name: "Index",
|