@obr-fe/utils 1.0.26 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/array-CEhD-Z_e.mjs +1 -0
- package/dist/{array.d.ts → array-CiSUhZCW.d.mts} +9 -8
- package/dist/array-okkZATKz.d.cts +99 -0
- package/dist/array-ri-t3Wsz.cjs +1 -0
- package/dist/array.cjs +1 -0
- package/dist/array.d.cts +3 -0
- package/dist/array.d.mts +3 -0
- package/dist/array.mjs +1 -1
- package/dist/base-854WVUaj.mjs +1 -0
- package/dist/base-BSg8gJZf.mjs +1 -0
- package/dist/{base.d.ts → base-BXKvmcaf.d.cts} +5 -4
- package/dist/{dom/base.d.ts → base-Ca2FN16G.d.mts} +3 -2
- package/dist/base-DSfexc9G.d.cts +25 -0
- package/dist/base-DUxrUTOr.cjs +1 -0
- package/dist/base-Dl59EolR.d.mts +193 -0
- package/dist/base-DmSU_ydZ.cjs +1 -0
- package/dist/base.cjs +1 -0
- package/dist/base.d.cts +3 -0
- package/dist/base.d.mts +3 -0
- package/dist/base.mjs +1 -1
- package/dist/can-use-dom-DiyvIP5G.mjs +1 -0
- package/dist/can-use-dom-DvmMdeGa.cjs +1 -0
- package/dist/cancel-BV5B58Lw.mjs +1 -0
- package/dist/cancel-Do0w5I5K.cjs +1 -0
- package/dist/chunk-BcXMmzxH.cjs +1 -0
- package/dist/chunk-Dbq9I6zD.mjs +1 -0
- package/dist/{dom/class.d.ts → class-Bp70Yi1y.d.cts} +3 -2
- package/dist/class-C29-Mh-o.mjs +1 -0
- package/dist/class-D5duI9ps.d.mts +27 -0
- package/dist/class-D8a8qnWA.cjs +1 -0
- package/dist/clipboard-BN1iiQLu.d.mts +4 -0
- package/dist/clipboard-C8ZiJE_h.d.cts +9 -0
- package/dist/clipboard-CJ-9sRbH.d.mts +9 -0
- package/dist/clipboard-CWQVWiTk.cjs +1 -0
- package/dist/clipboard-Ci0l5Dtt.d.cts +4 -0
- package/dist/clipboard-CjgXtqbg.mjs +1 -0
- package/dist/clipboard-DqGhq6A4.mjs +1 -0
- package/dist/clipboard-ZMrs6wzK.cjs +1 -0
- package/dist/clipboard.cjs +1 -0
- package/dist/clipboard.d.cts +2 -0
- package/dist/clipboard.d.mts +2 -0
- package/dist/clipboard.mjs +1 -1
- package/dist/constant-CskvZDUK.cjs +1 -0
- package/dist/constant-Dxt8HuVn.mjs +1 -0
- package/dist/{dom/contains.d.ts → contains-Bj-oQ7KI.d.mts} +3 -2
- package/dist/contains-BpG9RIaT.mjs +1 -0
- package/dist/contains-CYQgjY4K.cjs +1 -0
- package/dist/contains-D3q8gHUu.d.cts +11 -0
- package/dist/{dom/css.d.ts → css-5xR1zP0f.d.cts} +11 -10
- package/dist/css-DIpTZrC7.mjs +1 -0
- package/dist/css-DkmknM-7.d.mts +23 -0
- package/dist/css-WYllKaVv.cjs +1 -0
- package/dist/dayjs-00xX6Mts.d.mts +31 -0
- package/dist/dayjs-BBOQ72ow.mjs +1 -0
- package/dist/dayjs-Bvzj_rlD.cjs +1 -0
- package/dist/{dayjs.d.ts → dayjs-DgS65bx1.d.cts} +6 -5
- package/dist/dayjs.cjs +1 -0
- package/dist/dayjs.d.cts +2 -0
- package/dist/dayjs.d.mts +2 -0
- package/dist/dayjs.mjs +1 -1
- package/dist/dom/base.cjs +1 -0
- package/dist/dom/base.d.cts +2 -0
- package/dist/dom/base.d.mts +2 -0
- package/dist/dom/base.mjs +1 -1
- package/dist/dom/class.cjs +1 -0
- package/dist/dom/class.d.cts +2 -0
- package/dist/dom/class.d.mts +2 -0
- package/dist/dom/class.mjs +1 -1
- package/dist/dom/contains.cjs +1 -0
- package/dist/dom/contains.d.cts +2 -0
- package/dist/dom/contains.d.mts +2 -0
- package/dist/dom/contains.mjs +1 -1
- package/dist/dom/css.cjs +1 -0
- package/dist/dom/css.d.cts +2 -0
- package/dist/dom/css.d.mts +2 -0
- package/dist/dom/css.mjs +1 -1
- package/dist/dom/dynamic-css.cjs +1 -0
- package/dist/dom/dynamic-css.d.cts +2 -0
- package/dist/dom/dynamic-css.d.mts +2 -0
- package/dist/dom/dynamic-css.mjs +1 -1
- package/dist/dom/find-dom-node.cjs +1 -0
- package/dist/dom/find-dom-node.d.cts +2 -0
- package/dist/dom/find-dom-node.d.mts +2 -0
- package/dist/dom/find-dom-node.mjs +1 -1
- package/dist/dom/focus.cjs +1 -0
- package/dist/dom/focus.d.cts +2 -0
- package/dist/dom/focus.d.mts +2 -0
- package/dist/dom/focus.mjs +1 -1
- package/dist/dom/iframe.cjs +1 -0
- package/dist/dom/iframe.d.cts +2 -0
- package/dist/dom/iframe.d.mts +2 -0
- package/dist/dom/iframe.mjs +1 -1
- package/dist/dom/index.cjs +1 -0
- package/dist/dom/index.d.cts +18 -0
- package/dist/dom/index.d.mts +18 -0
- package/dist/dom/index.mjs +1 -1
- package/dist/dom/is-visible.cjs +1 -0
- package/dist/dom/is-visible.d.cts +2 -0
- package/dist/dom/is-visible.d.mts +2 -0
- package/dist/dom/is-visible.mjs +1 -1
- package/dist/dom/lib/can-use-dom.cjs +1 -0
- package/dist/dom/lib/can-use-dom.d.cts +3 -0
- package/dist/dom/lib/can-use-dom.d.mts +4 -0
- package/dist/dom/lib/can-use-dom.mjs +1 -1
- package/dist/dom/scrollbar.cjs +1 -0
- package/dist/dom/scrollbar.d.cts +2 -0
- package/dist/dom/scrollbar.d.mts +2 -0
- package/dist/dom/scrollbar.mjs +1 -1
- package/dist/dom/storage.cjs +1 -0
- package/dist/dom/storage.d.cts +3 -0
- package/dist/dom/storage.d.mts +3 -0
- package/dist/dom/storage.mjs +1 -1
- package/dist/dom/style-checker.cjs +1 -0
- package/dist/dom/style-checker.d.cts +2 -0
- package/dist/dom/style-checker.d.mts +2 -0
- package/dist/dom/style-checker.mjs +1 -1
- package/dist/dom/style-names.cjs +1 -0
- package/dist/dom/style-names.d.cts +2 -0
- package/dist/dom/style-names.d.mts +2 -0
- package/dist/dom/style-names.mjs +1 -1
- package/dist/dom/support.cjs +1 -0
- package/dist/dom/support.d.cts +2 -0
- package/dist/dom/support.d.mts +2 -0
- package/dist/dom/support.mjs +1 -1
- package/dist/dom/video.cjs +1 -0
- package/dist/dom/video.d.cts +2 -0
- package/dist/dom/video.d.mts +2 -0
- package/dist/dom/video.mjs +1 -1
- package/dist/dom-D2QfuVth.mjs +1 -0
- package/dist/{dom/dynamic-css.d.ts → dynamic-css-CD9eHWzL.d.mts} +9 -8
- package/dist/dynamic-css-CIw8ZtwR.d.cts +21 -0
- package/dist/dynamic-css-CP1iFszw.mjs +1 -0
- package/dist/dynamic-css-iSnm5CN6.cjs +1 -0
- package/dist/{encrypt.d.ts → encrypt-BFDBlSX_.d.cts} +3 -2
- package/dist/encrypt-CHxdyuoC.d.mts +29 -0
- package/dist/encrypt-D6oTfiTY.cjs +1 -0
- package/dist/encrypt-Z5CU2r_1.mjs +1 -0
- package/dist/encrypt.cjs +1 -0
- package/dist/encrypt.d.cts +2 -0
- package/dist/encrypt.d.mts +2 -0
- package/dist/encrypt.mjs +1 -1
- package/dist/file-B9oorXhT.cjs +1 -0
- package/dist/{file.d.ts → file-CjjpuB5u.d.cts} +6 -5
- package/dist/file-D4oBhObv.d.mts +36 -0
- package/dist/file-Dwobl-pF.mjs +1 -0
- package/dist/file-TjtumYrh.mjs +1 -0
- package/dist/file-rmcv99h0.cjs +1 -0
- package/dist/file.cjs +1 -0
- package/dist/file.d.cts +2 -0
- package/dist/file.d.mts +2 -0
- package/dist/file.mjs +1 -1
- package/dist/find-dom-node-BYO9We8P.d.mts +4 -0
- package/dist/find-dom-node-BkrYW2pm.d.cts +4 -0
- package/dist/find-dom-node-gbroqN2N.mjs +1 -0
- package/dist/find-dom-node-lY7vePVL.cjs +1 -0
- package/dist/{dom/focus.d.ts → focus-BBcVAsFx.d.cts} +3 -2
- package/dist/focus-ByNB07tt.d.mts +11 -0
- package/dist/focus-DtSCSQEr.cjs +1 -0
- package/dist/focus-REYXIBdQ.mjs +1 -0
- package/dist/format-3CsgkBWg.mjs +1 -0
- package/dist/format-CezZBld9.cjs +1 -0
- package/dist/handler-C40H2JG4.cjs +1 -0
- package/dist/handler-Dk1QWSgF.d.cts +10 -0
- package/dist/handler-N6Akxkpa.mjs +1 -0
- package/dist/handler-bsPUG7U9.d.mts +10 -0
- package/dist/iframe-ByOdqFYr.mjs +1 -0
- package/dist/{dom/iframe.d.ts → iframe-CBeiHcmx.d.mts} +16 -15
- package/dist/iframe-CR0bl22C.cjs +1 -0
- package/dist/iframe-QhpkIola.d.cts +58 -0
- package/dist/index-6bSwZ6-V.d.cts +1 -0
- package/dist/index-BYjO2-Dk.d.mts +3 -0
- package/dist/index-CLTQPxoD.d.mts +1 -0
- package/dist/index-CqciuydZ.d.cts +7 -0
- package/dist/index-Ctvuv0vV.d.cts +1 -0
- package/dist/index-D-9tW2r5.d.mts +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +43 -0
- package/dist/index.d.mts +44 -0
- package/dist/index.mjs +1 -1
- package/dist/is-visible-BXbqt6I2.mjs +1 -0
- package/dist/is-visible-BpFCb4uJ.d.mts +4 -0
- package/dist/is-visible-DT2jLmnp.d.cts +4 -0
- package/dist/is-visible-laJngqtK.cjs +1 -0
- package/dist/lodash-BrrZKPAY.d.cts +10 -0
- package/dist/lodash-DAdPs0O9.d.mts +10 -0
- package/dist/lodash-iHVEJs1z.mjs +1 -0
- package/dist/lodash-kixEH9o9.cjs +1 -0
- package/dist/lodash.cjs +1 -0
- package/dist/lodash.d.cts +2 -0
- package/dist/lodash.d.mts +2 -0
- package/dist/lodash.mjs +1 -1
- package/dist/object-C6qVmoZY.cjs +1 -0
- package/dist/{object.d.ts → object-CqyPehTh.d.cts} +5 -4
- package/dist/object-j-lK643f.mjs +1 -0
- package/dist/object-l_DvbWqN.d.mts +87 -0
- package/dist/object.cjs +1 -0
- package/dist/object.d.cts +3 -0
- package/dist/object.d.mts +3 -0
- package/dist/object.mjs +1 -1
- package/dist/other-B2ug3Xof.mjs +1 -0
- package/dist/{other.d.ts → other-BzR4DqG0.d.cts} +5 -4
- package/dist/other-H13CGzY5.d.mts +50 -0
- package/dist/other-c9ZDQ-tY.cjs +1 -0
- package/dist/other.cjs +1 -0
- package/dist/other.d.cts +3 -0
- package/dist/other.d.mts +3 -0
- package/dist/other.mjs +1 -1
- package/dist/params-CnZhAsve.cjs +1 -0
- package/dist/params-CpjttIDa.mjs +1 -0
- package/dist/parse-BpErok05.cjs +1 -0
- package/dist/parse-C1eaIjot.mjs +1 -0
- package/dist/{parse.d.ts → parse-DQMRWCdz.d.mts} +8 -7
- package/dist/parse-vp0jh8-x.d.cts +22 -0
- package/dist/parse.cjs +1 -0
- package/dist/parse.d.cts +3 -0
- package/dist/parse.d.mts +3 -0
- package/dist/parse.mjs +1 -1
- package/dist/pinyin-BE6Ew65z.cjs +1 -0
- package/dist/{pinyin.d.ts → pinyin-C2BqrFMq.d.mts} +5 -3
- package/dist/pinyin-D11MW4u2.mjs +1 -0
- package/dist/pinyin-Di92101W.d.cts +20 -0
- package/dist/pinyin.cjs +1 -0
- package/dist/pinyin.d.cts +2 -0
- package/dist/pinyin.d.mts +2 -0
- package/dist/pinyin.mjs +1 -1
- package/dist/request/constant.cjs +1 -0
- package/dist/request/{constant.d.ts → constant.d.cts} +4 -4
- package/dist/request/constant.d.mts +9 -0
- package/dist/request/constant.mjs +1 -1
- package/dist/request/handler.cjs +1 -0
- package/dist/request/handler.d.cts +3 -0
- package/dist/request/handler.d.mts +3 -0
- package/dist/request/handler.mjs +1 -1
- package/dist/request/index.cjs +1 -0
- package/dist/request/index.d.cts +6 -0
- package/dist/request/index.d.mts +6 -0
- package/dist/request/index.mjs +1 -1
- package/dist/request/request.cjs +1 -0
- package/dist/request/request.d.cts +3 -0
- package/dist/request/request.d.mts +3 -0
- package/dist/request/request.mjs +1 -1
- package/dist/request/utils/cancel.cjs +1 -0
- package/dist/request/utils/{cancel.d.ts → cancel.d.cts} +4 -4
- package/dist/request/utils/cancel.d.mts +23 -0
- package/dist/request/utils/cancel.mjs +1 -1
- package/dist/request/utils/file.cjs +1 -0
- package/dist/request/utils/file.d.cts +6 -0
- package/dist/request/utils/file.d.mts +6 -0
- package/dist/request/utils/file.mjs +1 -1
- package/dist/request/utils/format.cjs +1 -0
- package/dist/request/utils/{format.d.ts → format.d.cts} +4 -4
- package/dist/request/utils/format.d.mts +13 -0
- package/dist/request/utils/format.mjs +1 -1
- package/dist/request/utils/params.cjs +1 -0
- package/dist/request/utils/params.d.cts +6 -0
- package/dist/request/utils/params.d.mts +6 -0
- package/dist/request/utils/params.mjs +1 -1
- package/dist/request-BG5UIh9R.mjs +1 -0
- package/dist/request-C8gChBjl.d.cts +99 -0
- package/dist/request-Cbv8Ih3e.cjs +1 -0
- package/dist/request-CcQHJNao.cjs +1 -0
- package/dist/request-CmsAe99W.mjs +1 -0
- package/dist/request-DGUcKxsQ.d.mts +99 -0
- package/dist/{safe-next-tick.d.ts → safe-next-tick-1ezZPIPs.d.cts} +5 -4
- package/dist/safe-next-tick-Cc30ZlUX.mjs +1 -0
- package/dist/safe-next-tick-DlJsO1Ha.d.mts +10 -0
- package/dist/safe-next-tick-DphyaFY6.cjs +1 -0
- package/dist/safe-next-tick.cjs +1 -0
- package/dist/safe-next-tick.d.cts +2 -0
- package/dist/safe-next-tick.d.mts +2 -0
- package/dist/safe-next-tick.mjs +1 -1
- package/dist/{dom/scrollbar.d.ts → scrollbar-07jqhpVk.d.cts} +3 -2
- package/dist/scrollbar-2zQwgB3N.cjs +1 -0
- package/dist/scrollbar-B0PNF6i2.d.mts +9 -0
- package/dist/scrollbar-BsVSwcz1.mjs +1 -0
- package/dist/storage-CVE8yo6N.mjs +1 -0
- package/dist/storage-ClTxbIcP.cjs +1 -0
- package/dist/{dom/storage.d.ts → storage-DicI9wsP.d.cts} +5 -4
- package/dist/storage-HTBNfA8Q.d.mts +21 -0
- package/dist/style-checker-066o7h7_.mjs +1 -0
- package/dist/{dom/style-checker.d.ts → style-checker-B5wzcdHi.d.mts} +3 -2
- package/dist/style-checker-CpyAZJew.d.cts +5 -0
- package/dist/style-checker-DAxS0NyJ.cjs +1 -0
- package/dist/style-names-CYvxRARD.cjs +1 -0
- package/dist/{dom/style-names.d.ts → style-names-ClFu2pk1.d.cts} +3 -2
- package/dist/style-names-DDdz6-7S.d.mts +4 -0
- package/dist/style-names-cEIIM3cL.mjs +1 -0
- package/dist/support-BKRoxgNc.d.mts +9 -0
- package/dist/support-BZYJpIOE.cjs +1 -0
- package/dist/support-jAYY4GwL.d.cts +9 -0
- package/dist/support-wu9hh5gZ.mjs +1 -0
- package/dist/{vue/type-util.d.ts → type-util-BRGMhQFp.d.cts} +22 -21
- package/dist/type-util-BdSpgYN3.d.mts +48 -0
- package/dist/type-util-HyvLYA2w.cjs +1 -0
- package/dist/type-util-Qle7ht7X.mjs +1 -0
- package/dist/types-BEdiy6mb.d.mts +208 -0
- package/dist/types-Bs46AtMe.mjs +1 -0
- package/dist/types-DTtPjrm8.d.cts +208 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.cts +2 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +1 -1
- package/dist/video-BDLauzJm.cjs +1 -0
- package/dist/{dom/video.d.ts → video-Bp6NaeX6.d.cts} +3 -2
- package/dist/video-C_sYI0Ht.d.mts +10 -0
- package/dist/video-CtkByFxt.mjs +1 -0
- package/dist/vue/hooks/clipboard.cjs +1 -0
- package/dist/vue/hooks/clipboard.d.cts +2 -0
- package/dist/vue/hooks/clipboard.d.mts +2 -0
- package/dist/vue/hooks/clipboard.mjs +1 -1
- package/dist/vue/index.cjs +1 -0
- package/dist/vue/index.d.cts +4 -0
- package/dist/vue/index.d.mts +4 -0
- package/dist/vue/index.mjs +1 -1
- package/dist/vue/type-util.cjs +1 -0
- package/dist/vue/type-util.d.cts +2 -0
- package/dist/vue/type-util.d.mts +2 -0
- package/dist/vue/type-util.mjs +1 -1
- package/dist/vue-Q8n_JN-R.mjs +1 -0
- package/package.json +6 -6
- package/dist/array.js +0 -1
- package/dist/base.js +0 -1
- package/dist/chunk-3EVCK72A.mjs +0 -1
- package/dist/chunk-44EYU7QJ.mjs +0 -1
- package/dist/chunk-4JPCGRPU.mjs +0 -1
- package/dist/chunk-6DX7ZFGR.mjs +0 -1
- package/dist/chunk-7FGMUEZA.mjs +0 -1
- package/dist/chunk-7YMDSJIW.mjs +0 -1
- package/dist/chunk-A25LR755.mjs +0 -1
- package/dist/chunk-A5BXGBYT.mjs +0 -1
- package/dist/chunk-AMTPTGPU.mjs +0 -1
- package/dist/chunk-BEM6E7R7.mjs +0 -1
- package/dist/chunk-BPXO4V4X.mjs +0 -1
- package/dist/chunk-CTKIL4BL.mjs +0 -1
- package/dist/chunk-DDHFJKTT.mjs +0 -1
- package/dist/chunk-DKKF6DRJ.mjs +0 -1
- package/dist/chunk-DVMX6FDA.mjs +0 -1
- package/dist/chunk-E4SEMOGO.mjs +0 -1
- package/dist/chunk-EUDEMS67.mjs +0 -1
- package/dist/chunk-G6NAYP42.mjs +0 -1
- package/dist/chunk-GS4ARDQV.mjs +0 -1
- package/dist/chunk-HOXWKSQ2.mjs +0 -1
- package/dist/chunk-HZMHGGXU.mjs +0 -1
- package/dist/chunk-INFFTHYR.mjs +0 -1
- package/dist/chunk-IZHCWZIN.mjs +0 -1
- package/dist/chunk-KGXCJWE5.mjs +0 -1
- package/dist/chunk-LPLK3ZT5.mjs +0 -1
- package/dist/chunk-MQBXN7R5.mjs +0 -1
- package/dist/chunk-MUHFPVB3.mjs +0 -1
- package/dist/chunk-MUUIQW2M.mjs +0 -1
- package/dist/chunk-NX2HGAYK.mjs +0 -1
- package/dist/chunk-PE3DNHCL.mjs +0 -1
- package/dist/chunk-PK5CYIDE.mjs +0 -1
- package/dist/chunk-SAXMBV46.mjs +0 -1
- package/dist/chunk-TQ5GXPYB.mjs +0 -1
- package/dist/chunk-UVMLBW6A.mjs +0 -1
- package/dist/chunk-VYAKT4FB.mjs +0 -1
- package/dist/chunk-WN7L4HYY.mjs +0 -1
- package/dist/chunk-X7TUTCBW.mjs +0 -1
- package/dist/chunk-YA66RVVU.mjs +0 -1
- package/dist/clipboard.d.ts +0 -3
- package/dist/clipboard.js +0 -1
- package/dist/dayjs.js +0 -1
- package/dist/dom/base.js +0 -1
- package/dist/dom/class.js +0 -1
- package/dist/dom/contains.js +0 -1
- package/dist/dom/css.js +0 -1
- package/dist/dom/dynamic-css.js +0 -1
- package/dist/dom/find-dom-node.d.ts +0 -3
- package/dist/dom/find-dom-node.js +0 -1
- package/dist/dom/focus.js +0 -1
- package/dist/dom/iframe.js +0 -1
- package/dist/dom/index.d.ts +0 -17
- package/dist/dom/index.js +0 -1
- package/dist/dom/is-visible.d.ts +0 -3
- package/dist/dom/is-visible.js +0 -1
- package/dist/dom/lib/can-use-dom.d.ts +0 -3
- package/dist/dom/lib/can-use-dom.js +0 -1
- package/dist/dom/scrollbar.js +0 -1
- package/dist/dom/storage.js +0 -1
- package/dist/dom/style-checker.js +0 -1
- package/dist/dom/style-names.js +0 -1
- package/dist/dom/support.d.ts +0 -8
- package/dist/dom/support.js +0 -1
- package/dist/dom/video.js +0 -1
- package/dist/encrypt.js +0 -1
- package/dist/file.js +0 -1
- package/dist/index.d.ts +0 -44
- package/dist/index.js +0 -1
- package/dist/lodash.d.ts +0 -9
- package/dist/lodash.js +0 -1
- package/dist/object.js +0 -1
- package/dist/other.js +0 -1
- package/dist/parse.js +0 -1
- package/dist/pinyin.js +0 -1
- package/dist/request/constant.js +0 -1
- package/dist/request/handler.d.ts +0 -10
- package/dist/request/handler.js +0 -1
- package/dist/request/index.d.ts +0 -4
- package/dist/request/index.js +0 -1
- package/dist/request/request.d.ts +0 -99
- package/dist/request/request.js +0 -1
- package/dist/request/utils/cancel.js +0 -1
- package/dist/request/utils/file.d.ts +0 -6
- package/dist/request/utils/file.js +0 -1
- package/dist/request/utils/format.js +0 -1
- package/dist/request/utils/params.d.ts +0 -6
- package/dist/request/utils/params.js +0 -1
- package/dist/safe-next-tick.js +0 -1
- package/dist/types.d.ts +0 -207
- package/dist/types.js +0 -1
- package/dist/vue/hooks/clipboard.d.ts +0 -8
- package/dist/vue/hooks/clipboard.js +0 -1
- package/dist/vue/index.d.ts +0 -3
- package/dist/vue/index.js +0 -1
- package/dist/vue/type-util.js +0 -1
- /package/dist/{chunk-G27KRYT2.mjs → dom-DzrnEGri.cjs} +0 -0
- /package/dist/{chunk-PM3H3ISM.mjs → types-DAFnYo8a.cjs} +0 -0
- /package/dist/{chunk-WBQAMGXK.mjs → vue-CGBzFhF4.cjs} +0 -0
package/README.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e,f as t,g as n,v as r}from"./base-854WVUaj.mjs";import{r as i}from"./lodash-iHVEJs1z.mjs";import{n as a}from"./object-j-lK643f.mjs";const o=(...e)=>e,s=(...e)=>e;function c(e){return Array.isArray(e)?e:[e]}function l(e=[],t=`id`,n=`pid`,r=`children`){let a=[],o={},s=i(e);for(let e=0;e<s.length;e++)o[s[e][t]]=s[e];for(let e=0;e<s.length;e++)o[s[e][n]]&&s[e][t]!==s[e][n]?(o[s[e][n]][r]||(o[s[e][n]][r]=[]),o[s[e][n]][r].push(s[e])):a.push(s[e]);return a}function u(e,t){return e.map(e=>({label:e[t.label],value:e[t.value]}))}function d(e){return e.filter(e=>!t(e))}function f(e=[],n,r,i=!1){let o={value:`value`,children:`children`,...a(r)},s=[],[c]=n,l=e.find(e=>e[o.value]===c);if(!t(c)&&!t(l)){let{[o.children]:e,...t}=l;return s.concat(i?{...t,children:e}:t,...f(e??[],n.slice(1),o))}return s}function p(e=[],t=`children`,n=!1){let r=[],i=(e,t)=>{e.forEach(e=>{let{[t]:a,...o}=e;n?r.push(e):r.push(o),a&&i(a,t)})};return i(e,t),r}function m(e,t){return e.reduce((e,n)=>(e.find(e=>t.every(t=>e[t]===n[t]))||e.push(n),e),[])}function h(e,t=[]){return e.filter(e=>!t.includes(e))}function g(t,i=[]){return t.filter(t=>!i.some(i=>r(i)&&r(t)?e(i)?e(t):Object.entries(i).every(([e,n])=>n===t[e]):n(i)&&Number.isNaN(i)?n(t)&&Number.isNaN(t):t===i))}export{d as a,p as c,m as d,g as i,o as l,l as n,f as o,h as r,c as s,u as t,s as u};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { TreeItemType,
|
|
2
|
-
|
|
1
|
+
import { T as TreeItemType, t as BaseOptionType, u as ObjectDataType } from "./types-BEdiy6mb.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/array.d.ts
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @description: 字符串元组
|
|
@@ -40,8 +41,8 @@ declare function array2tree<T = TreeItemType>(data?: ObjectDataType[], id?: stri
|
|
|
40
41
|
* @autor: 刘 相卿
|
|
41
42
|
*/
|
|
42
43
|
declare function array2option(array: ObjectDataType[], alias: {
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
label: string;
|
|
45
|
+
value: string;
|
|
45
46
|
}): BaseOptionType[];
|
|
46
47
|
/**
|
|
47
48
|
* @description: 删除数组中的空元素
|
|
@@ -59,8 +60,8 @@ declare function deleteEmptyElement<T>(array: T[]): T[];
|
|
|
59
60
|
* @autor: 刘 相卿
|
|
60
61
|
*/
|
|
61
62
|
declare function getElementsByValues(array: TreeItemType[] | undefined, values: (string | number)[], alias?: {
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
value?: string;
|
|
64
|
+
children?: string;
|
|
64
65
|
}, reserveChildren?: boolean): ObjectDataType[];
|
|
65
66
|
/**
|
|
66
67
|
* @description: 将树型结构数组拉平为一维数组
|
|
@@ -94,5 +95,5 @@ declare function deleteElement(array: (number | string | boolean)[], values?: (n
|
|
|
94
95
|
* @autor: 刘 相卿
|
|
95
96
|
*/
|
|
96
97
|
declare function deleteElementPro(array: any[], rules?: any[]): any[];
|
|
97
|
-
|
|
98
|
-
export {
|
|
98
|
+
//#endregion
|
|
99
|
+
export { deleteEmptyElement as a, tree2array as c, uniqueArrayByKeys as d, deleteElementPro as i, tuple as l, array2tree as n, getElementsByValues as o, deleteElement as r, toArray as s, array2option as t, tupleNum as u };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { T as TreeItemType, t as BaseOptionType, u as ObjectDataType } from "./types-DTtPjrm8.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/array.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description: 字符串元组
|
|
7
|
+
* @param {*} args
|
|
8
|
+
* @return {*}
|
|
9
|
+
* @autor: 刘 相卿
|
|
10
|
+
*/
|
|
11
|
+
declare const tuple: <T extends string[]>(...args: T) => T;
|
|
12
|
+
/**
|
|
13
|
+
* @description: 数字元组
|
|
14
|
+
* @param {*} args
|
|
15
|
+
* @return {*}
|
|
16
|
+
* @autor: 刘 相卿
|
|
17
|
+
*/
|
|
18
|
+
declare const tupleNum: <T extends number[]>(...args: T) => T;
|
|
19
|
+
/**
|
|
20
|
+
* @description: 转换为数组
|
|
21
|
+
* @param {*} val
|
|
22
|
+
* @return {*}
|
|
23
|
+
* @autor: 刘 相卿
|
|
24
|
+
*/
|
|
25
|
+
declare function toArray<T>(val: T): T[];
|
|
26
|
+
/**
|
|
27
|
+
* @description: 数组转树型结构数据
|
|
28
|
+
* @param {any[]} data
|
|
29
|
+
* @param {string} id id字段名
|
|
30
|
+
* @param {string} pid pid字段名
|
|
31
|
+
* @param {string} children children字段名
|
|
32
|
+
* @return {TreeItemType[]} 树型数据
|
|
33
|
+
* @autor: 刘 相卿
|
|
34
|
+
*/
|
|
35
|
+
declare function array2tree<T = TreeItemType>(data?: ObjectDataType[], id?: string, pid?: string, children?: string): T[];
|
|
36
|
+
/**
|
|
37
|
+
* @description: 对象数组转换为选项数组
|
|
38
|
+
* @param {ObjectDataType[]} array
|
|
39
|
+
* @param {{ label: string; value: string }} alias
|
|
40
|
+
* @return {BaseOptionType[]}
|
|
41
|
+
* @autor: 刘 相卿
|
|
42
|
+
*/
|
|
43
|
+
declare function array2option(array: ObjectDataType[], alias: {
|
|
44
|
+
label: string;
|
|
45
|
+
value: string;
|
|
46
|
+
}): BaseOptionType[];
|
|
47
|
+
/**
|
|
48
|
+
* @description: 删除数组中的空元素
|
|
49
|
+
* @param {T[]} array
|
|
50
|
+
* @return {*}
|
|
51
|
+
* @autor: 刘 相卿
|
|
52
|
+
*/
|
|
53
|
+
declare function deleteEmptyElement<T>(array: T[]): T[];
|
|
54
|
+
/**
|
|
55
|
+
* @description: 根据给定的值集合,查找树型结构数据中符合条件的元素
|
|
56
|
+
* @param {TreeItemType[]} array 树型数组
|
|
57
|
+
* @param {(string | number)[]} values 值集合
|
|
58
|
+
* @param {{ value?: string; children?: string }} alias
|
|
59
|
+
* @return {*}
|
|
60
|
+
* @autor: 刘 相卿
|
|
61
|
+
*/
|
|
62
|
+
declare function getElementsByValues(array: TreeItemType[] | undefined, values: (string | number)[], alias?: {
|
|
63
|
+
value?: string;
|
|
64
|
+
children?: string;
|
|
65
|
+
}, reserveChildren?: boolean): ObjectDataType[];
|
|
66
|
+
/**
|
|
67
|
+
* @description: 将树型结构数组拉平为一维数组
|
|
68
|
+
* @param {TreeItemType[]} data 树型数组
|
|
69
|
+
* @param {{ value?: string; children?: string }} alias
|
|
70
|
+
* @return {TreeItemType[]}
|
|
71
|
+
* @autor: 刘 相卿
|
|
72
|
+
*/
|
|
73
|
+
declare function tree2array<T extends ObjectDataType = ObjectDataType>(data?: T[], alias?: string, reserveChildren?: boolean): T[];
|
|
74
|
+
/**
|
|
75
|
+
* @description: 根据对象数组中的keys去重
|
|
76
|
+
* @param {ObjectDataType[]} array 原数组
|
|
77
|
+
* @param {string[]} keys 对象key
|
|
78
|
+
* @return {T[]}
|
|
79
|
+
* @autor: 刘 相卿
|
|
80
|
+
*/
|
|
81
|
+
declare function uniqueArrayByKeys<T = ObjectDataType>(array: T[], keys: (keyof T)[]): T[];
|
|
82
|
+
/**
|
|
83
|
+
* @description: 删除简单数组中的符合规则的元素,并返回新数组
|
|
84
|
+
* @param {(number|string|boolean)[]} array 原数组
|
|
85
|
+
* @param {(number|string|boolean)[]} values 符合的元素值
|
|
86
|
+
* @return {*} (number|string|boolean)[]
|
|
87
|
+
* @autor: 刘 相卿
|
|
88
|
+
*/
|
|
89
|
+
declare function deleteElement(array: (number | string | boolean)[], values?: (number | string | boolean)[]): (number | string | boolean)[];
|
|
90
|
+
/**
|
|
91
|
+
* @description: 删除数组中的符合规则的元素,并返回新数组
|
|
92
|
+
* @param {any[]} array 原数组
|
|
93
|
+
* @param {any[]} rules 符合的元素值,如:[1, { name: 'x', age: 12 }, { name: 'z' }]则删除「元素 = 1 或 元素.name = 'x' && 元素.age = 'x' 或 元素.name = 'z'」的元素
|
|
94
|
+
* @return {*}
|
|
95
|
+
* @autor: 刘 相卿
|
|
96
|
+
*/
|
|
97
|
+
declare function deleteElementPro(array: any[], rules?: any[]): any[];
|
|
98
|
+
//#endregion
|
|
99
|
+
export { deleteEmptyElement as a, tree2array as c, uniqueArrayByKeys as d, deleteElementPro as i, tuple as l, array2tree as n, getElementsByValues as o, deleteElement as r, toArray as s, array2option as t, tupleNum as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-BcXMmzxH.cjs`),t=require(`./base-DUxrUTOr.cjs`),n=require(`./object-C6qVmoZY.cjs`);let r=require(`lodash.clonedeep`);const i=(...e)=>e,a=(...e)=>e;function o(e){return Array.isArray(e)?e:[e]}function s(e=[],t=`id`,n=`pid`,i=`children`){let a=[],o={},s=(0,r.default)(e);for(let e=0;e<s.length;e++)o[s[e][t]]=s[e];for(let e=0;e<s.length;e++)o[s[e][n]]&&s[e][t]!==s[e][n]?(o[s[e][n]][i]||(o[s[e][n]][i]=[]),o[s[e][n]][i].push(s[e])):a.push(s[e]);return a}function c(e,t){return e.map(e=>({label:e[t.label],value:e[t.value]}))}function l(e){return e.filter(e=>!t.f(e))}function u(e=[],r,i,a=!1){let o={value:`value`,children:`children`,...n.n(i)},s=[],[c]=r,l=e.find(e=>e[o.value]===c);if(!t.f(c)&&!t.f(l)){let{[o.children]:e,...t}=l;return s.concat(a?{...t,children:e}:t,...u(e??[],r.slice(1),o))}return s}function d(e=[],t=`children`,n=!1){let r=[],i=(e,t)=>{e.forEach(e=>{let{[t]:a,...o}=e;n?r.push(e):r.push(o),a&&i(a,t)})};return i(e,t),r}function f(e,t){return e.reduce((e,n)=>(e.find(e=>t.every(t=>e[t]===n[t]))||e.push(n),e),[])}function p(e,t=[]){return e.filter(e=>!t.includes(e))}function m(e,n=[]){return e.filter(e=>!n.some(n=>t.v(n)&&t.v(e)?t.d(n)?t.d(e):Object.entries(n).every(([t,n])=>n===e[t]):t.g(n)&&Number.isNaN(n)?t.g(e)&&Number.isNaN(e):e===n))}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return a}});
|
package/dist/array.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require(`./base-DUxrUTOr.cjs`),require(`./lodash-kixEH9o9.cjs`),require(`./object-C6qVmoZY.cjs`);const e=require(`./array-ri-t3Wsz.cjs`);exports.array2option=e.t,exports.array2tree=e.n,exports.deleteElement=e.r,exports.deleteElementPro=e.i,exports.deleteEmptyElement=e.a,exports.getElementsByValues=e.o,exports.toArray=e.s,exports.tree2array=e.c,exports.tuple=e.l,exports.tupleNum=e.u,exports.uniqueArrayByKeys=e.d;
|
package/dist/array.d.cts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "./types-DTtPjrm8.cjs";
|
|
2
|
+
import { a as deleteEmptyElement, c as tree2array, d as uniqueArrayByKeys, i as deleteElementPro, l as tuple, n as array2tree, o as getElementsByValues, r as deleteElement, s as toArray, t as array2option, u as tupleNum } from "./array-okkZATKz.cjs";
|
|
3
|
+
export { array2option, array2tree, deleteElement, deleteElementPro, deleteEmptyElement, getElementsByValues, toArray, tree2array, tuple, tupleNum, uniqueArrayByKeys };
|
package/dist/array.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "./types-BEdiy6mb.mjs";
|
|
2
|
+
import { a as deleteEmptyElement, c as tree2array, d as uniqueArrayByKeys, i as deleteElementPro, l as tuple, n as array2tree, o as getElementsByValues, r as deleteElement, s as toArray, t as array2option, u as tupleNum } from "./array-CiSUhZCW.mjs";
|
|
3
|
+
export { array2option, array2tree, deleteElement, deleteElementPro, deleteEmptyElement, getElementsByValues, toArray, tree2array, tuple, tupleNum, uniqueArrayByKeys };
|
package/dist/array.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./base-854WVUaj.mjs";import"./lodash-iHVEJs1z.mjs";import"./object-j-lK643f.mjs";import{a as e,c as t,d as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./array-CEhD-Z_e.mjs";export{l as array2option,a as array2tree,s as deleteElement,r as deleteElementPro,e as deleteEmptyElement,o as getElementsByValues,c as toArray,t as tree2array,i as tuple,u as tupleNum,n as uniqueArrayByKeys};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>typeof e==`string`,t=e=>typeof e==`number`;function n(e){return typeof e==`boolean`}const r=e=>typeof e==`function`,i=e=>Array.isArray(e);function a(e){return e===void 0}const o=e=>e!==void 0,s=e=>e===null,c=e=>typeof e==`symbol`,l=e=>Object.prototype.toString.call(e)===`[object Object]`,u=e=>Object.prototype.toString.call(e)===`[object Object]`;function d(e){return Object.prototype.toString.call(e)===`[object Date]`}function f(r){return e(r)||t(r)||n(r)||c(r)||a(r)||s(r)}function p(e){return/^(?:https?|mailto|tel|file):/.test(e)}function m(e,t=!0){return t&&e===void 0||e===null||e===`null`}function h(e){return e==null||e===``||typeof e==`number`&&Number.isNaN(e)}function g(e){return!e||Object.getOwnPropertyNames(e).length===0}function _(e=[]){return Array.isArray(e)&&!e.length}function v(e=[]){return Array.isArray(e)?_(e)||e.every(e=>h(e)):!1}function y(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function b(e){return(e.match(/\.([^.]+)$/)?.[1]??`未知`).toUpperCase()}function x(e,t,n){return e.replace(RegExp(`(.*)${t}`),`$1${n}`)}function S(e,t,n){return e.replace(new RegExp(t,`g`),n)}function C(e){return e&&e>0?e:0}function w(t,n){let r=null;try{t&&e(t)&&(r=JSON.parse(t))}finally{s(r)&&(r=n||{})}return r}function T(e,t=``){let n=t;try{n=JSON.stringify(e)}catch{n=t}return n}function E(e=10){let t=``;for(let n=0;n<e;n++)t+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return t}export{T as C,E as D,w as E,p as S,S as T,u as _,f as a,c as b,o as c,g as d,h as f,t as g,s as h,i,m as l,v as m,y as n,n as o,r as p,b as r,d as s,C as t,_ as u,l as v,x as w,a as x,e as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){document.title=e}function t(e,t=1920,n=1080){let r=document.documentElement.clientWidth||document.body.clientWidth||t,i=window.screen.height||document.body.clientHeight||t,a=t/n;return r/i/a*e}function n(){let e=document.querySelectorAll(`[style*=z-index]`),t=0;return e.forEach(e=>{let n=window.getComputedStyle(e).zIndex;if(n!==`auto`){let e=Number.parseInt(n,10);!Number.isNaN(e)&&e>t&&(t=e)}}),t+1}export{t as n,e as r,n as t};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { i as DataType, u as ObjectDataType } from "./types-DTtPjrm8.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/base.d.ts
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* @description: 判断是否为string类型
|
|
@@ -188,5 +189,5 @@ declare function json2string(json: any, defaultValue?: string): string;
|
|
|
188
189
|
* @autor: 刘 相卿
|
|
189
190
|
*/
|
|
190
191
|
declare function uuid(length?: number): string;
|
|
191
|
-
|
|
192
|
-
export {
|
|
192
|
+
//#endregion
|
|
193
|
+
export { json2string as C, uuid as D, string2json as E, isUrl as S, replaceMatch as T, isObject as _, isBaseType as a, isSymbol as b, isDef as c, isEmptyObject as d, isEmptyValue as f, isNumber as g, isNull as h, isArray as i, isEmpty as l, isMeaninglessArray as m, getDataType as n, isBoolean as o, isFunction as p, getFileType as r, isDate as s, formatPositiveNumber as t, isEmptyArray as u, isObjectDataType as v, replaceLastMatch as w, isUndefined as x, isString as y };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/dom/base.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* @description: 设置文档标题
|
|
3
4
|
* @param {string} title
|
|
@@ -20,5 +21,5 @@ declare function getPx(px: number, width?: number, height?: number): number;
|
|
|
20
21
|
* @autor: 刘 相卿
|
|
21
22
|
*/
|
|
22
23
|
declare function getMaxZIndex(): number;
|
|
23
|
-
|
|
24
|
-
export {
|
|
24
|
+
//#endregion
|
|
25
|
+
export { getPx as n, setDocumentTitle as r, getMaxZIndex as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/dom/base.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @description: 设置文档标题
|
|
4
|
+
* @param {string} title
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @autor: 刘 相卿
|
|
7
|
+
*/
|
|
8
|
+
declare function setDocumentTitle(title: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* @description: 动态计算px
|
|
11
|
+
* @param {number} px 原始px数值
|
|
12
|
+
* @param {number} width 设计稿宽度 默认1920
|
|
13
|
+
* @param {number} height 设计稿高度 默认1080
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @autor: 刘 相卿
|
|
16
|
+
*/
|
|
17
|
+
declare function getPx(px: number, width?: number, height?: number): number;
|
|
18
|
+
/**
|
|
19
|
+
* @description: 获取页面中最大的z-index并+1
|
|
20
|
+
* @return {number} zIndex 最大的index
|
|
21
|
+
* @autor: 刘 相卿
|
|
22
|
+
*/
|
|
23
|
+
declare function getMaxZIndex(): number;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { getPx as n, setDocumentTitle as r, getMaxZIndex as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=e=>typeof e==`string`,t=e=>typeof e==`number`;function n(e){return typeof e==`boolean`}const r=e=>typeof e==`function`,i=e=>Array.isArray(e);function a(e){return e===void 0}const o=e=>e!==void 0,s=e=>e===null,c=e=>typeof e==`symbol`,l=e=>Object.prototype.toString.call(e)===`[object Object]`,u=e=>Object.prototype.toString.call(e)===`[object Object]`;function d(e){return Object.prototype.toString.call(e)===`[object Date]`}function f(r){return e(r)||t(r)||n(r)||c(r)||a(r)||s(r)}function p(e){return/^(?:https?|mailto|tel|file):/.test(e)}function m(e,t=!0){return t&&e===void 0||e===null||e===`null`}function h(e){return e==null||e===``||typeof e==`number`&&Number.isNaN(e)}function g(e){return!e||Object.getOwnPropertyNames(e).length===0}function _(e=[]){return Array.isArray(e)&&!e.length}function v(e=[]){return Array.isArray(e)?_(e)||e.every(e=>h(e)):!1}function y(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function b(e){return(e.match(/\.([^.]+)$/)?.[1]??`未知`).toUpperCase()}function x(e,t,n){return e.replace(RegExp(`(.*)${t}`),`$1${n}`)}function S(e,t,n){return e.replace(new RegExp(t,`g`),n)}function C(e){return e&&e>0?e:0}function w(t,n){let r=null;try{t&&e(t)&&(r=JSON.parse(t))}finally{s(r)&&(r=n||{})}return r}function T(e,t=``){let n=t;try{n=JSON.stringify(e)}catch{n=t}return n}function E(e=10){let t=``;for(let n=0;n<e;n++)t+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`.charAt(Math.floor(Math.random()*62));return t}Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { i as DataType, u as ObjectDataType } from "./types-BEdiy6mb.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/base.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description: 判断是否为string类型
|
|
7
|
+
* @param {unknown} val
|
|
8
|
+
* @return {*}
|
|
9
|
+
* @autor: 刘 相卿
|
|
10
|
+
*/
|
|
11
|
+
declare const isString: (val: unknown) => val is string;
|
|
12
|
+
/**
|
|
13
|
+
* @description: 判断是否为number类型
|
|
14
|
+
* @param {unknown} val
|
|
15
|
+
* @return {*}
|
|
16
|
+
* @autor: 刘 相卿
|
|
17
|
+
*/
|
|
18
|
+
declare const isNumber: (val: unknown) => val is number;
|
|
19
|
+
/**
|
|
20
|
+
* @description: 判断是否为boolean类型
|
|
21
|
+
* @param {unknown} val
|
|
22
|
+
* @return {*}
|
|
23
|
+
* @autor: 刘 相卿
|
|
24
|
+
*/
|
|
25
|
+
declare function isBoolean(val: unknown): val is boolean;
|
|
26
|
+
/**
|
|
27
|
+
* @description: 判断是否为函数类型
|
|
28
|
+
* @param {unknown} val
|
|
29
|
+
* @return {*}
|
|
30
|
+
* @autor: 刘 相卿
|
|
31
|
+
*/
|
|
32
|
+
declare const isFunction: (val: unknown) => val is Function;
|
|
33
|
+
/**
|
|
34
|
+
* @description: 判断是否为数组类型
|
|
35
|
+
* @param {unknown} val
|
|
36
|
+
* @return {*}
|
|
37
|
+
* @autor: 刘 相卿
|
|
38
|
+
*/
|
|
39
|
+
declare const isArray: <T>(val: unknown) => val is T[];
|
|
40
|
+
/**
|
|
41
|
+
* @description: 判断是否为undefined类型
|
|
42
|
+
* @param {unknown} val
|
|
43
|
+
* @return {*}
|
|
44
|
+
* @autor: 刘 相卿
|
|
45
|
+
*/
|
|
46
|
+
declare function isUndefined(val: unknown): val is undefined;
|
|
47
|
+
/**
|
|
48
|
+
* @description: 判断参数已定义且不为空
|
|
49
|
+
* @param {*} val
|
|
50
|
+
* @return {*}
|
|
51
|
+
* @autor: 刘 相卿
|
|
52
|
+
*/
|
|
53
|
+
declare const isDef: <T = any>(val?: T | undefined) => val is NonNullable<T>;
|
|
54
|
+
/**
|
|
55
|
+
* @description: 是否为null
|
|
56
|
+
* @param {unknown} val
|
|
57
|
+
* @return {*}
|
|
58
|
+
* @autor: 刘 相卿
|
|
59
|
+
*/
|
|
60
|
+
declare const isNull: (val: unknown) => val is null;
|
|
61
|
+
/**
|
|
62
|
+
* @description: 是否为symbol类型
|
|
63
|
+
* @param {unknown} val
|
|
64
|
+
* @return {*}
|
|
65
|
+
* @autor: 刘 相卿
|
|
66
|
+
*/
|
|
67
|
+
declare const isSymbol: (val: unknown) => val is symbol;
|
|
68
|
+
/**
|
|
69
|
+
* @description: 是否为对象类型
|
|
70
|
+
* @param {unknown} val
|
|
71
|
+
* @return {*}
|
|
72
|
+
* @autor: 刘 相卿
|
|
73
|
+
*/
|
|
74
|
+
declare const isObjectDataType: <T extends ObjectDataType<any, string> = ObjectDataType<any, string>>(val: unknown) => val is T;
|
|
75
|
+
declare const isObject: (val: unknown) => val is object;
|
|
76
|
+
/**
|
|
77
|
+
* @description: 是否为日期类型
|
|
78
|
+
* @param {unknown} val
|
|
79
|
+
* @return {*}
|
|
80
|
+
* @autor: 刘 相卿
|
|
81
|
+
*/
|
|
82
|
+
declare function isDate(val: unknown): val is Date;
|
|
83
|
+
/**
|
|
84
|
+
* @description: 是否为原始类型
|
|
85
|
+
* @return {*}
|
|
86
|
+
* @autor: 刘 相卿
|
|
87
|
+
*/
|
|
88
|
+
declare function isBaseType(val: unknown): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* @description: 是否为url
|
|
91
|
+
* @param {string} val
|
|
92
|
+
* @return {*}
|
|
93
|
+
* @autor: 刘 相卿
|
|
94
|
+
*/
|
|
95
|
+
declare function isUrl(val: string): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* @description: 判断是否未null或者undefined
|
|
98
|
+
* @param {unknown} value
|
|
99
|
+
* @return {*}
|
|
100
|
+
* @autor: 刘 相卿
|
|
101
|
+
*/
|
|
102
|
+
declare function isEmpty(value: unknown, undefinedValue?: boolean): boolean;
|
|
103
|
+
/**
|
|
104
|
+
* @description: 判断是否为空值
|
|
105
|
+
* @param {unknown} value
|
|
106
|
+
* @return {boolean}
|
|
107
|
+
* @autor: 刘 相卿
|
|
108
|
+
*/
|
|
109
|
+
declare function isEmptyValue(value: unknown): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* @description: 判断是否为空对象
|
|
112
|
+
* @param {ObjectDataType} object
|
|
113
|
+
* @return {*}
|
|
114
|
+
* @autor: 刘 相卿
|
|
115
|
+
*/
|
|
116
|
+
declare function isEmptyObject(object: ObjectDataType): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* @description: 判断是否为空数组
|
|
119
|
+
* @param {any} data
|
|
120
|
+
* @return {boolean}
|
|
121
|
+
* @autor: 刘 相卿
|
|
122
|
+
*/
|
|
123
|
+
declare function isEmptyArray(data?: any[]): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* @description: 判断是否为无意义的数组,即数组的每个元素都是空值
|
|
126
|
+
* @param {any} data
|
|
127
|
+
* @return {boolean}
|
|
128
|
+
* @autor: 刘 相卿
|
|
129
|
+
*/
|
|
130
|
+
declare function isMeaninglessArray(data?: any[]): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* @description: 获取数据类型
|
|
133
|
+
* @param {any} data
|
|
134
|
+
* @return {DataType} 数据类型字符串
|
|
135
|
+
* @autor: 刘 相卿
|
|
136
|
+
*/
|
|
137
|
+
declare function getDataType(data: any): DataType;
|
|
138
|
+
/**
|
|
139
|
+
* @description: 根据url获取文件类型
|
|
140
|
+
* @param {string} fileUrl
|
|
141
|
+
* @return {*}
|
|
142
|
+
* @autor: 刘 相卿
|
|
143
|
+
*/
|
|
144
|
+
declare function getFileType(fileUrl: string): string;
|
|
145
|
+
/**
|
|
146
|
+
* @description: 替换最后一个匹配的字符串
|
|
147
|
+
* @param {string} str
|
|
148
|
+
* @param {string} char
|
|
149
|
+
* @param {string} target
|
|
150
|
+
* @return {*}
|
|
151
|
+
* @autor: 刘 相卿
|
|
152
|
+
*/
|
|
153
|
+
declare function replaceLastMatch(str: string, char: string, target: string): string;
|
|
154
|
+
/**
|
|
155
|
+
* @description: 替换所有匹配的字符串
|
|
156
|
+
* @param {string} str
|
|
157
|
+
* @param {RegExp} reg
|
|
158
|
+
* @param {string} target
|
|
159
|
+
* @return {*}
|
|
160
|
+
* @autor: 刘 相卿
|
|
161
|
+
*/
|
|
162
|
+
declare function replaceMatch(str: string, reg: RegExp, target: string): string;
|
|
163
|
+
/**
|
|
164
|
+
* @description: 将数字转化为正数
|
|
165
|
+
* @param {number} value
|
|
166
|
+
* @return {*}
|
|
167
|
+
* @autor: 刘 相卿
|
|
168
|
+
*/
|
|
169
|
+
declare function formatPositiveNumber(value: number): number;
|
|
170
|
+
/**
|
|
171
|
+
* @description: JSON字符串转换为JSON对象/数组
|
|
172
|
+
* @param {string} str JSON字符串
|
|
173
|
+
* @return {T}
|
|
174
|
+
* @autor: 刘 相卿
|
|
175
|
+
*/
|
|
176
|
+
declare function string2json<T>(str: string, defaultValue?: T): T;
|
|
177
|
+
/**
|
|
178
|
+
* @description: JSON对象转换为JSON字符串
|
|
179
|
+
* @param {any} json
|
|
180
|
+
* @param {string} defaultValue
|
|
181
|
+
* @return {string}
|
|
182
|
+
* @autor: 刘 相卿
|
|
183
|
+
*/
|
|
184
|
+
declare function json2string(json: any, defaultValue?: string): string;
|
|
185
|
+
/**
|
|
186
|
+
* @description: 生成随机字符串
|
|
187
|
+
* @param {number} length 随机字符串长度 默认长度为10
|
|
188
|
+
* @return {*}
|
|
189
|
+
* @autor: 刘 相卿
|
|
190
|
+
*/
|
|
191
|
+
declare function uuid(length?: number): string;
|
|
192
|
+
//#endregion
|
|
193
|
+
export { json2string as C, uuid as D, string2json as E, isUrl as S, replaceMatch as T, isObject as _, isBaseType as a, isSymbol as b, isDef as c, isEmptyObject as d, isEmptyValue as f, isNumber as g, isNull as h, isArray as i, isEmpty as l, isMeaninglessArray as m, getDataType as n, isBoolean as o, isFunction as p, getFileType as r, isDate as s, formatPositiveNumber as t, isEmptyArray as u, isObjectDataType as v, replaceLastMatch as w, isUndefined as x, isString as y };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){document.title=e}function t(e,t=1920,n=1080){let r=document.documentElement.clientWidth||document.body.clientWidth||t,i=window.screen.height||document.body.clientHeight||t,a=t/n;return r/i/a*e}function n(){let e=document.querySelectorAll(`[style*=z-index]`),t=0;return e.forEach(e=>{let n=window.getComputedStyle(e).zIndex;if(n!==`auto`){let e=Number.parseInt(n,10);!Number.isNaN(e)&&e>t&&(t=e)}}),t+1}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
|
package/dist/base.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./base-DUxrUTOr.cjs`);exports.formatPositiveNumber=e.t,exports.getDataType=e.n,exports.getFileType=e.r,exports.isArray=e.i,exports.isBaseType=e.a,exports.isBoolean=e.o,exports.isDate=e.s,exports.isDef=e.c,exports.isEmpty=e.l,exports.isEmptyArray=e.u,exports.isEmptyObject=e.d,exports.isEmptyValue=e.f,exports.isFunction=e.p,exports.isMeaninglessArray=e.m,exports.isNull=e.h,exports.isNumber=e.g,exports.isObject=e._,exports.isObjectDataType=e.v,exports.isString=e.y,exports.isSymbol=e.b,exports.isUndefined=e.x,exports.isUrl=e.S,exports.json2string=e.C,exports.replaceLastMatch=e.w,exports.replaceMatch=e.T,exports.string2json=e.E,exports.uuid=e.D;
|
package/dist/base.d.cts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "./types-DTtPjrm8.cjs";
|
|
2
|
+
import { C as json2string, D as uuid, E as string2json, S as isUrl, T as replaceMatch, _ as isObject, a as isBaseType, b as isSymbol, c as isDef, d as isEmptyObject, f as isEmptyValue, g as isNumber, h as isNull, i as isArray, l as isEmpty, m as isMeaninglessArray, n as getDataType, o as isBoolean, p as isFunction, r as getFileType, s as isDate, t as formatPositiveNumber, u as isEmptyArray, v as isObjectDataType, w as replaceLastMatch, x as isUndefined, y as isString } from "./base-BXKvmcaf.cjs";
|
|
3
|
+
export { formatPositiveNumber, getDataType, getFileType, isArray, isBaseType, isBoolean, isDate, isDef, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isFunction, isMeaninglessArray, isNull, isNumber, isObject, isObjectDataType, isString, isSymbol, isUndefined, isUrl, json2string, replaceLastMatch, replaceMatch, string2json, uuid };
|
package/dist/base.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "./types-BEdiy6mb.mjs";
|
|
2
|
+
import { C as json2string, D as uuid, E as string2json, S as isUrl, T as replaceMatch, _ as isObject, a as isBaseType, b as isSymbol, c as isDef, d as isEmptyObject, f as isEmptyValue, g as isNumber, h as isNull, i as isArray, l as isEmpty, m as isMeaninglessArray, n as getDataType, o as isBoolean, p as isFunction, r as getFileType, s as isDate, t as formatPositiveNumber, u as isEmptyArray, v as isObjectDataType, w as replaceLastMatch, x as isUndefined, y as isString } from "./base-Dl59EolR.mjs";
|
|
3
|
+
export { formatPositiveNumber, getDataType, getFileType, isArray, isBaseType, isBoolean, isDate, isDef, isEmpty, isEmptyArray, isEmptyObject, isEmptyValue, isFunction, isMeaninglessArray, isNull, isNumber, isObject, isObjectDataType, isString, isSymbol, isUndefined, isUrl, json2string, replaceLastMatch, replaceMatch, string2json, uuid };
|
package/dist/base.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{C as e,D as t,E as n,S as r,T as i,_ as a,a as o,b as s,c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x,u as S,v as C,w,x as T,y as E}from"./base-854WVUaj.mjs";export{x as formatPositiveNumber,g as getDataType,y as getFileType,p as isArray,o as isBaseType,_ as isBoolean,b as isDate,c as isDef,m as isEmpty,S as isEmptyArray,l as isEmptyObject,u as isEmptyValue,v as isFunction,h as isMeaninglessArray,f as isNull,d as isNumber,a as isObject,C as isObjectDataType,E as isString,s as isSymbol,T as isUndefined,r as isUrl,e as json2string,w as replaceLastMatch,i as replaceMatch,n as string2json,t as uuid};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var t=e;export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}var t=e;Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"axios";const t=new Map;function n(e){let{url:t,method:n,params:r,data:i,headers:a}=e,o=i,s=r;typeof i==`string`&&(o=JSON.parse(i)),typeof r==`string`&&(s=JSON.parse(r));let c=[],l=a?.[`X-Cancel-Rule`];return c=l===`path`?[`请求路径:${t}`]:l===`method`?[`请求路径:${t}`,`请求方法:${n}`]:[`请求路径:${t}`,`请求方法:${n}`,`请求PARAMS:${JSON.stringify(s)}`,`请求DATA:${JSON.stringify(o)}`],c.join(`;`)}function r(r){if(!r.headers?.neverCancel){let i=n(r);r.cancelToken=new e.CancelToken(e=>{t.has(i)||t.set(i,e)})}}function i(e,r=!1){if(!e.headers?.[`X-Never-Cancel`]||r){let r=n(e);if(t.has(r)){let e=t.get(r);e&&e(r),t.delete(r)}}}function a(e){i(e),r(e)}function o(){Array.from(t.keys()).forEach(e=>{t.get(e)&&t.get(e)(e),t.delete(e)})}export{i as a,a as i,t as n,o as r,r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-BcXMmzxH.cjs`);let t=require(`axios`);t=e.r(t);const n=new Map;function r(e){let{url:t,method:n,params:r,data:i,headers:a}=e,o=i,s=r;typeof i==`string`&&(o=JSON.parse(i)),typeof r==`string`&&(s=JSON.parse(r));let c=[],l=a?.[`X-Cancel-Rule`];return c=l===`path`?[`请求路径:${t}`]:l===`method`?[`请求路径:${t}`,`请求方法:${n}`]:[`请求路径:${t}`,`请求方法:${n}`,`请求PARAMS:${JSON.stringify(s)}`,`请求DATA:${JSON.stringify(o)}`],c.join(`;`)}function i(e){if(!e.headers?.neverCancel){let i=r(e);e.cancelToken=new t.default.CancelToken(e=>{n.has(i)||n.set(i,e)})}}function a(e,t=!1){if(!e.headers?.[`X-Never-Cancel`]||t){let t=r(e);if(n.has(t)){let e=n.get(t);e&&e(t),n.delete(t)}}}function o(e){a(e),i(e)}function s(){Array.from(n.keys()).forEach(e=>{n.get(e)&&n.get(e)(e),n.delete(e)})}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n&&t(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(e,n,r,i)=>{i&&(t(e,Symbol.toStringTag,{value:`Module`}),r&&t(r,Symbol.toStringTag,{value:`Module`})),s(e,n,`default`),r&&s(r,n,`default`)},l=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n&&e(r,Symbol.toStringTag,{value:`Module`}),r},a=(i,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(var c=n(a),l=0,u=c.length,d;l<u;l++)d=c[l],!r.call(i,d)&&d!==o&&e(i,d,{get:(e=>a[e]).bind(null,d),enumerable:!(s=t(a,d))||s.enumerable});return i},o=(t,n,r,i)=>{i&&(e(t,Symbol.toStringTag,{value:`Module`}),r&&e(r,Symbol.toStringTag,{value:`Module`})),a(t,n,`default`),r&&a(r,n,`default`)};export{o as n,i as t};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/dom/class.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* @description: 节点是否存在某个class
|
|
3
4
|
* @param {HTMLElement} node
|
|
@@ -22,5 +23,5 @@ declare function addClass(node: HTMLElement, className: string): void;
|
|
|
22
23
|
* @autor: 刘 相卿
|
|
23
24
|
*/
|
|
24
25
|
declare function removeClass(node: HTMLElement, className: string): void;
|
|
25
|
-
|
|
26
|
-
export {
|
|
26
|
+
//#endregion
|
|
27
|
+
export { hasClass as n, removeClass as r, addClass as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){return e.classList?e.classList.contains(t):` ${e.className} `.includes(` ${t} `)}function t(t,n){t.classList?t.classList.add(n):e(t,n)||(t.className=`${t.className} ${n}`)}function n(t,n){t.classList?t.classList.remove(n):e(t,n)&&(t.className=` ${t.className} `.replace(` ${n} `,` `))}export{e as n,n as r,t};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/dom/class.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @description: 节点是否存在某个class
|
|
4
|
+
* @param {HTMLElement} node
|
|
5
|
+
* @param {string} className
|
|
6
|
+
* @return {*}
|
|
7
|
+
* @autor: 刘 相卿
|
|
8
|
+
*/
|
|
9
|
+
declare function hasClass(node: HTMLElement, className: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @description: 给节点添加class
|
|
12
|
+
* @param {HTMLElement} node
|
|
13
|
+
* @param {string} className
|
|
14
|
+
* @return {*}
|
|
15
|
+
* @autor: 刘 相卿
|
|
16
|
+
*/
|
|
17
|
+
declare function addClass(node: HTMLElement, className: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* @description: 移除class
|
|
20
|
+
* @param {HTMLElement} node
|
|
21
|
+
* @param {string} className
|
|
22
|
+
* @return {*}
|
|
23
|
+
* @autor: 刘 相卿
|
|
24
|
+
*/
|
|
25
|
+
declare function removeClass(node: HTMLElement, className: string): void;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { hasClass as n, removeClass as r, addClass as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){return e.classList?e.classList.contains(t):` ${e.className} `.includes(` ${t} `)}function t(t,n){t.classList?t.classList.add(n):e(t,n)||(t.className=`${t.className} ${n}`)}function n(t,n){t.classList?t.classList.remove(n):e(t,n)&&(t.className=` ${t.className} `.replace(` ${n} `,` `))}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComputedRef, Ref, ShallowRef } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/vue/hooks/clipboard.d.ts
|
|
4
|
+
declare function useClipboard(delay?: number): {
|
|
5
|
+
copied: any;
|
|
6
|
+
copy: (text: string | Ref<string> | ComputedRef<string> | ShallowRef<string>) => void;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { useClipboard as t };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComputedRef, Ref, ShallowRef } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/vue/hooks/clipboard.d.ts
|
|
4
|
+
declare function useClipboard(delay?: number): {
|
|
5
|
+
copied: any;
|
|
6
|
+
copy: (text: string | Ref<string> | ComputedRef<string> | ShallowRef<string>) => void;
|
|
7
|
+
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { useClipboard as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-BcXMmzxH.cjs`),t=require(`./clipboard-ZMrs6wzK.cjs`);let n=require(`vue`);function r(e=3e3){let r=(0,n.ref)(!1);return{copied:r,copy:i=>{t.t((0,n.unref)(i)).then(()=>{r.value=!0;let t=setTimeout(()=>{r.value=!1,clearTimeout(t)},e)})}}}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./clipboard-DqGhq6A4.mjs";import{ref as t,unref as n}from"vue";function r(r=3e3){let i=t(!1);return{copied:i,copy:t=>{e(n(t)).then(()=>{i.value=!0;let e=setTimeout(()=>{i.value=!1,clearTimeout(e)},r)})}}}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){return new DOMException(`The request is not allowed`,`NotAllowedError`)}async function t(t){if(!navigator.clipboard)throw e();return navigator.clipboard.writeText(t)}async function n(t){let n=document.createElement(`span`);n.textContent=t,n.style.whiteSpace=`pre`,n.style.webkitUserSelect=`auto`,n.style.userSelect=`all`,document.body.appendChild(n);let r=window.getSelection(),i=window.document.createRange();r.removeAllRanges(),i.selectNode(n),r.addRange(i);let a=!1;try{a=window.document.execCommand(`copy`)}finally{r.removeAllRanges(),window.document.body.removeChild(n)}if(!a)throw e()}async function r(r){try{await t(r)}catch(t){try{await n(r)}catch(n){throw n||t||e()}}}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){return new DOMException(`The request is not allowed`,`NotAllowedError`)}async function t(t){if(!navigator.clipboard)throw e();return navigator.clipboard.writeText(t)}async function n(t){let n=document.createElement(`span`);n.textContent=t,n.style.whiteSpace=`pre`,n.style.webkitUserSelect=`auto`,n.style.userSelect=`all`,document.body.appendChild(n);let r=window.getSelection(),i=window.document.createRange();r.removeAllRanges(),i.selectNode(n),r.addRange(i);let a=!1;try{a=window.document.execCommand(`copy`)}finally{r.removeAllRanges(),window.document.body.removeChild(n)}if(!a)throw e()}async function r(r){try{await t(r)}catch(t){try{await n(r)}catch(n){throw n||t||e()}}}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./clipboard-ZMrs6wzK.cjs`);exports.clipboardCopy=e.t;
|
package/dist/clipboard.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./clipboard-DqGhq6A4.mjs";export{e as clipboardCopy};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={data:`data`,code:`code`,msg:`msg`},t={label:`label`,value:`value`,json:`json`,disabled:`disabled`,children:`children`},n={pageSize:`pageSize`,pageNo:`pageNo`,total:`total`,records:`records`},r={baseURL:``,timeout:60*1e3,basePath:``,allowCancel:!1,allowNullValue:!0,successCode:[200],unauthorizedCode:[401],whiteUrl:()=>[],alias:()=>e,token:{key:`x-access-token`,get:()=>``}};Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={data:`data`,code:`code`,msg:`msg`},t={label:`label`,value:`value`,json:`json`,disabled:`disabled`,children:`children`},n={pageSize:`pageSize`,pageNo:`pageNo`,total:`total`,records:`records`},r={baseURL:``,timeout:60*1e3,basePath:``,allowCancel:!1,allowNullValue:!0,successCode:[200],unauthorizedCode:[401],whiteUrl:()=>[],alias:()=>e,token:{key:`x-access-token`,get:()=>``}};export{e as i,t as n,n as r,r as t};
|