@web-utils/form-ui 1.0.0-beta87 → 1.0.0-beta88
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/address-input/index.mjs +1 -1
- package/affix/index.mjs +1 -1
- package/capsule-tab/index.mjs +1 -1
- package/card/index.mjs +15 -15
- package/chunks/{Cwgd7PoY.mjs → 5RCAxanu2.mjs} +4 -4
- package/chunks/6eDDQWcr.mjs +69 -0
- package/chunks/9ec0Wti82.mjs +37 -0
- package/chunks/{BkEjtrWy.mjs → B7BaAm4k2.mjs} +2 -2
- package/chunks/{B14qtsOg2.mjs → BCYFaOiB.mjs} +7 -8
- package/chunks/{BBlZh4pj.mjs → BFhVUqpP2.mjs} +2 -2
- package/chunks/{BF0OBs7P.mjs → BJDeTpmp2.mjs} +14 -15
- package/chunks/BLKcXIrX.mjs +517 -0
- package/chunks/BQytQPLa.mjs +780 -0
- package/chunks/{y9rz_ZSp.mjs → BSOrm2U4.mjs} +36 -37
- package/chunks/{B0rLJ6br2.mjs → BcsscZAM.mjs} +26 -27
- package/chunks/{CTCW5Zu02.mjs → BegZOXrr.mjs} +134 -135
- package/chunks/{BZb0RMw12.mjs → BfW25VbY.mjs} +13 -15
- package/chunks/Bg01eBVa2.mjs +50 -0
- package/chunks/BhPVs8Ju.mjs +30 -0
- package/chunks/{BCqOe0lx.mjs → BjccroM8.mjs} +1 -1
- package/chunks/{BjZf7WL6.mjs → BmbhIxPF2.mjs} +2 -2
- package/chunks/{BPQMbzNr.mjs → Br3whXEJ2.mjs} +2 -2
- package/chunks/{CsckXzQC.mjs → BsqIRxSS.mjs} +6 -7
- package/chunks/BuI82QMb2.mjs +29 -0
- package/chunks/{C5SO6LJW.mjs → Bv7b2DXh2.mjs} +2 -2
- package/chunks/{Cqn3fqrC.mjs → C-iN5MJZ.mjs} +6 -6
- package/chunks/{losZHy0P.mjs → C-s-88fN2.mjs} +1 -1
- package/chunks/C54nZqvy2.mjs +39 -0
- package/chunks/{DNicIC4X.mjs → CB0zQsKV2.mjs} +31 -32
- package/chunks/{kWflpyKd.mjs → CFpGTE5U2.mjs} +2 -2
- package/chunks/{BuwISkjU.mjs → CHqxWrj7.mjs} +11 -12
- package/chunks/{_wUx1zSH2.mjs → CIihGrgY.mjs} +3 -3
- package/chunks/{DUzoabyA2.mjs → CJwAjhLy.mjs} +68 -69
- package/chunks/CW021IPm2.mjs +34 -0
- package/chunks/{DOPqetRk2.mjs → CW1nopZH.mjs} +1 -1
- package/chunks/{BgQktI__2.mjs → CbedyG4s.mjs} +385 -384
- package/chunks/{C_mXAGw2.mjs → CdvD0NRo2.mjs} +2 -2
- package/chunks/{BsBVCVnp2.mjs → Cf_h9S62.mjs} +1 -1
- package/chunks/{Cxhpz5pM.mjs → CixNVW_T2.mjs} +112 -112
- package/chunks/ClVh1Lek.mjs +130 -0
- package/chunks/ClkLQjZ82.mjs +63 -0
- package/chunks/{Dk_ATXDY.mjs → CpmWELPU.mjs} +1 -1
- package/chunks/{DsSXjU752.mjs → CsNZt53l.mjs} +862 -1599
- package/chunks/{DcIBy4G3.mjs → Ctx93AFS.mjs} +6 -6
- package/chunks/D1mQTnJ8.mjs +672 -0
- package/chunks/D20CQ-B6.mjs +58 -0
- package/chunks/D2kLAzxW.mjs +61 -0
- package/chunks/{XGboXSyJ2.mjs → D8_fl5Oq.mjs} +138 -139
- package/chunks/{1EH2Ca7m2.mjs → D9ft-f6n.mjs} +29 -31
- package/chunks/DC3DNg_r.mjs +68 -0
- package/chunks/{BvdCIFp_.mjs → DL4xcGES2.mjs} +31 -32
- package/chunks/{CFfhckpA.mjs → DNq7pbXh2.mjs} +27 -26
- package/chunks/Dd4RtBO02.mjs +31 -0
- package/chunks/DdACGFy3.mjs +90 -0
- package/chunks/DdHN2Nv72.mjs +108 -0
- package/chunks/{LnWJAAlm2.mjs → DmJaItEY.mjs} +178 -178
- package/chunks/Dnapnskp2.mjs +29 -0
- package/chunks/{CuU6RbNj2.mjs → Dodxnwze.mjs} +6 -6
- package/chunks/{BXdCyPVV.mjs → MUk_IdeO2.mjs} +2 -2
- package/chunks/{Bi2y9LWO2.mjs → NAZ8HFBg.mjs} +92 -90
- package/chunks/V-Js6hNd.mjs +179 -0
- package/chunks/aOv3rI7q.mjs +32 -0
- package/chunks/{DrrpjVlS.mjs → dxZzZgUn.mjs} +17 -18
- package/chunks/{DZ1RiRcl2.mjs → fT8tFJVO.mjs} +29 -31
- package/chunks/{wkrB-kab.mjs → jG7vu3RX.mjs} +1 -1
- package/chunks/m5oFTe8Y2.mjs +25 -0
- package/chunks/mQG01w6Y.mjs +155 -0
- package/chunks/{2Bhi7uIl.mjs → mnqSaATq.mjs} +19 -18
- package/chunks/n7IipIUY.mjs +99 -0
- package/chunks/{Bi03Pb_j2.mjs → vCOhFr2x.mjs} +1 -1
- package/code-mirror-editor/index.mjs +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/index.mjs +1 -1
- package/count-up/index.mjs +1 -1
- package/custom-scrollbar/index.mjs +1 -1
- package/data-box/index.mjs +1 -1
- package/data-card/index.mjs +8 -8
- package/data-card-text/index.mjs +8 -8
- package/data-display/index.mjs +9 -9
- package/data-icons/index.mjs +9 -9
- package/data-imgtext/index.mjs +9 -10
- package/data-operatext/index.mjs +8 -8
- package/data-panel/index.mjs +9 -9
- package/data-pay/index.mjs +10 -11
- package/data-price/index.mjs +8 -8
- package/data-progress/index.mjs +10 -10
- package/data-rotate/index.mjs +1 -1
- package/data-table-picker/index.mjs +15 -15
- package/data-tabs/index.mjs +1 -1
- package/dialog-form/index.mjs +49 -49
- package/dict-render/index.mjs +1 -1
- package/e-charts/index.mjs +2 -2
- package/easy-popup/index.mjs +1 -1
- package/editable-progress/index.mjs +8 -8
- package/editable-tree/index.mjs +596 -2
- package/editable-tree/style.css +1 -1
- package/element-dialog/index.mjs +1 -1
- package/element-dialog/style.css +1 -1
- package/element-resize-observer/index.mjs +1 -1
- package/flex-box/index.mjs +1 -1
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flex-scroller/index.mjs +1 -1
- package/flow-designer/index.mjs +1 -1
- package/flow-viewer/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-checkbox-group/style.css +1 -1
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/form-view/index.mjs +3 -3
- package/fy-array/index.mjs +130 -2
- package/fy-array/style.css +1 -1
- package/fy-button/index.mjs +1 -1
- package/fy-cascader/index.mjs +27 -27
- package/fy-checkbox/index.mjs +29 -29
- package/fy-curd/index.mjs +1 -1
- package/fy-date/index.mjs +31 -31
- package/fy-dynamic/index.mjs +1 -1
- package/fy-empty/index.mjs +2 -2
- package/fy-form/index.mjs +1 -1
- package/fy-form/style.css +1 -1
- package/fy-input/index.mjs +36 -37
- package/fy-input-color/index.mjs +80 -2
- package/fy-input-icon/index.mjs +35 -36
- package/fy-input-map/index.mjs +30 -31
- package/fy-input-number/index.mjs +26 -26
- package/fy-input-table/index.mjs +24 -25
- package/fy-input-tree/index.mjs +43 -43
- package/fy-radio/index.mjs +20 -21
- package/fy-rate/index.mjs +27 -27
- package/fy-select/index.mjs +1 -1
- package/fy-slider/index.mjs +29 -29
- package/fy-switch/index.mjs +24 -24
- package/fy-tabs/index.mjs +8 -8
- package/fy-time/index.mjs +10 -10
- package/fy-title/index.mjs +2 -2
- package/fy-tree/index.mjs +57 -59
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +1 -1
- package/fy-upload/style.css +1 -1
- package/guide-steps/index.mjs +77 -2
- package/guide-steps/style.css +1 -1
- package/helper/dictionary.mjs +1 -1
- package/helper/input.mjs +1 -1
- package/highlight-j-s/index.mjs +1 -1
- package/icon-temp/index.mjs +1 -1
- package/iframe-window/index.mjs +1 -1
- package/image-cropper/index.mjs +5 -5
- package/image-preview/index.mjs +201 -2
- package/image-preview/style.css +1 -1
- package/image-viewer/index.mjs +1 -1
- package/index.css +1 -1
- package/index.mjs +147 -147
- package/input-number-range/index.mjs +7 -7
- package/keyboard/index.mjs +1 -1
- package/loading-view/index.mjs +1 -1
- package/monaco-editor/index.mjs +1 -1
- package/name-avatar/index.mjs +1 -1
- package/nav-bar/index.mjs +3 -3
- package/package.json +1 -1
- package/page-index/index.mjs +14 -14
- package/page-index-top/index.mjs +12 -12
- package/pageable-table/index.mjs +1 -1
- package/photo-swipe/index.mjs +1 -1
- package/props/col.mjs +1 -1
- package/props/form-item.mjs +1 -1
- package/sign-panel/index.mjs +1 -1
- package/skeleton-panel/index.mjs +3 -3
- package/split-pane/index.mjs +1 -1
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/swiper/index.mjs +2 -2
- package/table-column/index.mjs +1 -1
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +103 -104
- package/tag-render/index.mjs +7 -9
- package/text-ellipsis/index.mjs +1 -1
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/vue-tags-input/index.mjs +1 -1
- package/vue-tree-select/index.mjs +1 -1
- package/vue-video-player/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +20 -24
- package/year-calendar/index.mjs +1 -1
- package/base2.css +0 -1
- package/chunks/2Hag_Aho.mjs +0 -4
- package/chunks/6Lm-ZabT2.mjs +0 -439
- package/chunks/7OAy-mrx.mjs +0 -642
- package/chunks/7cy48wUQ.mjs +0 -25
- package/chunks/8ldF4QwW.mjs +0 -209
- package/chunks/B2vpUK0j.mjs +0 -13
- package/chunks/B7fnIBG_2.mjs +0 -346
- package/chunks/B9BRO_ca2.mjs +0 -2
- package/chunks/B9rfY77Q.mjs +0 -107
- package/chunks/BBYzYVET.mjs +0 -173
- package/chunks/BBbwcaCo.mjs +0 -196
- package/chunks/BFY-akW92.mjs +0 -1
- package/chunks/BGjN3ifV.mjs +0 -34
- package/chunks/BMouE3MT.mjs +0 -48
- package/chunks/BVD_ePZC.mjs +0 -37
- package/chunks/BVSJF8GY.mjs +0 -670
- package/chunks/BZuJ9dKq2.mjs +0 -69
- package/chunks/BaM7vJ3h.mjs +0 -1920
- package/chunks/BbJd8Pij.mjs +0 -734
- package/chunks/BhIjXcRj2.mjs +0 -617
- package/chunks/BnNJk0GR2.mjs +0 -4
- package/chunks/Bpp7HhpF.mjs +0 -446
- package/chunks/Bs0Qas8r.mjs +0 -14
- package/chunks/Bs8cIxmy.mjs +0 -384
- package/chunks/BtGJbKCB.mjs +0 -4
- package/chunks/BwVhaeaN2.mjs +0 -8
- package/chunks/BxfDXlNF.mjs +0 -5
- package/chunks/C1rRv4L7.mjs +0 -1094
- package/chunks/C2ILQE4o.mjs +0 -15
- package/chunks/C6wieT3K2.mjs +0 -4
- package/chunks/C7L-0D2c.mjs +0 -18
- package/chunks/CAXQZ1D92.mjs +0 -158
- package/chunks/CAmsy3d12.mjs +0 -1
- package/chunks/CBrMFZX-.mjs +0 -39
- package/chunks/CDhbz_dU.mjs +0 -5
- package/chunks/CEAep1cG2.mjs +0 -88
- package/chunks/CEDUulAx.mjs +0 -245
- package/chunks/CEaiqlCR.mjs +0 -678
- package/chunks/CG-vyVAP2.mjs +0 -2
- package/chunks/CHqbeWkw.mjs +0 -99
- package/chunks/CI6Nw27a2.mjs +0 -299
- package/chunks/CNcSX5f1.mjs +0 -1
- package/chunks/CPAK-Btp2.mjs +0 -58
- package/chunks/CRScbQff2.mjs +0 -1
- package/chunks/CShykH0i.mjs +0 -1
- package/chunks/CTAUFbNL.mjs +0 -222
- package/chunks/CZbhVowA2.mjs +0 -105
- package/chunks/C_rLHaAm.mjs +0 -41
- package/chunks/C_ykwQIT.mjs +0 -25
- package/chunks/Cm5l5wtF.mjs +0 -21
- package/chunks/CogUVyM32.mjs +0 -161
- package/chunks/CtqI9iHR.mjs +0 -108
- package/chunks/Cu_oMKPd.mjs +0 -250
- package/chunks/Cum802WQ.mjs +0 -13
- package/chunks/Cx2xXO7o.mjs +0 -52
- package/chunks/CyF0QYX72.mjs +0 -1098
- package/chunks/D0SsqlhV2.mjs +0 -2381
- package/chunks/D5OVW2kN.mjs +0 -34
- package/chunks/D6WqEUFG2.mjs +0 -98
- package/chunks/D8iXlrtZ2.mjs +0 -1038
- package/chunks/D98jjbwV2.mjs +0 -61
- package/chunks/D9Pg_OCD2.mjs +0 -6
- package/chunks/DA1LVvTS.mjs +0 -577
- package/chunks/DHUKKHoT.mjs +0 -1
- package/chunks/DJQH0NMv.mjs +0 -276
- package/chunks/DK7E0MrC2.mjs +0 -990
- package/chunks/DTS-uhBE.mjs +0 -25
- package/chunks/DUQs5bPg.mjs +0 -188
- package/chunks/DV-c1hfn2.mjs +0 -6
- package/chunks/DVvu0kbn2.mjs +0 -69
- package/chunks/DZZdwRGN.mjs +0 -479
- package/chunks/Dd5QuF1x.mjs +0 -26
- package/chunks/DeXyq_xW2.mjs +0 -936
- package/chunks/DgXDFUzM2.mjs +0 -60
- package/chunks/DhA6VYyn.mjs +0 -588
- package/chunks/DiQUqii-.mjs +0 -486
- package/chunks/DlhCJLng.mjs +0 -211
- package/chunks/Dq9YiS-H.mjs +0 -26
- package/chunks/DuIXSS2d.mjs +0 -454
- package/chunks/DvCdN2bU.mjs +0 -1
- package/chunks/DvG4VjQh.mjs +0 -216
- package/chunks/DvenxcV4.mjs +0 -186
- package/chunks/DxG4FcLQ2.mjs +0 -58
- package/chunks/E-zZdDOp.mjs +0 -48
- package/chunks/HQd8AhfS.mjs +0 -225
- package/chunks/HsqImdEj.mjs +0 -69
- package/chunks/IAX-2m4F.mjs +0 -31
- package/chunks/JvWWISEH2.mjs +0 -243
- package/chunks/K7NMn1cU.mjs +0 -12
- package/chunks/NiAjkTEH2.mjs +0 -32
- package/chunks/OWDOBaZL.mjs +0 -467
- package/chunks/R_GWm9EB.mjs +0 -41
- package/chunks/Rn-X08l92.mjs +0 -273
- package/chunks/STHbzblo.mjs +0 -55
- package/chunks/TWAjK03p.mjs +0 -3092
- package/chunks/ZIHPaVeg.mjs +0 -105
- package/chunks/ZxxDJBOG2.mjs +0 -180
- package/chunks/_NG8ze6x.mjs +0 -42
- package/chunks/aeYRYRdi.mjs +0 -29
- package/chunks/b58kljs82.mjs +0 -525
- package/chunks/cGGsl8YM2.mjs +0 -2
- package/chunks/cvUTkWmm.mjs +0 -98
- package/chunks/el7WAt3q.mjs +0 -4
- package/chunks/f-0LSLCC.mjs +0 -17
- package/chunks/g1H2yYXi.mjs +0 -35
- package/chunks/hczonP-N2.mjs +0 -206
- package/chunks/jkTWyLZa.mjs +0 -17
- package/chunks/kN7dSjtl.mjs +0 -1278
- package/chunks/lJ7uxiQe2.mjs +0 -46
- package/chunks/lKeVGJZg.mjs +0 -62
- package/chunks/qNngJ9B9.mjs +0 -29
- package/chunks/r6tERHEL.mjs +0 -438
- package/chunks/tSJE9_uL.mjs +0 -1
- package/chunks/vRQzbLgj.mjs +0 -2
- package/chunks/wfxM1ecI.mjs +0 -17
- package/chunks/zG9cElaH.mjs +0 -1209
- package/css/style.css +0 -1
- package/css/style10.css +0 -1
- package/css/style11.css +0 -1
- package/css/style12.css +0 -1
- package/css/style13.css +0 -1
- package/css/style14.css +0 -1
- package/css/style15.css +0 -1
- package/css/style16.css +0 -1
- package/css/style17.css +0 -1
- package/css/style18.css +0 -1
- package/css/style19.css +0 -1
- package/css/style2.css +0 -1
- package/css/style20.css +0 -1
- package/css/style21.css +0 -1
- package/css/style22.css +0 -1
- package/css/style23.css +0 -1
- package/css/style24.css +0 -1
- package/css/style25.css +0 -1
- package/css/style26.css +0 -1
- package/css/style27.css +0 -1
- package/css/style28.css +0 -1
- package/css/style29.css +0 -1
- package/css/style3.css +0 -1
- package/css/style30.css +0 -1
- package/css/style31.css +0 -1
- package/css/style32.css +0 -1
- package/css/style33.css +0 -1
- package/css/style34.css +0 -1
- package/css/style35.css +0 -1
- package/css/style36.css +0 -1
- package/css/style37.css +0 -1
- package/css/style38.css +0 -1
- package/css/style39.css +0 -1
- package/css/style4.css +0 -1
- package/css/style5.css +0 -1
- package/css/style6.css +0 -1
- package/css/style7.css +0 -1
- package/css/style8.css +0 -1
- package/css/style9.css +0 -1
- package/form-image/style.css +0 -1
- package/form-radio-group/style.css +0 -1
- package/fy-input-color/style.css +0 -1
- /package/chunks/{hFCEXdXW.mjs → B1MSrc6f.mjs} +0 -0
- /package/chunks/{DdkcOQQ02.mjs → BbUUI4mF.mjs} +0 -0
- /package/chunks/{wm9pxXuv.mjs → Br0vC3nS2.mjs} +0 -0
- /package/chunks/{BEOl740t2.mjs → CBHGpbDK.mjs} +0 -0
- /package/chunks/{gQwOnofw.mjs → CY2YrwMT.mjs} +0 -0
- /package/chunks/{DX29uO-O.mjs → CZnwC17w.mjs} +0 -0
- /package/chunks/{nvUgyH-A.mjs → C_QfuxeQ.mjs} +0 -0
- /package/chunks/{CyNGeUTh.mjs → Cp1olyWc.mjs} +0 -0
- /package/chunks/{CVDxIjGg.mjs → DEHzWyyp.mjs} +0 -0
- /package/chunks/{BMdSzPpD2.mjs → DJe2Reym.mjs} +0 -0
- /package/chunks/{CISLTyi_2.mjs → DOLQ28wD.mjs} +0 -0
- /package/chunks/{CeLNtZZw.mjs → DokYQ49m.mjs} +0 -0
- /package/chunks/{Xe_0bP0H.mjs → tzjUpVIj.mjs} +0 -0
package/chunks/zG9cElaH.mjs
DELETED
|
@@ -1,1209 +0,0 @@
|
|
|
1
|
-
import "./B2vpUK0j.mjs";
|
|
2
|
-
import { m as e, n as t, t as n } from "./r6tERHEL.mjs";
|
|
3
|
-
import { D as r, N as i, S as a, d as o, j as s, k as c, l, s as u, t as d, u as f } from "./cvUTkWmm.mjs";
|
|
4
|
-
import { P as p, _ as m, c as h, g, l as _, p as ee, t as v } from "./DiQUqii-.mjs";
|
|
5
|
-
import { n as te } from "./DUQs5bPg.mjs";
|
|
6
|
-
import { r as y } from "./E-zZdDOp.mjs";
|
|
7
|
-
import { t as b } from "./BnNJk0GR2.mjs";
|
|
8
|
-
import { u as x } from "./b58kljs82.mjs";
|
|
9
|
-
import { t as ne } from "./BBbwcaCo.mjs";
|
|
10
|
-
import { t as re } from "./DvenxcV4.mjs";
|
|
11
|
-
import { t as ie } from "./hFCEXdXW.mjs";
|
|
12
|
-
import { avueConfigContextKey as ae } from "../constants/index.mjs";
|
|
13
|
-
import { t as oe } from "./_wUx1zSH2.mjs";
|
|
14
|
-
import { d as se, i as ce } from "./DdkcOQQ02.mjs";
|
|
15
|
-
import { n as le, t as ue } from "./BsBVCVnp2.mjs";
|
|
16
|
-
import { t as S } from "./BEOl740t2.mjs";
|
|
17
|
-
import { Fragment as C, TransitionGroup as de, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as fe, createTextVNode as k, createVNode as A, defineComponent as j, inject as pe, mergeProps as me, nextTick as he, normalizeClass as M, normalizeStyle as ge, onBeforeUnmount as _e, openBlock as N, provide as ve, ref as P, renderList as ye, renderSlot as F, resolveDynamicComponent as I, shallowRef as L, toDisplayString as R, toRef as be, unref as z, watch as B, withCtx as V, withDirectives as xe, withKeys as H, withModifiers as U } from "vue";
|
|
18
|
-
import { cloneDeep as Se, flatten as Ce, isEqual as we, isNil as Te } from "lodash-unified";
|
|
19
|
-
import { isBlank as W } from "@web-utils/core";
|
|
20
|
-
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/upload/src/ajax.mjs
|
|
21
|
-
var Ee = "ElUpload", De = class extends Error {
|
|
22
|
-
constructor(e, t, n, r) {
|
|
23
|
-
super(e), this.name = "UploadAjaxError", this.status = t, this.method = n, this.url = r;
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
function Oe(e, t, n) {
|
|
27
|
-
let r;
|
|
28
|
-
return r = n.response ? `${n.response.error || n.response}` : n.responseText ? `${n.responseText}` : `fail to ${t.method} ${e} ${n.status}`, new De(r, n.status, t.method, e);
|
|
29
|
-
}
|
|
30
|
-
function ke(e) {
|
|
31
|
-
let t = e.responseText || e.response;
|
|
32
|
-
if (!t) return t;
|
|
33
|
-
try {
|
|
34
|
-
return JSON.parse(t);
|
|
35
|
-
} catch {
|
|
36
|
-
return t;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
var Ae = (e) => {
|
|
40
|
-
typeof XMLHttpRequest > "u" && t(Ee, "XMLHttpRequest is undefined");
|
|
41
|
-
let n = new XMLHttpRequest(), a = e.action;
|
|
42
|
-
n.upload && n.upload.addEventListener("progress", (t) => {
|
|
43
|
-
let n = t;
|
|
44
|
-
n.percent = t.total > 0 ? t.loaded / t.total * 100 : 0, e.onProgress(n);
|
|
45
|
-
});
|
|
46
|
-
let o = new FormData();
|
|
47
|
-
if (e.data) for (let [t, n] of Object.entries(e.data)) r(n) ? n.length === 2 && n[0] instanceof Blob && i(n[1]) ? o.append(t, n[0], n[1]) : n.forEach((e) => {
|
|
48
|
-
o.append(t, e);
|
|
49
|
-
}) : o.append(t, n);
|
|
50
|
-
o.append(e.filename, e.file, e.file.name), n.addEventListener("error", () => {
|
|
51
|
-
e.onError(Oe(a, e, n));
|
|
52
|
-
}), n.addEventListener("load", () => {
|
|
53
|
-
if (n.status < 200 || n.status >= 300) return e.onError(Oe(a, e, n));
|
|
54
|
-
e.onSuccess(ke(n));
|
|
55
|
-
}), n.open(e.method, a, !0), e.withCredentials && "withCredentials" in n && (n.withCredentials = !0);
|
|
56
|
-
let s = e.headers || {};
|
|
57
|
-
if (s instanceof Headers) s.forEach((e, t) => n.setRequestHeader(t, e));
|
|
58
|
-
else for (let [e, t] of Object.entries(s)) Te(t) || n.setRequestHeader(e, String(t));
|
|
59
|
-
return n.send(o), n;
|
|
60
|
-
}, G = [
|
|
61
|
-
"text",
|
|
62
|
-
"picture",
|
|
63
|
-
"picture-card"
|
|
64
|
-
], je = 1, K = () => Date.now() + je++, Me = l({
|
|
65
|
-
action: {
|
|
66
|
-
type: String,
|
|
67
|
-
default: "#"
|
|
68
|
-
},
|
|
69
|
-
headers: { type: f(Object) },
|
|
70
|
-
method: {
|
|
71
|
-
type: String,
|
|
72
|
-
default: "post"
|
|
73
|
-
},
|
|
74
|
-
data: {
|
|
75
|
-
type: f([
|
|
76
|
-
Object,
|
|
77
|
-
Function,
|
|
78
|
-
Promise
|
|
79
|
-
]),
|
|
80
|
-
default: () => b({})
|
|
81
|
-
},
|
|
82
|
-
multiple: Boolean,
|
|
83
|
-
name: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: "file"
|
|
86
|
-
},
|
|
87
|
-
drag: Boolean,
|
|
88
|
-
withCredentials: Boolean,
|
|
89
|
-
showFileList: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: !0
|
|
92
|
-
},
|
|
93
|
-
accept: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: ""
|
|
96
|
-
},
|
|
97
|
-
fileList: {
|
|
98
|
-
type: f(Array),
|
|
99
|
-
default: () => b([])
|
|
100
|
-
},
|
|
101
|
-
autoUpload: {
|
|
102
|
-
type: Boolean,
|
|
103
|
-
default: !0
|
|
104
|
-
},
|
|
105
|
-
listType: {
|
|
106
|
-
type: String,
|
|
107
|
-
values: G,
|
|
108
|
-
default: "text"
|
|
109
|
-
},
|
|
110
|
-
httpRequest: {
|
|
111
|
-
type: f(Function),
|
|
112
|
-
default: Ae
|
|
113
|
-
},
|
|
114
|
-
disabled: {
|
|
115
|
-
type: Boolean,
|
|
116
|
-
default: void 0
|
|
117
|
-
},
|
|
118
|
-
limit: Number,
|
|
119
|
-
directory: Boolean
|
|
120
|
-
}), Ne = l({
|
|
121
|
-
...Me,
|
|
122
|
-
beforeUpload: {
|
|
123
|
-
type: f(Function),
|
|
124
|
-
default: a
|
|
125
|
-
},
|
|
126
|
-
beforeRemove: { type: f(Function) },
|
|
127
|
-
onRemove: {
|
|
128
|
-
type: f(Function),
|
|
129
|
-
default: a
|
|
130
|
-
},
|
|
131
|
-
onChange: {
|
|
132
|
-
type: f(Function),
|
|
133
|
-
default: a
|
|
134
|
-
},
|
|
135
|
-
onPreview: {
|
|
136
|
-
type: f(Function),
|
|
137
|
-
default: a
|
|
138
|
-
},
|
|
139
|
-
onSuccess: {
|
|
140
|
-
type: f(Function),
|
|
141
|
-
default: a
|
|
142
|
-
},
|
|
143
|
-
onProgress: {
|
|
144
|
-
type: f(Function),
|
|
145
|
-
default: a
|
|
146
|
-
},
|
|
147
|
-
onError: {
|
|
148
|
-
type: f(Function),
|
|
149
|
-
default: a
|
|
150
|
-
},
|
|
151
|
-
onExceed: {
|
|
152
|
-
type: f(Function),
|
|
153
|
-
default: a
|
|
154
|
-
},
|
|
155
|
-
crossorigin: { type: f(String) }
|
|
156
|
-
}), Pe = {
|
|
157
|
-
action: "#",
|
|
158
|
-
method: "post",
|
|
159
|
-
data: () => b({}),
|
|
160
|
-
name: "file",
|
|
161
|
-
showFileList: !0,
|
|
162
|
-
accept: "",
|
|
163
|
-
fileList: () => b([]),
|
|
164
|
-
autoUpload: !0,
|
|
165
|
-
listType: "text",
|
|
166
|
-
httpRequest: Ae,
|
|
167
|
-
disabled: void 0
|
|
168
|
-
};
|
|
169
|
-
({ ...Pe });
|
|
170
|
-
//#endregion
|
|
171
|
-
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/upload/src/constants.mjs
|
|
172
|
-
var Fe = Symbol("uploadContextKey"), Ie = l({
|
|
173
|
-
files: {
|
|
174
|
-
type: f(Array),
|
|
175
|
-
default: () => b([])
|
|
176
|
-
},
|
|
177
|
-
disabled: {
|
|
178
|
-
type: Boolean,
|
|
179
|
-
default: void 0
|
|
180
|
-
},
|
|
181
|
-
handlePreview: {
|
|
182
|
-
type: f(Function),
|
|
183
|
-
default: a
|
|
184
|
-
},
|
|
185
|
-
listType: {
|
|
186
|
-
type: String,
|
|
187
|
-
values: G,
|
|
188
|
-
default: "text"
|
|
189
|
-
},
|
|
190
|
-
crossorigin: { type: f(String) }
|
|
191
|
-
}), Le = { remove: (e) => !!e }, Re = l({
|
|
192
|
-
...Me,
|
|
193
|
-
beforeUpload: {
|
|
194
|
-
type: f(Function),
|
|
195
|
-
default: a
|
|
196
|
-
},
|
|
197
|
-
onRemove: {
|
|
198
|
-
type: f(Function),
|
|
199
|
-
default: a
|
|
200
|
-
},
|
|
201
|
-
onStart: {
|
|
202
|
-
type: f(Function),
|
|
203
|
-
default: a
|
|
204
|
-
},
|
|
205
|
-
onSuccess: {
|
|
206
|
-
type: f(Function),
|
|
207
|
-
default: a
|
|
208
|
-
},
|
|
209
|
-
onProgress: {
|
|
210
|
-
type: f(Function),
|
|
211
|
-
default: a
|
|
212
|
-
},
|
|
213
|
-
onError: {
|
|
214
|
-
type: f(Function),
|
|
215
|
-
default: a
|
|
216
|
-
},
|
|
217
|
-
onExceed: {
|
|
218
|
-
type: f(Function),
|
|
219
|
-
default: a
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
({ ...Pe });
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/upload/src/upload-dragger.mjs
|
|
225
|
-
var ze = l({
|
|
226
|
-
disabled: {
|
|
227
|
-
type: Boolean,
|
|
228
|
-
default: void 0
|
|
229
|
-
},
|
|
230
|
-
directory: Boolean
|
|
231
|
-
}), Be = { file: (e) => r(e) }, Ve = [
|
|
232
|
-
"tabindex",
|
|
233
|
-
"aria-disabled",
|
|
234
|
-
"onKeydown"
|
|
235
|
-
], He = ["src", "crossorigin"], Ue = ["onClick"], We = ["title"], Ge = ["onClick"], Ke = ["onClick"], qe = /* @__PURE__ */ j({
|
|
236
|
-
name: "ElUploadList",
|
|
237
|
-
__name: "upload-list",
|
|
238
|
-
props: Ie,
|
|
239
|
-
emits: Le,
|
|
240
|
-
setup(e, { emit: t }) {
|
|
241
|
-
let n = e, r = t, { t: i } = te(), a = u("upload"), o = u("icon"), s = u("list"), c = y(), l = P(!1), d = w(() => [
|
|
242
|
-
a.b("list"),
|
|
243
|
-
a.bm("list", n.listType),
|
|
244
|
-
a.is("disabled", c.value)
|
|
245
|
-
]), f = (e) => {
|
|
246
|
-
r("remove", e);
|
|
247
|
-
};
|
|
248
|
-
return (t, n) => (N(), T(de, {
|
|
249
|
-
tag: "ul",
|
|
250
|
-
class: M(d.value),
|
|
251
|
-
name: z(s).b()
|
|
252
|
-
}, {
|
|
253
|
-
default: V(() => [(N(!0), D(C, null, ye(e.files, (r, s) => (N(), D("li", {
|
|
254
|
-
key: r.uid || r.name,
|
|
255
|
-
class: M([
|
|
256
|
-
z(a).be("list", "item"),
|
|
257
|
-
z(a).is(r.status),
|
|
258
|
-
{ focusing: l.value }
|
|
259
|
-
]),
|
|
260
|
-
tabindex: z(c) ? void 0 : 0,
|
|
261
|
-
"aria-disabled": z(c),
|
|
262
|
-
role: "button",
|
|
263
|
-
onKeydown: H((e) => !z(c) && f(r), ["delete"]),
|
|
264
|
-
onFocus: n[0] || (n[0] = (e) => l.value = !0),
|
|
265
|
-
onBlur: n[1] || (n[1] = (e) => l.value = !1),
|
|
266
|
-
onClick: n[2] || (n[2] = (e) => l.value = !1)
|
|
267
|
-
}, [F(t.$slots, "default", {
|
|
268
|
-
file: r,
|
|
269
|
-
index: s
|
|
270
|
-
}, () => [
|
|
271
|
-
e.listType === "picture" || r.status !== "uploading" && e.listType === "picture-card" ? (N(), D("img", {
|
|
272
|
-
key: 0,
|
|
273
|
-
class: M(z(a).be("list", "item-thumbnail")),
|
|
274
|
-
src: r.url,
|
|
275
|
-
crossorigin: e.crossorigin,
|
|
276
|
-
alt: ""
|
|
277
|
-
}, null, 10, He)) : E("v-if", !0),
|
|
278
|
-
r.status === "uploading" || e.listType !== "picture-card" ? (N(), D("div", {
|
|
279
|
-
key: 1,
|
|
280
|
-
class: M(z(a).be("list", "item-info"))
|
|
281
|
-
}, [O("a", {
|
|
282
|
-
class: M(z(a).be("list", "item-name")),
|
|
283
|
-
onClick: U((t) => e.handlePreview(r), ["prevent"])
|
|
284
|
-
}, [A(z(v), { class: M(z(o).m("document")) }, {
|
|
285
|
-
default: V(() => [A(z(m))]),
|
|
286
|
-
_: 1
|
|
287
|
-
}, 8, ["class"]), O("span", {
|
|
288
|
-
class: M(z(a).be("list", "item-file-name")),
|
|
289
|
-
title: r.name
|
|
290
|
-
}, R(r.name), 11, We)], 10, Ue), r.status === "uploading" ? (N(), T(z(ne), {
|
|
291
|
-
key: 0,
|
|
292
|
-
type: e.listType === "picture-card" ? "circle" : "line",
|
|
293
|
-
"stroke-width": e.listType === "picture-card" ? 6 : 2,
|
|
294
|
-
percentage: Number(r.percentage),
|
|
295
|
-
style: ge(e.listType === "picture-card" ? "" : "margin-top: 0.5rem")
|
|
296
|
-
}, null, 8, [
|
|
297
|
-
"type",
|
|
298
|
-
"stroke-width",
|
|
299
|
-
"percentage",
|
|
300
|
-
"style"
|
|
301
|
-
])) : E("v-if", !0)], 2)) : E("v-if", !0),
|
|
302
|
-
O("label", { class: M(z(a).be("list", "item-status-label")) }, [e.listType === "text" ? (N(), T(z(v), {
|
|
303
|
-
key: 0,
|
|
304
|
-
class: M([z(o).m("upload-success"), z(o).m("circle-check")])
|
|
305
|
-
}, {
|
|
306
|
-
default: V(() => [A(z(_))]),
|
|
307
|
-
_: 1
|
|
308
|
-
}, 8, ["class"])) : ["picture-card", "picture"].includes(e.listType) ? (N(), T(z(v), {
|
|
309
|
-
key: 1,
|
|
310
|
-
class: M([z(o).m("upload-success"), z(o).m("check")])
|
|
311
|
-
}, {
|
|
312
|
-
default: V(() => [A(z(h))]),
|
|
313
|
-
_: 1
|
|
314
|
-
}, 8, ["class"])) : E("v-if", !0)], 2),
|
|
315
|
-
z(c) ? E("v-if", !0) : (N(), T(z(v), {
|
|
316
|
-
key: 2,
|
|
317
|
-
class: M(z(o).m("close")),
|
|
318
|
-
"aria-label": z(i)("el.upload.delete"),
|
|
319
|
-
role: "button",
|
|
320
|
-
tabindex: "0",
|
|
321
|
-
onClick: (e) => f(r),
|
|
322
|
-
onKeydown: H(U((e) => f(r), ["prevent"]), ["enter", "space"])
|
|
323
|
-
}, {
|
|
324
|
-
default: V(() => [A(z(ee))]),
|
|
325
|
-
_: 1
|
|
326
|
-
}, 8, [
|
|
327
|
-
"class",
|
|
328
|
-
"aria-label",
|
|
329
|
-
"onClick",
|
|
330
|
-
"onKeydown"
|
|
331
|
-
])),
|
|
332
|
-
z(c) ? E("v-if", !0) : (N(), D("i", {
|
|
333
|
-
key: 3,
|
|
334
|
-
class: M(z(o).m("close-tip"))
|
|
335
|
-
}, R(z(i)("el.upload.deleteTip")), 3)),
|
|
336
|
-
e.listType === "picture-card" ? (N(), D("span", {
|
|
337
|
-
key: 4,
|
|
338
|
-
class: M(z(a).be("list", "item-actions"))
|
|
339
|
-
}, [O("span", {
|
|
340
|
-
class: M(z(a).be("list", "item-preview")),
|
|
341
|
-
onClick: (t) => e.handlePreview(r)
|
|
342
|
-
}, [A(z(v), { class: M(z(o).m("zoom-in")) }, {
|
|
343
|
-
default: V(() => [A(z(p))]),
|
|
344
|
-
_: 1
|
|
345
|
-
}, 8, ["class"])], 10, Ge), z(c) ? E("v-if", !0) : (N(), D("span", {
|
|
346
|
-
key: 0,
|
|
347
|
-
class: M(z(a).be("list", "item-delete")),
|
|
348
|
-
onClick: (e) => f(r)
|
|
349
|
-
}, [A(z(v), { class: M(z(o).m("delete")) }, {
|
|
350
|
-
default: V(() => [A(z(g))]),
|
|
351
|
-
_: 1
|
|
352
|
-
}, 8, ["class"])], 10, Ke))], 2)) : E("v-if", !0)
|
|
353
|
-
])], 42, Ve))), 128)), F(t.$slots, "append")]),
|
|
354
|
-
_: 3
|
|
355
|
-
}, 8, ["class", "name"]));
|
|
356
|
-
}
|
|
357
|
-
}), Je = "ElUploadDrag", Ye = /* @__PURE__ */ j({
|
|
358
|
-
name: Je,
|
|
359
|
-
__name: "upload-dragger",
|
|
360
|
-
props: ze,
|
|
361
|
-
emits: Be,
|
|
362
|
-
setup(e, { emit: n }) {
|
|
363
|
-
let r = e, i = n;
|
|
364
|
-
pe(Fe) || t(Je, "usage: <el-upload><el-upload-dragger /></el-upload>");
|
|
365
|
-
let a = u("upload"), o = P(!1), s = y(), c = (e) => new Promise((t, n) => e.file(t, n)), l = async (e) => {
|
|
366
|
-
try {
|
|
367
|
-
if (e.isFile) {
|
|
368
|
-
let t = await c(e);
|
|
369
|
-
return t.isDirectory = !1, [t];
|
|
370
|
-
}
|
|
371
|
-
if (e.isDirectory) {
|
|
372
|
-
let t = e.createReader(), n = () => new Promise((e, n) => t.readEntries(e, n)), r = [], i = await n();
|
|
373
|
-
for (; i.length > 0;) r.push(...i), i = await n();
|
|
374
|
-
let a = r.map((e) => l(e).catch(() => []));
|
|
375
|
-
return Ce(await Promise.all(a));
|
|
376
|
-
}
|
|
377
|
-
} catch {
|
|
378
|
-
return [];
|
|
379
|
-
}
|
|
380
|
-
return [];
|
|
381
|
-
}, d = async (e) => {
|
|
382
|
-
if (s.value) return;
|
|
383
|
-
o.value = !1, e.stopPropagation();
|
|
384
|
-
let t = Array.from(e.dataTransfer.files), n = e.dataTransfer.items || [];
|
|
385
|
-
if (r.directory) {
|
|
386
|
-
let e = Array.from(n).map((e) => {
|
|
387
|
-
var t;
|
|
388
|
-
return e == null || (t = e.webkitGetAsEntry) == null ? void 0 : t.call(e);
|
|
389
|
-
}).filter((e) => e);
|
|
390
|
-
i("file", Ce(await Promise.all(e.map(l))));
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
t.forEach((e, t) => {
|
|
394
|
-
var r, i;
|
|
395
|
-
let a = (r = n[t]) == null || (i = r.webkitGetAsEntry) == null ? void 0 : i.call(r);
|
|
396
|
-
a && (e.isDirectory = a.isDirectory);
|
|
397
|
-
}), i("file", t);
|
|
398
|
-
}, f = () => {
|
|
399
|
-
s.value || (o.value = !0);
|
|
400
|
-
}, p = (e) => {
|
|
401
|
-
e.currentTarget.contains(e.relatedTarget) || (o.value = !1);
|
|
402
|
-
};
|
|
403
|
-
return (e, t) => (N(), D("div", {
|
|
404
|
-
class: M([z(a).b("dragger"), z(a).is("dragover", o.value)]),
|
|
405
|
-
onDrop: U(d, ["prevent"]),
|
|
406
|
-
onDragover: U(f, ["prevent"]),
|
|
407
|
-
onDragleave: U(p, ["prevent"])
|
|
408
|
-
}, [F(e.$slots, "default")], 34));
|
|
409
|
-
}
|
|
410
|
-
}), Xe = [
|
|
411
|
-
"tabindex",
|
|
412
|
-
"aria-disabled",
|
|
413
|
-
"onKeydown"
|
|
414
|
-
], Ze = [
|
|
415
|
-
"name",
|
|
416
|
-
"disabled",
|
|
417
|
-
"multiple",
|
|
418
|
-
"accept",
|
|
419
|
-
"webkitdirectory"
|
|
420
|
-
], Qe = /* @__PURE__ */ j({
|
|
421
|
-
name: "ElUploadContent",
|
|
422
|
-
inheritAttrs: !1,
|
|
423
|
-
__name: "upload-content",
|
|
424
|
-
props: Re,
|
|
425
|
-
setup(e, { expose: t }) {
|
|
426
|
-
let n = e, r = u("upload"), i = y(), a = L({}), l = L(), d = (e) => {
|
|
427
|
-
if (e.length === 0) return;
|
|
428
|
-
let { autoUpload: t, limit: r, fileList: i, multiple: a, onStart: o, onExceed: s } = n;
|
|
429
|
-
if (r && i.length + e.length > r) {
|
|
430
|
-
s(e, i);
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
a || (e = e.slice(0, 1));
|
|
434
|
-
for (let n of e) {
|
|
435
|
-
let e = n;
|
|
436
|
-
e.uid = K(), o(e), t && f(e);
|
|
437
|
-
}
|
|
438
|
-
}, f = async (e) => {
|
|
439
|
-
if (l.value.value = "", !n.beforeUpload) return m(e);
|
|
440
|
-
let t, r = {};
|
|
441
|
-
try {
|
|
442
|
-
let i = n.data, a = n.beforeUpload(e);
|
|
443
|
-
r = s(n.data) ? Se(n.data) : n.data, t = await a, s(n.data) && we(i, r) && (r = Se(n.data));
|
|
444
|
-
} catch {
|
|
445
|
-
t = !1;
|
|
446
|
-
}
|
|
447
|
-
if (t === !1) {
|
|
448
|
-
n.onRemove(e);
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
let i = e;
|
|
452
|
-
t instanceof Blob && (i = t instanceof File ? t : new File([t], e.name, { type: e.type })), m(Object.assign(i, { uid: e.uid }), r);
|
|
453
|
-
}, p = async (e, t) => c(e) ? e(t) : e, m = async (e, t) => {
|
|
454
|
-
let { headers: r, data: i, method: o, withCredentials: s, name: c, action: l, onProgress: u, onSuccess: d, onError: f, httpRequest: m } = n;
|
|
455
|
-
try {
|
|
456
|
-
t = await p(t ?? i, e);
|
|
457
|
-
} catch {
|
|
458
|
-
n.onRemove(e);
|
|
459
|
-
return;
|
|
460
|
-
}
|
|
461
|
-
let { uid: h } = e, g = {
|
|
462
|
-
headers: r || {},
|
|
463
|
-
withCredentials: s,
|
|
464
|
-
file: e,
|
|
465
|
-
data: t,
|
|
466
|
-
method: o,
|
|
467
|
-
filename: c,
|
|
468
|
-
action: l,
|
|
469
|
-
onProgress: (t) => {
|
|
470
|
-
u(t, e);
|
|
471
|
-
},
|
|
472
|
-
onSuccess: (t) => {
|
|
473
|
-
d(t, e), delete a.value[h];
|
|
474
|
-
},
|
|
475
|
-
onError: (t) => {
|
|
476
|
-
f(t, e), delete a.value[h];
|
|
477
|
-
}
|
|
478
|
-
}, _ = m(g);
|
|
479
|
-
a.value[h] = _, _ instanceof Promise && _.then(g.onSuccess, g.onError);
|
|
480
|
-
}, h = (e) => {
|
|
481
|
-
let t = e.target.files;
|
|
482
|
-
t && d(Array.from(t));
|
|
483
|
-
}, g = () => {
|
|
484
|
-
i.value || (l.value.value = "", l.value.click());
|
|
485
|
-
}, _ = () => {
|
|
486
|
-
g();
|
|
487
|
-
};
|
|
488
|
-
return t({
|
|
489
|
-
abort: (e) => {
|
|
490
|
-
o(a.value).filter(e ? ([t]) => String(e.uid) === t : () => !0).forEach(([e, t]) => {
|
|
491
|
-
t instanceof XMLHttpRequest && t.abort(), delete a.value[e];
|
|
492
|
-
});
|
|
493
|
-
},
|
|
494
|
-
upload: f
|
|
495
|
-
}), (t, n) => (N(), D("div", {
|
|
496
|
-
class: M([
|
|
497
|
-
z(r).b(),
|
|
498
|
-
z(r).m(e.listType),
|
|
499
|
-
z(r).is("drag", e.drag),
|
|
500
|
-
z(r).is("disabled", z(i))
|
|
501
|
-
]),
|
|
502
|
-
tabindex: z(i) ? void 0 : 0,
|
|
503
|
-
"aria-disabled": z(i),
|
|
504
|
-
role: "button",
|
|
505
|
-
onClick: g,
|
|
506
|
-
onKeydown: H(U(_, ["self"]), ["enter", "space"])
|
|
507
|
-
}, [e.drag ? (N(), T(Ye, {
|
|
508
|
-
key: 0,
|
|
509
|
-
disabled: z(i),
|
|
510
|
-
directory: e.directory,
|
|
511
|
-
onFile: d
|
|
512
|
-
}, {
|
|
513
|
-
default: V(() => [F(t.$slots, "default")]),
|
|
514
|
-
_: 3
|
|
515
|
-
}, 8, ["disabled", "directory"])) : F(t.$slots, "default", { key: 1 }), O("input", {
|
|
516
|
-
ref_key: "inputRef",
|
|
517
|
-
ref: l,
|
|
518
|
-
class: M(z(r).e("input")),
|
|
519
|
-
name: e.name,
|
|
520
|
-
disabled: z(i),
|
|
521
|
-
multiple: e.multiple,
|
|
522
|
-
accept: e.accept,
|
|
523
|
-
webkitdirectory: e.directory || void 0,
|
|
524
|
-
type: "file",
|
|
525
|
-
onChange: h,
|
|
526
|
-
onClick: n[0] || (n[0] = U(() => {}, ["stop"]))
|
|
527
|
-
}, null, 42, Ze)], 42, Xe));
|
|
528
|
-
}
|
|
529
|
-
}), $e = "ElUpload", et = (e) => {
|
|
530
|
-
var t;
|
|
531
|
-
(t = e.url) != null && t.startsWith("blob:") && URL.revokeObjectURL(e.url);
|
|
532
|
-
}, tt = (r, i) => {
|
|
533
|
-
let a = e(r, "fileList", void 0, { passive: !0 }), o = (e) => a.value.find((t) => t.uid === e.uid);
|
|
534
|
-
function s(e) {
|
|
535
|
-
var t;
|
|
536
|
-
(t = i.value) == null || t.abort(e);
|
|
537
|
-
}
|
|
538
|
-
function c(e = [
|
|
539
|
-
"ready",
|
|
540
|
-
"uploading",
|
|
541
|
-
"success",
|
|
542
|
-
"fail"
|
|
543
|
-
]) {
|
|
544
|
-
a.value = a.value.filter((t) => !e.includes(t.status));
|
|
545
|
-
}
|
|
546
|
-
function l(e) {
|
|
547
|
-
a.value = a.value.filter((t) => t.uid !== e.uid);
|
|
548
|
-
}
|
|
549
|
-
let u = (e) => {
|
|
550
|
-
he(() => r.onChange(e, a.value));
|
|
551
|
-
}, d = (e, t) => {
|
|
552
|
-
let n = o(t);
|
|
553
|
-
n && (console.error(e), n.status = "fail", l(n), r.onError(e, n, a.value), u(n));
|
|
554
|
-
}, f = (e, t) => {
|
|
555
|
-
let n = o(t);
|
|
556
|
-
n && (r.onProgress(e, n, a.value), n.status = "uploading", n.percentage = Math.round(e.percent));
|
|
557
|
-
}, p = (e, t) => {
|
|
558
|
-
let n = o(t);
|
|
559
|
-
n && (n.status = "success", n.response = e, r.onSuccess(e, n, a.value), u(n));
|
|
560
|
-
}, m = (e) => {
|
|
561
|
-
Te(e.uid) && (e.uid = K());
|
|
562
|
-
let t = {
|
|
563
|
-
name: e.name,
|
|
564
|
-
percentage: 0,
|
|
565
|
-
status: "ready",
|
|
566
|
-
size: e.size,
|
|
567
|
-
raw: e,
|
|
568
|
-
uid: e.uid
|
|
569
|
-
};
|
|
570
|
-
if (r.listType === "picture-card" || r.listType === "picture") try {
|
|
571
|
-
t.url = URL.createObjectURL(e);
|
|
572
|
-
} catch (e) {
|
|
573
|
-
n($e, e.message), r.onError(e, t, a.value);
|
|
574
|
-
}
|
|
575
|
-
a.value = [...a.value, t], u(t);
|
|
576
|
-
}, h = async (e) => {
|
|
577
|
-
let n = e instanceof File ? o(e) : e;
|
|
578
|
-
n || t($e, "file to be removed not found");
|
|
579
|
-
let i = (e) => {
|
|
580
|
-
s(e), l(e), r.onRemove(e, a.value), et(e);
|
|
581
|
-
};
|
|
582
|
-
r.beforeRemove ? await r.beforeRemove(n, a.value) !== !1 && i(n) : i(n);
|
|
583
|
-
};
|
|
584
|
-
function g() {
|
|
585
|
-
a.value.filter(({ status: e }) => e === "ready").forEach(({ raw: e }) => {
|
|
586
|
-
var t;
|
|
587
|
-
return e && ((t = i.value) == null ? void 0 : t.upload(e));
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
return B(() => r.listType, (e) => {
|
|
591
|
-
e !== "picture-card" && e !== "picture" || (a.value = a.value.map((e) => {
|
|
592
|
-
let { raw: t, url: n } = e;
|
|
593
|
-
if (!n && t) try {
|
|
594
|
-
e.url = URL.createObjectURL(t);
|
|
595
|
-
} catch (t) {
|
|
596
|
-
r.onError(t, e, a.value);
|
|
597
|
-
}
|
|
598
|
-
return e;
|
|
599
|
-
}));
|
|
600
|
-
}), B(a, (e) => {
|
|
601
|
-
for (let t of e) t.uid || (t.uid = K()), t.status || (t.status = "success");
|
|
602
|
-
}, {
|
|
603
|
-
immediate: !0,
|
|
604
|
-
deep: !0
|
|
605
|
-
}), {
|
|
606
|
-
uploadFiles: a,
|
|
607
|
-
abort: s,
|
|
608
|
-
clearFiles: c,
|
|
609
|
-
handleError: d,
|
|
610
|
-
handleProgress: f,
|
|
611
|
-
handleStart: m,
|
|
612
|
-
handleSuccess: p,
|
|
613
|
-
handleRemove: h,
|
|
614
|
-
submit: g,
|
|
615
|
-
revokeFileObjectURL: et
|
|
616
|
-
};
|
|
617
|
-
}, nt = d(/* @__PURE__ */ j({
|
|
618
|
-
name: "ElUpload",
|
|
619
|
-
__name: "upload",
|
|
620
|
-
props: Ne,
|
|
621
|
-
setup(e, { expose: t }) {
|
|
622
|
-
let n = e, r = y(), i = L(), { abort: a, submit: o, clearFiles: s, uploadFiles: c, handleStart: l, handleError: u, handleRemove: d, handleSuccess: f, handleProgress: p, revokeFileObjectURL: m } = tt(n, i), h = w(() => n.listType === "picture-card"), g = w(() => ({
|
|
623
|
-
...n,
|
|
624
|
-
fileList: c.value,
|
|
625
|
-
onStart: l,
|
|
626
|
-
onProgress: p,
|
|
627
|
-
onSuccess: f,
|
|
628
|
-
onError: u,
|
|
629
|
-
onRemove: d
|
|
630
|
-
}));
|
|
631
|
-
return _e(() => {
|
|
632
|
-
c.value.forEach(m);
|
|
633
|
-
}), ve(Fe, { accept: be(n, "accept") }), t({
|
|
634
|
-
abort: a,
|
|
635
|
-
submit: o,
|
|
636
|
-
clearFiles: s,
|
|
637
|
-
handleStart: l,
|
|
638
|
-
handleRemove: d
|
|
639
|
-
}), (t, n) => (N(), D("div", null, [
|
|
640
|
-
h.value && e.showFileList ? (N(), T(qe, {
|
|
641
|
-
key: 0,
|
|
642
|
-
disabled: z(r),
|
|
643
|
-
"list-type": e.listType,
|
|
644
|
-
files: z(c),
|
|
645
|
-
crossorigin: e.crossorigin,
|
|
646
|
-
"handle-preview": e.onPreview,
|
|
647
|
-
onRemove: z(d)
|
|
648
|
-
}, fe({
|
|
649
|
-
append: V(() => [A(Qe, me({
|
|
650
|
-
ref_key: "uploadRef",
|
|
651
|
-
ref: i
|
|
652
|
-
}, g.value), {
|
|
653
|
-
default: V(() => [t.$slots.trigger ? F(t.$slots, "trigger", { key: 0 }) : E("v-if", !0), !t.$slots.trigger && t.$slots.default ? F(t.$slots, "default", { key: 1 }) : E("v-if", !0)]),
|
|
654
|
-
_: 3
|
|
655
|
-
}, 16)]),
|
|
656
|
-
_: 2
|
|
657
|
-
}, [t.$slots.file ? {
|
|
658
|
-
name: "default",
|
|
659
|
-
fn: V(({ file: e, index: n }) => [F(t.$slots, "file", {
|
|
660
|
-
file: e,
|
|
661
|
-
index: n
|
|
662
|
-
})]),
|
|
663
|
-
key: "0"
|
|
664
|
-
} : void 0]), 1032, [
|
|
665
|
-
"disabled",
|
|
666
|
-
"list-type",
|
|
667
|
-
"files",
|
|
668
|
-
"crossorigin",
|
|
669
|
-
"handle-preview",
|
|
670
|
-
"onRemove"
|
|
671
|
-
])) : E("v-if", !0),
|
|
672
|
-
!h.value || h.value && !e.showFileList ? (N(), T(Qe, me({
|
|
673
|
-
key: 1,
|
|
674
|
-
ref_key: "uploadRef",
|
|
675
|
-
ref: i
|
|
676
|
-
}, g.value), {
|
|
677
|
-
default: V(() => [t.$slots.trigger ? F(t.$slots, "trigger", { key: 0 }) : E("v-if", !0), !t.$slots.trigger && t.$slots.default ? F(t.$slots, "default", { key: 1 }) : E("v-if", !0)]),
|
|
678
|
-
_: 3
|
|
679
|
-
}, 16)) : E("v-if", !0),
|
|
680
|
-
t.$slots.trigger ? F(t.$slots, "default", { key: 2 }) : E("v-if", !0),
|
|
681
|
-
F(t.$slots, "tip"),
|
|
682
|
-
!h.value && e.showFileList ? (N(), T(qe, {
|
|
683
|
-
key: 3,
|
|
684
|
-
disabled: z(r),
|
|
685
|
-
"list-type": e.listType,
|
|
686
|
-
files: z(c),
|
|
687
|
-
crossorigin: e.crossorigin,
|
|
688
|
-
"handle-preview": e.onPreview,
|
|
689
|
-
onRemove: z(d)
|
|
690
|
-
}, fe({ _: 2 }, [t.$slots.file ? {
|
|
691
|
-
name: "default",
|
|
692
|
-
fn: V(({ file: e, index: n }) => [F(t.$slots, "file", {
|
|
693
|
-
file: e,
|
|
694
|
-
index: n
|
|
695
|
-
})]),
|
|
696
|
-
key: "0"
|
|
697
|
-
} : void 0]), 1032, [
|
|
698
|
-
"disabled",
|
|
699
|
-
"list-type",
|
|
700
|
-
"files",
|
|
701
|
-
"crossorigin",
|
|
702
|
-
"handle-preview",
|
|
703
|
-
"onRemove"
|
|
704
|
-
])) : E("v-if", !0)
|
|
705
|
-
]));
|
|
706
|
-
}
|
|
707
|
-
})), q, J, Y = {
|
|
708
|
-
width: 200,
|
|
709
|
-
height: 200
|
|
710
|
-
}, X = {
|
|
711
|
-
text: "avueJS",
|
|
712
|
-
fontFamily: "microsoft yahei",
|
|
713
|
-
color: "#999",
|
|
714
|
-
fontSize: 16,
|
|
715
|
-
opacity: 100,
|
|
716
|
-
bottom: 10,
|
|
717
|
-
right: 10,
|
|
718
|
-
ratio: 1
|
|
719
|
-
};
|
|
720
|
-
function Z(e, t) {
|
|
721
|
-
let n = new FileReader();
|
|
722
|
-
n.readAsDataURL(e), n.onload = function(e) {
|
|
723
|
-
t(e.target.result);
|
|
724
|
-
};
|
|
725
|
-
}
|
|
726
|
-
function rt(e, t = {}, n) {
|
|
727
|
-
let { text: r, fontFamily: i, color: a, fontSize: o, opacity: s, bottom: c, right: l, ratio: u } = t;
|
|
728
|
-
d(), Z(e, f);
|
|
729
|
-
function d() {
|
|
730
|
-
X.text = r || X.text, X.fontFamily = i || X.fontFamily, X.color = a || X.color, X.fontSize = o || X.fontSize, X.opacity = s || X.opacity, X.bottom = c || X.bottom, X.right = l || X.right, X.ratio = u || X.ratio;
|
|
731
|
-
}
|
|
732
|
-
function f(t) {
|
|
733
|
-
let r = new Image();
|
|
734
|
-
r.src = t, r.onload = function() {
|
|
735
|
-
let t = r.width, i = r.height;
|
|
736
|
-
p(t, i), J.drawImage(r, 0, 0, t, i), m(t, i);
|
|
737
|
-
let a = ce(document.getElementById("canvas").toDataURL(e.type, X.ratio), e.name);
|
|
738
|
-
n == null || n(a);
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
function p(e, t) {
|
|
742
|
-
q = document.getElementById("canvas"), q === null && (q = document.createElement("canvas"), q.id = "canvas", q.className = "avue-canvas", document.body.appendChild(q)), J = q.getContext("2d"), q.width = e, q.height = t;
|
|
743
|
-
}
|
|
744
|
-
function m(e, t) {
|
|
745
|
-
let n = X.text, r = h(n, e, t);
|
|
746
|
-
J.font = `${r.fontSize}px ${X.fontFamily}`, J.fillStyle = X.color, J.globalAlpha = X.opacity / 100, J.fillText(n, r.x, r.y);
|
|
747
|
-
}
|
|
748
|
-
function h(e, t, n) {
|
|
749
|
-
let r, i, a = X.fontSize / Y.width * t;
|
|
750
|
-
i = X.bottom ? Y.height - X.bottom : X.top, r = X.right ? Y.width - X.right : X.left, J.font = `${X.fontSize}px ${X.fontFamily}`;
|
|
751
|
-
let o = Number(J.measureText(e).width);
|
|
752
|
-
r -= o;
|
|
753
|
-
let s = r / Y.width, c = i / Y.height;
|
|
754
|
-
return r = s * t, i = c * n, {
|
|
755
|
-
x: r,
|
|
756
|
-
y: i,
|
|
757
|
-
fontSize: a
|
|
758
|
-
};
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
//#endregion
|
|
762
|
-
//#region src/components/avue/fy-from/upload/qiniu/index.js
|
|
763
|
-
var it = (e, t, n) => {
|
|
764
|
-
let r = JSON.stringify(n);
|
|
765
|
-
if (window.__ENV__ === "development") {
|
|
766
|
-
var i;
|
|
767
|
-
(i = console) == null || i.log("put_policy = ", r);
|
|
768
|
-
}
|
|
769
|
-
let a = ot(at(r));
|
|
770
|
-
if (window.__ENV__ === "development") {
|
|
771
|
-
var o;
|
|
772
|
-
(o = console) == null || o.log("encoded = ", a);
|
|
773
|
-
}
|
|
774
|
-
let s = window.CryptoJS.HmacSHA1(a, t).toString(window.CryptoJS.enc.Base64);
|
|
775
|
-
if (window.__ENV__ === "development") {
|
|
776
|
-
var c;
|
|
777
|
-
(c = console) == null || c.log("encoded_signed=", s);
|
|
778
|
-
}
|
|
779
|
-
let l = `${e}:${st(s)}:${a}`;
|
|
780
|
-
if (window.__ENV__ === "development") {
|
|
781
|
-
var u;
|
|
782
|
-
(u = console) == null || u.log("upload_token=", l);
|
|
783
|
-
}
|
|
784
|
-
return l;
|
|
785
|
-
};
|
|
786
|
-
function at(e) {
|
|
787
|
-
let t, n, r;
|
|
788
|
-
t = "";
|
|
789
|
-
let i = e.length;
|
|
790
|
-
for (n = 0; n < i; n++) r = e.charCodeAt(n), r >= 1 && r <= 127 ? t += e.charAt(n) : r > 2047 ? (t += String.fromCharCode(224 | r >> 12 & 15), t += String.fromCharCode(128 | r >> 6 & 63), t += String.fromCharCode(128 | r >> 0 & 63)) : (t += String.fromCharCode(192 | r >> 6 & 31), t += String.fromCharCode(128 | r >> 0 & 63));
|
|
791
|
-
return t;
|
|
792
|
-
}
|
|
793
|
-
var Q = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
794
|
-
function ot(e) {
|
|
795
|
-
let t, n, r, i, a, o = e.length;
|
|
796
|
-
for (n = 0, t = ""; n < o;) {
|
|
797
|
-
if (r = e.charCodeAt(n++) & 255, n === o) {
|
|
798
|
-
t += Q.charAt(r >> 2), t += Q.charAt((r & 3) << 4), t += "==";
|
|
799
|
-
break;
|
|
800
|
-
}
|
|
801
|
-
if (i = e.charCodeAt(n++), n === o) {
|
|
802
|
-
t += Q.charAt(r >> 2), t += Q.charAt((r & 3) << 4 | (i & 240) >> 4), t += Q.charAt((i & 15) << 2), t += "=";
|
|
803
|
-
break;
|
|
804
|
-
}
|
|
805
|
-
a = e.charCodeAt(n++), t += Q.charAt(r >> 2), t += Q.charAt((r & 3) << 4 | (i & 240) >> 4), t += Q.charAt((i & 15) << 2 | (a & 192) >> 6), t += Q.charAt(a & 63);
|
|
806
|
-
}
|
|
807
|
-
return t;
|
|
808
|
-
}
|
|
809
|
-
var st = function(e) {
|
|
810
|
-
return e = e.replace(/\+/g, "-"), e = e.replace(/\//g, "_"), e;
|
|
811
|
-
}, ct = (e) => new window.OSS(e);
|
|
812
|
-
//#endregion
|
|
813
|
-
//#region src/components/avue/fy-from/upload/FyUpload.vue
|
|
814
|
-
function $(e, t = "") {
|
|
815
|
-
return t.match(/(^http:\/\/|^https:\/\/|^\/\/|data:image\/)/) ? t : e + t;
|
|
816
|
-
}
|
|
817
|
-
var lt = {
|
|
818
|
-
name: "FyUpload",
|
|
819
|
-
mixins: [le, ue],
|
|
820
|
-
inject: { AVUE: {
|
|
821
|
-
from: ae,
|
|
822
|
-
default: null
|
|
823
|
-
} },
|
|
824
|
-
props: {
|
|
825
|
-
qiniu: Object,
|
|
826
|
-
ali: Object,
|
|
827
|
-
data: {
|
|
828
|
-
type: Object,
|
|
829
|
-
default: () => ({})
|
|
830
|
-
},
|
|
831
|
-
showFileList: {
|
|
832
|
-
type: Boolean,
|
|
833
|
-
default: !0
|
|
834
|
-
},
|
|
835
|
-
fileText: String,
|
|
836
|
-
fileType: { type: String },
|
|
837
|
-
oss: { type: String },
|
|
838
|
-
limit: { type: Number },
|
|
839
|
-
headers: {
|
|
840
|
-
type: Object,
|
|
841
|
-
default: () => ({})
|
|
842
|
-
},
|
|
843
|
-
accept: {
|
|
844
|
-
type: [String, Array],
|
|
845
|
-
default: ""
|
|
846
|
-
},
|
|
847
|
-
canvasOption: {
|
|
848
|
-
type: Object,
|
|
849
|
-
default: () => ({})
|
|
850
|
-
},
|
|
851
|
-
cropperOption: {
|
|
852
|
-
type: Object,
|
|
853
|
-
default: () => ({})
|
|
854
|
-
},
|
|
855
|
-
fileSize: { type: Number },
|
|
856
|
-
dragFile: {
|
|
857
|
-
type: Boolean,
|
|
858
|
-
default: !1
|
|
859
|
-
},
|
|
860
|
-
drag: {
|
|
861
|
-
type: Boolean,
|
|
862
|
-
default: !1
|
|
863
|
-
},
|
|
864
|
-
loadText: {
|
|
865
|
-
type: String,
|
|
866
|
-
default: "Loading..."
|
|
867
|
-
},
|
|
868
|
-
action: {
|
|
869
|
-
type: String,
|
|
870
|
-
default: ""
|
|
871
|
-
},
|
|
872
|
-
uploadBefore: Function,
|
|
873
|
-
uploadAfter: Function,
|
|
874
|
-
uploadDelete: Function,
|
|
875
|
-
uploadPreview: Function,
|
|
876
|
-
uploadError: Function,
|
|
877
|
-
uploadExceed: Function,
|
|
878
|
-
httpRequest: Function
|
|
879
|
-
},
|
|
880
|
-
data() {
|
|
881
|
-
return {
|
|
882
|
-
res: "",
|
|
883
|
-
loading: !1,
|
|
884
|
-
menu: !1,
|
|
885
|
-
reload: Math.random()
|
|
886
|
-
};
|
|
887
|
-
},
|
|
888
|
-
computed: {
|
|
889
|
-
isObject() {
|
|
890
|
-
return typeof this.text[0] == "object";
|
|
891
|
-
},
|
|
892
|
-
acceptList() {
|
|
893
|
-
return Array.isArray(this.accept) ? this.accept.join(",") : this.accept;
|
|
894
|
-
},
|
|
895
|
-
homeUrl() {
|
|
896
|
-
return this.propsHttp.home || "";
|
|
897
|
-
},
|
|
898
|
-
fileName() {
|
|
899
|
-
return this.propsHttp.fileName || "file";
|
|
900
|
-
},
|
|
901
|
-
isAliOss() {
|
|
902
|
-
return this.oss === "ali";
|
|
903
|
-
},
|
|
904
|
-
isQiniuOss() {
|
|
905
|
-
return this.oss === "qiniu";
|
|
906
|
-
},
|
|
907
|
-
isPictureImg() {
|
|
908
|
-
return this.listType === "picture-img";
|
|
909
|
-
},
|
|
910
|
-
imgUrl() {
|
|
911
|
-
return W(this.text) ? null : $(this.homeUrl, this.text[0]);
|
|
912
|
-
},
|
|
913
|
-
fileList() {
|
|
914
|
-
let e = [];
|
|
915
|
-
return (this.text || []).forEach((t, n) => {
|
|
916
|
-
if (t) {
|
|
917
|
-
let r = this.isObject ? t[this.labelKey] : t.substring(t.lastIndexOf("/") + 1), i = this.isObject ? t[this.valueKey] : t;
|
|
918
|
-
i = $(this.homeUrl, i), e.push({
|
|
919
|
-
uid: `${n}`,
|
|
920
|
-
status: "done",
|
|
921
|
-
type: this.isMediaType(i),
|
|
922
|
-
name: r,
|
|
923
|
-
url: i
|
|
924
|
-
});
|
|
925
|
-
}
|
|
926
|
-
}), e;
|
|
927
|
-
}
|
|
928
|
-
},
|
|
929
|
-
mounted() {
|
|
930
|
-
this.drag && this.setSort();
|
|
931
|
-
},
|
|
932
|
-
methods: {
|
|
933
|
-
isMediaType(e) {
|
|
934
|
-
return x(e, this.fileType);
|
|
935
|
-
},
|
|
936
|
-
setSort() {
|
|
937
|
-
if (!window.Sortable) {
|
|
938
|
-
S.logs("Sortable");
|
|
939
|
-
return;
|
|
940
|
-
}
|
|
941
|
-
let e = this.$el.querySelectorAll(".avue-upload > ul")[0];
|
|
942
|
-
window.Sortable.create(e, {
|
|
943
|
-
animation: 100,
|
|
944
|
-
onEnd: (e) => {
|
|
945
|
-
let t = this.text.splice(e.oldIndex, 1)[0];
|
|
946
|
-
this.text.splice(e.newIndex, 0, t), this.reload = Math.random(), this.$nextTick(() => this.setSort());
|
|
947
|
-
}
|
|
948
|
-
});
|
|
949
|
-
},
|
|
950
|
-
handleSuccess(e) {
|
|
951
|
-
if (this.isPictureImg) this.text.splice(0, 1, e[this.urlKey]);
|
|
952
|
-
else if (this.isObject) {
|
|
953
|
-
let t = {};
|
|
954
|
-
t[this.labelKey] = e[this.nameKey], t[this.valueKey] = e[this.urlKey], this.text.push(t);
|
|
955
|
-
} else this.text.push(e[this.urlKey]);
|
|
956
|
-
},
|
|
957
|
-
handleRemove(e) {
|
|
958
|
-
this.beforeRemove(e).then(() => {
|
|
959
|
-
this.delete(e);
|
|
960
|
-
});
|
|
961
|
-
},
|
|
962
|
-
handleError(e) {
|
|
963
|
-
var t;
|
|
964
|
-
(t = this.uploadError) == null || t.call(this, e, this.column);
|
|
965
|
-
},
|
|
966
|
-
delete(e) {
|
|
967
|
-
(this.text || []).forEach((t, n) => {
|
|
968
|
-
let r = this.isObject ? t[this.valueKey] : t;
|
|
969
|
-
$(this.homeUrl, r) === e.url && this.text.splice(n, 1);
|
|
970
|
-
});
|
|
971
|
-
},
|
|
972
|
-
show(e) {
|
|
973
|
-
this.loading = !1, this.res = e || this.res, this.handleSuccess(this.res);
|
|
974
|
-
},
|
|
975
|
-
hide(e) {
|
|
976
|
-
this.loading = !1, e && this.handleError(e);
|
|
977
|
-
},
|
|
978
|
-
handleFileChange(e, t) {
|
|
979
|
-
t.splice(t.length - 1, 1);
|
|
980
|
-
},
|
|
981
|
-
httpUpload(e) {
|
|
982
|
-
if (typeof this.httpRequest == "function") {
|
|
983
|
-
this.httpRequest(e);
|
|
984
|
-
return;
|
|
985
|
-
}
|
|
986
|
-
this.loading = !0;
|
|
987
|
-
let t = e.file, n = t.size / 1024;
|
|
988
|
-
if (!W(n) && n > this.fileSize) {
|
|
989
|
-
this.hide("文件太大不符合");
|
|
990
|
-
return;
|
|
991
|
-
}
|
|
992
|
-
let r = Object.assign(this.headers, { "Content-Type": "multipart/form-data" }), i = {}, a = {}, o = new FormData(), s = () => {
|
|
993
|
-
let e = (e) => {
|
|
994
|
-
let n = this.action;
|
|
995
|
-
for (let e in this.data) o.append(e, this.data[e]);
|
|
996
|
-
let s = e || t;
|
|
997
|
-
if (o.append(this.fileName, s), this.isQiniuOss) {
|
|
998
|
-
var c;
|
|
999
|
-
if (!window.CryptoJS) {
|
|
1000
|
-
S.logs("CryptoJS"), this.hide();
|
|
1001
|
-
return;
|
|
1002
|
-
}
|
|
1003
|
-
i = this.qiniu || ((c = this.AVUE) == null ? void 0 : c.qiniu);
|
|
1004
|
-
let e = it(i.AK, i.SK, {
|
|
1005
|
-
scope: i.scope,
|
|
1006
|
-
deadline: (/* @__PURE__ */ new Date()).getTime() + i.deadline * 3600
|
|
1007
|
-
});
|
|
1008
|
-
o.append("token", e), n = i.bucket;
|
|
1009
|
-
} else if (this.isAliOss) {
|
|
1010
|
-
var l;
|
|
1011
|
-
if (!window.OSS) {
|
|
1012
|
-
S.logs("AliOSS"), this.hide();
|
|
1013
|
-
return;
|
|
1014
|
-
}
|
|
1015
|
-
i = this.ali || ((l = this.AVUE) == null ? void 0 : l.ali), a = ct(i);
|
|
1016
|
-
}
|
|
1017
|
-
(this.isAliOss ? a.put(s.name, s, { headers: this.headers }) : this.$axios.post(n, o, { headers: r })).then((e) => {
|
|
1018
|
-
this.res = {}, this.isQiniuOss && (e.data.key = i.url + e.data.key), this.res = se(this.isAliOss ? e : e.data, this.resKey), typeof this.uploadAfter == "function" ? this.uploadAfter(this.res, this.show, this.hide, this.column) : this.show();
|
|
1019
|
-
}).catch((e) => {
|
|
1020
|
-
this.hide(e);
|
|
1021
|
-
});
|
|
1022
|
-
};
|
|
1023
|
-
typeof this.uploadBefore == "function" ? this.uploadBefore(t, e, this.hide, this.column) : e();
|
|
1024
|
-
};
|
|
1025
|
-
if (x(t.name) !== "img") {
|
|
1026
|
-
s();
|
|
1027
|
-
return;
|
|
1028
|
-
}
|
|
1029
|
-
let c = () => {
|
|
1030
|
-
W(this.canvasOption) ? s() : rt(t, this.canvasOption, (e) => {
|
|
1031
|
-
t = e, s();
|
|
1032
|
-
});
|
|
1033
|
-
};
|
|
1034
|
-
W(this.cropperOption) ? c() : Z(t, (e) => {
|
|
1035
|
-
let n = Object.assign(this.cropperOption, {
|
|
1036
|
-
img: e,
|
|
1037
|
-
type: "file",
|
|
1038
|
-
callback: (e) => {
|
|
1039
|
-
t = e, c();
|
|
1040
|
-
},
|
|
1041
|
-
cancel: () => {
|
|
1042
|
-
this.loading = !1;
|
|
1043
|
-
}
|
|
1044
|
-
});
|
|
1045
|
-
this.$ImageCropper(n);
|
|
1046
|
-
});
|
|
1047
|
-
},
|
|
1048
|
-
handleExceed(e, t) {
|
|
1049
|
-
var n;
|
|
1050
|
-
(n = this.uploadExceed) == null || n.call(this, this.limit, e, t, this.column);
|
|
1051
|
-
},
|
|
1052
|
-
handlePreview(e) {
|
|
1053
|
-
let t = () => {
|
|
1054
|
-
let t = this.fileList.findIndex((t) => t.url === e.url);
|
|
1055
|
-
this.$ImagePreview(this.fileList, t);
|
|
1056
|
-
};
|
|
1057
|
-
typeof this.uploadPreview == "function" ? this.uploadPreview(e, this.column, t) : t();
|
|
1058
|
-
},
|
|
1059
|
-
handleDelete(e) {
|
|
1060
|
-
this.beforeRemove(e).then(() => {
|
|
1061
|
-
this.text = [], this.menu = !1;
|
|
1062
|
-
});
|
|
1063
|
-
},
|
|
1064
|
-
beforeRemove(e) {
|
|
1065
|
-
return typeof this.uploadDelete == "function" ? this.uploadDelete(e, this.column) : Promise.resolve();
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
}, ut = ["element-loading-text"], dt = {
|
|
1069
|
-
key: 0,
|
|
1070
|
-
class: "el-icon-plus"
|
|
1071
|
-
}, ft = {
|
|
1072
|
-
key: 2,
|
|
1073
|
-
class: "el-icon-plus avue-upload__avatar"
|
|
1074
|
-
}, pt = { class: "el-upload__text" }, mt = ["innerHTML"], ht = { key: 1 }, gt = {
|
|
1075
|
-
key: 1,
|
|
1076
|
-
class: "avue-upload__avatar el-icon-document"
|
|
1077
|
-
}, _t = { class: "el-upload-list__item-actions" }, vt = { class: "el-upload-list__item-preview" }, yt = ["onClick"], bt = { class: "el-upload-list__item-delete" }, xt = ["onClick"], St = ["onClick"], Ct = { class: "el-upload-list__item-name" }, wt = ["onClick"], Tt = ["onClick"], Et = { class: "el-upload-list__item-name" }, Dt = ["onClick"];
|
|
1078
|
-
function Ot(e, t, n, r, i, a) {
|
|
1079
|
-
let o = oe, s = nt, c = re;
|
|
1080
|
-
return xe((N(), D("div", {
|
|
1081
|
-
class: "avue-upload",
|
|
1082
|
-
"element-loading-text": n.loadText
|
|
1083
|
-
}, [(N(), T(s, {
|
|
1084
|
-
key: i.reload,
|
|
1085
|
-
class: M({
|
|
1086
|
-
"avue-upload--list": e.listType === "picture-img",
|
|
1087
|
-
"avue-upload--upload": e.disabled
|
|
1088
|
-
}),
|
|
1089
|
-
action: n.action,
|
|
1090
|
-
"on-remove": a.handleRemove,
|
|
1091
|
-
accept: a.acceptList,
|
|
1092
|
-
"before-remove": a.beforeRemove,
|
|
1093
|
-
multiple: e.multiple,
|
|
1094
|
-
"on-preview": a.handlePreview,
|
|
1095
|
-
limit: n.limit,
|
|
1096
|
-
"http-request": a.httpUpload,
|
|
1097
|
-
readonly: e.readonly,
|
|
1098
|
-
drag: n.dragFile,
|
|
1099
|
-
"show-file-list": a.isPictureImg ? !1 : n.showFileList,
|
|
1100
|
-
"list-type": e.listType,
|
|
1101
|
-
"on-change": a.handleFileChange,
|
|
1102
|
-
"on-exceed": a.handleExceed,
|
|
1103
|
-
disabled: e.disabled,
|
|
1104
|
-
"file-list": a.fileList,
|
|
1105
|
-
onClick: e.handleClick
|
|
1106
|
-
}, {
|
|
1107
|
-
tip: V(() => [O("div", {
|
|
1108
|
-
class: "el-upload__tip",
|
|
1109
|
-
innerHTML: e.tip
|
|
1110
|
-
}, null, 8, mt)]),
|
|
1111
|
-
file: V(({ file: n }) => [e.$slots.default ? F(e.$slots, "default", {
|
|
1112
|
-
key: 0,
|
|
1113
|
-
file: n
|
|
1114
|
-
}) : e.listType === "picture-card" ? (N(), D("span", ht, [a.isMediaType(n.url) ? (N(), T(I(n.type), {
|
|
1115
|
-
key: 0,
|
|
1116
|
-
class: "el-upload-list__item-thumbnail",
|
|
1117
|
-
src: n.url
|
|
1118
|
-
}, null, 8, ["src"])) : (N(), D("i", gt)), O("span", _t, [O("span", vt, [O("i", {
|
|
1119
|
-
class: "el-icon-zoom-in",
|
|
1120
|
-
onClick: U((e) => a.handlePreview(n), ["stop"])
|
|
1121
|
-
}, null, 8, yt)]), O("span", bt, [e.disabled ? E("v-if", !0) : (N(), D("i", {
|
|
1122
|
-
key: 0,
|
|
1123
|
-
class: "el-icon-delete",
|
|
1124
|
-
onClick: U((e) => a.handleRemove(n), ["stop"])
|
|
1125
|
-
}, null, 8, xt))])])])) : e.listType === "picture" ? (N(), D("span", {
|
|
1126
|
-
key: 2,
|
|
1127
|
-
onClick: U((e) => a.handlePreview(n), ["stop"])
|
|
1128
|
-
}, [
|
|
1129
|
-
(N(), T(I(n.type), {
|
|
1130
|
-
class: "el-upload-list__item-thumbnail",
|
|
1131
|
-
src: n.url
|
|
1132
|
-
}, null, 8, ["src"])),
|
|
1133
|
-
O("a", Ct, [t[8] || (t[8] = O("i", { class: "el-icon-document" }, null, -1)), k(" " + R(n.name), 1)]),
|
|
1134
|
-
O("i", {
|
|
1135
|
-
class: "el-icon-close",
|
|
1136
|
-
onClick: U((e) => a.handleRemove(n), ["stop"])
|
|
1137
|
-
}, null, 8, wt)
|
|
1138
|
-
], 8, St)) : (N(), D("span", {
|
|
1139
|
-
key: 3,
|
|
1140
|
-
onClick: U((e) => a.handlePreview(n), ["stop"])
|
|
1141
|
-
}, [O("a", Et, [t[9] || (t[9] = O("i", { class: "el-icon-document" }, null, -1)), k(" " + R(n.name), 1)]), e.disabled ? E("v-if", !0) : (N(), D("i", {
|
|
1142
|
-
key: 0,
|
|
1143
|
-
class: "el-icon-close",
|
|
1144
|
-
onClick: U((e) => a.handleRemove(n), ["stop"])
|
|
1145
|
-
}, null, 8, Dt))], 8, Tt))]),
|
|
1146
|
-
default: V(() => [e.listType === "picture-card" ? (N(), D("i", dt)) : e.listType === "picture-img" ? (N(), D(C, { key: 1 }, [e.$slots.default ? F(e.$slots, "default", {
|
|
1147
|
-
key: 0,
|
|
1148
|
-
file: { url: a.imgUrl }
|
|
1149
|
-
}) : (N(), D(C, { key: 1 }, [a.isMediaType(a.imgUrl) ? (N(), T(I(a.isMediaType(a.imgUrl)), {
|
|
1150
|
-
key: 0,
|
|
1151
|
-
src: a.imgUrl,
|
|
1152
|
-
class: "avue-upload__avatar",
|
|
1153
|
-
onMouseover: t[0] || (t[0] = (e) => i.menu = !0)
|
|
1154
|
-
}, null, 40, ["src"])) : a.imgUrl ? (N(), D("i", {
|
|
1155
|
-
key: 1,
|
|
1156
|
-
class: "avue-upload__avatar el-icon-document",
|
|
1157
|
-
onMouseover: t[1] || (t[1] = (e) => i.menu = !0)
|
|
1158
|
-
}, null, 32)) : (N(), D("i", ft)), i.menu ? (N(), D("div", {
|
|
1159
|
-
key: 3,
|
|
1160
|
-
class: "el-upload-list__item-actions avue-upload__menu",
|
|
1161
|
-
onMouseover: t[4] || (t[4] = (e) => i.menu = !0),
|
|
1162
|
-
onMouseout: t[5] || (t[5] = (e) => i.menu = !1),
|
|
1163
|
-
onClick: t[6] || (t[6] = U(() => {}, ["stop"]))
|
|
1164
|
-
}, [O("i", {
|
|
1165
|
-
class: "el-icon-zoom-in",
|
|
1166
|
-
onClick: t[2] || (t[2] = U((e) => a.handlePreview({ url: a.imgUrl }), ["stop"]))
|
|
1167
|
-
}), e.disabled ? E("v-if", !0) : (N(), D("i", {
|
|
1168
|
-
key: 0,
|
|
1169
|
-
class: "el-icon-delete",
|
|
1170
|
-
onClick: t[3] || (t[3] = U((e) => a.handleDelete(a.imgUrl), ["stop"]))
|
|
1171
|
-
}))], 32)) : E("v-if", !0)], 64))], 64)) : n.dragFile ? (N(), D(C, { key: 2 }, [t[7] || (t[7] = O("i", { class: "el-icon-upload" }, null, -1)), O("div", pt, [O("em", null, R(n.fileText || "上传"), 1)])], 64)) : (N(), T(o, {
|
|
1172
|
-
key: 3,
|
|
1173
|
-
icon: "el-icon-upload",
|
|
1174
|
-
size: e.size,
|
|
1175
|
-
type: "primary"
|
|
1176
|
-
}, {
|
|
1177
|
-
default: V(() => [k(R(n.fileText || "上传"), 1)]),
|
|
1178
|
-
_: 1
|
|
1179
|
-
}, 8, ["size"]))]),
|
|
1180
|
-
_: 3
|
|
1181
|
-
}, 8, [
|
|
1182
|
-
"class",
|
|
1183
|
-
"action",
|
|
1184
|
-
"on-remove",
|
|
1185
|
-
"accept",
|
|
1186
|
-
"before-remove",
|
|
1187
|
-
"multiple",
|
|
1188
|
-
"on-preview",
|
|
1189
|
-
"limit",
|
|
1190
|
-
"http-request",
|
|
1191
|
-
"readonly",
|
|
1192
|
-
"drag",
|
|
1193
|
-
"show-file-list",
|
|
1194
|
-
"list-type",
|
|
1195
|
-
"on-change",
|
|
1196
|
-
"on-exceed",
|
|
1197
|
-
"disabled",
|
|
1198
|
-
"file-list",
|
|
1199
|
-
"onClick"
|
|
1200
|
-
]))], 8, ut)), [[
|
|
1201
|
-
c,
|
|
1202
|
-
i.loading,
|
|
1203
|
-
void 0,
|
|
1204
|
-
{ lock: !0 }
|
|
1205
|
-
]]);
|
|
1206
|
-
}
|
|
1207
|
-
var kt = /* @__PURE__ */ ie(lt, [["render", Ot]]);
|
|
1208
|
-
//#endregion
|
|
1209
|
-
export { kt as t };
|