@web-utils/form-ui 1.0.0-beta86 → 1.0.0-beta87
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 +2 -2
- package/base2.css +1 -0
- package/capsule-tab/index.mjs +1 -1
- package/card/index.mjs +15 -15
- package/chunks/{C-zPVdz-.mjs → 1EH2Ca7m2.mjs} +31 -29
- package/chunks/{mnqSaATq.mjs → 2Bhi7uIl.mjs} +18 -19
- package/chunks/2Hag_Aho.mjs +4 -0
- package/chunks/6Lm-ZabT2.mjs +439 -0
- package/chunks/7OAy-mrx.mjs +642 -0
- package/chunks/7cy48wUQ.mjs +25 -0
- package/chunks/8ldF4QwW.mjs +209 -0
- package/chunks/{BhHMGhJ8.mjs → B0rLJ6br2.mjs} +27 -26
- package/chunks/{DCqyZyF6.mjs → B14qtsOg2.mjs} +8 -7
- package/chunks/B2vpUK0j.mjs +13 -0
- package/chunks/B7fnIBG_2.mjs +346 -0
- package/chunks/B9BRO_ca2.mjs +2 -0
- package/chunks/B9rfY77Q.mjs +107 -0
- package/chunks/BBYzYVET.mjs +173 -0
- package/chunks/BBbwcaCo.mjs +196 -0
- package/chunks/{DSTNXl142.mjs → BBlZh4pj.mjs} +2 -2
- package/chunks/{6dNVtIN32.mjs → BCqOe0lx.mjs} +1 -1
- package/chunks/BEOl740t2.mjs +56 -0
- package/chunks/{B1luuf_A2.mjs → BF0OBs7P.mjs} +15 -14
- package/chunks/BFY-akW92.mjs +1 -0
- package/chunks/BGjN3ifV.mjs +34 -0
- package/chunks/BMouE3MT.mjs +48 -0
- package/chunks/{BYu4QaK72.mjs → BPQMbzNr.mjs} +2 -2
- package/chunks/BVD_ePZC.mjs +37 -0
- package/chunks/{HFLY8Wla.mjs → BVSJF8GY.mjs} +215 -221
- package/chunks/{vHsAJZRT.mjs → BXdCyPVV.mjs} +2 -2
- package/chunks/{DbcxJ45j.mjs → BZb0RMw12.mjs} +15 -13
- package/chunks/BZuJ9dKq2.mjs +69 -0
- package/chunks/BaM7vJ3h.mjs +1920 -0
- package/chunks/BbJd8Pij.mjs +734 -0
- package/chunks/{tVHVSu5h.mjs → BgQktI__2.mjs} +384 -385
- package/chunks/BhIjXcRj2.mjs +617 -0
- package/chunks/{SInS7QSL.mjs → Bi03Pb_j2.mjs} +1 -1
- package/chunks/Bi2y9LWO2.mjs +338 -0
- package/chunks/{DrvwVjzq2.mjs → BjZf7WL6.mjs} +2 -2
- package/chunks/{BxcsELcB2.mjs → BkEjtrWy.mjs} +2 -2
- package/chunks/BnNJk0GR2.mjs +4 -0
- package/chunks/Bpp7HhpF.mjs +446 -0
- package/chunks/Bs0Qas8r.mjs +14 -0
- package/chunks/Bs8cIxmy.mjs +384 -0
- package/chunks/BsBVCVnp2.mjs +378 -0
- package/chunks/BtGJbKCB.mjs +4 -0
- package/chunks/{Bs926z902.mjs → BuwISkjU.mjs} +12 -11
- package/chunks/{DWN5uzm02.mjs → BvdCIFp_.mjs} +32 -31
- package/chunks/BwVhaeaN2.mjs +8 -0
- package/chunks/BxfDXlNF.mjs +5 -0
- package/chunks/C1rRv4L7.mjs +1094 -0
- package/chunks/C2ILQE4o.mjs +15 -0
- package/chunks/{CCpKg0cM.mjs → C5SO6LJW.mjs} +2 -2
- package/chunks/C6wieT3K2.mjs +4 -0
- package/chunks/C7L-0D2c.mjs +18 -0
- package/chunks/CAXQZ1D92.mjs +158 -0
- package/chunks/CAmsy3d12.mjs +1 -0
- package/chunks/CBrMFZX-.mjs +39 -0
- package/chunks/CDhbz_dU.mjs +5 -0
- package/chunks/CEAep1cG2.mjs +88 -0
- package/chunks/CEDUulAx.mjs +245 -0
- package/chunks/CEaiqlCR.mjs +678 -0
- package/chunks/{CpsHWpwH2.mjs → CFfhckpA.mjs} +26 -27
- package/chunks/CG-vyVAP2.mjs +2 -0
- package/chunks/CHqbeWkw.mjs +99 -0
- package/chunks/CI6Nw27a2.mjs +299 -0
- package/chunks/CNcSX5f1.mjs +1 -0
- package/chunks/CPAK-Btp2.mjs +58 -0
- package/chunks/CRScbQff2.mjs +1 -0
- package/chunks/CShykH0i.mjs +1 -0
- package/chunks/CTAUFbNL.mjs +222 -0
- package/chunks/{D_q3C3v4.mjs → CTCW5Zu02.mjs} +135 -134
- package/chunks/CZbhVowA2.mjs +105 -0
- package/chunks/{DVF9q3oX.mjs → C_mXAGw2.mjs} +2 -2
- package/chunks/C_rLHaAm.mjs +41 -0
- package/chunks/C_ykwQIT.mjs +25 -0
- package/chunks/Cm5l5wtF.mjs +21 -0
- package/chunks/CogUVyM32.mjs +161 -0
- package/chunks/{C-iN5MJZ.mjs → Cqn3fqrC.mjs} +6 -6
- package/chunks/{BsqIRxSS.mjs → CsckXzQC.mjs} +7 -6
- package/chunks/CtqI9iHR.mjs +108 -0
- package/chunks/{Dodxnwze.mjs → CuU6RbNj2.mjs} +6 -6
- package/chunks/Cu_oMKPd.mjs +250 -0
- package/chunks/Cum802WQ.mjs +13 -0
- package/chunks/{4kjeIiag2.mjs → Cwgd7PoY.mjs} +4 -4
- package/chunks/Cx2xXO7o.mjs +52 -0
- package/chunks/{8h-xBLL82.mjs → Cxhpz5pM.mjs} +112 -112
- package/chunks/CyF0QYX72.mjs +1098 -0
- package/chunks/D0SsqlhV2.mjs +2381 -0
- package/chunks/D5OVW2kN.mjs +34 -0
- package/chunks/D6WqEUFG2.mjs +98 -0
- package/chunks/D8iXlrtZ2.mjs +1038 -0
- package/chunks/D98jjbwV2.mjs +61 -0
- package/chunks/D9Pg_OCD2.mjs +6 -0
- package/chunks/DA1LVvTS.mjs +577 -0
- package/chunks/DHUKKHoT.mjs +1 -0
- package/chunks/DJQH0NMv.mjs +276 -0
- package/chunks/DK7E0MrC2.mjs +990 -0
- package/chunks/{BM5LdxU72.mjs → DNicIC4X.mjs} +32 -31
- package/chunks/{CLn5E7NV.mjs → DOPqetRk2.mjs} +1 -1
- package/chunks/DTS-uhBE.mjs +25 -0
- package/chunks/DUQs5bPg.mjs +188 -0
- package/chunks/{B5c0s3IR.mjs → DUzoabyA2.mjs} +69 -68
- package/chunks/DV-c1hfn2.mjs +6 -0
- package/chunks/DVvu0kbn2.mjs +69 -0
- package/chunks/{tqW2DSco.mjs → DZ1RiRcl2.mjs} +31 -29
- package/chunks/DZZdwRGN.mjs +479 -0
- package/chunks/{Ctx93AFS.mjs → DcIBy4G3.mjs} +6 -6
- package/chunks/Dd5QuF1x.mjs +26 -0
- package/chunks/DdkcOQQ02.mjs +204 -0
- package/chunks/DeXyq_xW2.mjs +936 -0
- package/chunks/DgXDFUzM2.mjs +60 -0
- package/chunks/DhA6VYyn.mjs +588 -0
- package/chunks/DiQUqii-.mjs +486 -0
- package/chunks/{KOJEsarR2.mjs → Dk_ATXDY.mjs} +1 -1
- package/chunks/DlhCJLng.mjs +211 -0
- package/chunks/Dq9YiS-H.mjs +26 -0
- package/chunks/{mqi8hesW2.mjs → DrrpjVlS.mjs} +19 -18
- package/chunks/DsSXjU752.mjs +4811 -0
- package/chunks/DuIXSS2d.mjs +454 -0
- package/chunks/DvCdN2bU.mjs +1 -0
- package/chunks/DvG4VjQh.mjs +216 -0
- package/chunks/DvenxcV4.mjs +186 -0
- package/chunks/DxG4FcLQ2.mjs +58 -0
- package/chunks/E-zZdDOp.mjs +48 -0
- package/chunks/HQd8AhfS.mjs +225 -0
- package/chunks/HsqImdEj.mjs +69 -0
- package/chunks/IAX-2m4F.mjs +31 -0
- package/chunks/JvWWISEH2.mjs +243 -0
- package/chunks/K7NMn1cU.mjs +12 -0
- package/chunks/{BrSqLOi5.mjs → LnWJAAlm2.mjs} +178 -178
- package/chunks/NiAjkTEH2.mjs +32 -0
- package/chunks/OWDOBaZL.mjs +467 -0
- package/chunks/R_GWm9EB.mjs +41 -0
- package/chunks/Rn-X08l92.mjs +273 -0
- package/chunks/STHbzblo.mjs +55 -0
- package/chunks/TWAjK03p.mjs +3092 -0
- package/chunks/{tfaGdZX2.mjs → XGboXSyJ2.mjs} +139 -138
- package/chunks/ZIHPaVeg.mjs +105 -0
- package/chunks/ZxxDJBOG2.mjs +180 -0
- package/chunks/_NG8ze6x.mjs +42 -0
- package/chunks/_wUx1zSH2.mjs +30 -0
- package/chunks/aeYRYRdi.mjs +29 -0
- package/chunks/b58kljs82.mjs +525 -0
- package/chunks/cGGsl8YM2.mjs +2 -0
- package/chunks/cvUTkWmm.mjs +98 -0
- package/chunks/el7WAt3q.mjs +4 -0
- package/chunks/f-0LSLCC.mjs +17 -0
- package/chunks/g1H2yYXi.mjs +35 -0
- package/chunks/gQwOnofw.mjs +302 -0
- package/chunks/hczonP-N2.mjs +206 -0
- package/chunks/jkTWyLZa.mjs +17 -0
- package/chunks/kN7dSjtl.mjs +1278 -0
- package/chunks/kWflpyKd.mjs +221 -0
- package/chunks/lJ7uxiQe2.mjs +46 -0
- package/chunks/lKeVGJZg.mjs +62 -0
- package/chunks/{ofu8wJKp.mjs → losZHy0P.mjs} +1 -1
- package/chunks/qNngJ9B9.mjs +29 -0
- package/chunks/r6tERHEL.mjs +438 -0
- package/chunks/tSJE9_uL.mjs +1 -0
- package/chunks/vRQzbLgj.mjs +2 -0
- package/chunks/wfxM1ecI.mjs +17 -0
- package/chunks/{Dkw6LNCq2.mjs → wkrB-kab.mjs} +1 -1
- package/chunks/{C8h_P_kl2.mjs → y9rz_ZSp.mjs} +37 -36
- package/chunks/zG9cElaH.mjs +1209 -0
- package/code-mirror-editor/index.mjs +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/constants/index.d.ts +2 -0
- package/constants/index.mjs +2 -2
- package/context-menu/index.mjs +1 -1
- package/count-up/index.mjs +1 -1
- package/css/style.css +1 -0
- package/css/style10.css +1 -0
- package/css/style11.css +1 -0
- package/css/style12.css +1 -0
- package/css/style13.css +1 -0
- package/css/style14.css +1 -0
- package/css/style15.css +1 -0
- package/css/style16.css +1 -0
- package/css/style17.css +1 -0
- package/css/style18.css +1 -0
- package/css/style19.css +1 -0
- package/css/style2.css +1 -0
- package/css/style20.css +1 -0
- package/css/style21.css +1 -0
- package/css/style22.css +1 -0
- package/css/style23.css +1 -0
- package/css/style24.css +1 -0
- package/css/style25.css +1 -0
- package/css/style26.css +1 -0
- package/css/style27.css +1 -0
- package/css/style28.css +1 -0
- package/css/style29.css +1 -0
- package/css/style3.css +1 -0
- package/css/style30.css +1 -0
- package/css/style31.css +1 -0
- package/css/style32.css +1 -0
- package/css/style33.css +1 -0
- package/css/style34.css +1 -0
- package/css/style35.css +1 -0
- package/css/style36.css +1 -0
- package/css/style37.css +1 -0
- package/css/style38.css +1 -0
- package/css/style39.css +1 -0
- package/css/style4.css +1 -0
- package/css/style5.css +1 -0
- package/css/style6.css +1 -0
- package/css/style7.css +1 -0
- package/css/style8.css +1 -0
- package/css/style9.css +1 -0
- 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 +10 -9
- package/data-operatext/index.mjs +8 -8
- package/data-panel/index.mjs +9 -9
- package/data-pay/index.mjs +11 -10
- 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.d.ts +4 -0
- package/dialog-form/index.mjs +154 -0
- package/dialog-form/style.css +1 -0
- 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 +2 -596
- 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/empty-view/index.d.ts +2 -2
- 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.d.ts +4 -4
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-image/style.css +1 -0
- 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-radio-group/style.css +1 -0
- 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.d.ts +234 -0
- package/fy-array/index.mjs +2 -0
- package/fy-array/style.css +1 -0
- package/fy-button/index.d.ts +18 -0
- package/fy-button/index.mjs +2 -0
- package/fy-button/style.css +1 -0
- package/fy-cascader/index.d.ts +298 -0
- package/fy-cascader/index.mjs +116 -0
- package/fy-checkbox/index.d.ts +231 -0
- package/fy-checkbox/index.mjs +100 -0
- package/fy-checkbox/style.css +1 -0
- package/fy-curd/index.d.ts +908 -0
- package/fy-curd/index.mjs +2 -0
- package/fy-date/index.d.ts +246 -0
- package/fy-date/index.mjs +79 -0
- package/fy-date/style.css +1 -0
- package/fy-dynamic/index.d.ts +268 -0
- package/fy-dynamic/index.mjs +2 -0
- package/fy-empty/index.d.ts +31 -0
- package/fy-empty/index.mjs +35 -0
- package/fy-empty/style.css +1 -0
- package/fy-form/index.d.ts +522 -0
- package/fy-form/index.mjs +2 -0
- package/fy-form/style.css +1 -0
- package/fy-input/index.d.ts +316 -0
- package/fy-input/index.mjs +123 -0
- package/fy-input-color/index.d.ts +235 -0
- package/fy-input-color/index.mjs +2 -0
- package/fy-input-color/style.css +1 -0
- package/fy-input-icon/index.d.ts +244 -0
- package/fy-input-icon/index.mjs +134 -0
- package/fy-input-icon/style.css +1 -0
- package/fy-input-map/index.d.ts +266 -0
- package/fy-input-map/index.mjs +249 -0
- package/fy-input-map/style.css +1 -0
- package/fy-input-number/index.d.ts +266 -0
- package/fy-input-number/index.mjs +78 -0
- package/fy-input-table/index.d.ts +248 -0
- package/fy-input-table/index.mjs +167 -0
- package/fy-input-table/style.css +1 -0
- package/fy-input-tree/index.d.ts +351 -0
- package/fy-input-tree/index.mjs +266 -0
- package/fy-input-tree/style.css +1 -0
- package/fy-radio/index.d.ts +218 -0
- package/fy-radio/index.mjs +57 -0
- package/fy-radio/style.css +1 -0
- package/fy-rate/index.d.ts +288 -0
- package/fy-rate/index.mjs +90 -0
- package/fy-rate/style.css +1 -0
- package/fy-select/index.d.ts +324 -0
- package/fy-select/index.mjs +2 -0
- package/fy-select/style.css +1 -0
- package/fy-slider/index.d.ts +249 -0
- package/fy-slider/index.mjs +72 -0
- package/fy-switch/index.d.ts +229 -0
- package/fy-switch/index.mjs +71 -0
- package/fy-tabs/index.d.ts +20 -0
- package/fy-tabs/index.mjs +50 -0
- package/fy-time/index.d.ts +704 -0
- package/fy-time/index.mjs +85 -0
- package/fy-title/index.d.ts +224 -0
- package/fy-title/index.mjs +18 -0
- package/fy-title/style.css +1 -0
- package/fy-tree/index.d.ts +141 -0
- package/fy-tree/index.mjs +392 -0
- package/fy-tree/style.css +1 -0
- package/fy-u-editor/index.d.ts +116 -0
- package/fy-u-editor/index.mjs +2 -0
- package/fy-u-editor/style.css +1 -0
- package/fy-upload/index.d.ts +379 -0
- package/fy-upload/index.mjs +2 -0
- package/fy-upload/style.css +1 -0
- package/guide-steps/index.mjs +2 -77
- package/guide-steps/style.css +1 -1
- package/helper/avue.d.ts +36 -0
- package/helper/avue.mjs +35 -0
- package/helper/dictionary.mjs +1 -1
- package/helper/input.mjs +1 -1
- package/highlight-j-s/index.mjs +1 -1
- package/icon-temp/index.d.ts +19 -0
- package/icon-temp/index.mjs +27 -0
- package/icon-temp/style.css +1 -0
- package/iframe-window/index.mjs +1 -1
- package/image-cropper/index.mjs +5 -5
- package/image-preview/index.mjs +2 -201
- package/image-preview/style.css +1 -1
- package/image-viewer/index.d.ts +1 -1
- package/image-viewer/index.mjs +1 -1
- package/index.css +1 -1
- package/index.d.ts +31 -1
- package/index.mjs +149 -121
- 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.d.ts +126 -0
- package/monaco-editor/index.mjs +2 -0
- package/monaco-editor/style.css +1 -0
- package/name-avatar/index.mjs +1 -1
- package/nav-bar/index.mjs +3 -3
- package/package.json +3 -1
- package/page-index/index.mjs +14 -14
- package/page-index-top/index.mjs +12 -12
- package/pageable-table/index.d.ts +1 -1
- 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/resolver/components.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.d.ts +6 -6
- package/table-column-def/index.mjs +1 -1
- package/table-view/index.mjs +104 -103
- package/tag-render/index.d.ts +1 -1
- package/tag-render/index.mjs +9 -7
- 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.d.ts +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 +24 -20
- package/year-calendar/index.mjs +1 -1
- package/chunks/3nLaRSbR2.mjs +0 -108
- package/chunks/6eDDQWcr.mjs +0 -69
- package/chunks/BIy6bO4j.mjs +0 -50
- package/chunks/BQytQPLa.mjs +0 -780
- package/chunks/BxuM-fgJ.mjs +0 -61
- package/chunks/By-W0XXn2.mjs +0 -63
- package/chunks/C28bnMcw.mjs +0 -68
- package/chunks/CET31mBi.mjs +0 -39
- package/chunks/CjCNtCWd.mjs +0 -58
- package/chunks/CkHQY4ME2.mjs +0 -29
- package/chunks/ClVh1Lek.mjs +0 -130
- package/chunks/DJlgX5ty.mjs +0 -30
- package/chunks/DdACGFy3.mjs +0 -90
- package/chunks/Dst9_BmZ.mjs +0 -99
- package/chunks/SWO35fS42.mjs +0 -31
- package/chunks/Tq3_dajC2.mjs +0 -25
- package/chunks/V-Js6hNd.mjs +0 -179
- package/chunks/XQwnPkab2.mjs +0 -34
- package/chunks/b0ve2YgF.mjs +0 -155
- package/chunks/saZ_qJOT.mjs +0 -32
- package/chunks/vebd58-O.mjs +0 -37
- package/chunks/y1Q66LEa2.mjs +0 -29
- /package/chunks/{CHmZyvFr.mjs → BMdSzPpD2.mjs} +0 -0
- /package/chunks/{X-ckP2Hj.mjs → CISLTyi_2.mjs} +0 -0
- /package/chunks/{PEU1JRcN2.mjs → CVDxIjGg.mjs} +0 -0
- /package/chunks/{DokYQ49m.mjs → CeLNtZZw.mjs} +0 -0
- /package/chunks/{BwL9Xz1F.mjs → CyNGeUTh.mjs} +0 -0
- /package/chunks/{BAG_R87k2.mjs → DX29uO-O.mjs} +0 -0
- /package/chunks/{tzjUpVIj.mjs → Xe_0bP0H.mjs} +0 -0
- /package/chunks/{B1MSrc6f.mjs → hFCEXdXW.mjs} +0 -0
- /package/chunks/{C_QfuxeQ.mjs → nvUgyH-A.mjs} +0 -0
- /package/chunks/{BTGrh7dw2.mjs → wm9pxXuv.mjs} +0 -0
|
@@ -0,0 +1,4811 @@
|
|
|
1
|
+
import "./B2vpUK0j.mjs";
|
|
2
|
+
import { a as e, i as t, n, t as r } from "./_NG8ze6x.mjs";
|
|
3
|
+
import { u as i } from "./r6tERHEL.mjs";
|
|
4
|
+
import { i as a, l as o, s, t as c, u as l } from "./cvUTkWmm.mjs";
|
|
5
|
+
import { n as u, t as d } from "./TWAjK03p.mjs";
|
|
6
|
+
import { L as f, n as p, t as m } from "./DiQUqii-.mjs";
|
|
7
|
+
import { n as ee } from "./DUQs5bPg.mjs";
|
|
8
|
+
import { i as h, t as g } from "./BaM7vJ3h.mjs";
|
|
9
|
+
import { i as te } from "./E-zZdDOp.mjs";
|
|
10
|
+
import { t as ne } from "./C2ILQE4o.mjs";
|
|
11
|
+
import { n as _, t as re } from "./DuIXSS2d.mjs";
|
|
12
|
+
import { n as ie } from "./DV-c1hfn2.mjs";
|
|
13
|
+
import { t as v } from "./BwVhaeaN2.mjs";
|
|
14
|
+
import { t as ae } from "./B7fnIBG_2.mjs";
|
|
15
|
+
import { u as oe } from "./b58kljs82.mjs";
|
|
16
|
+
import { n as se, t as ce } from "./DeXyq_xW2.mjs";
|
|
17
|
+
import { r as le } from "./CPAK-Btp2.mjs";
|
|
18
|
+
import { t as ue } from "./CZbhVowA2.mjs";
|
|
19
|
+
import { t as de } from "./6Lm-ZabT2.mjs";
|
|
20
|
+
import { t as fe } from "./CEAep1cG2.mjs";
|
|
21
|
+
import { t as pe } from "./DgXDFUzM2.mjs";
|
|
22
|
+
import { n as me, t as he } from "./ZxxDJBOG2.mjs";
|
|
23
|
+
import { t as ge } from "./DK7E0MrC2.mjs";
|
|
24
|
+
import { n as _e, t as ve } from "./Bs8cIxmy.mjs";
|
|
25
|
+
import { t as ye } from "./HQd8AhfS.mjs";
|
|
26
|
+
import { n as be, r as xe, t as Se } from "./CtqI9iHR.mjs";
|
|
27
|
+
import { n as Ce, t as we } from "./CEaiqlCR.mjs";
|
|
28
|
+
import { n as Te, t as Ee } from "./DvG4VjQh.mjs";
|
|
29
|
+
import { n as De, t as Oe } from "./Bpp7HhpF.mjs";
|
|
30
|
+
import { t as ke } from "./zG9cElaH.mjs";
|
|
31
|
+
import { t as Ae } from "./DvenxcV4.mjs";
|
|
32
|
+
import "./DHUKKHoT.mjs";
|
|
33
|
+
import "./DvCdN2bU.mjs";
|
|
34
|
+
import "./CShykH0i.mjs";
|
|
35
|
+
import { t as y } from "./hFCEXdXW.mjs";
|
|
36
|
+
import "./vRQzbLgj.mjs";
|
|
37
|
+
import "./2Hag_Aho.mjs";
|
|
38
|
+
import { avueConfigContextKey as je } from "../constants/index.mjs";
|
|
39
|
+
import { t as b } from "./_wUx1zSH2.mjs";
|
|
40
|
+
import "./BFY-akW92.mjs";
|
|
41
|
+
import "./CRScbQff2.mjs";
|
|
42
|
+
import { C as x, T as Me, _ as Ne, a as S, b as Pe, c as C, d as Fe, g as Ie, h as Le, l as Re, m as w, n as ze, p as Be, t as Ve, v as He, x as Ue, y as We } from "./DdkcOQQ02.mjs";
|
|
43
|
+
import { a as Ge, c as Ke, i as qe, l as Je, n as Ye, o as Xe, r as Ze, s as Qe, t as $e, u as et } from "./BsBVCVnp2.mjs";
|
|
44
|
+
import tt from "../fy-cascader/index.mjs";
|
|
45
|
+
import nt from "../fy-checkbox/index.mjs";
|
|
46
|
+
import rt from "../fy-date/index.mjs";
|
|
47
|
+
import it from "../fy-input/index.mjs";
|
|
48
|
+
import { a as at, i as ot, n as st, r as ct, t as lt } from "./Bi2y9LWO2.mjs";
|
|
49
|
+
import { t as ut } from "./BEOl740t2.mjs";
|
|
50
|
+
import dt from "../icon-temp/index.mjs";
|
|
51
|
+
import ft from "../fy-rate/index.mjs";
|
|
52
|
+
import "./CAmsy3d12.mjs";
|
|
53
|
+
import pt from "../fy-input-icon/index.mjs";
|
|
54
|
+
import mt from "../fy-input-map/index.mjs";
|
|
55
|
+
import ht from "../fy-input-number/index.mjs";
|
|
56
|
+
import gt from "../fy-radio/index.mjs";
|
|
57
|
+
import _t from "../fy-slider/index.mjs";
|
|
58
|
+
import vt from "../fy-switch/index.mjs";
|
|
59
|
+
import yt from "../fy-time/index.mjs";
|
|
60
|
+
import bt from "../fy-title/index.mjs";
|
|
61
|
+
import xt from "../fy-input-tree/index.mjs";
|
|
62
|
+
import { Fragment as T, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createSlots as j, createTextVNode as M, createVNode as N, defineAsyncComponent as St, defineComponent as P, getCurrentInstance as Ct, guardReactiveProps as F, inject as I, mergeProps as L, nextTick as wt, normalizeClass as R, normalizeProps as z, normalizeStyle as B, onBeforeUnmount as Tt, onMounted as Et, openBlock as V, provide as H, readonly as Dt, ref as U, renderList as W, renderSlot as G, resolveComponent as K, resolveDirective as Ot, resolveDynamicComponent as kt, toDisplayString as q, toHandlers as At, toRef as jt, unref as J, vShow as Mt, watch as Nt, withCtx as Y, withDirectives as X, withKeys as Pt, withModifiers as Z } from "vue";
|
|
63
|
+
import { isBlank as Q } from "@web-utils/core";
|
|
64
|
+
import { formatDate as Ft } from "@web-utils/integrations/dayjs";
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/card/index.mjs
|
|
67
|
+
var It = c(/* @__PURE__ */ P({
|
|
68
|
+
name: "ElCard",
|
|
69
|
+
__name: "card",
|
|
70
|
+
props: o({
|
|
71
|
+
header: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: ""
|
|
74
|
+
},
|
|
75
|
+
footer: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: ""
|
|
78
|
+
},
|
|
79
|
+
bodyStyle: {
|
|
80
|
+
type: l([
|
|
81
|
+
String,
|
|
82
|
+
Object,
|
|
83
|
+
Array
|
|
84
|
+
]),
|
|
85
|
+
default: ""
|
|
86
|
+
},
|
|
87
|
+
headerClass: String,
|
|
88
|
+
bodyClass: String,
|
|
89
|
+
footerClass: String,
|
|
90
|
+
shadow: {
|
|
91
|
+
type: String,
|
|
92
|
+
values: [
|
|
93
|
+
"always",
|
|
94
|
+
"hover",
|
|
95
|
+
"never"
|
|
96
|
+
],
|
|
97
|
+
default: void 0
|
|
98
|
+
}
|
|
99
|
+
}),
|
|
100
|
+
setup(e) {
|
|
101
|
+
let t = le("card"), n = s("card");
|
|
102
|
+
return (r, i) => {
|
|
103
|
+
var a;
|
|
104
|
+
return V(), k("div", { class: R([J(n).b(), J(n).is(`${e.shadow || ((a = J(t)) == null ? void 0 : a.shadow) || "always"}-shadow`)]) }, [
|
|
105
|
+
r.$slots.header || e.header ? (V(), k("div", {
|
|
106
|
+
key: 0,
|
|
107
|
+
class: R([J(n).e("header"), e.headerClass])
|
|
108
|
+
}, [G(r.$slots, "header", {}, () => [M(q(e.header), 1)])], 2)) : O("v-if", !0),
|
|
109
|
+
A("div", {
|
|
110
|
+
class: R([J(n).e("body"), e.bodyClass]),
|
|
111
|
+
style: B(e.bodyStyle)
|
|
112
|
+
}, [G(r.$slots, "default")], 6),
|
|
113
|
+
r.$slots.footer || e.footer ? (V(), k("div", {
|
|
114
|
+
key: 1,
|
|
115
|
+
class: R([J(n).e("footer"), e.footerClass])
|
|
116
|
+
}, [G(r.$slots, "footer", {}, () => [M(q(e.footer), 1)])], 2)) : O("v-if", !0)
|
|
117
|
+
], 2);
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
})), Lt = Symbol("elDropdown"), Rt = "elDropdown", zt = P({ inheritAttrs: !1 });
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/collection/src/collection2.mjs
|
|
123
|
+
function Bt(e, t, n, r, i, a) {
|
|
124
|
+
return G(e.$slots, "default");
|
|
125
|
+
}
|
|
126
|
+
var Vt = /* @__PURE__ */ v(zt, [["render", Bt]]), Ht = P({
|
|
127
|
+
name: "ElCollectionItem",
|
|
128
|
+
inheritAttrs: !1
|
|
129
|
+
});
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/collection/src/collection-item.mjs
|
|
132
|
+
function Ut(e, t, n, r, i, a) {
|
|
133
|
+
return G(e.$slots, "default");
|
|
134
|
+
}
|
|
135
|
+
var Wt = /* @__PURE__ */ v(Ht, [["render", Ut]]), Gt = "data-el-collection-item", Kt = (e) => {
|
|
136
|
+
let t = `El${e}Collection`, n = `${t}Item`, r = Symbol(t), i = Symbol(n);
|
|
137
|
+
return {
|
|
138
|
+
COLLECTION_INJECTION_KEY: r,
|
|
139
|
+
COLLECTION_ITEM_INJECTION_KEY: i,
|
|
140
|
+
ElCollection: Object.assign({}, Vt, {
|
|
141
|
+
name: t,
|
|
142
|
+
setup() {
|
|
143
|
+
let e = U(), t = /* @__PURE__ */ new Map();
|
|
144
|
+
H(r, {
|
|
145
|
+
itemMap: t,
|
|
146
|
+
getItems: (() => {
|
|
147
|
+
let n = J(e);
|
|
148
|
+
if (!n) return [];
|
|
149
|
+
let r = Array.from(n.querySelectorAll(`[${Gt}]`));
|
|
150
|
+
return [...t.values()].sort((e, t) => r.indexOf(e.ref) - r.indexOf(t.ref));
|
|
151
|
+
}),
|
|
152
|
+
collectionRef: e
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}),
|
|
156
|
+
ElCollectionItem: Object.assign({}, Wt, {
|
|
157
|
+
name: n,
|
|
158
|
+
setup(e, { attrs: t }) {
|
|
159
|
+
let n = U(), a = I(r, void 0);
|
|
160
|
+
H(i, { collectionItemRef: n }), Et(() => {
|
|
161
|
+
let e = J(n);
|
|
162
|
+
e && a.itemMap.set(e, {
|
|
163
|
+
ref: e,
|
|
164
|
+
...t
|
|
165
|
+
});
|
|
166
|
+
}), Tt(() => {
|
|
167
|
+
let e = J(n);
|
|
168
|
+
a.itemMap.delete(e);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
})
|
|
172
|
+
};
|
|
173
|
+
}, qt = o({
|
|
174
|
+
style: { type: l([
|
|
175
|
+
String,
|
|
176
|
+
Array,
|
|
177
|
+
Object
|
|
178
|
+
]) },
|
|
179
|
+
currentTabId: { type: l(String) },
|
|
180
|
+
defaultCurrentTabId: String,
|
|
181
|
+
loop: Boolean,
|
|
182
|
+
dir: {
|
|
183
|
+
type: String,
|
|
184
|
+
values: ["ltr", "rtl"],
|
|
185
|
+
default: "ltr"
|
|
186
|
+
},
|
|
187
|
+
orientation: { type: l(String) },
|
|
188
|
+
onBlur: Function,
|
|
189
|
+
onFocus: Function,
|
|
190
|
+
onMousedown: Function
|
|
191
|
+
}), { ElCollection: Jt, ElCollectionItem: Yt, COLLECTION_INJECTION_KEY: Xt, COLLECTION_ITEM_INJECTION_KEY: Zt } = Kt("RovingFocusGroup"), Qt = Symbol("elRovingFocusGroup"), $t = Symbol("elRovingFocusGroupItem"), en = {
|
|
192
|
+
ArrowLeft: "prev",
|
|
193
|
+
ArrowUp: "prev",
|
|
194
|
+
ArrowRight: "next",
|
|
195
|
+
ArrowDown: "next",
|
|
196
|
+
PageUp: "first",
|
|
197
|
+
Home: "first",
|
|
198
|
+
PageDown: "last",
|
|
199
|
+
End: "last"
|
|
200
|
+
}, tn = (t, n) => {
|
|
201
|
+
if (n !== "rtl") return t;
|
|
202
|
+
switch (t) {
|
|
203
|
+
case e.right: return e.left;
|
|
204
|
+
case e.left: return e.right;
|
|
205
|
+
default: return t;
|
|
206
|
+
}
|
|
207
|
+
}, nn = (t, r, i) => {
|
|
208
|
+
let a = tn(n(t), i);
|
|
209
|
+
if (!(r === "vertical" && [e.left, e.right].includes(a)) && !(r === "horizontal" && [e.up, e.down].includes(a))) return en[a];
|
|
210
|
+
}, rn = (e, t) => e.map((n, r) => e[(r + t) % e.length]), an = (e) => {
|
|
211
|
+
let { activeElement: t } = document;
|
|
212
|
+
for (let n of e) if (n === t || (n.focus(), t !== document.activeElement)) return;
|
|
213
|
+
}, on = "currentTabIdChange", sn = "rovingFocusGroup.entryFocus", cn = {
|
|
214
|
+
bubbles: !1,
|
|
215
|
+
cancelable: !0
|
|
216
|
+
}, ln = P({
|
|
217
|
+
name: "ElRovingFocusGroupImpl",
|
|
218
|
+
inheritAttrs: !1,
|
|
219
|
+
props: qt,
|
|
220
|
+
emits: [on, "entryFocus"],
|
|
221
|
+
setup(e, { emit: t }) {
|
|
222
|
+
let n = U((e.currentTabId || e.defaultCurrentTabId) ?? null), a = U(!1), o = U(!1), s = U(), { getItems: c } = I(Xt, void 0), l = E(() => [{ outline: "none" }, e.style]), u = (e) => {
|
|
223
|
+
t(on, e);
|
|
224
|
+
}, d = () => {
|
|
225
|
+
a.value = !0;
|
|
226
|
+
}, f = r((t) => {
|
|
227
|
+
var n;
|
|
228
|
+
(n = e.onMousedown) == null || n.call(e, t);
|
|
229
|
+
}, () => {
|
|
230
|
+
o.value = !0;
|
|
231
|
+
}), p = r((t) => {
|
|
232
|
+
var n;
|
|
233
|
+
(n = e.onFocus) == null || n.call(e, t);
|
|
234
|
+
}, (e) => {
|
|
235
|
+
let t = !J(o), { target: r, currentTarget: i } = e;
|
|
236
|
+
if (r === i && t && !J(a)) {
|
|
237
|
+
let e = new Event(sn, cn);
|
|
238
|
+
if (i == null || i.dispatchEvent(e), !e.defaultPrevented) {
|
|
239
|
+
let e = c().filter((e) => e.focusable);
|
|
240
|
+
an([
|
|
241
|
+
e.find((e) => e.active),
|
|
242
|
+
e.find((e) => e.id === J(n)),
|
|
243
|
+
...e
|
|
244
|
+
].filter(Boolean).map((e) => e.ref));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
o.value = !1;
|
|
248
|
+
}), m = r((t) => {
|
|
249
|
+
var n;
|
|
250
|
+
(n = e.onBlur) == null || n.call(e, t);
|
|
251
|
+
}, () => {
|
|
252
|
+
a.value = !1;
|
|
253
|
+
});
|
|
254
|
+
H(Qt, {
|
|
255
|
+
currentTabbedId: Dt(n),
|
|
256
|
+
loop: jt(e, "loop"),
|
|
257
|
+
tabIndex: E(() => J(a) ? -1 : 0),
|
|
258
|
+
rovingFocusGroupRef: s,
|
|
259
|
+
rovingFocusGroupRootStyle: l,
|
|
260
|
+
orientation: jt(e, "orientation"),
|
|
261
|
+
dir: jt(e, "dir"),
|
|
262
|
+
onItemFocus: u,
|
|
263
|
+
onItemShiftTab: d,
|
|
264
|
+
onBlur: m,
|
|
265
|
+
onFocus: p,
|
|
266
|
+
onMousedown: f,
|
|
267
|
+
onKeydown: (t) => {
|
|
268
|
+
let n = nn(t);
|
|
269
|
+
if (n) {
|
|
270
|
+
t.preventDefault();
|
|
271
|
+
let r = c().filter((e) => e.focusable).map((e) => e.ref);
|
|
272
|
+
switch (n) {
|
|
273
|
+
case "last":
|
|
274
|
+
r.reverse();
|
|
275
|
+
break;
|
|
276
|
+
case "prev":
|
|
277
|
+
case "next": {
|
|
278
|
+
n === "prev" && r.reverse();
|
|
279
|
+
let i = r.indexOf(t.currentTarget);
|
|
280
|
+
r = e.loop ? rn(r, i + 1) : r.slice(i + 1);
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
default: break;
|
|
284
|
+
}
|
|
285
|
+
wt(() => {
|
|
286
|
+
an(r);
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}), Nt(() => e.currentTabId, (e) => {
|
|
291
|
+
n.value = e ?? null;
|
|
292
|
+
}), i(s, sn, (...e) => {
|
|
293
|
+
t("entryFocus", ...e);
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
|
|
299
|
+
function un(e, t, n, r, i, a) {
|
|
300
|
+
return G(e.$slots, "default");
|
|
301
|
+
}
|
|
302
|
+
//#endregion
|
|
303
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs
|
|
304
|
+
var dn = P({
|
|
305
|
+
name: "ElRovingFocusGroup",
|
|
306
|
+
components: {
|
|
307
|
+
ElFocusGroupCollection: Jt,
|
|
308
|
+
ElRovingFocusGroupImpl: /* @__PURE__ */ v(ln, [["render", un]])
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
|
|
313
|
+
function fn(e, t, n, r, i, a) {
|
|
314
|
+
let o = K("el-roving-focus-group-impl"), s = K("el-focus-group-collection");
|
|
315
|
+
return V(), D(s, null, {
|
|
316
|
+
default: Y(() => [N(o, z(F(e.$attrs)), {
|
|
317
|
+
default: Y(() => [G(e.$slots, "default")]),
|
|
318
|
+
_: 3
|
|
319
|
+
}, 16)]),
|
|
320
|
+
_: 3
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
var pn = /* @__PURE__ */ v(dn, [["render", fn]]), mn = P({
|
|
324
|
+
components: { ElRovingFocusCollectionItem: Yt },
|
|
325
|
+
props: {
|
|
326
|
+
focusable: {
|
|
327
|
+
type: Boolean,
|
|
328
|
+
default: !0
|
|
329
|
+
},
|
|
330
|
+
active: Boolean
|
|
331
|
+
},
|
|
332
|
+
emits: [
|
|
333
|
+
"mousedown",
|
|
334
|
+
"focus",
|
|
335
|
+
"keydown"
|
|
336
|
+
],
|
|
337
|
+
setup(t, { emit: i }) {
|
|
338
|
+
let { currentTabbedId: a, onItemFocus: o, onItemShiftTab: s, onKeydown: c } = I(Qt, void 0), l = ne(), u = U(), d = r((e) => {
|
|
339
|
+
i("mousedown", e);
|
|
340
|
+
}, (e) => {
|
|
341
|
+
t.focusable ? o(J(l)) : e.preventDefault();
|
|
342
|
+
}), f = r((e) => {
|
|
343
|
+
i("focus", e);
|
|
344
|
+
}, () => {
|
|
345
|
+
o(J(l));
|
|
346
|
+
}), p = r((e) => {
|
|
347
|
+
i("keydown", e);
|
|
348
|
+
}, (t) => {
|
|
349
|
+
let { shiftKey: r, target: i, currentTarget: a } = t;
|
|
350
|
+
if (n(t) === e.tab && r) {
|
|
351
|
+
s();
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
i === a && c(t);
|
|
355
|
+
}), m = E(() => a.value === J(l));
|
|
356
|
+
return H($t, {
|
|
357
|
+
rovingFocusGroupItemRef: u,
|
|
358
|
+
tabIndex: E(() => J(m) ? 0 : -1),
|
|
359
|
+
handleMousedown: d,
|
|
360
|
+
handleFocus: f,
|
|
361
|
+
handleKeydown: p
|
|
362
|
+
}), {
|
|
363
|
+
id: l,
|
|
364
|
+
handleKeydown: p,
|
|
365
|
+
handleFocus: f,
|
|
366
|
+
handleMousedown: d
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
//#endregion
|
|
371
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
|
|
372
|
+
function hn(e, t, n, r, i, a) {
|
|
373
|
+
let o = K("el-roving-focus-collection-item");
|
|
374
|
+
return V(), D(o, {
|
|
375
|
+
id: e.id,
|
|
376
|
+
focusable: e.focusable,
|
|
377
|
+
active: e.active
|
|
378
|
+
}, {
|
|
379
|
+
default: Y(() => [G(e.$slots, "default")]),
|
|
380
|
+
_: 3
|
|
381
|
+
}, 8, [
|
|
382
|
+
"id",
|
|
383
|
+
"focusable",
|
|
384
|
+
"active"
|
|
385
|
+
]);
|
|
386
|
+
}
|
|
387
|
+
var gn = /* @__PURE__ */ v(mn, [["render", hn]]), _n = pn, { ButtonGroup: vn } = ce, yn = P({
|
|
388
|
+
name: "ElDropdown",
|
|
389
|
+
components: {
|
|
390
|
+
ElButton: ce,
|
|
391
|
+
ElButtonGroup: vn,
|
|
392
|
+
ElScrollbar: ae,
|
|
393
|
+
ElTooltip: g,
|
|
394
|
+
ElRovingFocusGroup: _n,
|
|
395
|
+
ElOnlyChild: h,
|
|
396
|
+
ElIcon: m,
|
|
397
|
+
ArrowDown: p
|
|
398
|
+
},
|
|
399
|
+
props: xe,
|
|
400
|
+
emits: [
|
|
401
|
+
"visible-change",
|
|
402
|
+
"click",
|
|
403
|
+
"command"
|
|
404
|
+
],
|
|
405
|
+
setup(e, { emit: t }) {
|
|
406
|
+
let n = Ct(), r = s("dropdown"), { t: i } = ee(), a = U(), o = U(), c = U(), l = U(), u = U(null), d = U(null), p = U(!1), m = E(() => ({ maxHeight: f(e.maxHeight) })), h = E(() => [r.m(se.value)]), g = E(() => ie(e.trigger)), _ = ne().value, re = E(() => e.id || _);
|
|
407
|
+
function v() {
|
|
408
|
+
var e;
|
|
409
|
+
(e = c.value) == null || e.onClose(void 0, 0);
|
|
410
|
+
}
|
|
411
|
+
function ae() {
|
|
412
|
+
var e;
|
|
413
|
+
(e = c.value) == null || e.onClose();
|
|
414
|
+
}
|
|
415
|
+
function oe() {
|
|
416
|
+
var e;
|
|
417
|
+
(e = c.value) == null || e.onOpen();
|
|
418
|
+
}
|
|
419
|
+
let se = te();
|
|
420
|
+
function ce(...e) {
|
|
421
|
+
t("command", ...e);
|
|
422
|
+
}
|
|
423
|
+
function le() {}
|
|
424
|
+
function ue() {
|
|
425
|
+
let e = J(l);
|
|
426
|
+
g.value.includes("hover") && (e == null || e.focus({ preventScroll: !0 })), d.value = null;
|
|
427
|
+
}
|
|
428
|
+
function de(e) {
|
|
429
|
+
d.value = e;
|
|
430
|
+
}
|
|
431
|
+
function fe() {
|
|
432
|
+
t("visible-change", !0);
|
|
433
|
+
}
|
|
434
|
+
function pe(e) {
|
|
435
|
+
var t;
|
|
436
|
+
p.value = (e == null ? void 0 : e.type) === "keydown", (t = l.value) == null || t.focus();
|
|
437
|
+
}
|
|
438
|
+
function me() {
|
|
439
|
+
t("visible-change", !1);
|
|
440
|
+
}
|
|
441
|
+
return H(Lt, {
|
|
442
|
+
contentRef: l,
|
|
443
|
+
role: E(() => e.role),
|
|
444
|
+
triggerId: re,
|
|
445
|
+
isUsingKeyboard: p,
|
|
446
|
+
onItemEnter: le,
|
|
447
|
+
onItemLeave: ue,
|
|
448
|
+
handleClose: ae
|
|
449
|
+
}), H(Rt, {
|
|
450
|
+
instance: n,
|
|
451
|
+
dropdownSize: se,
|
|
452
|
+
handleClick: v,
|
|
453
|
+
commandHandler: ce,
|
|
454
|
+
trigger: jt(e, "trigger"),
|
|
455
|
+
hideOnClick: jt(e, "hideOnClick")
|
|
456
|
+
}), {
|
|
457
|
+
t: i,
|
|
458
|
+
ns: r,
|
|
459
|
+
scrollbar: u,
|
|
460
|
+
wrapStyle: m,
|
|
461
|
+
dropdownTriggerKls: h,
|
|
462
|
+
dropdownSize: se,
|
|
463
|
+
triggerId: re,
|
|
464
|
+
currentTabId: d,
|
|
465
|
+
handleCurrentTabIdChange: de,
|
|
466
|
+
handlerMainButtonClick: (e) => {
|
|
467
|
+
t("click", e);
|
|
468
|
+
},
|
|
469
|
+
handleClose: ae,
|
|
470
|
+
handleOpen: oe,
|
|
471
|
+
handleBeforeShowTooltip: fe,
|
|
472
|
+
handleShowTooltip: pe,
|
|
473
|
+
handleBeforeHideTooltip: me,
|
|
474
|
+
popperRef: c,
|
|
475
|
+
contentRef: l,
|
|
476
|
+
triggeringElementRef: a,
|
|
477
|
+
referenceElementRef: o
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/dropdown/src/dropdown2.mjs
|
|
483
|
+
function bn(e, t, n, r, i, a) {
|
|
484
|
+
let o = K("el-roving-focus-group"), s = K("el-scrollbar"), c = K("el-only-child"), l = K("el-tooltip"), u = K("el-button"), d = K("arrow-down"), f = K("el-icon"), p = K("el-button-group");
|
|
485
|
+
return V(), k("div", { class: R([e.ns.b(), e.ns.is("disabled", e.disabled)]) }, [N(l, {
|
|
486
|
+
ref: "popperRef",
|
|
487
|
+
role: e.role,
|
|
488
|
+
effect: e.effect,
|
|
489
|
+
"fallback-placements": ["bottom", "top"],
|
|
490
|
+
"popper-options": e.popperOptions,
|
|
491
|
+
"gpu-acceleration": !1,
|
|
492
|
+
placement: e.placement,
|
|
493
|
+
"popper-class": [e.ns.e("popper"), e.popperClass],
|
|
494
|
+
"popper-style": e.popperStyle,
|
|
495
|
+
trigger: e.trigger,
|
|
496
|
+
"trigger-keys": e.triggerKeys,
|
|
497
|
+
"trigger-target-el": e.contentRef,
|
|
498
|
+
"show-arrow": e.showArrow,
|
|
499
|
+
"show-after": e.trigger === "hover" ? e.showTimeout : 0,
|
|
500
|
+
"hide-after": e.trigger === "hover" ? e.hideTimeout : 0,
|
|
501
|
+
"virtual-ref": e.virtualRef ?? e.triggeringElementRef,
|
|
502
|
+
"virtual-triggering": e.virtualTriggering || e.splitButton,
|
|
503
|
+
disabled: e.disabled,
|
|
504
|
+
transition: `${e.ns.namespace.value}-zoom-in-top`,
|
|
505
|
+
teleported: e.teleported,
|
|
506
|
+
"append-to": e.appendTo,
|
|
507
|
+
pure: "",
|
|
508
|
+
"focus-on-target": "",
|
|
509
|
+
persistent: e.persistent,
|
|
510
|
+
onBeforeShow: e.handleBeforeShowTooltip,
|
|
511
|
+
onShow: e.handleShowTooltip,
|
|
512
|
+
onBeforeHide: e.handleBeforeHideTooltip
|
|
513
|
+
}, j({
|
|
514
|
+
content: Y(() => [N(s, {
|
|
515
|
+
ref: "scrollbar",
|
|
516
|
+
"wrap-style": e.wrapStyle,
|
|
517
|
+
tag: "div",
|
|
518
|
+
"view-class": e.ns.e("list")
|
|
519
|
+
}, {
|
|
520
|
+
default: Y(() => [N(o, {
|
|
521
|
+
loop: e.loop,
|
|
522
|
+
"current-tab-id": e.currentTabId,
|
|
523
|
+
orientation: "horizontal",
|
|
524
|
+
onCurrentTabIdChange: e.handleCurrentTabIdChange
|
|
525
|
+
}, {
|
|
526
|
+
default: Y(() => [G(e.$slots, "dropdown")]),
|
|
527
|
+
_: 3
|
|
528
|
+
}, 8, [
|
|
529
|
+
"loop",
|
|
530
|
+
"current-tab-id",
|
|
531
|
+
"onCurrentTabIdChange"
|
|
532
|
+
])]),
|
|
533
|
+
_: 3
|
|
534
|
+
}, 8, ["wrap-style", "view-class"])]),
|
|
535
|
+
_: 2
|
|
536
|
+
}, [e.splitButton ? void 0 : {
|
|
537
|
+
name: "default",
|
|
538
|
+
fn: Y(() => [N(c, {
|
|
539
|
+
id: e.triggerId,
|
|
540
|
+
ref: "triggeringElementRef",
|
|
541
|
+
role: "button",
|
|
542
|
+
tabindex: e.tabindex
|
|
543
|
+
}, {
|
|
544
|
+
default: Y(() => [G(e.$slots, "default")]),
|
|
545
|
+
_: 3
|
|
546
|
+
}, 8, ["id", "tabindex"])]),
|
|
547
|
+
key: "0"
|
|
548
|
+
}]), 1032, [
|
|
549
|
+
"role",
|
|
550
|
+
"effect",
|
|
551
|
+
"popper-options",
|
|
552
|
+
"placement",
|
|
553
|
+
"popper-class",
|
|
554
|
+
"popper-style",
|
|
555
|
+
"trigger",
|
|
556
|
+
"trigger-keys",
|
|
557
|
+
"trigger-target-el",
|
|
558
|
+
"show-arrow",
|
|
559
|
+
"show-after",
|
|
560
|
+
"hide-after",
|
|
561
|
+
"virtual-ref",
|
|
562
|
+
"virtual-triggering",
|
|
563
|
+
"disabled",
|
|
564
|
+
"transition",
|
|
565
|
+
"teleported",
|
|
566
|
+
"append-to",
|
|
567
|
+
"persistent",
|
|
568
|
+
"onBeforeShow",
|
|
569
|
+
"onShow",
|
|
570
|
+
"onBeforeHide"
|
|
571
|
+
]), e.splitButton ? (V(), D(p, { key: 0 }, {
|
|
572
|
+
default: Y(() => [N(u, L({ ref: "referenceElementRef" }, e.buttonProps, {
|
|
573
|
+
size: e.dropdownSize,
|
|
574
|
+
type: e.type,
|
|
575
|
+
disabled: e.disabled,
|
|
576
|
+
tabindex: e.tabindex,
|
|
577
|
+
onClick: e.handlerMainButtonClick
|
|
578
|
+
}), {
|
|
579
|
+
default: Y(() => [G(e.$slots, "default")]),
|
|
580
|
+
_: 3
|
|
581
|
+
}, 16, [
|
|
582
|
+
"size",
|
|
583
|
+
"type",
|
|
584
|
+
"disabled",
|
|
585
|
+
"tabindex",
|
|
586
|
+
"onClick"
|
|
587
|
+
]), N(u, L({
|
|
588
|
+
id: e.triggerId,
|
|
589
|
+
ref: "triggeringElementRef"
|
|
590
|
+
}, e.buttonProps, {
|
|
591
|
+
role: "button",
|
|
592
|
+
size: e.dropdownSize,
|
|
593
|
+
type: e.type,
|
|
594
|
+
class: e.ns.e("caret-button"),
|
|
595
|
+
disabled: e.disabled,
|
|
596
|
+
tabindex: e.tabindex,
|
|
597
|
+
"aria-label": e.t("el.dropdown.toggleDropdown")
|
|
598
|
+
}), {
|
|
599
|
+
default: Y(() => [N(f, { class: R(e.ns.e("icon")) }, {
|
|
600
|
+
default: Y(() => [N(d)]),
|
|
601
|
+
_: 1
|
|
602
|
+
}, 8, ["class"])]),
|
|
603
|
+
_: 1
|
|
604
|
+
}, 16, [
|
|
605
|
+
"id",
|
|
606
|
+
"size",
|
|
607
|
+
"type",
|
|
608
|
+
"class",
|
|
609
|
+
"disabled",
|
|
610
|
+
"tabindex",
|
|
611
|
+
"aria-label"
|
|
612
|
+
])]),
|
|
613
|
+
_: 3
|
|
614
|
+
})) : O("v-if", !0)], 2);
|
|
615
|
+
}
|
|
616
|
+
var xn = /* @__PURE__ */ v(yn, [["render", bn]]), Sn = P({
|
|
617
|
+
name: "DropdownItemImpl",
|
|
618
|
+
components: { ElIcon: m },
|
|
619
|
+
props: Se,
|
|
620
|
+
emits: [
|
|
621
|
+
"pointermove",
|
|
622
|
+
"pointerleave",
|
|
623
|
+
"click",
|
|
624
|
+
"clickimpl"
|
|
625
|
+
],
|
|
626
|
+
setup(t, { emit: i }) {
|
|
627
|
+
let a = s("dropdown"), { role: o } = I(Lt, void 0), { collectionItemRef: c } = I(Zt, void 0), { rovingFocusGroupItemRef: l, tabIndex: u, handleFocus: d, handleKeydown: f, handleMousedown: p } = I($t, void 0), m = _e(c, l), ee = E(() => o.value === "menu" ? "menuitem" : o.value === "navigation" ? "link" : "button"), h = r((t) => {
|
|
628
|
+
let r = n(t);
|
|
629
|
+
if ([
|
|
630
|
+
e.enter,
|
|
631
|
+
e.numpadEnter,
|
|
632
|
+
e.space
|
|
633
|
+
].includes(r)) return t.preventDefault(), t.stopImmediatePropagation(), i("clickimpl", t), !0;
|
|
634
|
+
}, f);
|
|
635
|
+
return {
|
|
636
|
+
ns: a,
|
|
637
|
+
itemRef: m,
|
|
638
|
+
dataset: { [Gt]: "" },
|
|
639
|
+
role: ee,
|
|
640
|
+
tabIndex: u,
|
|
641
|
+
handleFocus: d,
|
|
642
|
+
handleKeydown: h,
|
|
643
|
+
handleMousedown: p
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
}), Cn = [
|
|
647
|
+
"aria-disabled",
|
|
648
|
+
"tabindex",
|
|
649
|
+
"role"
|
|
650
|
+
];
|
|
651
|
+
function wn(e, t, n, r, i, a) {
|
|
652
|
+
let o = K("el-icon");
|
|
653
|
+
return V(), k(T, null, [e.divided ? (V(), k("li", {
|
|
654
|
+
key: 0,
|
|
655
|
+
role: "separator",
|
|
656
|
+
class: R(e.ns.bem("menu", "item", "divided"))
|
|
657
|
+
}, null, 2)) : O("v-if", !0), A("li", L({ ref: e.itemRef }, {
|
|
658
|
+
...e.dataset,
|
|
659
|
+
...e.$attrs
|
|
660
|
+
}, {
|
|
661
|
+
"aria-disabled": e.disabled,
|
|
662
|
+
class: [e.ns.be("menu", "item"), e.ns.is("disabled", e.disabled)],
|
|
663
|
+
tabindex: e.tabIndex,
|
|
664
|
+
role: e.role,
|
|
665
|
+
onClick: t[0] || (t[0] = (t) => e.$emit("clickimpl", t)),
|
|
666
|
+
onFocus: t[1] || (t[1] = (...t) => e.handleFocus && e.handleFocus(...t)),
|
|
667
|
+
onKeydown: t[2] || (t[2] = Z((...t) => e.handleKeydown && e.handleKeydown(...t), ["self"])),
|
|
668
|
+
onMousedown: t[3] || (t[3] = (...t) => e.handleMousedown && e.handleMousedown(...t)),
|
|
669
|
+
onPointermove: t[4] || (t[4] = (t) => e.$emit("pointermove", t)),
|
|
670
|
+
onPointerleave: t[5] || (t[5] = (t) => e.$emit("pointerleave", t))
|
|
671
|
+
}), [e.icon || e.$slots.icon ? (V(), D(o, { key: 0 }, {
|
|
672
|
+
default: Y(() => [G(e.$slots, "icon", {}, () => [(V(), D(kt(e.icon)))])]),
|
|
673
|
+
_: 3
|
|
674
|
+
})) : O("v-if", !0), G(e.$slots, "default")], 16, Cn)], 64);
|
|
675
|
+
}
|
|
676
|
+
var Tn = /* @__PURE__ */ v(Sn, [["render", wn]]), En = () => {
|
|
677
|
+
let e = I(Rt, {});
|
|
678
|
+
return {
|
|
679
|
+
elDropdown: e,
|
|
680
|
+
_elDropdownSize: E(() => e == null ? void 0 : e.dropdownSize)
|
|
681
|
+
};
|
|
682
|
+
}, Dn = P({
|
|
683
|
+
name: "ElDropdownItem",
|
|
684
|
+
components: {
|
|
685
|
+
ElRovingFocusItem: gn,
|
|
686
|
+
ElDropdownItemImpl: Tn
|
|
687
|
+
},
|
|
688
|
+
inheritAttrs: !1,
|
|
689
|
+
props: Se,
|
|
690
|
+
emits: [
|
|
691
|
+
"pointermove",
|
|
692
|
+
"pointerleave",
|
|
693
|
+
"click"
|
|
694
|
+
],
|
|
695
|
+
setup(e, { emit: n, attrs: i }) {
|
|
696
|
+
let { elDropdown: a } = En(), o = Ct(), { onItemEnter: s, onItemLeave: c } = I(Lt, void 0), l = r((e) => (n("pointermove", e), e.defaultPrevented), t((t) => {
|
|
697
|
+
if (e.disabled) {
|
|
698
|
+
c(t);
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
let n = t.currentTarget;
|
|
702
|
+
n === document.activeElement || n.contains(document.activeElement) || (s(t), t.defaultPrevented || n == null || n.focus({ preventScroll: !0 }));
|
|
703
|
+
})), u = r((e) => (n("pointerleave", e), e.defaultPrevented), t(c));
|
|
704
|
+
return {
|
|
705
|
+
handleClick: r((t) => {
|
|
706
|
+
if (!e.disabled) return n("click", t), t.type !== "keydown" && t.defaultPrevented;
|
|
707
|
+
}, (t) => {
|
|
708
|
+
var n, r, i;
|
|
709
|
+
if (e.disabled) {
|
|
710
|
+
t.stopImmediatePropagation();
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
!(a == null || (n = a.hideOnClick) == null) && n.value && ((r = a.handleClick) == null || r.call(a)), (i = a.commandHandler) == null || i.call(a, e.command, o, t);
|
|
714
|
+
}),
|
|
715
|
+
handlePointerMove: l,
|
|
716
|
+
handlePointerLeave: u,
|
|
717
|
+
propsAndAttrs: E(() => ({
|
|
718
|
+
...e,
|
|
719
|
+
...i
|
|
720
|
+
}))
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
//#endregion
|
|
725
|
+
//#region node_modules/.pnpm/element-plus@2.13.7_typescr_8efe08c8f3fc18df5e2015e9e70f0912/node_modules/element-plus/es/components/dropdown/src/dropdown-item.mjs
|
|
726
|
+
function On(e, t, n, r, i, a) {
|
|
727
|
+
let o = K("el-dropdown-item-impl"), s = K("el-roving-focus-item");
|
|
728
|
+
return V(), D(s, { focusable: !e.disabled }, {
|
|
729
|
+
default: Y(() => [N(o, L(e.propsAndAttrs, {
|
|
730
|
+
onPointerleave: e.handlePointerLeave,
|
|
731
|
+
onPointermove: e.handlePointerMove,
|
|
732
|
+
onClickimpl: e.handleClick
|
|
733
|
+
}), j({
|
|
734
|
+
default: Y(() => [G(e.$slots, "default")]),
|
|
735
|
+
_: 2
|
|
736
|
+
}, [e.$slots.icon ? {
|
|
737
|
+
name: "icon",
|
|
738
|
+
fn: Y(() => [G(e.$slots, "icon")]),
|
|
739
|
+
key: "0"
|
|
740
|
+
} : void 0]), 1040, [
|
|
741
|
+
"onPointerleave",
|
|
742
|
+
"onPointermove",
|
|
743
|
+
"onClickimpl"
|
|
744
|
+
])]),
|
|
745
|
+
_: 3
|
|
746
|
+
}, 8, ["focusable"]);
|
|
747
|
+
}
|
|
748
|
+
var kn = /* @__PURE__ */ v(Dn, [["render", On]]), An = P({
|
|
749
|
+
name: "ElDropdownMenu",
|
|
750
|
+
props: be,
|
|
751
|
+
setup(t) {
|
|
752
|
+
let i = s("dropdown"), { _elDropdownSize: a } = En(), o = a.value, { contentRef: c, role: l, triggerId: u, isUsingKeyboard: d, handleClose: f } = I(Lt, void 0), { rovingFocusGroupRef: p, rovingFocusGroupRootStyle: m, onBlur: ee, onFocus: h, onKeydown: g, onMousedown: te } = I(Qt, void 0), { collectionRef: ne } = I(Xt, void 0), _ = E(() => [i.b("menu"), i.bm("menu", o == null ? void 0 : o.value)]), re = _e(c, p, ne), ie = r((e) => {
|
|
753
|
+
var n;
|
|
754
|
+
(n = t.onKeydown) == null || n.call(t, e);
|
|
755
|
+
}, (t) => {
|
|
756
|
+
let { currentTarget: r, target: i } = t, a = n(t);
|
|
757
|
+
if (r.contains(i), e.tab === a) return f();
|
|
758
|
+
g(t);
|
|
759
|
+
});
|
|
760
|
+
function v(e) {
|
|
761
|
+
d.value && h(e);
|
|
762
|
+
}
|
|
763
|
+
return {
|
|
764
|
+
size: o,
|
|
765
|
+
rovingFocusGroupRootStyle: m,
|
|
766
|
+
dropdownKls: _,
|
|
767
|
+
role: l,
|
|
768
|
+
triggerId: u,
|
|
769
|
+
dropdownListWrapperRef: re,
|
|
770
|
+
handleKeydown: ie,
|
|
771
|
+
onBlur: ee,
|
|
772
|
+
handleFocus: v,
|
|
773
|
+
onMousedown: te
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
}), jn = ["role", "aria-labelledby"];
|
|
777
|
+
function Mn(e, t, n, r, i, a) {
|
|
778
|
+
return V(), k("ul", {
|
|
779
|
+
ref: e.dropdownListWrapperRef,
|
|
780
|
+
class: R(e.dropdownKls),
|
|
781
|
+
style: B(e.rovingFocusGroupRootStyle),
|
|
782
|
+
tabindex: -1,
|
|
783
|
+
role: e.role,
|
|
784
|
+
"aria-labelledby": e.triggerId,
|
|
785
|
+
onFocusin: t[0] || (t[0] = (...t) => e.handleFocus && e.handleFocus(...t)),
|
|
786
|
+
onFocusout: t[1] || (t[1] = (...t) => e.onBlur && e.onBlur(...t)),
|
|
787
|
+
onKeydown: t[2] || (t[2] = Z((...t) => e.handleKeydown && e.handleKeydown(...t), ["self"])),
|
|
788
|
+
onMousedown: t[3] || (t[3] = Z((...t) => e.onMousedown && e.onMousedown(...t), ["self"]))
|
|
789
|
+
}, [G(e.$slots, "default")], 46, jn);
|
|
790
|
+
}
|
|
791
|
+
var Nn = /* @__PURE__ */ v(An, [["render", Mn]]), Pn = c(xn, {
|
|
792
|
+
DropdownItem: kn,
|
|
793
|
+
DropdownMenu: Nn
|
|
794
|
+
}), Fn = a(kn), In = a(Nn), Ln = {
|
|
795
|
+
name: "FormGroup",
|
|
796
|
+
props: {
|
|
797
|
+
arrow: {
|
|
798
|
+
type: Boolean,
|
|
799
|
+
default: !0
|
|
800
|
+
},
|
|
801
|
+
collapse: {
|
|
802
|
+
type: Boolean,
|
|
803
|
+
default: !0
|
|
804
|
+
},
|
|
805
|
+
header: {
|
|
806
|
+
type: Boolean,
|
|
807
|
+
default: !0
|
|
808
|
+
},
|
|
809
|
+
icon: { type: String },
|
|
810
|
+
display: {
|
|
811
|
+
type: Boolean,
|
|
812
|
+
default: !0
|
|
813
|
+
},
|
|
814
|
+
label: { type: String }
|
|
815
|
+
},
|
|
816
|
+
data() {
|
|
817
|
+
return { activeName: "" };
|
|
818
|
+
},
|
|
819
|
+
computed: {
|
|
820
|
+
text() {
|
|
821
|
+
return +!!this.collapse;
|
|
822
|
+
},
|
|
823
|
+
isHeader() {
|
|
824
|
+
return this.$slots.header && this.header || (this.label || this.icon) && this.header;
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
watch: { text(e) {
|
|
828
|
+
this.activeName = [e];
|
|
829
|
+
} },
|
|
830
|
+
created() {
|
|
831
|
+
this.activeName = [this.text];
|
|
832
|
+
},
|
|
833
|
+
methods: { handleChange(e) {
|
|
834
|
+
this.$emit("change", e);
|
|
835
|
+
} }
|
|
836
|
+
}, Rn = { class: "avue-group__header" }, zn = {
|
|
837
|
+
key: 1,
|
|
838
|
+
class: "avue-group__title"
|
|
839
|
+
};
|
|
840
|
+
function Bn(e, t, n, r, i, a) {
|
|
841
|
+
let o = me, s = he;
|
|
842
|
+
return n.display ? (V(), k("div", {
|
|
843
|
+
key: 0,
|
|
844
|
+
class: R(["avue-group", {
|
|
845
|
+
"avue-group--header": !a.isHeader,
|
|
846
|
+
"avue-group__arrow": !n.arrow
|
|
847
|
+
}])
|
|
848
|
+
}, [G(e.$slots, "tabs"), N(s, {
|
|
849
|
+
modelValue: i.activeName,
|
|
850
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => i.activeName = e),
|
|
851
|
+
value: a.text,
|
|
852
|
+
onChange: a.handleChange
|
|
853
|
+
}, {
|
|
854
|
+
default: Y(() => [N(o, {
|
|
855
|
+
name: 1,
|
|
856
|
+
disabled: !n.arrow
|
|
857
|
+
}, {
|
|
858
|
+
title: Y(() => [A("div", Rn, [G(e.$slots, "header", {}, () => [n.icon ? (V(), k("i", {
|
|
859
|
+
key: 0,
|
|
860
|
+
class: R([n.icon, "avue-group__icon"])
|
|
861
|
+
}, null, 2)) : O("v-if", !0), n.label ? (V(), k("h1", zn, q(n.label), 1)) : O("v-if", !0)])])]),
|
|
862
|
+
default: Y(() => [G(e.$slots, "default")]),
|
|
863
|
+
_: 3
|
|
864
|
+
}, 8, ["disabled"])]),
|
|
865
|
+
_: 3
|
|
866
|
+
}, 8, [
|
|
867
|
+
"modelValue",
|
|
868
|
+
"value",
|
|
869
|
+
"onChange"
|
|
870
|
+
])], 2)) : O("v-if", !0);
|
|
871
|
+
}
|
|
872
|
+
var Vn = /* @__PURE__ */ y(Ln, [["render", Bn]]), Hn = {
|
|
873
|
+
name: "FyFormMenu",
|
|
874
|
+
components: { FyButton: b },
|
|
875
|
+
inject: ["formSafe"],
|
|
876
|
+
computed: {
|
|
877
|
+
menuSpan() {
|
|
878
|
+
return this.formSafe.parentOption.menuSpan || 24;
|
|
879
|
+
},
|
|
880
|
+
styleName() {
|
|
881
|
+
return this.menuSpan === 24 ? {} : { padding: 0 };
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
function Un(e, t, n, r, i, a) {
|
|
886
|
+
let o = b, s = _, c = fe;
|
|
887
|
+
return a.formSafe.parentOption.menuBtn === !1 ? O("v-if", !0) : (V(), D(c, {
|
|
888
|
+
key: 0,
|
|
889
|
+
span: a.menuSpan,
|
|
890
|
+
md: a.menuSpan,
|
|
891
|
+
style: B(a.styleName),
|
|
892
|
+
class: R([
|
|
893
|
+
"menu",
|
|
894
|
+
a.formSafe.menuPosition,
|
|
895
|
+
"no-print"
|
|
896
|
+
])
|
|
897
|
+
}, {
|
|
898
|
+
default: Y(() => [N(s, {
|
|
899
|
+
"label-width": "0px",
|
|
900
|
+
style: { "text-align": "center" }
|
|
901
|
+
}, {
|
|
902
|
+
default: Y(() => [
|
|
903
|
+
a.formSafe.isMock ? (V(), D(o, {
|
|
904
|
+
key: 0,
|
|
905
|
+
type: "primary",
|
|
906
|
+
size: a.formSafe.controlSize,
|
|
907
|
+
disabled: a.formSafe.allDisabled,
|
|
908
|
+
onClick: a.formSafe.handleMock
|
|
909
|
+
}, {
|
|
910
|
+
icon: Y(() => [...t[0] || (t[0] = [A("i", { class: "el-icon-edit-outline" }, null, -1)])]),
|
|
911
|
+
default: Y(() => [M(q(a.formSafe.parentOption.mockText || "模拟") + " ", 1)]),
|
|
912
|
+
_: 1
|
|
913
|
+
}, 8, [
|
|
914
|
+
"size",
|
|
915
|
+
"disabled",
|
|
916
|
+
"onClick"
|
|
917
|
+
])) : O("v-if", !0),
|
|
918
|
+
a.formSafe.isPrint ? (V(), D(o, {
|
|
919
|
+
key: 1,
|
|
920
|
+
type: "primary",
|
|
921
|
+
size: a.formSafe.controlSize,
|
|
922
|
+
icon: "el-icon-printer",
|
|
923
|
+
disabled: a.formSafe.allDisabled,
|
|
924
|
+
onClick: a.formSafe.handlePrint
|
|
925
|
+
}, {
|
|
926
|
+
icon: Y(() => [...t[1] || (t[1] = [A("i", { class: "el-icon-printer" }, null, -1)])]),
|
|
927
|
+
default: Y(() => [M(q(a.formSafe.parentOption.printText || "打印") + " ", 1)]),
|
|
928
|
+
_: 1
|
|
929
|
+
}, 8, [
|
|
930
|
+
"size",
|
|
931
|
+
"disabled",
|
|
932
|
+
"onClick"
|
|
933
|
+
])) : O("v-if", !0),
|
|
934
|
+
a.formSafe.parentOption.submitBtn === !1 ? O("v-if", !0) : (V(), D(o, {
|
|
935
|
+
key: 2,
|
|
936
|
+
type: "primary",
|
|
937
|
+
size: a.formSafe.controlSize,
|
|
938
|
+
loading: a.formSafe.allDisabled,
|
|
939
|
+
onClick: a.formSafe.submit
|
|
940
|
+
}, {
|
|
941
|
+
icon: Y(() => [A("i", { class: R(a.formSafe.parentOption.submitIcon || "el-icon-check") }, null, 2)]),
|
|
942
|
+
default: Y(() => [M(q(a.formSafe.parentOption.submitText || "提交") + " ", 1)]),
|
|
943
|
+
_: 1
|
|
944
|
+
}, 8, [
|
|
945
|
+
"size",
|
|
946
|
+
"loading",
|
|
947
|
+
"onClick"
|
|
948
|
+
])),
|
|
949
|
+
a.formSafe.parentOption.emptyBtn === !1 ? O("v-if", !0) : (V(), D(o, {
|
|
950
|
+
key: 3,
|
|
951
|
+
size: a.formSafe.controlSize,
|
|
952
|
+
disabled: a.formSafe.allDisabled,
|
|
953
|
+
onClick: a.formSafe.resetForm
|
|
954
|
+
}, {
|
|
955
|
+
icon: Y(() => [A("i", { class: R(a.formSafe.parentOption.emptyIcon || "el-icon-delete") }, null, 2)]),
|
|
956
|
+
default: Y(() => [M(q(a.formSafe.parentOption.emptyText || "清空") + " ", 1)]),
|
|
957
|
+
_: 1
|
|
958
|
+
}, 8, [
|
|
959
|
+
"size",
|
|
960
|
+
"disabled",
|
|
961
|
+
"onClick"
|
|
962
|
+
])),
|
|
963
|
+
G(e.$slots, "menuForm", {
|
|
964
|
+
disabled: a.formSafe.allDisabled,
|
|
965
|
+
size: a.formSafe.controlSize
|
|
966
|
+
})
|
|
967
|
+
]),
|
|
968
|
+
_: 3
|
|
969
|
+
})]),
|
|
970
|
+
_: 3
|
|
971
|
+
}, 8, [
|
|
972
|
+
"span",
|
|
973
|
+
"md",
|
|
974
|
+
"style",
|
|
975
|
+
"class"
|
|
976
|
+
]));
|
|
977
|
+
}
|
|
978
|
+
var Wn = /* @__PURE__ */ y(Hn, [["render", Un]]), Gn = {
|
|
979
|
+
name: "DialogFilter",
|
|
980
|
+
inject: ["crud"],
|
|
981
|
+
data() {
|
|
982
|
+
return {
|
|
983
|
+
box: !1,
|
|
984
|
+
columnObj: {},
|
|
985
|
+
symbolDic: [
|
|
986
|
+
{
|
|
987
|
+
label: "=",
|
|
988
|
+
value: "="
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
label: "≠",
|
|
992
|
+
value: "≠"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
label: "like",
|
|
996
|
+
value: "like"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
label: ">",
|
|
1000
|
+
value: ">"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
label: "≥",
|
|
1004
|
+
value: "≥"
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
label: "<",
|
|
1008
|
+
value: "<"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
label: "≤",
|
|
1012
|
+
value: "≤"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
label: "∈",
|
|
1016
|
+
value: "∈"
|
|
1017
|
+
}
|
|
1018
|
+
],
|
|
1019
|
+
list: [],
|
|
1020
|
+
columnOption: {}
|
|
1021
|
+
};
|
|
1022
|
+
},
|
|
1023
|
+
methods: {
|
|
1024
|
+
handleShow() {
|
|
1025
|
+
this.getColumnOption(), this.box = !0;
|
|
1026
|
+
},
|
|
1027
|
+
getColumnOption() {
|
|
1028
|
+
let e = [];
|
|
1029
|
+
S(this.crud.propOption).forEach((t) => {
|
|
1030
|
+
t.showColumn !== !1 && e.push(Object.assign(t, { value: t.prop }));
|
|
1031
|
+
}), this.columnOption = e, this.columnObj = this.columnOption[0];
|
|
1032
|
+
},
|
|
1033
|
+
handleDelete(e) {
|
|
1034
|
+
this.list.splice(e, 1);
|
|
1035
|
+
},
|
|
1036
|
+
handleClear() {
|
|
1037
|
+
this.list = [];
|
|
1038
|
+
},
|
|
1039
|
+
handleValueClear() {
|
|
1040
|
+
this.list.forEach((e) => {
|
|
1041
|
+
e.value = "";
|
|
1042
|
+
});
|
|
1043
|
+
},
|
|
1044
|
+
handleSubmit() {
|
|
1045
|
+
let e = [];
|
|
1046
|
+
this.list.forEach((t) => {
|
|
1047
|
+
e.push([
|
|
1048
|
+
t.text,
|
|
1049
|
+
t.symbol,
|
|
1050
|
+
t.value
|
|
1051
|
+
]);
|
|
1052
|
+
}), this.crud.$emit("filter", e), this.box = !1;
|
|
1053
|
+
},
|
|
1054
|
+
handleChange(e) {
|
|
1055
|
+
this.list[e].value = "";
|
|
1056
|
+
},
|
|
1057
|
+
handleAdd() {
|
|
1058
|
+
let e = this.columnObj.prop;
|
|
1059
|
+
this.list.push({
|
|
1060
|
+
text: e,
|
|
1061
|
+
value: "",
|
|
1062
|
+
symbol: this.symbolDic[0].value
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}, Kn = { key: 0 }, qn = { class: "avue-crud__filter-menu" };
|
|
1067
|
+
function Jn(e, t, n, r, i, a) {
|
|
1068
|
+
let o = b, s = se, c = lt, l = it, u = fe, d = pe, f = ye;
|
|
1069
|
+
return i.box ? (V(), k("div", Kn, [N(f, {
|
|
1070
|
+
modelValue: i.box,
|
|
1071
|
+
"onUpdate:modelValue": t[1] || (t[1] = (e) => i.box = e),
|
|
1072
|
+
class: R([["avue-crud__dialog", "avue-crud__filter"], "avue-dialog"]),
|
|
1073
|
+
"lock-scroll": "",
|
|
1074
|
+
"append-to-body": "",
|
|
1075
|
+
title: "过滤条件",
|
|
1076
|
+
size: a.crud.isMobile ? "100%" : "60%"
|
|
1077
|
+
}, {
|
|
1078
|
+
default: Y(() => [N(d, { span: 24 }, {
|
|
1079
|
+
default: Y(() => [
|
|
1080
|
+
A("div", qn, [N(s, null, {
|
|
1081
|
+
default: Y(() => [
|
|
1082
|
+
N(o, {
|
|
1083
|
+
type: "primary",
|
|
1084
|
+
size: a.crud.isMediumSize,
|
|
1085
|
+
onClick: a.handleAdd
|
|
1086
|
+
}, {
|
|
1087
|
+
default: Y(() => [...t[2] || (t[2] = [M("新增条件", -1)])]),
|
|
1088
|
+
_: 1
|
|
1089
|
+
}, 8, ["size", "onClick"]),
|
|
1090
|
+
N(o, {
|
|
1091
|
+
type: "primary",
|
|
1092
|
+
size: a.crud.isMediumSize,
|
|
1093
|
+
onClick: a.handleClear
|
|
1094
|
+
}, {
|
|
1095
|
+
default: Y(() => [...t[3] || (t[3] = [M("清空条件", -1)])]),
|
|
1096
|
+
_: 1
|
|
1097
|
+
}, 8, ["size", "onClick"]),
|
|
1098
|
+
N(o, {
|
|
1099
|
+
type: "primary",
|
|
1100
|
+
size: a.crud.isMediumSize,
|
|
1101
|
+
onClick: a.handleValueClear
|
|
1102
|
+
}, {
|
|
1103
|
+
default: Y(() => [...t[4] || (t[4] = [M("清空数据", -1)])]),
|
|
1104
|
+
_: 1
|
|
1105
|
+
}, 8, ["size", "onClick"])
|
|
1106
|
+
]),
|
|
1107
|
+
_: 1
|
|
1108
|
+
})]),
|
|
1109
|
+
(V(!0), k(T, null, W(i.list, (e, t) => (V(), D(u, {
|
|
1110
|
+
key: t,
|
|
1111
|
+
md: 12,
|
|
1112
|
+
xs: 24,
|
|
1113
|
+
sm: 12,
|
|
1114
|
+
class: "avue-crud__filter-item"
|
|
1115
|
+
}, {
|
|
1116
|
+
default: Y(() => [
|
|
1117
|
+
N(c, {
|
|
1118
|
+
modelValue: e.text,
|
|
1119
|
+
"onUpdate:modelValue": (t) => e.text = t,
|
|
1120
|
+
dic: i.columnOption,
|
|
1121
|
+
clearable: !1,
|
|
1122
|
+
size: a.crud.isMediumSize,
|
|
1123
|
+
class: "avue-crud__filter-label",
|
|
1124
|
+
onChange: (e) => a.handleChange(t)
|
|
1125
|
+
}, null, 8, [
|
|
1126
|
+
"modelValue",
|
|
1127
|
+
"onUpdate:modelValue",
|
|
1128
|
+
"dic",
|
|
1129
|
+
"size",
|
|
1130
|
+
"onChange"
|
|
1131
|
+
]),
|
|
1132
|
+
N(c, {
|
|
1133
|
+
modelValue: e.symbol,
|
|
1134
|
+
"onUpdate:modelValue": (t) => e.symbol = t,
|
|
1135
|
+
class: "avue-crud__filter-symbol",
|
|
1136
|
+
dic: i.symbolDic,
|
|
1137
|
+
clearable: !1,
|
|
1138
|
+
size: a.crud.isMediumSize
|
|
1139
|
+
}, null, 8, [
|
|
1140
|
+
"modelValue",
|
|
1141
|
+
"onUpdate:modelValue",
|
|
1142
|
+
"dic",
|
|
1143
|
+
"size"
|
|
1144
|
+
]),
|
|
1145
|
+
N(l, {
|
|
1146
|
+
modelValue: e.value,
|
|
1147
|
+
"onUpdate:modelValue": (t) => e.value = t,
|
|
1148
|
+
size: a.crud.isMediumSize,
|
|
1149
|
+
class: "avue-crud__filter-value"
|
|
1150
|
+
}, null, 8, [
|
|
1151
|
+
"modelValue",
|
|
1152
|
+
"onUpdate:modelValue",
|
|
1153
|
+
"size"
|
|
1154
|
+
]),
|
|
1155
|
+
N(o, {
|
|
1156
|
+
type: "danger",
|
|
1157
|
+
class: "avue-crud__filter-icon",
|
|
1158
|
+
circle: "",
|
|
1159
|
+
icon: "el-icon-minus",
|
|
1160
|
+
onClick: (e) => a.handleDelete(t)
|
|
1161
|
+
}, null, 8, ["onClick"])
|
|
1162
|
+
]),
|
|
1163
|
+
_: 2
|
|
1164
|
+
}, 1024))), 128)),
|
|
1165
|
+
N(u, {
|
|
1166
|
+
span: 24,
|
|
1167
|
+
class: "avue-form__menu avue-form__menu--right"
|
|
1168
|
+
}, {
|
|
1169
|
+
default: Y(() => [N(o, {
|
|
1170
|
+
type: "primary",
|
|
1171
|
+
size: a.crud.isMediumSize,
|
|
1172
|
+
onClick: a.handleSubmit
|
|
1173
|
+
}, {
|
|
1174
|
+
default: Y(() => [...t[5] || (t[5] = [M("确 定", -1)])]),
|
|
1175
|
+
_: 1
|
|
1176
|
+
}, 8, ["size", "onClick"]), N(o, {
|
|
1177
|
+
size: a.crud.isMediumSize,
|
|
1178
|
+
onClick: t[0] || (t[0] = (e) => i.box = !1)
|
|
1179
|
+
}, {
|
|
1180
|
+
default: Y(() => [...t[6] || (t[6] = [M("取 消", -1)])]),
|
|
1181
|
+
_: 1
|
|
1182
|
+
}, 8, ["size"])]),
|
|
1183
|
+
_: 1
|
|
1184
|
+
})
|
|
1185
|
+
]),
|
|
1186
|
+
_: 1
|
|
1187
|
+
})]),
|
|
1188
|
+
_: 1
|
|
1189
|
+
}, 8, ["modelValue", "size"])])) : O("v-if", !0);
|
|
1190
|
+
}
|
|
1191
|
+
var Yn = /* @__PURE__ */ y(Gn, [["render", Jn]]), Xn = (e = {}, t = {}, n = {}, r = []) => {
|
|
1192
|
+
let i = e[t.prop], a = t.type, o = t.separator;
|
|
1193
|
+
if (t.bind && (i = Fe(e, t.bind)), Q(i)) i = "";
|
|
1194
|
+
else {
|
|
1195
|
+
let e = Me.includes(t.type) && t.multiple, s = Pe.includes(t.type);
|
|
1196
|
+
if ((["string", "number"].includes(t.dataType) || e || s) && !Array.isArray(i) && (i = `${i}`.split(o || ","), t.dataType === "number" && (i = Ne(i))), We.includes(a)) i = Array.isArray(i) ? i.join(o || " | ") : i.split(o || ",").join(o || " | ");
|
|
1197
|
+
else if (a === "password") i = Be(i, "*");
|
|
1198
|
+
else if (Ue.includes(a) && t.format) {
|
|
1199
|
+
let e = t.format.replace("dd", "DD").replace("yyyy", "YYYY"), n = Ft(Date.now(), "YYYY-MM-DD");
|
|
1200
|
+
if (a.indexOf("range") !== -1) {
|
|
1201
|
+
let r = i[0] || "", o = i[1] || "";
|
|
1202
|
+
a === "timerange" && r.length <= 8 && o.length < 8 && (r = `${n} ${r}`, o = `${n} ${o}`), i = [Ft(r, e), Ft(o, e)].join(t.separator || "~");
|
|
1203
|
+
} else a === "time" && i.length <= 8 && (i = `${n} ${i}`), i = Ft(i, e);
|
|
1204
|
+
}
|
|
1205
|
+
i = Re(r, i, t.props || n.props);
|
|
1206
|
+
}
|
|
1207
|
+
return t.formatter && typeof t.formatter == "function" && (i = t.formatter(e, e[t.prop], i, t)), i;
|
|
1208
|
+
}, Zn = {
|
|
1209
|
+
name: "DialogExcel",
|
|
1210
|
+
inject: ["crud"],
|
|
1211
|
+
data() {
|
|
1212
|
+
return {
|
|
1213
|
+
option: {},
|
|
1214
|
+
columnOption: {},
|
|
1215
|
+
box: !1,
|
|
1216
|
+
form: { name: this.crud.tableOption.title }
|
|
1217
|
+
};
|
|
1218
|
+
},
|
|
1219
|
+
methods: {
|
|
1220
|
+
handleShow() {
|
|
1221
|
+
this.getColumnOption(), this.getOption(), this.box = !0;
|
|
1222
|
+
},
|
|
1223
|
+
handleSubmit() {
|
|
1224
|
+
this.$Export.excel({
|
|
1225
|
+
title: this.form.name,
|
|
1226
|
+
columns: this.getColumn(),
|
|
1227
|
+
data: this.handleSum()
|
|
1228
|
+
}), this.box = !1;
|
|
1229
|
+
},
|
|
1230
|
+
handleSum() {
|
|
1231
|
+
let e = this.crud.tableOption, t = this.crud.propOption, n = this.form.type ? this.crud.list : this.crud.tableSelect, r = [];
|
|
1232
|
+
return this.form.params.includes("data") && n.forEach((n) => {
|
|
1233
|
+
let i = S(n);
|
|
1234
|
+
t.forEach((t) => {
|
|
1235
|
+
let n = t.parentProp ? (this.crud.cascaderDIC[t.$index] || {})[t.prop] : this.crud.DIC[t.prop];
|
|
1236
|
+
i[t.prop] = Xn(i, t, e, n);
|
|
1237
|
+
}), r.push(i);
|
|
1238
|
+
}), this.form.params.includes("sum") && e.showSummary && r.push(this.crud.sumsList), r;
|
|
1239
|
+
},
|
|
1240
|
+
getOption() {
|
|
1241
|
+
this.option = {
|
|
1242
|
+
submitBtn: !1,
|
|
1243
|
+
emptyBtn: !1,
|
|
1244
|
+
column: [
|
|
1245
|
+
{
|
|
1246
|
+
label: "文件名",
|
|
1247
|
+
prop: "name",
|
|
1248
|
+
span: 24
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
label: "选择数据",
|
|
1252
|
+
prop: "type",
|
|
1253
|
+
span: 24,
|
|
1254
|
+
type: "select",
|
|
1255
|
+
dicData: [{
|
|
1256
|
+
label: "当前数据(当前页全部的数据)",
|
|
1257
|
+
value: !0
|
|
1258
|
+
}, {
|
|
1259
|
+
label: "选中的数据(当前页选中的数据)",
|
|
1260
|
+
disabled: this.crud.tableOption.selection !== !0,
|
|
1261
|
+
value: !1
|
|
1262
|
+
}]
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
label: "选择字段",
|
|
1266
|
+
prop: "prop",
|
|
1267
|
+
type: "tree",
|
|
1268
|
+
multiple: !0,
|
|
1269
|
+
checkStrictly: !0,
|
|
1270
|
+
span: 24,
|
|
1271
|
+
props: { value: "prop" },
|
|
1272
|
+
dicData: this.columnOption
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
label: "参数设置",
|
|
1276
|
+
prop: "params",
|
|
1277
|
+
type: "checkbox",
|
|
1278
|
+
span: 24,
|
|
1279
|
+
value: ["header", "data"].concat((() => {
|
|
1280
|
+
let e = [];
|
|
1281
|
+
return this.crud.isHeader && e.push("headers"), this.crud.isShowSummary && e.push("sum"), e;
|
|
1282
|
+
})()),
|
|
1283
|
+
dicData: [{
|
|
1284
|
+
label: "表头",
|
|
1285
|
+
disabled: !0,
|
|
1286
|
+
value: "header"
|
|
1287
|
+
}, {
|
|
1288
|
+
label: "数据源",
|
|
1289
|
+
value: "data"
|
|
1290
|
+
}].concat((() => {
|
|
1291
|
+
let e = [];
|
|
1292
|
+
return e.push({
|
|
1293
|
+
label: "复杂表头",
|
|
1294
|
+
value: "headers",
|
|
1295
|
+
disabled: !this.crud.isHeader
|
|
1296
|
+
}), e.push({
|
|
1297
|
+
label: "合计统计",
|
|
1298
|
+
value: "sum",
|
|
1299
|
+
disabled: !this.crud.isShowSummary
|
|
1300
|
+
}), e;
|
|
1301
|
+
})())
|
|
1302
|
+
}
|
|
1303
|
+
]
|
|
1304
|
+
}, this.form.type = this.crud.selectLen === 0;
|
|
1305
|
+
},
|
|
1306
|
+
getColumnOption() {
|
|
1307
|
+
let e = S(this.crud.columnOption), t = [], n = (e = []) => {
|
|
1308
|
+
e.forEach((r, i) => {
|
|
1309
|
+
let a = r.children;
|
|
1310
|
+
a && !Array.isArray(a) ? delete r.children : r.showColumn === !1 ? e.splice(i, 1) : (t.push(r.prop), r.children && n(a));
|
|
1311
|
+
});
|
|
1312
|
+
};
|
|
1313
|
+
n(e), this.columnOption = e, this.form.prop = t;
|
|
1314
|
+
},
|
|
1315
|
+
getColumn() {
|
|
1316
|
+
let e = S(this.columnOption), t = this.$refs.form.getPropRef("prop").$refs.temp.getHalfList();
|
|
1317
|
+
if (!this.form.params) return [];
|
|
1318
|
+
if (this.form.params.includes("headers")) {
|
|
1319
|
+
let n = (e = []) => {
|
|
1320
|
+
e.forEach((r, i) => {
|
|
1321
|
+
t.includes(r.prop) ? r.children && n(r.children) : e.splice(i, 1);
|
|
1322
|
+
});
|
|
1323
|
+
};
|
|
1324
|
+
return n(e), e;
|
|
1325
|
+
} else {
|
|
1326
|
+
let n = [], r = (e = []) => {
|
|
1327
|
+
e.forEach((e) => {
|
|
1328
|
+
e.children ? r(e.children) : t.includes(e.prop) && n.push(e);
|
|
1329
|
+
});
|
|
1330
|
+
};
|
|
1331
|
+
return r(e), n;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
}, Qn = { key: 0 }, $n = { class: "dialog-footer" };
|
|
1336
|
+
function er(e, t, n, r, i, a) {
|
|
1337
|
+
let o = fi, s = b, c = ve;
|
|
1338
|
+
return i.box ? (V(), k("div", Qn, [N(c, {
|
|
1339
|
+
modelValue: i.box,
|
|
1340
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => i.box = e),
|
|
1341
|
+
title: "导出",
|
|
1342
|
+
"lock-scroll": "",
|
|
1343
|
+
class: "avue-dialog",
|
|
1344
|
+
width: a.crud.isMobile ? "100%" : "30%"
|
|
1345
|
+
}, {
|
|
1346
|
+
footer: Y(() => [A("span", $n, [N(s, {
|
|
1347
|
+
type: "primary",
|
|
1348
|
+
size: a.crud.isMediumSize,
|
|
1349
|
+
onClick: a.handleSubmit
|
|
1350
|
+
}, {
|
|
1351
|
+
default: Y(() => [...t[3] || (t[3] = [M("确定", -1)])]),
|
|
1352
|
+
_: 1
|
|
1353
|
+
}, 8, ["size", "onClick"]), N(s, {
|
|
1354
|
+
size: a.crud.isMediumSize,
|
|
1355
|
+
onClick: t[1] || (t[1] = (e) => i.box = !1)
|
|
1356
|
+
}, {
|
|
1357
|
+
default: Y(() => [...t[4] || (t[4] = [M("取消", -1)])]),
|
|
1358
|
+
_: 1
|
|
1359
|
+
}, 8, ["size"])])]),
|
|
1360
|
+
default: Y(() => [N(o, {
|
|
1361
|
+
modelValue: i.form,
|
|
1362
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => i.form = e),
|
|
1363
|
+
option: i.option
|
|
1364
|
+
}, null, 8, ["modelValue", "option"])]),
|
|
1365
|
+
_: 1
|
|
1366
|
+
}, 8, ["modelValue", "width"])])) : O("v-if", !0);
|
|
1367
|
+
}
|
|
1368
|
+
var tr = /* @__PURE__ */ y(Zn, [["render", er]]), $ = {
|
|
1369
|
+
menuWidth: 220,
|
|
1370
|
+
menuFixed: "right",
|
|
1371
|
+
menuXsWidth: 100,
|
|
1372
|
+
menuAlign: "center",
|
|
1373
|
+
menuHeaderAlign: "center",
|
|
1374
|
+
headerAlign: "left",
|
|
1375
|
+
cancelBtnIcon: "el-icon-circle-close",
|
|
1376
|
+
viewBtnIcon: "el-icon-view",
|
|
1377
|
+
editBtnIcon: "el-icon-edit",
|
|
1378
|
+
copyBtnIcon: "el-icon-document-add",
|
|
1379
|
+
addBtnIcon: "el-icon-plus",
|
|
1380
|
+
printBtnIcon: "el-icon-printer",
|
|
1381
|
+
excelBtnIcon: "el-icon-download",
|
|
1382
|
+
delBtnIcon: "el-icon-delete",
|
|
1383
|
+
searchBtnIcon: "el-icon-search",
|
|
1384
|
+
emptyBtnIcon: "el-icon-delete",
|
|
1385
|
+
saveBtnIcon: "el-icon-circle-plus-outline",
|
|
1386
|
+
updateBtnIcon: "el-icon-circle-check",
|
|
1387
|
+
columnBtnIcon: "el-icon-s-operation",
|
|
1388
|
+
filterBtnIcon: "el-icon-tickets",
|
|
1389
|
+
refreshBtnIcon: "el-icon-refresh",
|
|
1390
|
+
viewBtn: !1,
|
|
1391
|
+
editBtn: !0,
|
|
1392
|
+
copyBtn: !1,
|
|
1393
|
+
cancelBtn: !0,
|
|
1394
|
+
addBtn: !0,
|
|
1395
|
+
addRowBtn: !1,
|
|
1396
|
+
printBtn: !1,
|
|
1397
|
+
excelBtn: !1,
|
|
1398
|
+
delBtn: !0,
|
|
1399
|
+
cellBtn: !1,
|
|
1400
|
+
dateBtn: !1,
|
|
1401
|
+
updateBtn: !0,
|
|
1402
|
+
saveBtn: !0,
|
|
1403
|
+
refreshBtn: !0,
|
|
1404
|
+
columnBtn: !0,
|
|
1405
|
+
filterBtn: !1,
|
|
1406
|
+
queryBtn: !0,
|
|
1407
|
+
menuBtn: !1,
|
|
1408
|
+
searchBtn: !0,
|
|
1409
|
+
clearBtn: !0,
|
|
1410
|
+
selectClearBtn: !0,
|
|
1411
|
+
searchShow: !0,
|
|
1412
|
+
tip: !0,
|
|
1413
|
+
dialogWidth: "60%",
|
|
1414
|
+
dialogDrag: !1,
|
|
1415
|
+
formFullscreen: !1,
|
|
1416
|
+
pageBackground: !0,
|
|
1417
|
+
page: !0,
|
|
1418
|
+
menu: !0,
|
|
1419
|
+
indexLabel: "#",
|
|
1420
|
+
indexWidth: 50,
|
|
1421
|
+
indexFixed: "left",
|
|
1422
|
+
selectionWidth: 50,
|
|
1423
|
+
selectionFixed: "left",
|
|
1424
|
+
expandWidth: 60,
|
|
1425
|
+
expandFixed: "left",
|
|
1426
|
+
filterMultiple: !0,
|
|
1427
|
+
calcHeight: 300,
|
|
1428
|
+
width: "100%",
|
|
1429
|
+
searchGutter: 20,
|
|
1430
|
+
searchLabelWidth: 80,
|
|
1431
|
+
searchSpan: 6,
|
|
1432
|
+
dropRowClass: ".el-table__body-wrapper > table > tbody",
|
|
1433
|
+
dropColClass: ".el-table__header-wrapper tr",
|
|
1434
|
+
ghostClass: "avue-crud__ghost"
|
|
1435
|
+
}, nr = {
|
|
1436
|
+
name: "DialogColumn",
|
|
1437
|
+
inject: ["crud"],
|
|
1438
|
+
data() {
|
|
1439
|
+
return {
|
|
1440
|
+
data: [],
|
|
1441
|
+
columnBox: !1
|
|
1442
|
+
};
|
|
1443
|
+
},
|
|
1444
|
+
computed: { defaultColumn() {
|
|
1445
|
+
return [
|
|
1446
|
+
{
|
|
1447
|
+
label: "隐藏",
|
|
1448
|
+
prop: "hide"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
label: "冻结",
|
|
1452
|
+
prop: "fixed"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
label: "过滤",
|
|
1456
|
+
prop: "filters"
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
label: "排序",
|
|
1460
|
+
prop: "sortable"
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
label: "序号",
|
|
1464
|
+
prop: "index",
|
|
1465
|
+
hide: !0
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
label: "宽度",
|
|
1469
|
+
prop: "width",
|
|
1470
|
+
hide: !0
|
|
1471
|
+
}
|
|
1472
|
+
];
|
|
1473
|
+
} },
|
|
1474
|
+
methods: {
|
|
1475
|
+
handleShow() {
|
|
1476
|
+
this.data = [], this.crud.propOption.forEach((e) => {
|
|
1477
|
+
e.showColumn !== !1 && this.data.push(e);
|
|
1478
|
+
}), this.columnBox = !0, this.$nextTick(() => this.rowDrop());
|
|
1479
|
+
},
|
|
1480
|
+
handleChange(e) {
|
|
1481
|
+
["hide", "filters"].includes(e) && this.crud.refreshTable();
|
|
1482
|
+
},
|
|
1483
|
+
rowDrop() {
|
|
1484
|
+
let e = this.$refs.table.$el.querySelectorAll($.dropRowClass)[0];
|
|
1485
|
+
this.crud.tableDrop("column", e, (e) => {
|
|
1486
|
+
let t = e.oldIndex, n = e.newIndex;
|
|
1487
|
+
this.crud.headerSort(t, n), this.crud.refreshTable(() => this.rowDrop());
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}, rr = { key: 0 };
|
|
1492
|
+
function ir(e, t, n, r, i, a) {
|
|
1493
|
+
let o = u, s = de, c = d, l = ye;
|
|
1494
|
+
return i.columnBox ? (V(), k("div", rr, [N(l, {
|
|
1495
|
+
modelValue: i.columnBox,
|
|
1496
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => i.columnBox = e),
|
|
1497
|
+
class: "avue-crud__dialog avue-crud__column avue-dialog",
|
|
1498
|
+
"lock-scroll": "",
|
|
1499
|
+
"append-to-body": "",
|
|
1500
|
+
title: "列显隐",
|
|
1501
|
+
size: a.crud.isMobile ? "100%" : "40%"
|
|
1502
|
+
}, {
|
|
1503
|
+
default: Y(() => [N(c, {
|
|
1504
|
+
ref: "table",
|
|
1505
|
+
data: i.data,
|
|
1506
|
+
height: "100%",
|
|
1507
|
+
border: ""
|
|
1508
|
+
}, {
|
|
1509
|
+
default: Y(() => [N(o, {
|
|
1510
|
+
key: "label",
|
|
1511
|
+
align: "center",
|
|
1512
|
+
width: "100",
|
|
1513
|
+
"header-align": "center",
|
|
1514
|
+
prop: "label",
|
|
1515
|
+
label: "列名"
|
|
1516
|
+
}), (V(!0), k(T, null, W(a.defaultColumn, (e, t) => (V(), k(T, null, [e.hide === !0 ? O("v-if", !0) : (V(), D(o, {
|
|
1517
|
+
key: t,
|
|
1518
|
+
label: e.label,
|
|
1519
|
+
prop: e.prop,
|
|
1520
|
+
align: "center",
|
|
1521
|
+
"header-align": "center"
|
|
1522
|
+
}, {
|
|
1523
|
+
default: Y(({ row: t }) => [N(s, {
|
|
1524
|
+
modelValue: a.crud.objectOption[t.prop][e.prop],
|
|
1525
|
+
"onUpdate:modelValue": (n) => a.crud.objectOption[t.prop][e.prop] = n,
|
|
1526
|
+
onChange: (t) => a.handleChange(e.prop)
|
|
1527
|
+
}, null, 8, [
|
|
1528
|
+
"modelValue",
|
|
1529
|
+
"onUpdate:modelValue",
|
|
1530
|
+
"onChange"
|
|
1531
|
+
])]),
|
|
1532
|
+
_: 2
|
|
1533
|
+
}, 1032, ["label", "prop"]))], 64))), 256))]),
|
|
1534
|
+
_: 1
|
|
1535
|
+
}, 8, ["data"])]),
|
|
1536
|
+
_: 1
|
|
1537
|
+
}, 8, ["modelValue", "size"])])) : O("v-if", !0);
|
|
1538
|
+
}
|
|
1539
|
+
var ar = /* @__PURE__ */ y(nr, [["render", ir]]), or = {
|
|
1540
|
+
name: "FyDialogForm",
|
|
1541
|
+
components: { ElementDialog: ve },
|
|
1542
|
+
inject: ["crud"],
|
|
1543
|
+
data() {
|
|
1544
|
+
return {
|
|
1545
|
+
disabled: !1,
|
|
1546
|
+
boxType: "",
|
|
1547
|
+
fullscreen: !1,
|
|
1548
|
+
size: null,
|
|
1549
|
+
boxVisible: !1
|
|
1550
|
+
};
|
|
1551
|
+
},
|
|
1552
|
+
computed: {
|
|
1553
|
+
option() {
|
|
1554
|
+
let e = S(this.crud.tableOption);
|
|
1555
|
+
return e.boxType = this.boxType, e.column = S(this.crud.propOption), e.menuBtn = !1, this.isAdd ? (e.submitBtn = e.saveBtn, e.submitText = this.crud.menuIcon("saveBtn"), e.submitIcon = this.crud.getBtnIcon("saveBtn")) : this.isEdit ? (e.submitBtn = e.updateBtn, e.submitText = this.crud.menuIcon("updateBtn"), e.submitIcon = this.crud.getBtnIcon("updateBtn")) : this.isView && (e.detail = !0), e.emptyBtn = e.cancelBtn, e.emptyText = this.crud.menuIcon("cancelBtn"), e.emptyIcon = this.crud.getBtnIcon("cancelBtn"), this.crud.isGroup || (e.dicFlag = !1, e.dicData = this.crud.DIC), Q(e.dicFlag) || e.column.forEach((t) => {
|
|
1556
|
+
t.boxType = this.boxType, t.dicFlag = t.dicFlag || e.dicFlag;
|
|
1557
|
+
}), e;
|
|
1558
|
+
},
|
|
1559
|
+
isView() {
|
|
1560
|
+
return this.boxType === "view";
|
|
1561
|
+
},
|
|
1562
|
+
isAdd() {
|
|
1563
|
+
return this.boxType === "add";
|
|
1564
|
+
},
|
|
1565
|
+
isEdit() {
|
|
1566
|
+
return this.boxType === "edit";
|
|
1567
|
+
},
|
|
1568
|
+
direction() {
|
|
1569
|
+
return this.crud.tableOption.dialogDirection;
|
|
1570
|
+
},
|
|
1571
|
+
width() {
|
|
1572
|
+
return w(`${this.crud.tableOption.dialogWidth}`, this.crud.isMobile ? "100%" : `${$.dialogWidth}`);
|
|
1573
|
+
},
|
|
1574
|
+
dialogType() {
|
|
1575
|
+
return this.isDrawer ? ye : ve;
|
|
1576
|
+
},
|
|
1577
|
+
dialogTop() {
|
|
1578
|
+
return !this.isDrawer && !this.fullscreen ? this.crud.tableOption.dialogTop : "0";
|
|
1579
|
+
},
|
|
1580
|
+
isDrawer() {
|
|
1581
|
+
return this.crud.tableOption.dialogType === "drawer";
|
|
1582
|
+
},
|
|
1583
|
+
params() {
|
|
1584
|
+
return this.isDrawer ? {
|
|
1585
|
+
size: this.fullscreen ? "100%" : this.width,
|
|
1586
|
+
direction: this.crud.tableOption.dialogDirection
|
|
1587
|
+
} : {
|
|
1588
|
+
width: this.width,
|
|
1589
|
+
fullscreen: this.fullscreen
|
|
1590
|
+
};
|
|
1591
|
+
},
|
|
1592
|
+
dialogTitle() {
|
|
1593
|
+
let e = `${this.boxType}`;
|
|
1594
|
+
return Q(this.boxType) ? "" : this.crud.tableOption[`${e}Title`] || {
|
|
1595
|
+
tipStartTitle: "当前表格已选择",
|
|
1596
|
+
tipEndTitle: "项",
|
|
1597
|
+
editTitle: "编 辑",
|
|
1598
|
+
copyTitle: "复 制",
|
|
1599
|
+
addTitle: "新 增",
|
|
1600
|
+
viewTitle: "查 看",
|
|
1601
|
+
filterTitle: "过滤条件",
|
|
1602
|
+
showTitle: "列显隐"
|
|
1603
|
+
}[`${e}Title`];
|
|
1604
|
+
},
|
|
1605
|
+
dialogMenuPosition() {
|
|
1606
|
+
return this.crud.option.dialogMenuPosition || "right";
|
|
1607
|
+
}
|
|
1608
|
+
},
|
|
1609
|
+
methods: {
|
|
1610
|
+
optVal: w,
|
|
1611
|
+
uploadFun: He,
|
|
1612
|
+
submit() {
|
|
1613
|
+
this.$refs.tableForm.submit();
|
|
1614
|
+
},
|
|
1615
|
+
reset() {
|
|
1616
|
+
this.$refs.tableForm.resetForm(!1);
|
|
1617
|
+
},
|
|
1618
|
+
getSlotName(e) {
|
|
1619
|
+
return e.replace("Form", "");
|
|
1620
|
+
},
|
|
1621
|
+
initFun() {
|
|
1622
|
+
[
|
|
1623
|
+
"clearValidate",
|
|
1624
|
+
"validate",
|
|
1625
|
+
"resetForm",
|
|
1626
|
+
"validateField"
|
|
1627
|
+
].forEach((e) => {
|
|
1628
|
+
var t;
|
|
1629
|
+
this.crud[e] = (t = this.$refs.tableForm) == null ? void 0 : t[e];
|
|
1630
|
+
});
|
|
1631
|
+
},
|
|
1632
|
+
handleChange() {
|
|
1633
|
+
this.crud.setVal();
|
|
1634
|
+
},
|
|
1635
|
+
handleTabClick(e, t) {
|
|
1636
|
+
this.crud.$emit("tab-click", e, t);
|
|
1637
|
+
},
|
|
1638
|
+
handleFullScreen() {
|
|
1639
|
+
this.isDrawer && (Q(this.size) ? this.size = "100%" : this.size = ""), this.fullscreen = !this.fullscreen;
|
|
1640
|
+
},
|
|
1641
|
+
handleError(e) {
|
|
1642
|
+
this.crud.$emit("error", e);
|
|
1643
|
+
},
|
|
1644
|
+
handleSubmit(e, t) {
|
|
1645
|
+
this.isAdd ? this.rowSave(t) : this.isEdit && this.rowUpdate(t);
|
|
1646
|
+
},
|
|
1647
|
+
rowSave(e) {
|
|
1648
|
+
this.crud.$emit("row-save", C(this.crud.tableForm, ["$"]), this.closeDialog, e);
|
|
1649
|
+
},
|
|
1650
|
+
rowUpdate(e) {
|
|
1651
|
+
this.crud.$emit("row-update", C(this.crud.tableForm, ["$"]), this.crud.tableIndex, this.closeDialog, e);
|
|
1652
|
+
},
|
|
1653
|
+
closeDialog(e) {
|
|
1654
|
+
e = S(e), e && (() => {
|
|
1655
|
+
if (this.isEdit) {
|
|
1656
|
+
let { parentList: t, index: n } = this.crud.findData(e[this.crud.rowKey]);
|
|
1657
|
+
if (t) {
|
|
1658
|
+
let r = t.splice(n, 1)[0];
|
|
1659
|
+
e[this.crud.childrenKey] = r[this.crud.childrenKey], t.splice(n, 0, e);
|
|
1660
|
+
}
|
|
1661
|
+
} else if (this.isAdd) {
|
|
1662
|
+
let { item: t } = this.crud.findData(e[this.crud.rowParentKey]);
|
|
1663
|
+
t ? (t[this.crud.childrenKey] || (t[this.crud.childrenKey] = []), this.crud.tableOption.lazy && (t[this.crud.hasChildrenKey] = !0), t[this.crud.childrenKey].push(e)) : this.crud.list.push(e);
|
|
1664
|
+
}
|
|
1665
|
+
})(), this.hide();
|
|
1666
|
+
},
|
|
1667
|
+
hide(e) {
|
|
1668
|
+
let t = () => {
|
|
1669
|
+
e == null || e(), this.crud.tableIndex = -1, this.crud.tableForm = {}, this.crud.setVal(), this.boxVisible = !1;
|
|
1670
|
+
};
|
|
1671
|
+
typeof this.crud.beforeClose == "function" ? this.crud.beforeClose(t, this.boxType) : t();
|
|
1672
|
+
},
|
|
1673
|
+
show(e) {
|
|
1674
|
+
this.boxType = e;
|
|
1675
|
+
let t = () => {
|
|
1676
|
+
this.fullscreen = this.crud.tableOption.dialogFullscreen, this.boxVisible = !0, this.$nextTick(() => {
|
|
1677
|
+
this.initFun();
|
|
1678
|
+
});
|
|
1679
|
+
};
|
|
1680
|
+
typeof this.crud.beforeOpen == "function" ? this.crud.beforeOpen(t, this.boxType) : t();
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
};
|
|
1684
|
+
function sr(e, t, n, r, i, a) {
|
|
1685
|
+
let o = fi, s = b;
|
|
1686
|
+
return i.boxVisible ? (V(), D(kt(a.dialogType), L({
|
|
1687
|
+
key: 0,
|
|
1688
|
+
modelValue: i.boxVisible,
|
|
1689
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => i.boxVisible = e),
|
|
1690
|
+
"lock-scroll": "",
|
|
1691
|
+
"show-full-screen": "",
|
|
1692
|
+
"destroy-on-close": a.crud.tableOption.dialogDestroy,
|
|
1693
|
+
"wrapper-closable": a.crud.tableOption.dialogClickModal,
|
|
1694
|
+
direction: a.direction,
|
|
1695
|
+
class: "dialog-form",
|
|
1696
|
+
"custom-class": a.crud.tableOption.dialogCustomClass,
|
|
1697
|
+
"modal-append-to-body": "",
|
|
1698
|
+
"append-to-body": "",
|
|
1699
|
+
top: a.dialogTop,
|
|
1700
|
+
title: a.dialogTitle,
|
|
1701
|
+
"close-on-press-escape": a.crud.tableOption.dialogEscape,
|
|
1702
|
+
"close-on-click-modal": a.optVal(a.crud.tableOption.dialogClickModal, !1),
|
|
1703
|
+
modal: a.crud.tableOption.dialogModal,
|
|
1704
|
+
"show-close": a.crud.tableOption.dialogCloseBtn
|
|
1705
|
+
}, a.params, { "before-close": a.hide }), {
|
|
1706
|
+
footer: Y(() => [A("span", { class: R(["avue-dialog__footer", `avue-dialog__footer--${a.dialogMenuPosition}`]) }, [
|
|
1707
|
+
a.optVal(a.option.submitBtn, !0) && !a.isView ? (V(), D(s, {
|
|
1708
|
+
key: 0,
|
|
1709
|
+
loading: i.disabled,
|
|
1710
|
+
size: a.crud.controlSize,
|
|
1711
|
+
icon: a.option.submitIcon,
|
|
1712
|
+
type: "primary",
|
|
1713
|
+
onClick: a.submit
|
|
1714
|
+
}, {
|
|
1715
|
+
default: Y(() => [M(q(a.option.submitText), 1)]),
|
|
1716
|
+
_: 1
|
|
1717
|
+
}, 8, [
|
|
1718
|
+
"loading",
|
|
1719
|
+
"size",
|
|
1720
|
+
"icon",
|
|
1721
|
+
"onClick"
|
|
1722
|
+
])) : O("v-if", !0),
|
|
1723
|
+
a.optVal(a.option.emptyBtn, !0) && !a.isView ? (V(), D(s, {
|
|
1724
|
+
key: 1,
|
|
1725
|
+
disabled: i.disabled,
|
|
1726
|
+
size: a.crud.controlSize,
|
|
1727
|
+
icon: a.option.emptyIcon,
|
|
1728
|
+
onClick: a.reset
|
|
1729
|
+
}, {
|
|
1730
|
+
default: Y(() => [M(q(a.option.emptyText), 1)]),
|
|
1731
|
+
_: 1
|
|
1732
|
+
}, 8, [
|
|
1733
|
+
"disabled",
|
|
1734
|
+
"size",
|
|
1735
|
+
"icon",
|
|
1736
|
+
"onClick"
|
|
1737
|
+
])) : O("v-if", !0),
|
|
1738
|
+
G(e.$slots, "menuForm", {
|
|
1739
|
+
disabled: i.disabled,
|
|
1740
|
+
size: a.crud.controlSize,
|
|
1741
|
+
type: i.boxType
|
|
1742
|
+
})
|
|
1743
|
+
], 2)]),
|
|
1744
|
+
default: Y(() => [N(o, L({
|
|
1745
|
+
ref: "tableForm",
|
|
1746
|
+
modelValue: a.crud.tableForm,
|
|
1747
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => a.crud.tableForm = e),
|
|
1748
|
+
status: i.disabled,
|
|
1749
|
+
"onUpdate:status": t[1] || (t[1] = (e) => i.disabled = e)
|
|
1750
|
+
}, a.uploadFun({}, a.crud), {
|
|
1751
|
+
option: a.option,
|
|
1752
|
+
onChange: a.handleChange,
|
|
1753
|
+
onSubmit: a.handleSubmit,
|
|
1754
|
+
onResetChange: a.hide,
|
|
1755
|
+
onTabClick: a.handleTabClick,
|
|
1756
|
+
onError: a.handleError
|
|
1757
|
+
}), j({ _: 2 }, [W(a.crud.formSlot, (t) => ({
|
|
1758
|
+
name: a.getSlotName(t),
|
|
1759
|
+
fn: Y((n) => [G(e.$slots, t, z(F(Object.assign(n, { type: i.boxType }))))])
|
|
1760
|
+
}))]), 1040, [
|
|
1761
|
+
"modelValue",
|
|
1762
|
+
"status",
|
|
1763
|
+
"option",
|
|
1764
|
+
"onChange",
|
|
1765
|
+
"onSubmit",
|
|
1766
|
+
"onResetChange",
|
|
1767
|
+
"onTabClick",
|
|
1768
|
+
"onError"
|
|
1769
|
+
])]),
|
|
1770
|
+
_: 3
|
|
1771
|
+
}, 16, [
|
|
1772
|
+
"modelValue",
|
|
1773
|
+
"destroy-on-close",
|
|
1774
|
+
"wrapper-closable",
|
|
1775
|
+
"direction",
|
|
1776
|
+
"custom-class",
|
|
1777
|
+
"top",
|
|
1778
|
+
"title",
|
|
1779
|
+
"close-on-press-escape",
|
|
1780
|
+
"close-on-click-modal",
|
|
1781
|
+
"modal",
|
|
1782
|
+
"show-close",
|
|
1783
|
+
"before-close"
|
|
1784
|
+
])) : O("v-if", !0);
|
|
1785
|
+
}
|
|
1786
|
+
var cr = /* @__PURE__ */ y(or, [["render", sr]]), lr = {
|
|
1787
|
+
name: "TablePage",
|
|
1788
|
+
inject: ["crud"],
|
|
1789
|
+
data() {
|
|
1790
|
+
return { defaultPage: {
|
|
1791
|
+
single: !0,
|
|
1792
|
+
total: 0,
|
|
1793
|
+
pagerCount: 7,
|
|
1794
|
+
currentPage: 1,
|
|
1795
|
+
pageSize: 10,
|
|
1796
|
+
pageSizes: [
|
|
1797
|
+
10,
|
|
1798
|
+
20,
|
|
1799
|
+
30,
|
|
1800
|
+
40,
|
|
1801
|
+
50,
|
|
1802
|
+
100
|
|
1803
|
+
],
|
|
1804
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
1805
|
+
background: !0
|
|
1806
|
+
} };
|
|
1807
|
+
},
|
|
1808
|
+
computed: { pageFlag() {
|
|
1809
|
+
return this.defaultPage.total !== 0;
|
|
1810
|
+
} },
|
|
1811
|
+
watch: {
|
|
1812
|
+
"crud.page": {
|
|
1813
|
+
handler() {
|
|
1814
|
+
this.pageInit();
|
|
1815
|
+
},
|
|
1816
|
+
deep: !0
|
|
1817
|
+
},
|
|
1818
|
+
pageFlag() {
|
|
1819
|
+
this.crud.getTableHeight();
|
|
1820
|
+
},
|
|
1821
|
+
"defaultPage.total"() {
|
|
1822
|
+
this.defaultPage.total === (this.defaultPage.currentPage - 1) * this.defaultPage.pageSize && this.defaultPage.total !== 0 && (this.defaultPage.currentPage = this.defaultPage.currentPage - 1, this.currentChange(this.defaultPage.currentPage));
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
created() {
|
|
1826
|
+
this.crud.isMobile && (this.defaultPage.layout = "total, sizes, prev, pager, next"), this.pageInit(), this.crud.$emit("on-load", this.defaultPage);
|
|
1827
|
+
},
|
|
1828
|
+
methods: {
|
|
1829
|
+
optVal: w,
|
|
1830
|
+
pageInit() {
|
|
1831
|
+
this.defaultPage = Object.assign(this.defaultPage, this.crud.page), this.updateValue();
|
|
1832
|
+
},
|
|
1833
|
+
updateValue() {
|
|
1834
|
+
this.crud.$emit("update:page", this.defaultPage);
|
|
1835
|
+
},
|
|
1836
|
+
nextClick(e) {
|
|
1837
|
+
this.crud.$emit("next-click", e);
|
|
1838
|
+
},
|
|
1839
|
+
prevClick(e) {
|
|
1840
|
+
this.crud.$emit("prev-click", e);
|
|
1841
|
+
},
|
|
1842
|
+
sizeChange(e) {
|
|
1843
|
+
this.defaultPage.currentPage = 1, this.defaultPage.pageSize = e, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", e);
|
|
1844
|
+
},
|
|
1845
|
+
currentChange(e) {
|
|
1846
|
+
this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", e);
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
};
|
|
1850
|
+
function ur(e, t, n, r, i, a) {
|
|
1851
|
+
let o = we, s = It;
|
|
1852
|
+
return a.pageFlag && a.optVal(a.crud.tableOption.page, !0) ? (V(), D(s, {
|
|
1853
|
+
key: 0,
|
|
1854
|
+
shadow: a.crud.isCard,
|
|
1855
|
+
class: "avue-pagination"
|
|
1856
|
+
}, {
|
|
1857
|
+
default: Y(() => [G(e.$slots, "page"), N(o, {
|
|
1858
|
+
"current-page": i.defaultPage.currentPage,
|
|
1859
|
+
"onUpdate:currentPage": t[0] || (t[0] = (e) => i.defaultPage.currentPage = e),
|
|
1860
|
+
small: a.crud.size === "mini",
|
|
1861
|
+
style: { "margin-top": "25px" },
|
|
1862
|
+
disabled: i.defaultPage.disabled,
|
|
1863
|
+
"hide-on-single-page": i.defaultPage.single,
|
|
1864
|
+
"pager-count": i.defaultPage.pagerCount,
|
|
1865
|
+
background: i.defaultPage.background,
|
|
1866
|
+
"page-size": i.defaultPage.pageSize,
|
|
1867
|
+
"page-sizes": i.defaultPage.pageSizes,
|
|
1868
|
+
layout: i.defaultPage.layout,
|
|
1869
|
+
total: i.defaultPage.total,
|
|
1870
|
+
onSizeChange: a.sizeChange,
|
|
1871
|
+
onPrevClick: a.prevClick,
|
|
1872
|
+
onNextClick: a.nextClick,
|
|
1873
|
+
onCurrentChange: a.currentChange
|
|
1874
|
+
}, null, 8, [
|
|
1875
|
+
"current-page",
|
|
1876
|
+
"small",
|
|
1877
|
+
"disabled",
|
|
1878
|
+
"hide-on-single-page",
|
|
1879
|
+
"pager-count",
|
|
1880
|
+
"background",
|
|
1881
|
+
"page-size",
|
|
1882
|
+
"page-sizes",
|
|
1883
|
+
"layout",
|
|
1884
|
+
"total",
|
|
1885
|
+
"onSizeChange",
|
|
1886
|
+
"onPrevClick",
|
|
1887
|
+
"onNextClick",
|
|
1888
|
+
"onCurrentChange"
|
|
1889
|
+
])]),
|
|
1890
|
+
_: 3
|
|
1891
|
+
}, 8, ["shadow"])) : O("v-if", !0);
|
|
1892
|
+
}
|
|
1893
|
+
var dr = /* @__PURE__ */ y(lr, [["render", ur]]), fr = {}, pr = {
|
|
1894
|
+
name: "ColumnSlot",
|
|
1895
|
+
inject: ["dynamic", "crud"],
|
|
1896
|
+
props: {
|
|
1897
|
+
column: Object,
|
|
1898
|
+
columnOption: Array
|
|
1899
|
+
},
|
|
1900
|
+
created() {
|
|
1901
|
+
let e = [
|
|
1902
|
+
"getColumnProp",
|
|
1903
|
+
"handleFilterMethod",
|
|
1904
|
+
"handleFilters"
|
|
1905
|
+
];
|
|
1906
|
+
Object.keys(this.dynamic).forEach((t) => {
|
|
1907
|
+
e.includes(t) && (this[t] = this.dynamic[t]);
|
|
1908
|
+
});
|
|
1909
|
+
},
|
|
1910
|
+
methods: {
|
|
1911
|
+
isBlank: Q,
|
|
1912
|
+
optVal: w,
|
|
1913
|
+
uploadFun: He,
|
|
1914
|
+
isMediaType(e, t) {
|
|
1915
|
+
return oe(e, t);
|
|
1916
|
+
},
|
|
1917
|
+
vaildLabel(e, t, n) {
|
|
1918
|
+
if (e.rules && t.$cellEdit) return n;
|
|
1919
|
+
},
|
|
1920
|
+
columnChange(e, t, n) {
|
|
1921
|
+
let r = `${n}-${t.prop}`;
|
|
1922
|
+
fr[r] || (this.handleChange(t, e), typeof t.change == "function" && t.cell === !0 && t.change({
|
|
1923
|
+
row: e,
|
|
1924
|
+
column: t,
|
|
1925
|
+
index: n,
|
|
1926
|
+
value: e[t.prop]
|
|
1927
|
+
})), fr[r] = !0, this.$nextTick(() => {
|
|
1928
|
+
fr[r] = !1;
|
|
1929
|
+
});
|
|
1930
|
+
},
|
|
1931
|
+
handleChange(e, t) {
|
|
1932
|
+
e.cascader && this.$nextTick(() => {
|
|
1933
|
+
let n = e.cascader;
|
|
1934
|
+
n.forEach((r) => {
|
|
1935
|
+
let i = r, a = t[e.prop], o = t.$index, s = this.findObject(this.columnOption, i);
|
|
1936
|
+
Q(s) || (Q(this.crud.cascaderDIC[o]) && (this.crud.cascaderDIC[o] = {}), this.crud.cascaderIndexList.includes(o) && n.forEach((e) => {
|
|
1937
|
+
this.crud.cascaderDIC[o][e.prop] = [], n.forEach((e) => t[e] = "");
|
|
1938
|
+
}), !(Q(n) || Q(a) || Q(s)) && at({
|
|
1939
|
+
column: s,
|
|
1940
|
+
value: a,
|
|
1941
|
+
form: t
|
|
1942
|
+
}).then((e) => {
|
|
1943
|
+
let n = e || [];
|
|
1944
|
+
this.crud.cascaderIndexList.includes(o) || this.crud.cascaderIndexList.push(o), this.crud.cascaderDicList[o] || (this.crud.cascaderDicList[o] = {}), this.crud.cascaderDicList[o][i] || (this.crud.cascaderDicList[o][i] = n), this.crud.cascaderDIC[o][i] = n, !Q(n[s.cascaderIndex]) && !Q(n) && !Q(s.cascaderIndex) && (t[i] = n[s.cascaderIndex][(s.props || {}).value || x.value]);
|
|
1945
|
+
}));
|
|
1946
|
+
});
|
|
1947
|
+
});
|
|
1948
|
+
},
|
|
1949
|
+
handleDetail(e, t) {
|
|
1950
|
+
let n = t.parentProp ? (this.crud.cascaderDIC[e.$index] || {})[t.prop] : this.crud.DIC[t.prop], r = Xn(e, t, this.crud.tableOption, n);
|
|
1951
|
+
return !Q(n) && this.crud.tableOption.filterDic !== !0 && (e[`$${t.prop}`] = r), r;
|
|
1952
|
+
},
|
|
1953
|
+
corArray(e, t) {
|
|
1954
|
+
let n = this.handleDetail(e, t);
|
|
1955
|
+
return Array.isArray(n) || (n = Q(n) ? [] : n.split(" | ")), S(n);
|
|
1956
|
+
},
|
|
1957
|
+
openImg(e, t, n) {
|
|
1958
|
+
let r = this.getImgList(e, t);
|
|
1959
|
+
r = r.map((e) => ({
|
|
1960
|
+
thumbUrl: e,
|
|
1961
|
+
url: e,
|
|
1962
|
+
type: t.fileType
|
|
1963
|
+
})), this.$ImagePreview(r, n);
|
|
1964
|
+
},
|
|
1965
|
+
getImgList(e, t) {
|
|
1966
|
+
var n, r;
|
|
1967
|
+
let i = ((n = t.propsHttp) == null ? void 0 : n.home) || "", a = ((r = t.props) == null ? void 0 : r.value) || x.value, o = this.corArray(e, t);
|
|
1968
|
+
return o.forEach((e, t) => {
|
|
1969
|
+
o[t] = i + (e[a] ? e[a] : e);
|
|
1970
|
+
}), o;
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}, mr = { key: 1 }, hr = {
|
|
1974
|
+
key: 0,
|
|
1975
|
+
class: "avue-crud__img"
|
|
1976
|
+
}, gr = ["src", "onClick"], _r = { key: 1 }, vr = { key: 2 }, yr = ["innerHTML"], br = ["textContent"];
|
|
1977
|
+
function xr(e, t, n, r, i, a) {
|
|
1978
|
+
let o = si, s = g, c = _, l = Te, d = ft, f = dt, p = u;
|
|
1979
|
+
return e.getColumnProp(n.column, "hide") ? (V(), D(p, {
|
|
1980
|
+
key: n.column.prop,
|
|
1981
|
+
prop: n.column.prop,
|
|
1982
|
+
label: n.column.label,
|
|
1983
|
+
"column-key": n.column.prop,
|
|
1984
|
+
"filter-placement": "bottom-end",
|
|
1985
|
+
filters: e.getColumnProp(n.column, "filters"),
|
|
1986
|
+
"filter-method": e.getColumnProp(n.column, "filterMethod") ? e.handleFilterMethod : void 0,
|
|
1987
|
+
"filter-multiple": a.optVal(n.column.filterMultiple, !0),
|
|
1988
|
+
"show-overflow-tooltip": n.column.overHidden,
|
|
1989
|
+
"min-width": n.column.minWidth,
|
|
1990
|
+
sortable: e.getColumnProp(n.column, "sortable"),
|
|
1991
|
+
"sort-method": n.column.sortMethod,
|
|
1992
|
+
"sort-orders": n.column.sortOrders,
|
|
1993
|
+
"sort-by": n.column.sortBy,
|
|
1994
|
+
resizable: n.column.resizable,
|
|
1995
|
+
"render-header": n.column.renderHeader,
|
|
1996
|
+
align: n.column.align || a.crud.tableOption.align,
|
|
1997
|
+
"header-align": n.column.headerAlign || a.crud.tableOption.headerAlign,
|
|
1998
|
+
width: e.getColumnProp(n.column, "width"),
|
|
1999
|
+
fixed: e.getColumnProp(n.column, "fixed")
|
|
2000
|
+
}, {
|
|
2001
|
+
header: Y(({ $index: t }) => [a.crud.getSlotName(n.column, "H", a.crud.$slots) ? G(e.$slots, a.crud.getSlotName(n.column, "H"), z(L({ key: 0 }, {
|
|
2002
|
+
column: n.column,
|
|
2003
|
+
$index: t
|
|
2004
|
+
}))) : (V(), k("span", mr, q(n.column.label), 1))]),
|
|
2005
|
+
default: Y(({ row: t, $index: r }) => [t.$cellEdit && n.column.cell ? (V(), D(c, {
|
|
2006
|
+
key: 0,
|
|
2007
|
+
prop: a.crud.isTree ? "" : `list.${r}.${n.column.prop}`,
|
|
2008
|
+
label: a.vaildLabel(n.column, t, " "),
|
|
2009
|
+
"label-width": a.vaildLabel(n.column, t, "1px"),
|
|
2010
|
+
rules: n.column.rules
|
|
2011
|
+
}, {
|
|
2012
|
+
default: Y(() => [N(s, {
|
|
2013
|
+
content: (a.crud.listError[`list.${r}.${n.column.prop}`] || {}).msg,
|
|
2014
|
+
disabled: !(a.crud.listError[`list.${r}.${n.column.prop}`] || {}).valid,
|
|
2015
|
+
placement: "top"
|
|
2016
|
+
}, {
|
|
2017
|
+
default: Y(() => [a.crud.getSlotName(n.column, "F", a.crud.$slots) ? G(e.$slots, a.crud.getSlotName(n.column, "F"), z(L({ key: 0 }, {
|
|
2018
|
+
row: t,
|
|
2019
|
+
dic: a.crud.DIC[n.column.prop],
|
|
2020
|
+
size: a.crud.isMediumSize,
|
|
2021
|
+
index: r,
|
|
2022
|
+
disabled: a.crud.btnDisabledList[r],
|
|
2023
|
+
label: a.handleDetail(t, n.column),
|
|
2024
|
+
$cell: t.$cellEdit
|
|
2025
|
+
}))) : (V(), D(o, L({ key: 1 }, a.uploadFun(n.column, a.crud), {
|
|
2026
|
+
modelValue: t[n.column.prop],
|
|
2027
|
+
"onUpdate:modelValue": (e) => t[n.column.prop] = e,
|
|
2028
|
+
column: n.column,
|
|
2029
|
+
size: a.crud.isMediumSize,
|
|
2030
|
+
"table-data": {
|
|
2031
|
+
index: r,
|
|
2032
|
+
row: t,
|
|
2033
|
+
label: a.handleDetail(t, n.column)
|
|
2034
|
+
},
|
|
2035
|
+
dic: (a.crud.cascaderDIC[r] || {})[n.column.prop] || a.crud.DIC[n.column.prop],
|
|
2036
|
+
props: n.column.props || a.crud.tableOption.props,
|
|
2037
|
+
readonly: n.column.readonly,
|
|
2038
|
+
disabled: a.crud.disabled || a.crud.tableOption.disabled || n.column.disabled || a.crud.btnDisabledList[r],
|
|
2039
|
+
clearable: a.optVal(n.column.clearable, !1),
|
|
2040
|
+
"column-slot": a.crud.mainSlot,
|
|
2041
|
+
onChange: (e) => a.columnChange(t, n.column, r)
|
|
2042
|
+
}), j({ _: 2 }, [W(a.crud.mainSlot, (t) => ({
|
|
2043
|
+
name: t,
|
|
2044
|
+
fn: Y((n) => [G(e.$slots, t, z(F(n)))])
|
|
2045
|
+
}))]), 1040, [
|
|
2046
|
+
"modelValue",
|
|
2047
|
+
"onUpdate:modelValue",
|
|
2048
|
+
"column",
|
|
2049
|
+
"size",
|
|
2050
|
+
"table-data",
|
|
2051
|
+
"dic",
|
|
2052
|
+
"props",
|
|
2053
|
+
"readonly",
|
|
2054
|
+
"disabled",
|
|
2055
|
+
"clearable",
|
|
2056
|
+
"column-slot",
|
|
2057
|
+
"onChange"
|
|
2058
|
+
]))]),
|
|
2059
|
+
_: 2
|
|
2060
|
+
}, 1032, ["content", "disabled"])]),
|
|
2061
|
+
_: 2
|
|
2062
|
+
}, 1032, [
|
|
2063
|
+
"prop",
|
|
2064
|
+
"label",
|
|
2065
|
+
"label-width",
|
|
2066
|
+
"rules"
|
|
2067
|
+
])) : a.crud.$slots[n.column.prop] ? G(e.$slots, n.column.prop, {
|
|
2068
|
+
key: 1,
|
|
2069
|
+
row: t,
|
|
2070
|
+
index: r,
|
|
2071
|
+
dic: a.crud.DIC[n.column.prop],
|
|
2072
|
+
size: a.crud.isMediumSize,
|
|
2073
|
+
label: a.handleDetail(t, n.column)
|
|
2074
|
+
}) : (V(), k(T, { key: 2 }, [["img", "upload"].includes(n.column.type) ? (V(), k("span", hr, [(V(!0), k(T, null, W(a.getImgList(t, n.column), (e, r) => (V(), k(T, null, [a.isMediaType(e, n.column.fileType) ? (V(), D(kt(a.isMediaType(e, n.column.fileType)), {
|
|
2075
|
+
key: r,
|
|
2076
|
+
src: e,
|
|
2077
|
+
onClick: Z((e) => a.openImg(t, n.column, r), ["stop"])
|
|
2078
|
+
}, null, 8, ["src", "onClick"])) : (V(), k("i", {
|
|
2079
|
+
key: `e_${r}`,
|
|
2080
|
+
src: e,
|
|
2081
|
+
class: "el-icon-document",
|
|
2082
|
+
onClick: Z((e) => a.openImg(t, n.column, r), ["stop"])
|
|
2083
|
+
}, null, 8, gr))], 64))), 256))])) : n.column.type === "url" ? (V(), k("span", _r, [(V(!0), k(T, null, W(a.corArray(t, n.column), (e, t) => (V(), D(l, {
|
|
2084
|
+
key: t,
|
|
2085
|
+
type: "primary",
|
|
2086
|
+
href: e,
|
|
2087
|
+
target: n.column.target || "_blank"
|
|
2088
|
+
}, {
|
|
2089
|
+
default: Y(() => [M(q(e), 1)]),
|
|
2090
|
+
_: 2
|
|
2091
|
+
}, 1032, ["href", "target"]))), 128))])) : n.column.type === "rate" ? (V(), k("span", vr, [N(d, {
|
|
2092
|
+
modelValue: t[n.column.prop],
|
|
2093
|
+
"onUpdate:modelValue": (e) => t[n.column.prop] = e,
|
|
2094
|
+
disabled: ""
|
|
2095
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])])) : n.column.type === "color" ? (V(), k("i", {
|
|
2096
|
+
key: 3,
|
|
2097
|
+
class: "avue-crud__color",
|
|
2098
|
+
style: B({ backgroundColor: t[n.column.prop] })
|
|
2099
|
+
}, null, 4)) : n.column.type === "icon" ? (V(), D(f, {
|
|
2100
|
+
key: 4,
|
|
2101
|
+
text: t[n.column.prop]
|
|
2102
|
+
}, null, 8, ["text"])) : n.column.html ? (V(), k("span", {
|
|
2103
|
+
key: 5,
|
|
2104
|
+
innerHTML: a.handleDetail(t, n.column)
|
|
2105
|
+
}, null, 8, yr)) : (V(), k("span", {
|
|
2106
|
+
key: 6,
|
|
2107
|
+
textContent: q(a.handleDetail(t, n.column))
|
|
2108
|
+
}, null, 8, br))], 64))]),
|
|
2109
|
+
_: 3
|
|
2110
|
+
}, 8, [
|
|
2111
|
+
"prop",
|
|
2112
|
+
"label",
|
|
2113
|
+
"column-key",
|
|
2114
|
+
"filters",
|
|
2115
|
+
"filter-method",
|
|
2116
|
+
"filter-multiple",
|
|
2117
|
+
"show-overflow-tooltip",
|
|
2118
|
+
"min-width",
|
|
2119
|
+
"sortable",
|
|
2120
|
+
"sort-method",
|
|
2121
|
+
"sort-orders",
|
|
2122
|
+
"sort-by",
|
|
2123
|
+
"resizable",
|
|
2124
|
+
"render-header",
|
|
2125
|
+
"align",
|
|
2126
|
+
"header-align",
|
|
2127
|
+
"width",
|
|
2128
|
+
"fixed"
|
|
2129
|
+
])) : O("v-if", !0);
|
|
2130
|
+
}
|
|
2131
|
+
var Sr = /* @__PURE__ */ y(pr, [["render", xr]]), Cr = {
|
|
2132
|
+
name: "ColumnDynamic",
|
|
2133
|
+
inject: ["dynamic", "crud"],
|
|
2134
|
+
props: { columnOption: Object },
|
|
2135
|
+
created() {
|
|
2136
|
+
let e = [
|
|
2137
|
+
"getColumnProp",
|
|
2138
|
+
"handleFilterMethod",
|
|
2139
|
+
"handleFilters"
|
|
2140
|
+
];
|
|
2141
|
+
Object.keys(this.dynamic).forEach((t) => {
|
|
2142
|
+
e.includes(t) && (this[t] = this.dynamic[t]);
|
|
2143
|
+
});
|
|
2144
|
+
},
|
|
2145
|
+
methods: { optVal: w }
|
|
2146
|
+
};
|
|
2147
|
+
function wr(e, t, n, r, i, a) {
|
|
2148
|
+
let o = K("ColumnDynamic", !0), s = Sr, c = u;
|
|
2149
|
+
return e.getColumnProp(n.columnOption, "hide") ? (V(), D(c, {
|
|
2150
|
+
key: n.columnOption.prop,
|
|
2151
|
+
prop: n.columnOption.prop,
|
|
2152
|
+
label: n.columnOption.label,
|
|
2153
|
+
"filter-placement": "bottom-end",
|
|
2154
|
+
filters: e.getColumnProp(n.columnOption, "filters"),
|
|
2155
|
+
"filter-method": e.getColumnProp(n.columnOption, "filterMethod") ? e.handleFilterMethod : void 0,
|
|
2156
|
+
"filter-multiple": a.optVal(n.columnOption.filterMultiple, !0),
|
|
2157
|
+
"show-overflow-tooltip": n.columnOption.overHidden,
|
|
2158
|
+
"min-width": n.columnOption.minWidth,
|
|
2159
|
+
sortable: e.getColumnProp(n.columnOption, "sortable"),
|
|
2160
|
+
"render-header": n.columnOption.renderHeader,
|
|
2161
|
+
align: n.columnOption.align || a.crud.tableOption.align,
|
|
2162
|
+
"header-align": n.columnOption.headerAlign || a.crud.tableOption.headerAlign,
|
|
2163
|
+
width: e.getColumnProp(n.columnOption, "width"),
|
|
2164
|
+
fixed: e.getColumnProp(n.columnOption, "fixed")
|
|
2165
|
+
}, {
|
|
2166
|
+
default: Y(() => [(V(!0), k(T, null, W(n.columnOption.children, (t) => (V(), k(T, null, [t.children && t.children.length > 0 ? (V(), D(o, {
|
|
2167
|
+
key: t.prop,
|
|
2168
|
+
"column-option": t
|
|
2169
|
+
}, j({ _: 2 }, [W(a.crud.mainSlot, (t) => ({
|
|
2170
|
+
name: t,
|
|
2171
|
+
fn: Y((n) => [G(e.$slots, t, L({ ref_for: !0 }, n))])
|
|
2172
|
+
}))]), 1032, ["column-option"])) : (V(), D(s, {
|
|
2173
|
+
key: t.prop,
|
|
2174
|
+
column: t,
|
|
2175
|
+
"column-option": n.columnOption.children
|
|
2176
|
+
}, j({ _: 2 }, [W(a.crud.mainSlot, (t) => ({
|
|
2177
|
+
name: t,
|
|
2178
|
+
fn: Y((n) => [G(e.$slots, t, L({ ref_for: !0 }, n))])
|
|
2179
|
+
}))]), 1032, ["column", "column-option"]))], 64))), 256))]),
|
|
2180
|
+
_: 3
|
|
2181
|
+
}, 8, [
|
|
2182
|
+
"prop",
|
|
2183
|
+
"label",
|
|
2184
|
+
"filters",
|
|
2185
|
+
"filter-method",
|
|
2186
|
+
"filter-multiple",
|
|
2187
|
+
"show-overflow-tooltip",
|
|
2188
|
+
"min-width",
|
|
2189
|
+
"sortable",
|
|
2190
|
+
"render-header",
|
|
2191
|
+
"align",
|
|
2192
|
+
"header-align",
|
|
2193
|
+
"width",
|
|
2194
|
+
"fixed"
|
|
2195
|
+
])) : O("v-if", !0);
|
|
2196
|
+
}
|
|
2197
|
+
var Tr = /* @__PURE__ */ y(Cr, [["render", wr]]), Er = {
|
|
2198
|
+
name: "Column",
|
|
2199
|
+
inject: ["crud"],
|
|
2200
|
+
provide() {
|
|
2201
|
+
return {
|
|
2202
|
+
crud: this.crud,
|
|
2203
|
+
dynamic: this
|
|
2204
|
+
};
|
|
2205
|
+
},
|
|
2206
|
+
props: { columnOption: Array },
|
|
2207
|
+
computed: { list() {
|
|
2208
|
+
let e = [...this.columnOption];
|
|
2209
|
+
return e = Ve(e, "index", (e, t) => {
|
|
2210
|
+
var n, r;
|
|
2211
|
+
return ((n = this.crud.objectOption[e.prop]) == null ? void 0 : n.index) - ((r = this.crud.objectOption[t.prop]) == null ? void 0 : r.index);
|
|
2212
|
+
}), e;
|
|
2213
|
+
} },
|
|
2214
|
+
methods: {
|
|
2215
|
+
handleFilterMethod(e, t, n) {
|
|
2216
|
+
let r = this.columnOption.filter((e) => e.prop === n.property)[0];
|
|
2217
|
+
return typeof r.filterMethod == "function" ? r.filterMethod(e, t, r) : t[r.prop] === e;
|
|
2218
|
+
},
|
|
2219
|
+
handleFilters(e, t) {
|
|
2220
|
+
if (t !== !0) return;
|
|
2221
|
+
let n = this.crud.DIC[e.prop] || [], r = [];
|
|
2222
|
+
return Q(n) ? this.crud.cellForm.list.forEach((t) => {
|
|
2223
|
+
r.map((e) => e.text).includes(t[e.prop]) || r.push({
|
|
2224
|
+
text: t[e.prop],
|
|
2225
|
+
value: t[e.prop]
|
|
2226
|
+
});
|
|
2227
|
+
}) : n.forEach((t) => {
|
|
2228
|
+
let n = e.props || this.crud.tableOption.props || {};
|
|
2229
|
+
r.push({
|
|
2230
|
+
text: t[n.label || x.label],
|
|
2231
|
+
value: t[n.value || x.value]
|
|
2232
|
+
});
|
|
2233
|
+
}), r;
|
|
2234
|
+
},
|
|
2235
|
+
getColumnProp(e, t) {
|
|
2236
|
+
let n = this.crud.objectOption[e.prop] || {};
|
|
2237
|
+
if (t === "filterMethod") return n == null ? void 0 : n.filters;
|
|
2238
|
+
if (this.crud.isMobile && ["fixed"].includes(t)) return !1;
|
|
2239
|
+
let r = n == null ? void 0 : n[t];
|
|
2240
|
+
if (!(t === "width" && r === 0)) return t === "filters" ? this.handleFilters(e, r) : t === "hide" ? (n == null ? void 0 : n.hide) !== !0 : r;
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
};
|
|
2244
|
+
function Dr(e, t, n, r, i, a) {
|
|
2245
|
+
let o = Tr, s = Sr;
|
|
2246
|
+
return V(), k(T, null, [
|
|
2247
|
+
G(e.$slots, "header"),
|
|
2248
|
+
O(" 动态列 "),
|
|
2249
|
+
(V(!0), k(T, null, W(a.list, (t) => (V(), k(T, null, [t.children && t.children.length > 0 ? (V(), D(o, {
|
|
2250
|
+
key: t.pop,
|
|
2251
|
+
"column-option": t
|
|
2252
|
+
}, j({ _: 2 }, [W(a.crud.mainSlot, (t) => ({
|
|
2253
|
+
name: t,
|
|
2254
|
+
fn: Y((n) => [G(e.$slots, t, L({ ref_for: !0 }, n))])
|
|
2255
|
+
}))]), 1032, ["column-option"])) : (V(), D(s, {
|
|
2256
|
+
key: t.prop,
|
|
2257
|
+
column: t,
|
|
2258
|
+
"column-option": n.columnOption
|
|
2259
|
+
}, j({ _: 2 }, [W(a.crud.mainSlot, (t) => ({
|
|
2260
|
+
name: t,
|
|
2261
|
+
fn: Y((n) => [G(e.$slots, t, L({ ref_for: !0 }, n))])
|
|
2262
|
+
}))]), 1032, ["column", "column-option"]))], 64))), 256)),
|
|
2263
|
+
G(e.$slots, "footer")
|
|
2264
|
+
], 64);
|
|
2265
|
+
}
|
|
2266
|
+
var Or = /* @__PURE__ */ y(Er, [["render", Dr]]), kr = (() => {
|
|
2267
|
+
function e(e, t) {
|
|
2268
|
+
t.value === !1 ? e.style.display = "none" : e.style.display = "";
|
|
2269
|
+
}
|
|
2270
|
+
return {
|
|
2271
|
+
bind(t, n) {
|
|
2272
|
+
e(t, n);
|
|
2273
|
+
},
|
|
2274
|
+
update(t, n) {
|
|
2275
|
+
e(t, n);
|
|
2276
|
+
}
|
|
2277
|
+
};
|
|
2278
|
+
})(), Ar = {
|
|
2279
|
+
name: "ColumnMenu",
|
|
2280
|
+
directives: { permission: kr },
|
|
2281
|
+
inject: {
|
|
2282
|
+
crud: { from: "crud" },
|
|
2283
|
+
AVUE: {
|
|
2284
|
+
from: je,
|
|
2285
|
+
default: null
|
|
2286
|
+
}
|
|
2287
|
+
},
|
|
2288
|
+
data() {
|
|
2289
|
+
return { config: $ };
|
|
2290
|
+
},
|
|
2291
|
+
computed: {
|
|
2292
|
+
menuType() {
|
|
2293
|
+
var e;
|
|
2294
|
+
return this.crud.tableOption.menuType || ((e = this.AVUE) == null ? void 0 : e.menuType) || "button";
|
|
2295
|
+
},
|
|
2296
|
+
isIconMenu() {
|
|
2297
|
+
return this.menuType === "icon";
|
|
2298
|
+
},
|
|
2299
|
+
isTextMenu() {
|
|
2300
|
+
return this.menuType === "text";
|
|
2301
|
+
},
|
|
2302
|
+
isMenu() {
|
|
2303
|
+
return this.menuType === "menu";
|
|
2304
|
+
}
|
|
2305
|
+
},
|
|
2306
|
+
methods: {
|
|
2307
|
+
optVal: w,
|
|
2308
|
+
menuText(e) {
|
|
2309
|
+
return ["text", "menu"].includes(this.menuType) ? "text" : e;
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
};
|
|
2313
|
+
function jr(e, t, n, r, i, a) {
|
|
2314
|
+
let o = b, s = Fn, c = In, l = Pn, d = u, f = Ot("permission");
|
|
2315
|
+
return V(), k(T, null, [O(" 操作栏 "), a.optVal(a.crud.tableOption.menu, i.config.menu) && a.crud.getPermission("menu") ? (V(), D(d, {
|
|
2316
|
+
key: "menu",
|
|
2317
|
+
class: "avue-crud__btn",
|
|
2318
|
+
prop: "menu",
|
|
2319
|
+
fixed: a.optVal(a.crud.tableOption.menuFixed, i.config.menuFixed),
|
|
2320
|
+
label: a.crud.tableOption.menuTitle || "操作",
|
|
2321
|
+
align: a.crud.tableOption.menuAlign || i.config.menuAlign,
|
|
2322
|
+
"header-align": a.crud.tableOption.menuHeaderAlign || i.config.menuHeaderAlign,
|
|
2323
|
+
width: a.crud.isMobile ? a.crud.tableOption.menuXsWidth || i.config.menuXsWidth : a.crud.tableOption.menuWidth || i.config.menuWidth
|
|
2324
|
+
}, {
|
|
2325
|
+
default: Y(({ row: n, $index: r }) => [a.isMenu ? (V(), D(l, {
|
|
2326
|
+
key: 0,
|
|
2327
|
+
size: a.crud.isMediumSize
|
|
2328
|
+
}, {
|
|
2329
|
+
dropdown: Y(() => [N(c, null, {
|
|
2330
|
+
default: Y(() => [
|
|
2331
|
+
a.optVal(a.crud.tableOption.viewBtn, i.config.viewBtn) ? X((V(), D(s, {
|
|
2332
|
+
key: 0,
|
|
2333
|
+
icon: a.crud.getBtnIcon("viewBtn"),
|
|
2334
|
+
onClick: (e) => a.crud.rowView(n, r)
|
|
2335
|
+
}, {
|
|
2336
|
+
default: Y(() => [M(q(a.crud.menuIcon("viewBtn")), 1)]),
|
|
2337
|
+
_: 1
|
|
2338
|
+
}, 8, ["icon", "onClick"])), [[f, a.crud.getPermission("viewBtn", n, r)]]) : O("v-if", !0),
|
|
2339
|
+
a.optVal(a.crud.tableOption.editBtn, i.config.editBtn) ? X((V(), D(s, {
|
|
2340
|
+
key: 1,
|
|
2341
|
+
icon: a.crud.getBtnIcon("editBtn"),
|
|
2342
|
+
onClick: (e) => a.crud.rowEdit(n, r)
|
|
2343
|
+
}, {
|
|
2344
|
+
default: Y(() => [M(q(a.crud.menuIcon("editBtn")), 1)]),
|
|
2345
|
+
_: 1
|
|
2346
|
+
}, 8, ["icon", "onClick"])), [[f, a.crud.getPermission("editBtn", n, r)]]) : O("v-if", !0),
|
|
2347
|
+
a.optVal(a.crud.tableOption.copyBtn, i.config.copyBtn) ? X((V(), D(s, {
|
|
2348
|
+
key: 2,
|
|
2349
|
+
icon: a.crud.getBtnIcon("copyBtn"),
|
|
2350
|
+
onClick: (e) => a.crud.rowCopy(n)
|
|
2351
|
+
}, {
|
|
2352
|
+
default: Y(() => [M(q(a.crud.menuIcon("copyBtn")), 1)]),
|
|
2353
|
+
_: 1
|
|
2354
|
+
}, 8, ["icon", "onClick"])), [[f, a.crud.getPermission("copyBtn", n, r)]]) : O("v-if", !0),
|
|
2355
|
+
a.optVal(a.crud.tableOption.delBtn, i.config.delBtn) ? X((V(), D(s, {
|
|
2356
|
+
key: 3,
|
|
2357
|
+
icon: a.crud.getBtnIcon("delBtn"),
|
|
2358
|
+
onClick: (e) => a.crud.rowDel(n, r)
|
|
2359
|
+
}, {
|
|
2360
|
+
default: Y(() => [M(q(a.crud.menuIcon("delBtn")), 1)]),
|
|
2361
|
+
_: 1
|
|
2362
|
+
}, 8, ["icon", "onClick"])), [[f, a.crud.getPermission("delBtn", n, r)]]) : O("v-if", !0),
|
|
2363
|
+
G(e.$slots, "menuBtn", {
|
|
2364
|
+
row: n,
|
|
2365
|
+
type: a.menuText("primary"),
|
|
2366
|
+
disabled: a.crud.btnDisabled,
|
|
2367
|
+
size: a.crud.isMediumSize,
|
|
2368
|
+
index: r
|
|
2369
|
+
})
|
|
2370
|
+
]),
|
|
2371
|
+
_: 2
|
|
2372
|
+
}, 1024)]),
|
|
2373
|
+
default: Y(() => [N(o, {
|
|
2374
|
+
text: "",
|
|
2375
|
+
size: a.crud.isMediumSize
|
|
2376
|
+
}, {
|
|
2377
|
+
default: Y(() => [M(q(a.crud.tableOption.menuBtnTitle || "按钮") + " ", 1), t[0] || (t[0] = A("i", { class: "el-icon-arrow-down el-icon--right" }, null, -1))]),
|
|
2378
|
+
_: 1
|
|
2379
|
+
}, 8, ["size"])]),
|
|
2380
|
+
_: 2
|
|
2381
|
+
}, 1032, ["size"])) : [
|
|
2382
|
+
"button",
|
|
2383
|
+
"text",
|
|
2384
|
+
"icon"
|
|
2385
|
+
].includes(a.menuType) ? (V(), k(T, { key: 1 }, [
|
|
2386
|
+
a.optVal(a.crud.tableOption.cellBtn, i.config.cellBtn) ? (V(), k(T, { key: 0 }, [a.optVal(a.crud.tableOption.editBtn, i.config.editBtn) && !n.$cellEdit ? X((V(), D(o, {
|
|
2387
|
+
key: 0,
|
|
2388
|
+
type: a.menuText("primary"),
|
|
2389
|
+
icon: a.crud.getBtnIcon("editBtn"),
|
|
2390
|
+
size: a.crud.isMediumSize,
|
|
2391
|
+
disabled: a.crud.btnDisabledList[r],
|
|
2392
|
+
onClick: Z((e) => a.crud.rowCell(n, r), ["stop"])
|
|
2393
|
+
}, {
|
|
2394
|
+
default: Y(() => [a.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("editBtn")), 1)], 64))]),
|
|
2395
|
+
_: 1
|
|
2396
|
+
}, 8, [
|
|
2397
|
+
"type",
|
|
2398
|
+
"icon",
|
|
2399
|
+
"size",
|
|
2400
|
+
"disabled",
|
|
2401
|
+
"onClick"
|
|
2402
|
+
])), [[f, a.crud.getPermission("editBtn", n, r)]]) : a.optVal(a.crud.tableOption.saveBtn, i.config.saveBtn) && n.$cellEdit ? X((V(), D(o, {
|
|
2403
|
+
key: 1,
|
|
2404
|
+
type: a.menuText("primary"),
|
|
2405
|
+
icon: a.crud.getBtnIcon("saveBtn"),
|
|
2406
|
+
size: a.crud.isMediumSize,
|
|
2407
|
+
disabled: a.crud.btnDisabledList[r],
|
|
2408
|
+
onClick: Z((e) => a.crud.rowCell(n, r), ["stop"])
|
|
2409
|
+
}, {
|
|
2410
|
+
default: Y(() => [a.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("saveBtn")), 1)], 64))]),
|
|
2411
|
+
_: 1
|
|
2412
|
+
}, 8, [
|
|
2413
|
+
"type",
|
|
2414
|
+
"icon",
|
|
2415
|
+
"size",
|
|
2416
|
+
"disabled",
|
|
2417
|
+
"onClick"
|
|
2418
|
+
])), [[f, a.crud.getPermission("saveBtn", n, r)]]) : O("v-if", !0), n.$cellEdit ? (V(), D(o, {
|
|
2419
|
+
key: 2,
|
|
2420
|
+
type: a.menuText("danger"),
|
|
2421
|
+
icon: a.crud.getBtnIcon("cancelBtn"),
|
|
2422
|
+
size: a.crud.isMediumSize,
|
|
2423
|
+
disabled: a.crud.btnDisabledList[r],
|
|
2424
|
+
onClick: Z((e) => a.crud.rowCancel(n, r), ["stop"])
|
|
2425
|
+
}, {
|
|
2426
|
+
default: Y(() => [a.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("cancelBtn")), 1)], 64))]),
|
|
2427
|
+
_: 1
|
|
2428
|
+
}, 8, [
|
|
2429
|
+
"type",
|
|
2430
|
+
"icon",
|
|
2431
|
+
"size",
|
|
2432
|
+
"disabled",
|
|
2433
|
+
"onClick"
|
|
2434
|
+
])) : O("v-if", !0)], 64)) : O("v-if", !0),
|
|
2435
|
+
a.optVal(a.crud.tableOption.viewBtn, i.config.viewBtn) ? X((V(), D(o, {
|
|
2436
|
+
key: 1,
|
|
2437
|
+
type: a.menuText("success"),
|
|
2438
|
+
icon: a.crud.getBtnIcon("viewBtn"),
|
|
2439
|
+
size: a.crud.isMediumSize,
|
|
2440
|
+
disabled: e.btnDisabled,
|
|
2441
|
+
onClick: Z((e) => a.crud.rowView(n, r), ["stop"])
|
|
2442
|
+
}, {
|
|
2443
|
+
default: Y(() => [a.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("viewBtn")), 1)], 64))]),
|
|
2444
|
+
_: 1
|
|
2445
|
+
}, 8, [
|
|
2446
|
+
"type",
|
|
2447
|
+
"icon",
|
|
2448
|
+
"size",
|
|
2449
|
+
"disabled",
|
|
2450
|
+
"onClick"
|
|
2451
|
+
])), [[f, a.crud.getPermission("viewBtn", n, r)]]) : O("v-if", !0),
|
|
2452
|
+
a.optVal(a.crud.tableOption.editBtn, i.config.editBtn) && !a.crud.tableOption.cellBtn ? X((V(), D(o, {
|
|
2453
|
+
key: 2,
|
|
2454
|
+
type: a.menuText("primary"),
|
|
2455
|
+
icon: a.crud.getBtnIcon("editBtn"),
|
|
2456
|
+
size: a.crud.isMediumSize,
|
|
2457
|
+
disabled: e.btnDisabled,
|
|
2458
|
+
onClick: Z((e) => a.crud.rowEdit(n, r), ["stop"])
|
|
2459
|
+
}, {
|
|
2460
|
+
default: Y(() => [a.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("editBtn")), 1)], 64))]),
|
|
2461
|
+
_: 1
|
|
2462
|
+
}, 8, [
|
|
2463
|
+
"type",
|
|
2464
|
+
"icon",
|
|
2465
|
+
"size",
|
|
2466
|
+
"disabled",
|
|
2467
|
+
"onClick"
|
|
2468
|
+
])), [[f, a.crud.getPermission("editBtn", n, r)]]) : O("v-if", !0),
|
|
2469
|
+
a.optVal(a.crud.tableOption.copyBtn, i.config.copyBtn) ? X((V(), D(o, {
|
|
2470
|
+
key: 3,
|
|
2471
|
+
type: a.menuText("primary"),
|
|
2472
|
+
icon: a.crud.getBtnIcon("copyBtn"),
|
|
2473
|
+
size: a.crud.isMediumSize,
|
|
2474
|
+
disabled: e.btnDisabled,
|
|
2475
|
+
onClick: Z((e) => a.crud.rowCopy(n), ["stop"])
|
|
2476
|
+
}, {
|
|
2477
|
+
default: Y(() => [a.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("copyBtn")), 1)], 64))]),
|
|
2478
|
+
_: 1
|
|
2479
|
+
}, 8, [
|
|
2480
|
+
"type",
|
|
2481
|
+
"icon",
|
|
2482
|
+
"size",
|
|
2483
|
+
"disabled",
|
|
2484
|
+
"onClick"
|
|
2485
|
+
])), [[f, a.crud.getPermission("copyBtn", n, r)]]) : O("v-if", !0),
|
|
2486
|
+
a.optVal(a.crud.tableOption.delBtn, i.config.delBtn) && !n.$cellEdit ? X((V(), D(o, {
|
|
2487
|
+
key: 4,
|
|
2488
|
+
type: a.menuText("danger"),
|
|
2489
|
+
icon: a.crud.getBtnIcon("delBtn"),
|
|
2490
|
+
size: a.crud.isMediumSize,
|
|
2491
|
+
disabled: e.btnDisabled,
|
|
2492
|
+
onClick: Z((e) => a.crud.rowDel(n, r), ["stop"])
|
|
2493
|
+
}, {
|
|
2494
|
+
default: Y(() => [a.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("delBtn")), 1)], 64))]),
|
|
2495
|
+
_: 1
|
|
2496
|
+
}, 8, [
|
|
2497
|
+
"type",
|
|
2498
|
+
"icon",
|
|
2499
|
+
"size",
|
|
2500
|
+
"disabled",
|
|
2501
|
+
"onClick"
|
|
2502
|
+
])), [[f, a.crud.getPermission("delBtn", n, r)]]) : O("v-if", !0)
|
|
2503
|
+
], 64)) : O("v-if", !0), G(e.$slots, "menu", {
|
|
2504
|
+
row: n,
|
|
2505
|
+
type: a.menuText("primary"),
|
|
2506
|
+
disabled: a.crud.btnDisabled,
|
|
2507
|
+
size: a.crud.isMediumSize,
|
|
2508
|
+
index: r
|
|
2509
|
+
})]),
|
|
2510
|
+
_: 3
|
|
2511
|
+
}, 8, [
|
|
2512
|
+
"fixed",
|
|
2513
|
+
"label",
|
|
2514
|
+
"align",
|
|
2515
|
+
"header-align",
|
|
2516
|
+
"width"
|
|
2517
|
+
])) : O("v-if", !0)], 2112);
|
|
2518
|
+
}
|
|
2519
|
+
var Mr = /* @__PURE__ */ y(Ar, [["render", jr]]), Nr = {
|
|
2520
|
+
name: "ColumnDefault",
|
|
2521
|
+
inject: ["crud"],
|
|
2522
|
+
data() {
|
|
2523
|
+
return { config: $ };
|
|
2524
|
+
},
|
|
2525
|
+
mounted() {
|
|
2526
|
+
this.setSort();
|
|
2527
|
+
},
|
|
2528
|
+
methods: {
|
|
2529
|
+
optVal: w,
|
|
2530
|
+
indexMethod(e) {
|
|
2531
|
+
return e + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
|
|
2532
|
+
},
|
|
2533
|
+
setSort() {
|
|
2534
|
+
this.rowDrop(), this.columnDrop();
|
|
2535
|
+
},
|
|
2536
|
+
rowDrop() {
|
|
2537
|
+
let e = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];
|
|
2538
|
+
this.crud.tableDrop("row", e, (e) => {
|
|
2539
|
+
let t = e.oldIndex, n = e.newIndex, r = this.crud.list.splice(t, 1)[0];
|
|
2540
|
+
this.crud.list.splice(n, 0, r), this.crud.$emit("sortable-change", t, n), this.crud.refreshTable(() => this.rowDrop());
|
|
2541
|
+
});
|
|
2542
|
+
},
|
|
2543
|
+
columnDrop() {
|
|
2544
|
+
let e = this.crud.$refs.table.$el.querySelector(this.config.dropColClass), t = 0;
|
|
2545
|
+
[
|
|
2546
|
+
"selection",
|
|
2547
|
+
"index",
|
|
2548
|
+
"expand"
|
|
2549
|
+
].forEach((e) => {
|
|
2550
|
+
this.crud.tableOption[e] && (t += 1);
|
|
2551
|
+
}), this.crud.tableDrop("column", e, (e) => {
|
|
2552
|
+
this.crud.headerSort(e.oldIndex - t, e.newIndex - t), this.columnDrop();
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
};
|
|
2557
|
+
function Pr(e, t, n, r, i, a) {
|
|
2558
|
+
let o = u;
|
|
2559
|
+
return V(), k(T, null, [
|
|
2560
|
+
N(o, { width: "1px" }),
|
|
2561
|
+
O(" 折叠面板 "),
|
|
2562
|
+
a.crud.tableOption.expand ? (V(), D(o, {
|
|
2563
|
+
key: "expand",
|
|
2564
|
+
type: "expand",
|
|
2565
|
+
width: a.crud.tableOption.expandWidth || i.config.expandWidth,
|
|
2566
|
+
fixed: a.optVal(a.crud.tableOption.expandFixed, i.config.expandFixed),
|
|
2567
|
+
align: "center"
|
|
2568
|
+
}, {
|
|
2569
|
+
default: Y(({ row: t }) => [G(e.$slots, "expand", {
|
|
2570
|
+
row: t,
|
|
2571
|
+
index: t.$index
|
|
2572
|
+
})]),
|
|
2573
|
+
_: 3
|
|
2574
|
+
}, 8, ["width", "fixed"])) : O("v-if", !0),
|
|
2575
|
+
O(" 选择框 "),
|
|
2576
|
+
a.crud.tableOption.selection ? (V(), D(o, {
|
|
2577
|
+
key: "selection",
|
|
2578
|
+
fixed: a.optVal(a.crud.tableOption.selectionFixed, i.config.selectionFixed),
|
|
2579
|
+
type: "selection",
|
|
2580
|
+
selectable: a.crud.tableOption.selectable,
|
|
2581
|
+
"reserve-selection": a.optVal(a.crud.tableOption.reserveSelection),
|
|
2582
|
+
width: a.crud.tableOption.selectionWidth || i.config.selectionWidth,
|
|
2583
|
+
align: "center"
|
|
2584
|
+
}, null, 8, [
|
|
2585
|
+
"fixed",
|
|
2586
|
+
"selectable",
|
|
2587
|
+
"reserve-selection",
|
|
2588
|
+
"width"
|
|
2589
|
+
])) : O("v-if", !0),
|
|
2590
|
+
O(" 序号 "),
|
|
2591
|
+
a.optVal(a.crud.tableOption.index) ? (V(), D(o, {
|
|
2592
|
+
key: "index",
|
|
2593
|
+
fixed: a.optVal(a.crud.tableOption.indexFixed, i.config.indexFixed),
|
|
2594
|
+
label: a.crud.tableOption.indexLabel || i.config.indexLabel,
|
|
2595
|
+
type: "index",
|
|
2596
|
+
width: a.crud.tableOption.indexWidth || i.config.indexWidth,
|
|
2597
|
+
index: a.indexMethod,
|
|
2598
|
+
align: "center"
|
|
2599
|
+
}, null, 8, [
|
|
2600
|
+
"fixed",
|
|
2601
|
+
"label",
|
|
2602
|
+
"width",
|
|
2603
|
+
"index"
|
|
2604
|
+
])) : O("v-if", !0)
|
|
2605
|
+
], 64);
|
|
2606
|
+
}
|
|
2607
|
+
var Fr = /* @__PURE__ */ y(Nr, [["render", Pr]]), Ir = {
|
|
2608
|
+
name: "HeaderMenu",
|
|
2609
|
+
directives: { permission: kr },
|
|
2610
|
+
inject: ["crud"],
|
|
2611
|
+
data() {
|
|
2612
|
+
return {
|
|
2613
|
+
dateCreate: !1,
|
|
2614
|
+
pickerOptions: { shortcuts: [
|
|
2615
|
+
{
|
|
2616
|
+
text: "今日",
|
|
2617
|
+
onClick(e) {
|
|
2618
|
+
let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
|
|
2619
|
+
n.setTime(n.getTime()), e.$emit("pick", [n, t]);
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
text: "昨日",
|
|
2624
|
+
onClick(e) {
|
|
2625
|
+
let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
|
|
2626
|
+
n.setTime(n.getTime() - 3600 * 1e3 * 24 * 1), e.$emit("pick", [n, t]);
|
|
2627
|
+
}
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
text: "最近一周",
|
|
2631
|
+
onClick(e) {
|
|
2632
|
+
let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
|
|
2633
|
+
n.setTime(n.getTime() - 3600 * 1e3 * 24 * 7), e.$emit("pick", [n, t]);
|
|
2634
|
+
}
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
text: "最近一个月",
|
|
2638
|
+
onClick(e) {
|
|
2639
|
+
let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
|
|
2640
|
+
n.setTime(n.getTime() - 3600 * 1e3 * 24 * 30), e.$emit("pick", [n, t]);
|
|
2641
|
+
}
|
|
2642
|
+
},
|
|
2643
|
+
{
|
|
2644
|
+
text: "最近三个月",
|
|
2645
|
+
onClick(e) {
|
|
2646
|
+
let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
|
|
2647
|
+
n.setTime(n.getTime() - 3600 * 1e3 * 24 * 90), e.$emit("pick", [n, t]);
|
|
2648
|
+
}
|
|
2649
|
+
}
|
|
2650
|
+
] },
|
|
2651
|
+
config: $
|
|
2652
|
+
};
|
|
2653
|
+
},
|
|
2654
|
+
created() {
|
|
2655
|
+
this.initFun();
|
|
2656
|
+
},
|
|
2657
|
+
methods: {
|
|
2658
|
+
optVal: w,
|
|
2659
|
+
dateChange(e) {
|
|
2660
|
+
this.dateCreate ? this.crud.$emit("date-change", e) : this.dateCreate = !0;
|
|
2661
|
+
},
|
|
2662
|
+
initFun() {
|
|
2663
|
+
this.crud.rowExcel = this.rowExcel, this.crud.rowPrint = this.rowPrint;
|
|
2664
|
+
},
|
|
2665
|
+
rowExcel() {
|
|
2666
|
+
this.crud.$refs.dialogExcel.handleShow();
|
|
2667
|
+
},
|
|
2668
|
+
rowPrint() {
|
|
2669
|
+
this.$Print(this.crud.$refs.table);
|
|
2670
|
+
}
|
|
2671
|
+
}
|
|
2672
|
+
}, Lr = { class: "avue-crud__menu" }, Rr = {
|
|
2673
|
+
key: 0,
|
|
2674
|
+
class: "avue-crud__left"
|
|
2675
|
+
}, zr = {
|
|
2676
|
+
key: 1,
|
|
2677
|
+
class: "avue-crud__right"
|
|
2678
|
+
};
|
|
2679
|
+
function Br(e, t, n, r, i, a) {
|
|
2680
|
+
let o = b, s = rt, c = Ot("permission");
|
|
2681
|
+
return V(), k("div", Lr, [a.optVal(a.crud.tableOption.menuLeft, !0) ? (V(), k("div", Rr, [
|
|
2682
|
+
a.optVal(a.crud.tableOption.addBtn, i.config.addBtn) ? X((V(), D(o, {
|
|
2683
|
+
key: 0,
|
|
2684
|
+
type: "primary",
|
|
2685
|
+
icon: a.crud.getBtnIcon("addBtn"),
|
|
2686
|
+
size: a.crud.isMediumSize,
|
|
2687
|
+
onClick: a.crud.rowAdd
|
|
2688
|
+
}, {
|
|
2689
|
+
default: Y(() => [a.crud.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("addBtn")), 1)], 64))]),
|
|
2690
|
+
_: 1
|
|
2691
|
+
}, 8, [
|
|
2692
|
+
"icon",
|
|
2693
|
+
"size",
|
|
2694
|
+
"onClick"
|
|
2695
|
+
])), [[c, a.crud.getPermission("addBtn")]]) : O("v-if", !0),
|
|
2696
|
+
a.optVal(a.crud.tableOption.addRowBtn, i.config.addRowBtn) ? X((V(), D(o, {
|
|
2697
|
+
key: 1,
|
|
2698
|
+
type: "primary",
|
|
2699
|
+
icon: a.crud.getBtnIcon("addBtn"),
|
|
2700
|
+
size: a.crud.isMediumSize,
|
|
2701
|
+
onClick: a.crud.rowCellAdd
|
|
2702
|
+
}, {
|
|
2703
|
+
default: Y(() => [a.crud.isIconMenu ? O("v-if", !0) : (V(), k(T, { key: 0 }, [M(q(a.crud.menuIcon("addBtn")), 1)], 64))]),
|
|
2704
|
+
_: 1
|
|
2705
|
+
}, 8, [
|
|
2706
|
+
"icon",
|
|
2707
|
+
"size",
|
|
2708
|
+
"onClick"
|
|
2709
|
+
])), [[c, a.crud.getPermission("addRowBtn")]]) : O("v-if", !0),
|
|
2710
|
+
G(e.$slots, "menuLeft", { size: a.crud.isMediumSize })
|
|
2711
|
+
])) : O("v-if", !0), a.optVal(a.crud.tableOption.menuRight, !0) ? (V(), k("div", zr, [
|
|
2712
|
+
a.optVal(a.crud.tableOption.dateBtn, i.config.dateBtn) ? (V(), D(s, {
|
|
2713
|
+
key: 0,
|
|
2714
|
+
type: "datetimerange",
|
|
2715
|
+
"value-format": "yyyy-MM-dd HH:mm:ss",
|
|
2716
|
+
format: "yyyy-MM-dd HH:mm:ss",
|
|
2717
|
+
"picker-options": i.pickerOptions,
|
|
2718
|
+
style: {
|
|
2719
|
+
display: "inline-block",
|
|
2720
|
+
"margin-right": "20px"
|
|
2721
|
+
},
|
|
2722
|
+
size: a.crud.isMediumSize,
|
|
2723
|
+
onChange: a.dateChange
|
|
2724
|
+
}, null, 8, [
|
|
2725
|
+
"picker-options",
|
|
2726
|
+
"size",
|
|
2727
|
+
"onChange"
|
|
2728
|
+
])) : O("v-if", !0),
|
|
2729
|
+
G(e.$slots, "menuRight", { size: a.crud.isMediumSize }),
|
|
2730
|
+
a.optVal(a.crud.tableOption.excelBtn, i.config.excelBtn) ? X((V(), D(o, {
|
|
2731
|
+
key: 1,
|
|
2732
|
+
icon: a.crud.getBtnIcon("excelBtn"),
|
|
2733
|
+
circle: "",
|
|
2734
|
+
size: a.crud.isMediumSize,
|
|
2735
|
+
onClick: a.rowExcel
|
|
2736
|
+
}, null, 8, [
|
|
2737
|
+
"icon",
|
|
2738
|
+
"size",
|
|
2739
|
+
"onClick"
|
|
2740
|
+
])), [[c, a.crud.getPermission("excelBtn")]]) : O("v-if", !0),
|
|
2741
|
+
a.optVal(a.crud.tableOption.printBtn, i.config.printBtn) ? X((V(), D(o, {
|
|
2742
|
+
key: 2,
|
|
2743
|
+
icon: a.crud.getBtnIcon("printBtn"),
|
|
2744
|
+
circle: "",
|
|
2745
|
+
size: a.crud.isMediumSize,
|
|
2746
|
+
onClick: a.rowPrint
|
|
2747
|
+
}, null, 8, [
|
|
2748
|
+
"icon",
|
|
2749
|
+
"size",
|
|
2750
|
+
"onClick"
|
|
2751
|
+
])), [[c, a.crud.getPermission("printBtn")]]) : O("v-if", !0),
|
|
2752
|
+
a.optVal(a.crud.tableOption.refreshBtn, i.config.refreshBtn) ? X((V(), D(o, {
|
|
2753
|
+
key: 3,
|
|
2754
|
+
icon: a.crud.getBtnIcon("refreshBtn"),
|
|
2755
|
+
circle: "",
|
|
2756
|
+
size: a.crud.isMediumSize,
|
|
2757
|
+
onClick: a.crud.refreshChange
|
|
2758
|
+
}, null, 8, [
|
|
2759
|
+
"icon",
|
|
2760
|
+
"size",
|
|
2761
|
+
"onClick"
|
|
2762
|
+
])), [[c, a.crud.getPermission("refreshBtn")]]) : O("v-if", !0),
|
|
2763
|
+
a.optVal(a.crud.tableOption.columnBtn, i.config.columnBtn) ? X((V(), D(o, {
|
|
2764
|
+
key: 4,
|
|
2765
|
+
icon: a.crud.getBtnIcon("columnBtn"),
|
|
2766
|
+
circle: "",
|
|
2767
|
+
size: a.crud.isMediumSize,
|
|
2768
|
+
onClick: t[0] || (t[0] = (e) => a.crud.$refs.dialogColumn.handleShow())
|
|
2769
|
+
}, null, 8, ["icon", "size"])), [[c, a.crud.getPermission("columnBtn")]]) : O("v-if", !0),
|
|
2770
|
+
(a.crud.$refs.headerSearch || {}).searchFlag && a.optVal(a.crud.tableOption.searchShowBtn, !0) ? (V(), D(o, {
|
|
2771
|
+
key: 5,
|
|
2772
|
+
icon: a.crud.getBtnIcon("searchBtn"),
|
|
2773
|
+
circle: "",
|
|
2774
|
+
size: a.crud.isMediumSize,
|
|
2775
|
+
onClick: t[1] || (t[1] = (e) => a.crud.$refs.headerSearch.handleSearchShow())
|
|
2776
|
+
}, null, 8, ["icon", "size"])) : O("v-if", !0),
|
|
2777
|
+
a.optVal(a.crud.tableOption.filterBtn, i.config.filterBtn) ? X((V(), D(o, {
|
|
2778
|
+
key: 6,
|
|
2779
|
+
icon: a.crud.getBtnIcon("filterBtn"),
|
|
2780
|
+
circle: "",
|
|
2781
|
+
size: a.crud.isMediumSize,
|
|
2782
|
+
onClick: t[2] || (t[2] = (e) => a.crud.$refs.dialogFilter.handleShow())
|
|
2783
|
+
}, null, 8, ["icon", "size"])), [[c, a.crud.getPermission("filterBtn")]]) : O("v-if", !0)
|
|
2784
|
+
])) : O("v-if", !0)]);
|
|
2785
|
+
}
|
|
2786
|
+
var Vr = /* @__PURE__ */ y(Ir, [["render", Br]]), Hr = {
|
|
2787
|
+
name: "HeaderSearch",
|
|
2788
|
+
mixins: [Ze],
|
|
2789
|
+
inject: {
|
|
2790
|
+
crud: { from: "crud" },
|
|
2791
|
+
AVUE: {
|
|
2792
|
+
from: je,
|
|
2793
|
+
default: null
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
props: { search: Object },
|
|
2797
|
+
data() {
|
|
2798
|
+
return {
|
|
2799
|
+
show: !1,
|
|
2800
|
+
searchIndex: 2,
|
|
2801
|
+
searchShow: !0
|
|
2802
|
+
};
|
|
2803
|
+
},
|
|
2804
|
+
computed: {
|
|
2805
|
+
searchForm: {
|
|
2806
|
+
get() {
|
|
2807
|
+
return this.crud.search;
|
|
2808
|
+
},
|
|
2809
|
+
set(e) {
|
|
2810
|
+
this.crud.$emit("update:search", e);
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
option() {
|
|
2814
|
+
let e = this.crud.option, t = (t = []) => {
|
|
2815
|
+
t = S(t);
|
|
2816
|
+
let n = [], r = 0;
|
|
2817
|
+
return t = t.sort((e, t) => (t.searchOrder || 0) - (e.searchOrder || 0)), t.forEach((t) => {
|
|
2818
|
+
if (t.search) {
|
|
2819
|
+
let i = r < this.searchIndex, a = {};
|
|
2820
|
+
Object.keys(t).forEach((e) => {
|
|
2821
|
+
let n = "search";
|
|
2822
|
+
if (e !== "searchProp" && e.includes(n)) {
|
|
2823
|
+
let r = e.replace(n, "");
|
|
2824
|
+
if (r.length === 0) return;
|
|
2825
|
+
r = r.replace(r[0], r[0].toLowerCase()), a[r] = t[e];
|
|
2826
|
+
}
|
|
2827
|
+
}), t = Object.assign(t, a, {
|
|
2828
|
+
type: Je(t),
|
|
2829
|
+
detail: !1,
|
|
2830
|
+
dicFlag: t.cascader ? !0 : w(t.dicFlag, !1),
|
|
2831
|
+
span: t.searchSpan || e.searchSpan || $.searchSpan,
|
|
2832
|
+
control: t.searchControl,
|
|
2833
|
+
gutter: t.searchGutter || e.searchGutter || $.searchGutter,
|
|
2834
|
+
labelWidth: t.searchLabelWidth || e.searchLabelWidth || $.searchLabelWidth,
|
|
2835
|
+
labelPosition: t.searchLabelPosition || e.searchLabelPosition,
|
|
2836
|
+
size: t.searchSize || e.searchSize,
|
|
2837
|
+
value: t.searchValue,
|
|
2838
|
+
rules: t.searchRules,
|
|
2839
|
+
row: t.searchRow,
|
|
2840
|
+
bind: t.searchBin,
|
|
2841
|
+
disabled: t.searchDisabled,
|
|
2842
|
+
readonly: t.searchReadonly,
|
|
2843
|
+
display: this.isSearchIcon ? this.show ? !0 : i : !0
|
|
2844
|
+
}), n.push(t), r += 1;
|
|
2845
|
+
}
|
|
2846
|
+
}), n;
|
|
2847
|
+
};
|
|
2848
|
+
return ((n) => {
|
|
2849
|
+
let r = S(n);
|
|
2850
|
+
return r.column = t(this.crud.propOption), r = Object.assign(r, {
|
|
2851
|
+
rowKey: e.searchRowKey || "null",
|
|
2852
|
+
tabs: !1,
|
|
2853
|
+
group: !1,
|
|
2854
|
+
printBtn: !1,
|
|
2855
|
+
mockBtn: !1,
|
|
2856
|
+
filterDic: e.searchFilterDic,
|
|
2857
|
+
filterNull: e.searchFilterNull,
|
|
2858
|
+
filterParam: e.searchFilterParam,
|
|
2859
|
+
enter: e.searchEnter,
|
|
2860
|
+
size: e.searchSize,
|
|
2861
|
+
submitText: e.searchBtnText || "搜 索",
|
|
2862
|
+
submitBtn: w(e.searchBtn, $.searchSubBtn),
|
|
2863
|
+
submitIcon: this.crud.getBtnIcon("searchBtn"),
|
|
2864
|
+
emptyText: e.emptyBtnText || "清 空",
|
|
2865
|
+
emptyBtn: w(e.emptyBtn, $.emptyBtn),
|
|
2866
|
+
emptyIcon: this.crud.getBtnIcon("emptyBtn"),
|
|
2867
|
+
menuSpan: this.show || !this.isSearchIcon || e.searchMenuSpan < 6 ? e.searchMenuSpan : 6,
|
|
2868
|
+
menuPosition: e.searchMenuPosition || "center",
|
|
2869
|
+
dicFlag: !1,
|
|
2870
|
+
dicData: this.crud.DIC
|
|
2871
|
+
}), r;
|
|
2872
|
+
})(e);
|
|
2873
|
+
},
|
|
2874
|
+
isSearchIcon() {
|
|
2875
|
+
var e;
|
|
2876
|
+
return w(this.crud.option.searchIcon, (e = this.AVUE) == null ? void 0 : e.searchIcon) && this.searchLen > this.searchIndex;
|
|
2877
|
+
},
|
|
2878
|
+
searchLen() {
|
|
2879
|
+
let e = 0;
|
|
2880
|
+
return this.crud.propOption.forEach((t) => {
|
|
2881
|
+
t.search && e++;
|
|
2882
|
+
}), e;
|
|
2883
|
+
},
|
|
2884
|
+
searchFlag() {
|
|
2885
|
+
return !!this.crud.$slots.search || this.searchLen !== 0;
|
|
2886
|
+
}
|
|
2887
|
+
},
|
|
2888
|
+
watch: {
|
|
2889
|
+
"crud.propOption": {
|
|
2890
|
+
handler() {
|
|
2891
|
+
this.dataFormat();
|
|
2892
|
+
},
|
|
2893
|
+
deep: !0
|
|
2894
|
+
},
|
|
2895
|
+
show() {
|
|
2896
|
+
this.crud.getTableHeight();
|
|
2897
|
+
},
|
|
2898
|
+
searchShow() {
|
|
2899
|
+
this.crud.getTableHeight();
|
|
2900
|
+
},
|
|
2901
|
+
option: {
|
|
2902
|
+
immediate: !0,
|
|
2903
|
+
deep: !0,
|
|
2904
|
+
handler() {
|
|
2905
|
+
var e;
|
|
2906
|
+
this.searchIndex = ((e = this.option) == null ? void 0 : e.searchIndex) || 2;
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
},
|
|
2910
|
+
created() {
|
|
2911
|
+
this.initFun(), this.dataFormat();
|
|
2912
|
+
},
|
|
2913
|
+
methods: {
|
|
2914
|
+
initFun() {
|
|
2915
|
+
["searchReset", "searchChange"].forEach((e) => {
|
|
2916
|
+
this.crud[e] = this[e];
|
|
2917
|
+
});
|
|
2918
|
+
},
|
|
2919
|
+
getSlotName(e) {
|
|
2920
|
+
return e.replace("Search", "");
|
|
2921
|
+
},
|
|
2922
|
+
searchChange(e, t) {
|
|
2923
|
+
e = C(e), this.crud.propOption.forEach((t) => {
|
|
2924
|
+
t.searchProp && (e[t.searchProp] = e[t.prop], delete e[t.prop]);
|
|
2925
|
+
}), this.crud.$emit("search-change", e, t);
|
|
2926
|
+
},
|
|
2927
|
+
resetChange() {
|
|
2928
|
+
this.crud.$emit("search-reset", this.searchForm);
|
|
2929
|
+
},
|
|
2930
|
+
searchReset() {
|
|
2931
|
+
this.$refs.form.resetForm();
|
|
2932
|
+
},
|
|
2933
|
+
handleSearchShow() {
|
|
2934
|
+
this.searchShow = !this.searchShow;
|
|
2935
|
+
},
|
|
2936
|
+
dataFormat() {
|
|
2937
|
+
let e = this.crud.option;
|
|
2938
|
+
this.searchShow = w(e.searchShow, $.searchShow);
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
};
|
|
2942
|
+
function Ur(e, t, n, r, i, a) {
|
|
2943
|
+
let o = b, s = fi, c = It;
|
|
2944
|
+
return a.searchFlag ? X((V(), D(c, {
|
|
2945
|
+
key: 0,
|
|
2946
|
+
shadow: a.crud.isCard,
|
|
2947
|
+
class: "avue-crud__search"
|
|
2948
|
+
}, {
|
|
2949
|
+
default: Y(() => [G(e.$slots, "search", {
|
|
2950
|
+
row: a.searchForm,
|
|
2951
|
+
search: a.searchForm,
|
|
2952
|
+
size: a.crud.controlSize
|
|
2953
|
+
}), N(s, {
|
|
2954
|
+
ref: "form",
|
|
2955
|
+
modelValue: a.searchForm,
|
|
2956
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => a.searchForm = e),
|
|
2957
|
+
option: a.option,
|
|
2958
|
+
onSubmit: a.searchChange,
|
|
2959
|
+
onResetChange: a.resetChange
|
|
2960
|
+
}, {
|
|
2961
|
+
menuForm: Y((n) => [G(e.$slots, "searchMenu", z(F(Object.assign(n, {
|
|
2962
|
+
search: a.searchForm,
|
|
2963
|
+
row: a.searchForm
|
|
2964
|
+
})))), a.isSearchIcon ? (V(), k(T, { key: 0 }, [i.show === !1 ? (V(), D(o, {
|
|
2965
|
+
key: 0,
|
|
2966
|
+
text: "",
|
|
2967
|
+
icon: "el-icon-arrow-down",
|
|
2968
|
+
onClick: t[0] || (t[0] = (e) => i.show = !0)
|
|
2969
|
+
}, {
|
|
2970
|
+
default: Y(() => [...t[3] || (t[3] = [M("展 开", -1)])]),
|
|
2971
|
+
_: 1
|
|
2972
|
+
})) : O("v-if", !0), i.show === !0 ? (V(), D(o, {
|
|
2973
|
+
key: 1,
|
|
2974
|
+
text: "",
|
|
2975
|
+
icon: "el-icon-arrow-up",
|
|
2976
|
+
onClick: t[1] || (t[1] = (e) => i.show = !1)
|
|
2977
|
+
}, {
|
|
2978
|
+
default: Y(() => [...t[4] || (t[4] = [M("收 缩", -1)])]),
|
|
2979
|
+
_: 1
|
|
2980
|
+
})) : O("v-if", !0)], 64)) : O("v-if", !0)]),
|
|
2981
|
+
default: Y(() => [(V(!0), k(T, null, W(a.crud.searchSlot, (t) => G(e.$slots, t, L({ ref_for: !0 }, Object.assign(e.scope, {
|
|
2982
|
+
search: a.searchForm,
|
|
2983
|
+
row: a.searchForm
|
|
2984
|
+
})))), 256))]),
|
|
2985
|
+
_: 3
|
|
2986
|
+
}, 8, [
|
|
2987
|
+
"modelValue",
|
|
2988
|
+
"option",
|
|
2989
|
+
"onSubmit",
|
|
2990
|
+
"onResetChange"
|
|
2991
|
+
])]),
|
|
2992
|
+
_: 3
|
|
2993
|
+
}, 8, ["shadow"])), [[Mt, i.searchShow && a.searchFlag]]) : O("v-if", !0);
|
|
2994
|
+
}
|
|
2995
|
+
var Wr = /* @__PURE__ */ y(Hr, [["render", Ur]]), Gr = {
|
|
2996
|
+
mixins: [Ze],
|
|
2997
|
+
inject: { AVUE: {
|
|
2998
|
+
from: je,
|
|
2999
|
+
default: null
|
|
3000
|
+
} },
|
|
3001
|
+
props: {
|
|
3002
|
+
defaults: {
|
|
3003
|
+
type: Object,
|
|
3004
|
+
default() {
|
|
3005
|
+
return {};
|
|
3006
|
+
}
|
|
3007
|
+
},
|
|
3008
|
+
option: {
|
|
3009
|
+
type: Object,
|
|
3010
|
+
required: !0,
|
|
3011
|
+
default: () => ({})
|
|
3012
|
+
}
|
|
3013
|
+
},
|
|
3014
|
+
watch: {
|
|
3015
|
+
defaults: {
|
|
3016
|
+
handler(e) {
|
|
3017
|
+
this.objectOption = e;
|
|
3018
|
+
},
|
|
3019
|
+
deep: !0
|
|
3020
|
+
},
|
|
3021
|
+
objectOption: {
|
|
3022
|
+
handler(e) {
|
|
3023
|
+
this.$emit("update:defaults", e);
|
|
3024
|
+
},
|
|
3025
|
+
deep: !0
|
|
3026
|
+
},
|
|
3027
|
+
propOption: {
|
|
3028
|
+
handler(e) {
|
|
3029
|
+
let t = {};
|
|
3030
|
+
e.forEach((e) => {
|
|
3031
|
+
t[e.prop] = e;
|
|
3032
|
+
}), this.objectOption = t;
|
|
3033
|
+
},
|
|
3034
|
+
deep: !0
|
|
3035
|
+
},
|
|
3036
|
+
option: {
|
|
3037
|
+
handler() {
|
|
3038
|
+
this.init(!1);
|
|
3039
|
+
},
|
|
3040
|
+
deep: !0
|
|
3041
|
+
}
|
|
3042
|
+
},
|
|
3043
|
+
data() {
|
|
3044
|
+
return {
|
|
3045
|
+
DIC: {},
|
|
3046
|
+
cascaderDIC: {},
|
|
3047
|
+
tableOption: {},
|
|
3048
|
+
isMobile: "",
|
|
3049
|
+
objectOption: {}
|
|
3050
|
+
};
|
|
3051
|
+
},
|
|
3052
|
+
created() {
|
|
3053
|
+
this.init();
|
|
3054
|
+
},
|
|
3055
|
+
computed: {
|
|
3056
|
+
resultOption() {
|
|
3057
|
+
return Object.assign(S(this.tableOption), { column: this.propOption });
|
|
3058
|
+
},
|
|
3059
|
+
rowKey() {
|
|
3060
|
+
return this.tableOption.rowKey || x.rowKey;
|
|
3061
|
+
},
|
|
3062
|
+
formRules() {
|
|
3063
|
+
let e = {};
|
|
3064
|
+
return this.propOption.forEach((t) => {
|
|
3065
|
+
t.rules && t.display !== !1 && (e[t.prop] = t.rules);
|
|
3066
|
+
}), e;
|
|
3067
|
+
},
|
|
3068
|
+
isMediumSize() {
|
|
3069
|
+
return this.controlSize;
|
|
3070
|
+
},
|
|
3071
|
+
controlSize() {
|
|
3072
|
+
var e;
|
|
3073
|
+
return this.tableOption.size || ((e = this.AVUE) == null ? void 0 : e.size);
|
|
3074
|
+
}
|
|
3075
|
+
},
|
|
3076
|
+
methods: {
|
|
3077
|
+
init(e) {
|
|
3078
|
+
this.tableOption = this.option, this.getIsMobile(), this.handleLocalDic(), e !== !1 && this.handleLoadDic();
|
|
3079
|
+
},
|
|
3080
|
+
dicInit(e) {
|
|
3081
|
+
e === "cascader" ? this.handleLoadCascaderDic() : this.handleLoadDic();
|
|
3082
|
+
},
|
|
3083
|
+
getIsMobile() {
|
|
3084
|
+
this.isMobile = document.body.clientWidth <= 768;
|
|
3085
|
+
},
|
|
3086
|
+
updateDic(e, t) {
|
|
3087
|
+
let n = this.findObject(this.propOption, e);
|
|
3088
|
+
Q(t) && Q(e) ? this.handleLoadDic() : Q(t) && !Q(n.dicUrl) ? at({ column: n }).then((t) => {
|
|
3089
|
+
this.DIC[e] = t;
|
|
3090
|
+
}) : this.DIC[e] = t;
|
|
3091
|
+
},
|
|
3092
|
+
handleSetDic(e, t = {}) {
|
|
3093
|
+
Object.keys(t).forEach((n) => {
|
|
3094
|
+
e[n] = t[n];
|
|
3095
|
+
});
|
|
3096
|
+
},
|
|
3097
|
+
handleLocalDic() {
|
|
3098
|
+
this.handleSetDic(this.DIC, ot(this.resultOption));
|
|
3099
|
+
},
|
|
3100
|
+
handleLoadDic() {
|
|
3101
|
+
ct(this.resultOption).then((e) => this.handleSetDic(this.DIC, e));
|
|
3102
|
+
},
|
|
3103
|
+
handleLoadCascaderDic() {
|
|
3104
|
+
st(this.propOption, this.data).then((e) => this.handleSetDic(this.cascaderDIC, e));
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
}, Kr = {
|
|
3108
|
+
name: "FyCurd",
|
|
3109
|
+
directives: { permission: kr },
|
|
3110
|
+
mixins: [Gr],
|
|
3111
|
+
provide() {
|
|
3112
|
+
return { crud: this };
|
|
3113
|
+
},
|
|
3114
|
+
props: {
|
|
3115
|
+
spanMethod: Function,
|
|
3116
|
+
summaryMethod: Function,
|
|
3117
|
+
rowStyle: Function,
|
|
3118
|
+
cellStyle: Function,
|
|
3119
|
+
beforeClose: Function,
|
|
3120
|
+
beforeOpen: Function,
|
|
3121
|
+
rowClassName: Function,
|
|
3122
|
+
cellClassName: Function,
|
|
3123
|
+
headerCellClassName: Function,
|
|
3124
|
+
uploadBefore: Function,
|
|
3125
|
+
uploadAfter: Function,
|
|
3126
|
+
uploadDelete: Function,
|
|
3127
|
+
uploadPreview: Function,
|
|
3128
|
+
uploadError: Function,
|
|
3129
|
+
uploadExceed: Function,
|
|
3130
|
+
permission: {
|
|
3131
|
+
type: [Function, Object],
|
|
3132
|
+
default: () => ({})
|
|
3133
|
+
},
|
|
3134
|
+
modelValue: {
|
|
3135
|
+
type: Object,
|
|
3136
|
+
default: () => ({})
|
|
3137
|
+
},
|
|
3138
|
+
search: {
|
|
3139
|
+
type: Object,
|
|
3140
|
+
default() {
|
|
3141
|
+
return {};
|
|
3142
|
+
}
|
|
3143
|
+
},
|
|
3144
|
+
page: {
|
|
3145
|
+
type: Object,
|
|
3146
|
+
default() {
|
|
3147
|
+
return {};
|
|
3148
|
+
}
|
|
3149
|
+
},
|
|
3150
|
+
tableLoading: {
|
|
3151
|
+
type: Boolean,
|
|
3152
|
+
default: !1
|
|
3153
|
+
},
|
|
3154
|
+
disabled: {
|
|
3155
|
+
type: Boolean,
|
|
3156
|
+
default: !1
|
|
3157
|
+
},
|
|
3158
|
+
data: {
|
|
3159
|
+
type: Array,
|
|
3160
|
+
default: () => []
|
|
3161
|
+
}
|
|
3162
|
+
},
|
|
3163
|
+
data() {
|
|
3164
|
+
return {
|
|
3165
|
+
reload: Math.random(),
|
|
3166
|
+
cellForm: { list: [] },
|
|
3167
|
+
config: $,
|
|
3168
|
+
list: [],
|
|
3169
|
+
listError: {},
|
|
3170
|
+
tableForm: {},
|
|
3171
|
+
tableHeight: void 0,
|
|
3172
|
+
tableIndex: -1,
|
|
3173
|
+
tableSelect: [],
|
|
3174
|
+
sumsList: {},
|
|
3175
|
+
cascaderIndexList: [],
|
|
3176
|
+
cascaderDicList: {},
|
|
3177
|
+
cascaderFormList: {},
|
|
3178
|
+
btnDisabledList: {},
|
|
3179
|
+
btnDisabled: !1,
|
|
3180
|
+
default: {}
|
|
3181
|
+
};
|
|
3182
|
+
},
|
|
3183
|
+
computed: {
|
|
3184
|
+
isHeightAuto() {
|
|
3185
|
+
return this.tableOption.height === "auto";
|
|
3186
|
+
},
|
|
3187
|
+
isSortable() {
|
|
3188
|
+
return this.tableOption.sortable;
|
|
3189
|
+
},
|
|
3190
|
+
isRowSort() {
|
|
3191
|
+
return this.tableOption.rowSort;
|
|
3192
|
+
},
|
|
3193
|
+
isColumnSort() {
|
|
3194
|
+
return this.tableOption.columnSort;
|
|
3195
|
+
},
|
|
3196
|
+
rowParentKey() {
|
|
3197
|
+
return this.option.rowParentKey || x.rowParentKey;
|
|
3198
|
+
},
|
|
3199
|
+
childrenKey() {
|
|
3200
|
+
return this.treeProps.children || x.children;
|
|
3201
|
+
},
|
|
3202
|
+
hasChildrenKey() {
|
|
3203
|
+
return this.treeProps.hasChildren || x.hasChildren;
|
|
3204
|
+
},
|
|
3205
|
+
treeProps() {
|
|
3206
|
+
return this.tableOption.treeProps || {};
|
|
3207
|
+
},
|
|
3208
|
+
isAutoHeight() {
|
|
3209
|
+
return this.tableOption.height === "auto";
|
|
3210
|
+
},
|
|
3211
|
+
formSlot() {
|
|
3212
|
+
return this.getSlotList([
|
|
3213
|
+
"Error",
|
|
3214
|
+
"Label",
|
|
3215
|
+
"Type",
|
|
3216
|
+
"Form"
|
|
3217
|
+
], this.$slots, this.propOption);
|
|
3218
|
+
},
|
|
3219
|
+
searchSlot() {
|
|
3220
|
+
return this.getSlotList(["Search"], this.$slots, this.propOption);
|
|
3221
|
+
},
|
|
3222
|
+
mainSlot() {
|
|
3223
|
+
let e = [];
|
|
3224
|
+
return this.propOption.forEach((t) => {
|
|
3225
|
+
this.$slots[t.prop] && e.push(t.prop);
|
|
3226
|
+
}), this.getSlotList(["Header", "Form"], this.$slots, this.propOption).concat(e);
|
|
3227
|
+
},
|
|
3228
|
+
calcHeight() {
|
|
3229
|
+
var e;
|
|
3230
|
+
return (this.tableOption.calcHeight || 0) + ((e = this.AVUE) == null ? void 0 : e.calcHeight);
|
|
3231
|
+
},
|
|
3232
|
+
propOption() {
|
|
3233
|
+
let e = [];
|
|
3234
|
+
function t(n = []) {
|
|
3235
|
+
Array.isArray(n) && n.forEach((n) => {
|
|
3236
|
+
Array.isArray(n.children) ? t(n.children) : e.push(n);
|
|
3237
|
+
});
|
|
3238
|
+
}
|
|
3239
|
+
return t(this.columnOption), e = qe(e), e;
|
|
3240
|
+
},
|
|
3241
|
+
isShowSummary() {
|
|
3242
|
+
return this.option.showSummary;
|
|
3243
|
+
},
|
|
3244
|
+
isHeader() {
|
|
3245
|
+
let e = !1;
|
|
3246
|
+
return this.columnOption.forEach((t) => {
|
|
3247
|
+
t.children && (e = !0);
|
|
3248
|
+
}), e;
|
|
3249
|
+
},
|
|
3250
|
+
isTree() {
|
|
3251
|
+
let e = !1;
|
|
3252
|
+
return this.data.forEach((t) => {
|
|
3253
|
+
t.children && (e = !0);
|
|
3254
|
+
}), e;
|
|
3255
|
+
},
|
|
3256
|
+
isCard() {
|
|
3257
|
+
return this.option.card ? "always" : "never";
|
|
3258
|
+
},
|
|
3259
|
+
expandLevel() {
|
|
3260
|
+
return this.parentOption.expandLevel || 0;
|
|
3261
|
+
},
|
|
3262
|
+
expandAll() {
|
|
3263
|
+
return this.parentOption.expandAll || !1;
|
|
3264
|
+
},
|
|
3265
|
+
parentOption() {
|
|
3266
|
+
return this.tableOption || {};
|
|
3267
|
+
},
|
|
3268
|
+
columnOption() {
|
|
3269
|
+
return this.tableOption.column || [];
|
|
3270
|
+
},
|
|
3271
|
+
sumColumnList() {
|
|
3272
|
+
return this.tableOption.sumColumnList || [];
|
|
3273
|
+
},
|
|
3274
|
+
selectLen() {
|
|
3275
|
+
return this.tableSelect ? this.tableSelect.length : 0;
|
|
3276
|
+
}
|
|
3277
|
+
},
|
|
3278
|
+
watch: {
|
|
3279
|
+
modelValue: {
|
|
3280
|
+
handler() {
|
|
3281
|
+
this.tableForm = this.modelValue;
|
|
3282
|
+
},
|
|
3283
|
+
immediate: !0,
|
|
3284
|
+
deep: !0
|
|
3285
|
+
},
|
|
3286
|
+
list: {
|
|
3287
|
+
handler() {
|
|
3288
|
+
this.cellForm.list = this.list;
|
|
3289
|
+
},
|
|
3290
|
+
deep: !0
|
|
3291
|
+
},
|
|
3292
|
+
data: {
|
|
3293
|
+
handler() {
|
|
3294
|
+
this.dataInit();
|
|
3295
|
+
},
|
|
3296
|
+
deep: !0
|
|
3297
|
+
}
|
|
3298
|
+
},
|
|
3299
|
+
mounted() {
|
|
3300
|
+
this.dataInit(), this.getTableHeight(), this.refreshTable();
|
|
3301
|
+
},
|
|
3302
|
+
methods: {
|
|
3303
|
+
setPx: Ie,
|
|
3304
|
+
optVal: w,
|
|
3305
|
+
handleValidate(e, t, n) {
|
|
3306
|
+
this.listError[e] || (this.listError[e] = {
|
|
3307
|
+
valid: !1,
|
|
3308
|
+
msg: ""
|
|
3309
|
+
}), this.listError[e].valid = !t, this.listError[e].msg = n;
|
|
3310
|
+
},
|
|
3311
|
+
getPermission(e, t, n) {
|
|
3312
|
+
return typeof this.permission == "function" ? this.permission(e, t, n) : Q(this.permission[e]) ? !0 : this.permission[e];
|
|
3313
|
+
},
|
|
3314
|
+
getTableHeight() {
|
|
3315
|
+
this.isAutoHeight ? this.$nextTick(() => {
|
|
3316
|
+
let e = this.$refs.table, t = this.$refs.tablePage;
|
|
3317
|
+
if (!e) return;
|
|
3318
|
+
let n = e.$el, r = t.$el.offsetHeight || 20;
|
|
3319
|
+
this.tableHeight = document.documentElement.clientHeight - n.offsetTop - r - this.calcHeight;
|
|
3320
|
+
}) : this.tableHeight = this.tableOption.height;
|
|
3321
|
+
},
|
|
3322
|
+
doLayout() {
|
|
3323
|
+
this.$refs.table.doLayout();
|
|
3324
|
+
},
|
|
3325
|
+
refreshTable(e) {
|
|
3326
|
+
this.reload = Math.random(), this.$nextTick(() => {
|
|
3327
|
+
e == null || e();
|
|
3328
|
+
});
|
|
3329
|
+
},
|
|
3330
|
+
treeLoad(e, t, n) {
|
|
3331
|
+
this.$emit("tree-load", e, t, (t) => {
|
|
3332
|
+
e.children = t, n(t);
|
|
3333
|
+
});
|
|
3334
|
+
},
|
|
3335
|
+
menuIcon(e) {
|
|
3336
|
+
return w(this.tableOption[`${e}Text`], et(`crud.${e}`));
|
|
3337
|
+
},
|
|
3338
|
+
getBtnIcon(e) {
|
|
3339
|
+
let t = `${e}Icon`;
|
|
3340
|
+
return this.tableOption[t] || $[t];
|
|
3341
|
+
},
|
|
3342
|
+
validateField(e) {
|
|
3343
|
+
return this.$refs.dialogForm.$refs.tableForm.validateField(e);
|
|
3344
|
+
},
|
|
3345
|
+
selectClear() {
|
|
3346
|
+
this.$emit("selection-clear", S(this.tableSelect)), this.$refs.table.clearSelection();
|
|
3347
|
+
},
|
|
3348
|
+
toggleRowSelection(e, t) {
|
|
3349
|
+
this.$refs.table.toggleRowSelection(e, t);
|
|
3350
|
+
},
|
|
3351
|
+
toggleRowExpansion(e, t) {
|
|
3352
|
+
this.$refs.table.toggleRowExpansion(e, t);
|
|
3353
|
+
},
|
|
3354
|
+
setCurrentRow(e) {
|
|
3355
|
+
this.$refs.table.setCurrentRow(e);
|
|
3356
|
+
},
|
|
3357
|
+
dataInit() {
|
|
3358
|
+
this.list = this.data, this.list.forEach((e, t) => {
|
|
3359
|
+
e.$cellEdit && !this.cascaderFormList[t] && (this.cascaderFormList[t] = S(e)), e.$cellEdit = e.$cellEdit || !1, e.$index = t;
|
|
3360
|
+
});
|
|
3361
|
+
},
|
|
3362
|
+
headerDragend(e, t, n, r) {
|
|
3363
|
+
this.objectOption[n.property] && (this.objectOption[n.property].width = e), this.$emit("header-dragend", e, t, n, r);
|
|
3364
|
+
},
|
|
3365
|
+
headerSort(e, t) {
|
|
3366
|
+
let n = this.columnOption, r = n.splice(e, 1)[0];
|
|
3367
|
+
n.splice(t, 0, r), this.refreshTable();
|
|
3368
|
+
},
|
|
3369
|
+
clearFilter(e) {
|
|
3370
|
+
this.$refs.table.clearFilter(e);
|
|
3371
|
+
},
|
|
3372
|
+
expandChange(e, t) {
|
|
3373
|
+
this.$emit("expand-change", e, t);
|
|
3374
|
+
},
|
|
3375
|
+
currentRowChange(e, t) {
|
|
3376
|
+
this.$emit("current-row-change", e, t);
|
|
3377
|
+
},
|
|
3378
|
+
refreshChange() {
|
|
3379
|
+
this.$emit("refresh-change");
|
|
3380
|
+
},
|
|
3381
|
+
toggleSelection(e) {
|
|
3382
|
+
e ? e.forEach((e) => {
|
|
3383
|
+
this.$refs.table.toggleRowSelection(e);
|
|
3384
|
+
}) : this.$refs.table.clearSelection();
|
|
3385
|
+
},
|
|
3386
|
+
selectionChange(e) {
|
|
3387
|
+
this.tableSelect = e, this.$emit("selection-change", this.tableSelect);
|
|
3388
|
+
},
|
|
3389
|
+
select(e, t) {
|
|
3390
|
+
this.$emit("select", e, t);
|
|
3391
|
+
},
|
|
3392
|
+
selectAll(e) {
|
|
3393
|
+
this.$emit("select-all", e);
|
|
3394
|
+
},
|
|
3395
|
+
filterChange(e) {
|
|
3396
|
+
this.$emit("filter-change", e);
|
|
3397
|
+
},
|
|
3398
|
+
sortChange(e) {
|
|
3399
|
+
this.$emit("sort-change", e);
|
|
3400
|
+
},
|
|
3401
|
+
rowDblclick(e, t) {
|
|
3402
|
+
this.$emit("row-dblclick", e, t);
|
|
3403
|
+
},
|
|
3404
|
+
rowClick(e, t, n) {
|
|
3405
|
+
this.$emit("row-click", e, t, n);
|
|
3406
|
+
},
|
|
3407
|
+
clearSort() {
|
|
3408
|
+
this.$refs.table.clearSort();
|
|
3409
|
+
},
|
|
3410
|
+
cellMouseEnter(e, t, n, r) {
|
|
3411
|
+
this.$emit("cell-mouse-enter", e, t, n, r);
|
|
3412
|
+
},
|
|
3413
|
+
cellMouseLeave(e, t, n, r) {
|
|
3414
|
+
this.$emit("cell-mouse-leave", e, t, n, r);
|
|
3415
|
+
},
|
|
3416
|
+
cellClick(e, t, n, r) {
|
|
3417
|
+
this.$emit("cell-click", e, t, n, r);
|
|
3418
|
+
},
|
|
3419
|
+
headerClick(e, t) {
|
|
3420
|
+
this.$emit("header-click", e, t);
|
|
3421
|
+
},
|
|
3422
|
+
rowContextmenu(e, t, n) {
|
|
3423
|
+
this.$emit("row-contextmenu", e, t, n);
|
|
3424
|
+
},
|
|
3425
|
+
headerContextmenu(e, t) {
|
|
3426
|
+
this.$emit("header-contextmenu", e, t);
|
|
3427
|
+
},
|
|
3428
|
+
cellDblclick(e, t, n, r) {
|
|
3429
|
+
this.$emit("cell-dblclick", e, t, n, r);
|
|
3430
|
+
},
|
|
3431
|
+
rowCellAdd(e = {}) {
|
|
3432
|
+
let t = this.list.length, n = Xe(this.propOption).tableForm;
|
|
3433
|
+
e = S({
|
|
3434
|
+
$cellEdit: !0,
|
|
3435
|
+
$index: t,
|
|
3436
|
+
...n,
|
|
3437
|
+
...e
|
|
3438
|
+
}), this.list.push(e);
|
|
3439
|
+
},
|
|
3440
|
+
rowCancel(e, t) {
|
|
3441
|
+
Q(e[this.rowKey]) ? (this.list.splice(t, 1), delete this.cascaderDIC[t]) : (this.cascaderFormList[t].$cellEdit = !1, this.cascaderDIC[t] = this.cascaderDicList[t], this.list[t] = this.cascaderFormList[t]), delete this.cascaderDicList[t], delete this.cascaderFormList[t], this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(t), 1);
|
|
3442
|
+
},
|
|
3443
|
+
rowCell(e, t) {
|
|
3444
|
+
e.$cellEdit ? this.rowCellUpdate(e, t) : this.rowCellEdit(e, t);
|
|
3445
|
+
},
|
|
3446
|
+
rowCellUpdate(e, t) {
|
|
3447
|
+
e = S(e);
|
|
3448
|
+
let n = this.validateCellField(t), r = () => {
|
|
3449
|
+
this.btnDisabledList[t] = !1, this.btnDisabled = !1, this.list[t].$cellEdit = !1, this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(t), 1), delete this.cascaderFormList[t];
|
|
3450
|
+
}, i = () => {
|
|
3451
|
+
this.btnDisabledList[t] = !1, this.btnDisabled = !1;
|
|
3452
|
+
};
|
|
3453
|
+
n && (this.btnDisabledList[t] = !0, this.btnDisabled = !0, Q(e[this.rowKey]) ? this.$emit("row-save", e, r, i) : this.$emit("row-update", e, t, r, i));
|
|
3454
|
+
},
|
|
3455
|
+
rowCellEdit(e, t) {
|
|
3456
|
+
e.$cellEdit = !0, this.cascaderFormList[t] = S(e), this.cascaderDicList[t] = S(this.cascaderDIC[t]);
|
|
3457
|
+
},
|
|
3458
|
+
validateCellForm() {
|
|
3459
|
+
return new Promise((e) => {
|
|
3460
|
+
this.$refs.cellForm.validate((t, n) => {
|
|
3461
|
+
e(n);
|
|
3462
|
+
});
|
|
3463
|
+
});
|
|
3464
|
+
},
|
|
3465
|
+
validateCellField(e) {
|
|
3466
|
+
let t = !0;
|
|
3467
|
+
for (let n of this.$refs.cellForm.fields) if (n.prop.split(".")[1] === `${e}` && this.$refs.cellForm.validateField(n.prop, (e) => {
|
|
3468
|
+
e && (t = !1);
|
|
3469
|
+
}), !t) break;
|
|
3470
|
+
return t;
|
|
3471
|
+
},
|
|
3472
|
+
rowAdd() {
|
|
3473
|
+
this.$refs.dialogForm.show("add");
|
|
3474
|
+
},
|
|
3475
|
+
rowSave() {
|
|
3476
|
+
return this.$refs.dialogForm.$refs.tableForm.submit();
|
|
3477
|
+
},
|
|
3478
|
+
rowUpdate() {
|
|
3479
|
+
return this.$refs.dialogForm.$refs.tableForm.submit();
|
|
3480
|
+
},
|
|
3481
|
+
closeDialog() {
|
|
3482
|
+
return this.$refs.dialogForm.closeDialog();
|
|
3483
|
+
},
|
|
3484
|
+
getPropRef(e) {
|
|
3485
|
+
return this.$refs.dialogForm.$refs.tableForm.getPropRef(e);
|
|
3486
|
+
},
|
|
3487
|
+
setVal() {
|
|
3488
|
+
this.$emit("update:modelValue", this.tableForm), this.$emit("change", this.tableForm);
|
|
3489
|
+
},
|
|
3490
|
+
rowEdit(e, t) {
|
|
3491
|
+
this.tableForm = S(e), this.tableIndex = t, this.setVal(), this.$refs.dialogForm.show("edit");
|
|
3492
|
+
},
|
|
3493
|
+
rowCopy(e) {
|
|
3494
|
+
this.tableForm = S(e), delete this.tableForm[this.rowKey], this.tableIndex = -1, this.setVal(), this.$refs.dialogForm.show("add");
|
|
3495
|
+
},
|
|
3496
|
+
rowView(e, t) {
|
|
3497
|
+
this.tableForm = S(e), this.tableIndex = t, this.setVal(), this.$refs.dialogForm.show("view");
|
|
3498
|
+
},
|
|
3499
|
+
rowDel(e, t) {
|
|
3500
|
+
this.$emit("row-del", e, t, () => {
|
|
3501
|
+
let { parentList: t, index: n } = this.findData(e[this.rowKey]);
|
|
3502
|
+
t && t.splice(n, 1);
|
|
3503
|
+
});
|
|
3504
|
+
},
|
|
3505
|
+
tableSpanMethod(e) {
|
|
3506
|
+
if (typeof this.spanMethod == "function") return this.spanMethod(e);
|
|
3507
|
+
},
|
|
3508
|
+
tableSummaryMethod(e) {
|
|
3509
|
+
let t = {};
|
|
3510
|
+
if (typeof this.summaryMethod == "function") return this.summaryMethod(e);
|
|
3511
|
+
let { columns: n, data: r } = e, i = [];
|
|
3512
|
+
return n.length > 0 && n.forEach((e, n) => {
|
|
3513
|
+
let a = this.sumColumnList.find((t) => t.name === e.property);
|
|
3514
|
+
if (a) {
|
|
3515
|
+
let o = a.decimals || 2, s = a.label || "", c = 1;
|
|
3516
|
+
switch (a.type) {
|
|
3517
|
+
case "count":
|
|
3518
|
+
i[n] = s + r.length;
|
|
3519
|
+
break;
|
|
3520
|
+
case "avg":
|
|
3521
|
+
i[n] = r.map((t) => Number(t[e.property])).reduce((e, t) => {
|
|
3522
|
+
let n = Number(t);
|
|
3523
|
+
return isNaN(n) ? e : (e * (c - 1) + t) / c++;
|
|
3524
|
+
}, 0), i[n] = s + i[n].toFixed(o);
|
|
3525
|
+
break;
|
|
3526
|
+
case "sum":
|
|
3527
|
+
i[n] = r.map((t) => Number(t[e.property])).reduce((e, t) => {
|
|
3528
|
+
let n = Number(t);
|
|
3529
|
+
return isNaN(n) ? e : e + t;
|
|
3530
|
+
}, 0), i[n] = s + i[n].toFixed(o);
|
|
3531
|
+
break;
|
|
3532
|
+
}
|
|
3533
|
+
t[e.property] = i[n];
|
|
3534
|
+
} else i[n] = "";
|
|
3535
|
+
}), this.sumsList = t, i;
|
|
3536
|
+
},
|
|
3537
|
+
tableDrop(e, t, n) {
|
|
3538
|
+
if (!(this.isSortable !== !0 && (e === "row" && !this.isRowSort || e === "column" && !this.isColumnSort))) {
|
|
3539
|
+
if (!window.Sortable) {
|
|
3540
|
+
ut.logs("Sortable");
|
|
3541
|
+
return;
|
|
3542
|
+
}
|
|
3543
|
+
window.Sortable.create(t, {
|
|
3544
|
+
ghostClass: $.ghostClass,
|
|
3545
|
+
chosenClass: $.ghostClass,
|
|
3546
|
+
animation: 500,
|
|
3547
|
+
delay: 0,
|
|
3548
|
+
onEnd: (e) => n(e)
|
|
3549
|
+
});
|
|
3550
|
+
}
|
|
3551
|
+
},
|
|
3552
|
+
findData(e) {
|
|
3553
|
+
let t = {}, n = (r, i) => {
|
|
3554
|
+
r.forEach((a, o) => {
|
|
3555
|
+
a[this.rowKey] === e && (t = {
|
|
3556
|
+
item: a,
|
|
3557
|
+
index: o,
|
|
3558
|
+
parentList: r,
|
|
3559
|
+
parent: i
|
|
3560
|
+
}), a[this.childrenKey] && n(a[this.childrenKey], a);
|
|
3561
|
+
});
|
|
3562
|
+
};
|
|
3563
|
+
return n(this.list), t;
|
|
3564
|
+
}
|
|
3565
|
+
}
|
|
3566
|
+
}, qr = { class: "avue-crud avue-crud--card" }, Jr = { class: "avue-crud__tip-name" }, Yr = { class: "avue-crud__tip-count" };
|
|
3567
|
+
function Xr(e, t, n, r, i, a) {
|
|
3568
|
+
let o = Wr, s = Vr, c = b, l = ue, u = Fr, f = Mr, p = Or, m = Ce, ee = d, h = re, g = dr, te = cr, ne = ar, _ = tr, ie = Yn, v = Ot("permission"), ae = Ae;
|
|
3569
|
+
return V(), k("div", qr, [
|
|
3570
|
+
e.tableOption.title ? (V(), D(kt(e.tableOption.titleSize || "h2"), {
|
|
3571
|
+
key: 0,
|
|
3572
|
+
style: B(e.tableOption.titleStyle)
|
|
3573
|
+
}, {
|
|
3574
|
+
default: Y(() => [M(q(e.tableOption.title), 1)]),
|
|
3575
|
+
_: 1
|
|
3576
|
+
}, 8, ["style"])) : O("v-if", !0),
|
|
3577
|
+
O(" 搜索组件 "),
|
|
3578
|
+
N(o, { ref: "headerSearch" }, j({
|
|
3579
|
+
search: Y((t) => [G(e.$slots, "search", z(F(t)))]),
|
|
3580
|
+
searchMenu: Y((t) => [G(e.$slots, "searchMenu", z(F(t)))]),
|
|
3581
|
+
_: 2
|
|
3582
|
+
}, [W(a.searchSlot, (t) => ({
|
|
3583
|
+
name: t,
|
|
3584
|
+
fn: Y((n) => [G(e.$slots, t, z(F(n)))])
|
|
3585
|
+
}))]), 1536),
|
|
3586
|
+
O(" 表格功能列 "),
|
|
3587
|
+
a.optVal(e.tableOption.header, !0) ? (V(), D(s, {
|
|
3588
|
+
key: 1,
|
|
3589
|
+
ref: "headerMenu"
|
|
3590
|
+
}, {
|
|
3591
|
+
menuLeft: Y((t) => [G(e.$slots, "menuLeft", z(F(t)))]),
|
|
3592
|
+
menuRight: Y((t) => [G(e.$slots, "menuRight", z(F(t)))]),
|
|
3593
|
+
_: 3
|
|
3594
|
+
}, 512)) : O("v-if", !0),
|
|
3595
|
+
a.optVal(e.tableOption.tip, i.config.tip) && e.tableOption.selection ? (V(), D(l, {
|
|
3596
|
+
key: 2,
|
|
3597
|
+
"disable-transitions": "",
|
|
3598
|
+
class: "avue-crud__tip"
|
|
3599
|
+
}, {
|
|
3600
|
+
default: Y(() => [
|
|
3601
|
+
A("span", Jr, [
|
|
3602
|
+
t[0] || (t[0] = M(" 当前表格已选择 ", -1)),
|
|
3603
|
+
A("span", Yr, q(a.selectLen), 1),
|
|
3604
|
+
t[1] || (t[1] = M(" 项 ", -1))
|
|
3605
|
+
]),
|
|
3606
|
+
a.optVal(e.tableOption.selectClearBtn, i.config.selectClearBtn) && e.tableOption.selection ? X((V(), D(c, {
|
|
3607
|
+
key: 0,
|
|
3608
|
+
text: "",
|
|
3609
|
+
onClick: a.selectClear
|
|
3610
|
+
}, {
|
|
3611
|
+
default: Y(() => [...t[2] || (t[2] = [M(" 清 空 ", -1)])]),
|
|
3612
|
+
_: 1
|
|
3613
|
+
}, 8, ["onClick"])), [[v, a.getPermission("selectClearBtn")]]) : O("v-if", !0),
|
|
3614
|
+
G(e.$slots, "tip")
|
|
3615
|
+
]),
|
|
3616
|
+
_: 3
|
|
3617
|
+
})) : O("v-if", !0),
|
|
3618
|
+
G(e.$slots, "header"),
|
|
3619
|
+
N(h, {
|
|
3620
|
+
ref: "cellForm",
|
|
3621
|
+
model: i.cellForm,
|
|
3622
|
+
"show-message": !1,
|
|
3623
|
+
onValidate: a.handleValidate
|
|
3624
|
+
}, {
|
|
3625
|
+
default: Y(() => {
|
|
3626
|
+
var t;
|
|
3627
|
+
return [X((V(), D(ee, {
|
|
3628
|
+
key: i.reload,
|
|
3629
|
+
ref: "table",
|
|
3630
|
+
data: i.cellForm.list,
|
|
3631
|
+
"row-key": e.rowKey,
|
|
3632
|
+
class: R({ "avue-crud--indeterminate": a.optVal(e.tableOption.indeterminate, !1) }),
|
|
3633
|
+
size: ((t = e.AVUE) == null ? void 0 : t.tableSize) || e.controlSize,
|
|
3634
|
+
lazy: a.optVal(e.tableOption.lazy, !1),
|
|
3635
|
+
load: a.treeLoad,
|
|
3636
|
+
"tree-props": a.treeProps,
|
|
3637
|
+
"expand-row-keys": e.tableOption.expandRowKeys,
|
|
3638
|
+
"default-expand-all": e.tableOption.defaultExpandAll,
|
|
3639
|
+
"highlight-current-row": e.tableOption.highlightCurrentRow,
|
|
3640
|
+
"show-summary": e.tableOption.showSummary,
|
|
3641
|
+
"summary-method": a.tableSummaryMethod,
|
|
3642
|
+
"span-method": a.tableSpanMethod,
|
|
3643
|
+
stripe: e.tableOption.stripe,
|
|
3644
|
+
"show-header": e.tableOption.showHeader,
|
|
3645
|
+
"default-sort": e.tableOption.defaultSort,
|
|
3646
|
+
"row-class-name": n.rowClassName,
|
|
3647
|
+
"cell-class-name": n.cellClassName,
|
|
3648
|
+
"row-style": n.rowStyle,
|
|
3649
|
+
"cell-style": n.cellStyle,
|
|
3650
|
+
fit: e.tableOption.fit,
|
|
3651
|
+
"header-cell-class-name": n.headerCellClassName,
|
|
3652
|
+
"max-height": a.isAutoHeight ? i.tableHeight : e.tableOption.maxHeight,
|
|
3653
|
+
height: i.tableHeight,
|
|
3654
|
+
width: a.setPx(e.tableOption.width, i.config.width),
|
|
3655
|
+
border: e.tableOption.border,
|
|
3656
|
+
onCurrentChange: a.currentRowChange,
|
|
3657
|
+
onExpandChange: a.expandChange,
|
|
3658
|
+
onHeaderDragend: a.headerDragend,
|
|
3659
|
+
onRowClick: a.rowClick,
|
|
3660
|
+
onRowDblclick: a.rowDblclick,
|
|
3661
|
+
onCellMouseEnter: a.cellMouseEnter,
|
|
3662
|
+
onCellMouseLeave: a.cellMouseLeave,
|
|
3663
|
+
onCellClick: a.cellClick,
|
|
3664
|
+
onHeaderClick: a.headerClick,
|
|
3665
|
+
onRowContextmenu: a.rowContextmenu,
|
|
3666
|
+
onHeaderContextmenu: a.headerContextmenu,
|
|
3667
|
+
onCellDblclick: a.cellDblclick,
|
|
3668
|
+
onFilterChange: a.filterChange,
|
|
3669
|
+
onSelectionChange: a.selectionChange,
|
|
3670
|
+
onSelect: a.select,
|
|
3671
|
+
onSelectAll: a.selectAll,
|
|
3672
|
+
onSortChange: a.sortChange
|
|
3673
|
+
}, {
|
|
3674
|
+
empty: Y(() => [e.$slots.empty ? G(e.$slots, "empty", { key: 0 }) : (V(), D(m, {
|
|
3675
|
+
key: 1,
|
|
3676
|
+
"image-size": 100,
|
|
3677
|
+
class: "avue-crud__empty",
|
|
3678
|
+
description: e.tableOption.emptyText
|
|
3679
|
+
}, null, 8, ["description"]))]),
|
|
3680
|
+
default: Y(() => [N(p, { "column-option": a.columnOption }, j({
|
|
3681
|
+
header: Y(() => [N(u, { ref: "columnDefault" }, {
|
|
3682
|
+
expand: Y(({ row: t, index: n }) => [G(e.$slots, "expand", {
|
|
3683
|
+
row: t,
|
|
3684
|
+
index: n
|
|
3685
|
+
})]),
|
|
3686
|
+
_: 3
|
|
3687
|
+
}, 512)]),
|
|
3688
|
+
footer: Y(() => [N(f, null, {
|
|
3689
|
+
menu: Y((t) => [G(e.$slots, "menu", z(F(t)))]),
|
|
3690
|
+
menuBtn: Y((t) => [G(e.$slots, "menuBtn", z(F(t)))]),
|
|
3691
|
+
_: 3
|
|
3692
|
+
})]),
|
|
3693
|
+
_: 2
|
|
3694
|
+
}, [W(a.mainSlot, (t) => ({
|
|
3695
|
+
name: t,
|
|
3696
|
+
fn: Y((n) => [G(e.$slots, t, z(F(n)))])
|
|
3697
|
+
}))]), 1032, ["column-option"])]),
|
|
3698
|
+
_: 3
|
|
3699
|
+
}, 8, /* @__PURE__ */ "data.row-key.class.size.lazy.load.tree-props.expand-row-keys.default-expand-all.highlight-current-row.show-summary.summary-method.span-method.stripe.show-header.default-sort.row-class-name.cell-class-name.row-style.cell-style.fit.header-cell-class-name.max-height.height.width.border.onCurrentChange.onExpandChange.onHeaderDragend.onRowClick.onRowDblclick.onCellMouseEnter.onCellMouseLeave.onCellClick.onHeaderClick.onRowContextmenu.onHeaderContextmenu.onCellDblclick.onFilterChange.onSelectionChange.onSelect.onSelectAll.onSortChange".split("."))), [[ae, n.tableLoading]])];
|
|
3700
|
+
}),
|
|
3701
|
+
_: 3
|
|
3702
|
+
}, 8, ["model", "onValidate"]),
|
|
3703
|
+
G(e.$slots, "footer"),
|
|
3704
|
+
O(" 分页 "),
|
|
3705
|
+
N(g, { ref: "tablePage" }, null, 512),
|
|
3706
|
+
O(" 表单 "),
|
|
3707
|
+
N(te, { ref: "dialogForm" }, j({
|
|
3708
|
+
menuForm: Y((t) => [G(e.$slots, "menuForm", z(F(t)))]),
|
|
3709
|
+
_: 2
|
|
3710
|
+
}, [W(a.formSlot, (t) => ({
|
|
3711
|
+
name: t,
|
|
3712
|
+
fn: Y((n) => [G(e.$slots, t, z(F(n)))])
|
|
3713
|
+
}))]), 1536),
|
|
3714
|
+
N(ne, { ref: "dialogColumn" }, null, 512),
|
|
3715
|
+
N(_, { ref: "dialogExcel" }, null, 512),
|
|
3716
|
+
N(ie, { ref: "dialogFilter" }, null, 512)
|
|
3717
|
+
]);
|
|
3718
|
+
}
|
|
3719
|
+
var Zr = /* @__PURE__ */ y(Kr, [["render", Xr]]), Qr = {
|
|
3720
|
+
name: "FyDynamic",
|
|
3721
|
+
mixins: [Ye, $e],
|
|
3722
|
+
props: {
|
|
3723
|
+
max: Number,
|
|
3724
|
+
columnSlot: {
|
|
3725
|
+
type: Array,
|
|
3726
|
+
default: () => []
|
|
3727
|
+
},
|
|
3728
|
+
children: {
|
|
3729
|
+
type: Object,
|
|
3730
|
+
default: () => ({})
|
|
3731
|
+
}
|
|
3732
|
+
},
|
|
3733
|
+
data() {
|
|
3734
|
+
return {
|
|
3735
|
+
reload: Math.random(),
|
|
3736
|
+
hoverList: []
|
|
3737
|
+
};
|
|
3738
|
+
},
|
|
3739
|
+
computed: {
|
|
3740
|
+
textLen() {
|
|
3741
|
+
return this.text.length;
|
|
3742
|
+
},
|
|
3743
|
+
maxFlag() {
|
|
3744
|
+
return this.max ? this.text.length !== this.max : !0;
|
|
3745
|
+
},
|
|
3746
|
+
showIndex() {
|
|
3747
|
+
return w(this.children.index, !0);
|
|
3748
|
+
},
|
|
3749
|
+
showType() {
|
|
3750
|
+
return this.children.type || "crud";
|
|
3751
|
+
},
|
|
3752
|
+
isForm() {
|
|
3753
|
+
return this.showType === "form";
|
|
3754
|
+
},
|
|
3755
|
+
isCrud() {
|
|
3756
|
+
return this.showType === "crud";
|
|
3757
|
+
},
|
|
3758
|
+
selectionChange() {
|
|
3759
|
+
return this.children.selectionChange;
|
|
3760
|
+
},
|
|
3761
|
+
sortableChange() {
|
|
3762
|
+
return this.children.sortableChange;
|
|
3763
|
+
},
|
|
3764
|
+
rowAdd() {
|
|
3765
|
+
return this.children.rowAdd;
|
|
3766
|
+
},
|
|
3767
|
+
rowDel() {
|
|
3768
|
+
return this.children.rowDel;
|
|
3769
|
+
},
|
|
3770
|
+
viewBtn() {
|
|
3771
|
+
return this.children.viewBtn === !1;
|
|
3772
|
+
},
|
|
3773
|
+
addBtn() {
|
|
3774
|
+
return this.children.addBtn === !1;
|
|
3775
|
+
},
|
|
3776
|
+
delBtn() {
|
|
3777
|
+
return this.children.delBtn === !1;
|
|
3778
|
+
},
|
|
3779
|
+
valueOption() {
|
|
3780
|
+
let e = {};
|
|
3781
|
+
return this.columnOption.forEach((t) => {
|
|
3782
|
+
t.value && (e[t.prop] = t.value);
|
|
3783
|
+
}), e;
|
|
3784
|
+
},
|
|
3785
|
+
rulesOption() {
|
|
3786
|
+
let e = {};
|
|
3787
|
+
return this.columnOption.forEach((t) => {
|
|
3788
|
+
t.rules && (e[t.prop] = t.rules);
|
|
3789
|
+
}), e;
|
|
3790
|
+
},
|
|
3791
|
+
columnOption() {
|
|
3792
|
+
return this.children.column || [];
|
|
3793
|
+
},
|
|
3794
|
+
option() {
|
|
3795
|
+
return {
|
|
3796
|
+
border: !0,
|
|
3797
|
+
header: !1,
|
|
3798
|
+
menu: !1,
|
|
3799
|
+
size: this.size,
|
|
3800
|
+
disabled: this.disabled,
|
|
3801
|
+
readonly: this.readonly,
|
|
3802
|
+
emptyBtn: !1,
|
|
3803
|
+
submitBtn: !1,
|
|
3804
|
+
...(() => {
|
|
3805
|
+
let e = S(this.children);
|
|
3806
|
+
return delete e.column, e;
|
|
3807
|
+
})(),
|
|
3808
|
+
...(() => {
|
|
3809
|
+
let e = [{
|
|
3810
|
+
label: this.children.indexLabel || "#",
|
|
3811
|
+
prop: "_index",
|
|
3812
|
+
display: this.showIndex,
|
|
3813
|
+
hide: !this.showIndex,
|
|
3814
|
+
fixed: !0,
|
|
3815
|
+
align: "center",
|
|
3816
|
+
headerAlign: "center",
|
|
3817
|
+
span: 24,
|
|
3818
|
+
width: 50
|
|
3819
|
+
}];
|
|
3820
|
+
return this.columnOption.forEach((t) => {
|
|
3821
|
+
e.push(Object.assign(t, { cell: w(t.cell, this.isCrud) }));
|
|
3822
|
+
}), { column: e };
|
|
3823
|
+
})()
|
|
3824
|
+
};
|
|
3825
|
+
}
|
|
3826
|
+
},
|
|
3827
|
+
watch: { text() {
|
|
3828
|
+
this.initData();
|
|
3829
|
+
} },
|
|
3830
|
+
mounted() {
|
|
3831
|
+
this.initData();
|
|
3832
|
+
},
|
|
3833
|
+
methods: {
|
|
3834
|
+
deepClone: S,
|
|
3835
|
+
handleSelectionChange(e) {
|
|
3836
|
+
var t;
|
|
3837
|
+
(t = this.selectionChange) == null || t.call(this, e);
|
|
3838
|
+
},
|
|
3839
|
+
handleSortableChange(e, t, n, r) {
|
|
3840
|
+
var i;
|
|
3841
|
+
(i = this.sortableChange) == null || i.call(this, e, t, n, r);
|
|
3842
|
+
},
|
|
3843
|
+
cellMouseenter(e) {
|
|
3844
|
+
let t = e.$index;
|
|
3845
|
+
this.mouseoverRow(t);
|
|
3846
|
+
},
|
|
3847
|
+
cellMouseLeave(e) {
|
|
3848
|
+
let t = e.$index;
|
|
3849
|
+
this.mouseoutRow(t);
|
|
3850
|
+
},
|
|
3851
|
+
initData() {
|
|
3852
|
+
this.text.forEach((e, t) => {
|
|
3853
|
+
e = Object.assign(e, {
|
|
3854
|
+
$cellEdit: !0,
|
|
3855
|
+
$index: t
|
|
3856
|
+
});
|
|
3857
|
+
});
|
|
3858
|
+
},
|
|
3859
|
+
mouseoverRow(e) {
|
|
3860
|
+
this.delBtn || (this.flagList(), this.hoverList[e] = !0);
|
|
3861
|
+
},
|
|
3862
|
+
mouseoutRow(e) {
|
|
3863
|
+
this.delBtn || (this.flagList(), this.hoverList[e] = !1);
|
|
3864
|
+
},
|
|
3865
|
+
flagList() {
|
|
3866
|
+
this.hoverList.forEach((e, t) => {
|
|
3867
|
+
this.hoverList[t] = !1;
|
|
3868
|
+
});
|
|
3869
|
+
},
|
|
3870
|
+
delRow(e) {
|
|
3871
|
+
let t = () => {
|
|
3872
|
+
let t = S(this.text);
|
|
3873
|
+
t.splice(e, 1), this.text = t, this.reload = Math.random();
|
|
3874
|
+
};
|
|
3875
|
+
typeof this.rowDel == "function" ? this.rowDel(this.text[e], t) : t();
|
|
3876
|
+
},
|
|
3877
|
+
addRow() {
|
|
3878
|
+
let e = (e = {}) => {
|
|
3879
|
+
e = Object.assign(this.valueOption, e, { $index: this.textLen }), this.isCrud ? this.$refs.main.rowCellAdd(e) : this.isForm && this.text.push(e);
|
|
3880
|
+
};
|
|
3881
|
+
typeof this.rowAdd == "function" ? this.rowAdd(e) : e();
|
|
3882
|
+
}
|
|
3883
|
+
}
|
|
3884
|
+
}, $r = { class: "avue-dynamic__header" }, ei = ["onMouseenter", "onMouseleave"], ti = { key: 1 };
|
|
3885
|
+
function ni(e, t, n, r, i, a) {
|
|
3886
|
+
let o = b, s = fi, c = Zr;
|
|
3887
|
+
return V(), k("div", {
|
|
3888
|
+
key: i.reload,
|
|
3889
|
+
class: "avue-dynamic"
|
|
3890
|
+
}, [a.isForm ? (V(), k(T, { key: 0 }, [A("div", $r, [!e.readonly && !e.disabled && !a.addBtn ? (V(), D(o, {
|
|
3891
|
+
key: 0,
|
|
3892
|
+
circle: "",
|
|
3893
|
+
disabled: e.disabled,
|
|
3894
|
+
type: "primary",
|
|
3895
|
+
icon: "el-icon-plus",
|
|
3896
|
+
onClick: a.addRow
|
|
3897
|
+
}, null, 8, ["disabled", "onClick"])) : O("v-if", !0)]), A("div", null, [(V(!0), k(T, null, W(e.text, (t, r) => (V(), k("div", {
|
|
3898
|
+
key: r,
|
|
3899
|
+
class: "avue-dynamic__row",
|
|
3900
|
+
onMouseenter: (e) => a.cellMouseenter({ $index: r }),
|
|
3901
|
+
onMouseleave: (e) => a.cellMouseLeave({ $index: r })
|
|
3902
|
+
}, [!e.readonly && !e.disabled && !a.delBtn && i.hoverList[r] ? (V(), D(o, {
|
|
3903
|
+
key: 0,
|
|
3904
|
+
type: "danger",
|
|
3905
|
+
class: "avue-dynamic__menu",
|
|
3906
|
+
disabled: e.disabled,
|
|
3907
|
+
icon: "el-icon-delete",
|
|
3908
|
+
circle: "",
|
|
3909
|
+
onClick: (e) => a.delRow(t.$index)
|
|
3910
|
+
}, null, 8, ["disabled", "onClick"])) : O("v-if", !0), (V(), D(s, {
|
|
3911
|
+
key: r,
|
|
3912
|
+
ref_for: !0,
|
|
3913
|
+
ref: "main",
|
|
3914
|
+
modelValue: e.text[r],
|
|
3915
|
+
"onUpdate:modelValue": (t) => e.text[r] = t,
|
|
3916
|
+
option: a.deepClone(a.option)
|
|
3917
|
+
}, j({
|
|
3918
|
+
_index: Y(({}) => [A("div", null, [A("span", null, q(t.$index + 1), 1)])]),
|
|
3919
|
+
_: 2
|
|
3920
|
+
}, [W(n.columnSlot, (t) => ({
|
|
3921
|
+
name: t,
|
|
3922
|
+
fn: Y((n) => [G(e.$slots, t, L({ ref_for: !0 }, Object.assign(n, { row: e.text[r] })))])
|
|
3923
|
+
}))]), 1032, [
|
|
3924
|
+
"modelValue",
|
|
3925
|
+
"onUpdate:modelValue",
|
|
3926
|
+
"option"
|
|
3927
|
+
]))], 40, ei))), 128))])], 64)) : a.isCrud ? (V(), D(c, {
|
|
3928
|
+
key: 1,
|
|
3929
|
+
ref: "main",
|
|
3930
|
+
option: a.option,
|
|
3931
|
+
disabled: e.disabled,
|
|
3932
|
+
data: e.text,
|
|
3933
|
+
onCellMouseEnter: a.cellMouseenter,
|
|
3934
|
+
onCellMouseLeave: a.cellMouseLeave,
|
|
3935
|
+
onSelectionChange: a.handleSelectionChange,
|
|
3936
|
+
onSortableChange: a.handleSortableChange
|
|
3937
|
+
}, {
|
|
3938
|
+
_indexHeader: Y(() => [!(a.addBtn || e.readonly) && a.maxFlag ? (V(), D(o, {
|
|
3939
|
+
key: 0,
|
|
3940
|
+
type: "primary",
|
|
3941
|
+
disabled: e.disabled,
|
|
3942
|
+
icon: "el-icon-plus",
|
|
3943
|
+
circle: "",
|
|
3944
|
+
onClick: t[0] || (t[0] = (e) => a.addRow())
|
|
3945
|
+
}, null, 8, ["disabled"])) : O("v-if", !0)]),
|
|
3946
|
+
_index: Y((t) => [!e.readonly && !e.disabled && !a.delBtn && i.hoverList[t.row.$index] ? (V(), D(o, {
|
|
3947
|
+
key: 0,
|
|
3948
|
+
type: "danger",
|
|
3949
|
+
disabled: e.disabled,
|
|
3950
|
+
icon: "el-icon-delete",
|
|
3951
|
+
circle: "",
|
|
3952
|
+
onClick: (e) => a.delRow(t.row.$index)
|
|
3953
|
+
}, null, 8, ["disabled", "onClick"])) : (V(), k("div", ti, q(t.row.$index + 1), 1))]),
|
|
3954
|
+
default: Y(() => [(V(!0), k(T, null, W(n.columnSlot, (t) => G(e.$slots, t, L({ ref_for: !0 }, e.scope))), 256))]),
|
|
3955
|
+
_: 3
|
|
3956
|
+
}, 8, [
|
|
3957
|
+
"option",
|
|
3958
|
+
"disabled",
|
|
3959
|
+
"data",
|
|
3960
|
+
"onCellMouseEnter",
|
|
3961
|
+
"onCellMouseLeave",
|
|
3962
|
+
"onSelectionChange",
|
|
3963
|
+
"onSortableChange"
|
|
3964
|
+
])) : O("v-if", !0)]);
|
|
3965
|
+
}
|
|
3966
|
+
var ri = /* @__PURE__ */ y(Qr, [["render", ni]]), ii = {
|
|
3967
|
+
name: "FormTemp",
|
|
3968
|
+
components: {
|
|
3969
|
+
FyUEditor: St(() => import("../fy-u-editor/index.mjs")),
|
|
3970
|
+
FyInputTable: St(() => import("../fy-input-table/index.mjs")),
|
|
3971
|
+
FyInputTree: xt,
|
|
3972
|
+
FyArray: Ee,
|
|
3973
|
+
FyCascader: tt,
|
|
3974
|
+
FyCheckbox: nt,
|
|
3975
|
+
FyDate: rt,
|
|
3976
|
+
FyDynamic: ri,
|
|
3977
|
+
FyInput: it,
|
|
3978
|
+
FyInputColor: ge,
|
|
3979
|
+
FyInputIcon: pt,
|
|
3980
|
+
FyInputMap: mt,
|
|
3981
|
+
FyInputNumber: ht,
|
|
3982
|
+
FyRadio: gt,
|
|
3983
|
+
FyRate: ft,
|
|
3984
|
+
FySelect: lt,
|
|
3985
|
+
FySlider: _t,
|
|
3986
|
+
FySwitch: vt,
|
|
3987
|
+
FyTime: yt,
|
|
3988
|
+
FyTitle: bt,
|
|
3989
|
+
FyUpload: ke
|
|
3990
|
+
},
|
|
3991
|
+
mixins: [Ze],
|
|
3992
|
+
props: {
|
|
3993
|
+
modelValue: [
|
|
3994
|
+
String,
|
|
3995
|
+
Object,
|
|
3996
|
+
Number,
|
|
3997
|
+
Boolean,
|
|
3998
|
+
Array
|
|
3999
|
+
],
|
|
4000
|
+
columnSlot: {
|
|
4001
|
+
type: Array,
|
|
4002
|
+
default: () => []
|
|
4003
|
+
},
|
|
4004
|
+
tableData: {
|
|
4005
|
+
type: Object,
|
|
4006
|
+
default: () => ({})
|
|
4007
|
+
},
|
|
4008
|
+
enter: {
|
|
4009
|
+
type: Boolean,
|
|
4010
|
+
default: !1
|
|
4011
|
+
},
|
|
4012
|
+
type: { type: String },
|
|
4013
|
+
propsHttp: {
|
|
4014
|
+
type: Object,
|
|
4015
|
+
default: () => ({})
|
|
4016
|
+
},
|
|
4017
|
+
props: { type: Object },
|
|
4018
|
+
dic: { type: Array },
|
|
4019
|
+
size: { type: String },
|
|
4020
|
+
disabled: { type: Boolean },
|
|
4021
|
+
readonly: { type: Boolean },
|
|
4022
|
+
column: {
|
|
4023
|
+
type: Object,
|
|
4024
|
+
default: () => ({})
|
|
4025
|
+
}
|
|
4026
|
+
},
|
|
4027
|
+
emits: [
|
|
4028
|
+
"enter",
|
|
4029
|
+
"change",
|
|
4030
|
+
"update:modelValue"
|
|
4031
|
+
],
|
|
4032
|
+
computed: {
|
|
4033
|
+
params() {
|
|
4034
|
+
return this.column.params || {};
|
|
4035
|
+
},
|
|
4036
|
+
event() {
|
|
4037
|
+
return this.column.event || {};
|
|
4038
|
+
},
|
|
4039
|
+
text: {
|
|
4040
|
+
get() {
|
|
4041
|
+
return this.modelValue;
|
|
4042
|
+
},
|
|
4043
|
+
set(e) {
|
|
4044
|
+
this.$emit("update:modelValue", e), this.$emit("change", e);
|
|
4045
|
+
}
|
|
4046
|
+
}
|
|
4047
|
+
},
|
|
4048
|
+
methods: {
|
|
4049
|
+
uploadFun: He,
|
|
4050
|
+
getComponent: Qe,
|
|
4051
|
+
getPlaceholder: Ke,
|
|
4052
|
+
enterChange() {
|
|
4053
|
+
typeof this.column.enter == "function" ? this.column.enter({
|
|
4054
|
+
value: this.text,
|
|
4055
|
+
column: this.column
|
|
4056
|
+
}) : this.enter && this.$emit("enter");
|
|
4057
|
+
}
|
|
4058
|
+
}
|
|
4059
|
+
}, ai = ["innerHTML"];
|
|
4060
|
+
function oi(e, t, n, r, i, a) {
|
|
4061
|
+
return V(), D(kt(a.getComponent(n.column.type, n.column.component)), L(Object.assign(n.column, a.uploadFun(n.column)), {
|
|
4062
|
+
ref: "temp",
|
|
4063
|
+
modelValue: a.text,
|
|
4064
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => a.text = e),
|
|
4065
|
+
column: Object.assign(n.column, a.params),
|
|
4066
|
+
dic: n.dic,
|
|
4067
|
+
disabled: n.column.disabled || n.disabled,
|
|
4068
|
+
readonly: n.column.readonly || n.readonly,
|
|
4069
|
+
placeholder: a.getPlaceholder(n.column),
|
|
4070
|
+
props: n.column.props || n.props,
|
|
4071
|
+
"props-http": n.column.propsHttp || n.propsHttp,
|
|
4072
|
+
size: n.column.size || n.size,
|
|
4073
|
+
"table-data": n.tableData,
|
|
4074
|
+
type: n.type || n.column.type,
|
|
4075
|
+
"column-slot": n.columnSlot
|
|
4076
|
+
}, At(a.event), { onKeyup: Pt(a.enterChange, ["enter"]) }), j({
|
|
4077
|
+
default: Y(() => [a.params.html ? (V(), k("span", {
|
|
4078
|
+
key: 0,
|
|
4079
|
+
innerHTML: a.params.html
|
|
4080
|
+
}, null, 8, ai)) : O("v-if", !0)]),
|
|
4081
|
+
_: 2
|
|
4082
|
+
}, [W(e.getSlotName(n.column, "T", e.$slots) ? [n.column] : [], (t) => ({
|
|
4083
|
+
name: t,
|
|
4084
|
+
fn: Y((n) => [G(e.$slots, e.getSlotName(t, "T"), z(F(n)))])
|
|
4085
|
+
})), W(n.columnSlot, (t) => ({
|
|
4086
|
+
name: t,
|
|
4087
|
+
fn: Y((n) => [G(e.$slots, t, z(F(n || {})))])
|
|
4088
|
+
}))]), 1040, [
|
|
4089
|
+
"modelValue",
|
|
4090
|
+
"column",
|
|
4091
|
+
"dic",
|
|
4092
|
+
"disabled",
|
|
4093
|
+
"readonly",
|
|
4094
|
+
"placeholder",
|
|
4095
|
+
"props",
|
|
4096
|
+
"props-http",
|
|
4097
|
+
"size",
|
|
4098
|
+
"table-data",
|
|
4099
|
+
"type",
|
|
4100
|
+
"column-slot",
|
|
4101
|
+
"onKeyup"
|
|
4102
|
+
]);
|
|
4103
|
+
}
|
|
4104
|
+
var si = /* @__PURE__ */ y(ii, [["render", oi]]), ci = (e, t, n, r) => {
|
|
4105
|
+
if (!r) return;
|
|
4106
|
+
if (!window.Mock) {
|
|
4107
|
+
ut.logs("mock");
|
|
4108
|
+
return;
|
|
4109
|
+
}
|
|
4110
|
+
let i = (window.Mock || {}).Random, a = {};
|
|
4111
|
+
function o({ en: e }) {
|
|
4112
|
+
return e ? i.name(!0) : i.cname();
|
|
4113
|
+
}
|
|
4114
|
+
function s({ max: e, min: t, precision: n }) {
|
|
4115
|
+
if (n) {
|
|
4116
|
+
let r = `${i.float(t, e, n)}`, a = r.indexOf(".") + 1;
|
|
4117
|
+
return Number(r.substring(0, a + n));
|
|
4118
|
+
} else return i.integer(t, e);
|
|
4119
|
+
}
|
|
4120
|
+
function c({ header: e }) {
|
|
4121
|
+
let t = i.url(), n = t.indexOf("://");
|
|
4122
|
+
return t = e === !1 ? t.substring(n + 3) : `http://${t.substring(n + 3)}`, t;
|
|
4123
|
+
}
|
|
4124
|
+
function l({ format: e, now: t }) {
|
|
4125
|
+
return t ? i.now(e) : i.datetime(e);
|
|
4126
|
+
}
|
|
4127
|
+
function u({ min: e, max: t }) {
|
|
4128
|
+
return i.csentence(e, t);
|
|
4129
|
+
}
|
|
4130
|
+
function d() {
|
|
4131
|
+
return i.county(!0);
|
|
4132
|
+
}
|
|
4133
|
+
function f({ dic: e, props: t, columnType: n, multiple: r }) {
|
|
4134
|
+
let i = t.value || "value", a = e.length;
|
|
4135
|
+
if (["checkbox"].includes(n) || r) {
|
|
4136
|
+
let t = s({
|
|
4137
|
+
min: 1,
|
|
4138
|
+
max: a
|
|
4139
|
+
}), n = [];
|
|
4140
|
+
for (let r = 0; r < t; r++) {
|
|
4141
|
+
let t = !0;
|
|
4142
|
+
for (; t;) {
|
|
4143
|
+
let r = e[s({
|
|
4144
|
+
min: 0,
|
|
4145
|
+
max: a - 1
|
|
4146
|
+
})][i];
|
|
4147
|
+
n.includes(r) || (n.push(r), t = !1);
|
|
4148
|
+
}
|
|
4149
|
+
}
|
|
4150
|
+
return n;
|
|
4151
|
+
} else return e[s({
|
|
4152
|
+
min: 0,
|
|
4153
|
+
max: a - 1
|
|
4154
|
+
})][i];
|
|
4155
|
+
}
|
|
4156
|
+
function p() {
|
|
4157
|
+
Object.keys(e).forEach((r) => {
|
|
4158
|
+
let i = e[r];
|
|
4159
|
+
if (i.mock && typeof i.mock == "object") {
|
|
4160
|
+
let e = i.mock;
|
|
4161
|
+
switch (e.dic = typeof i.dicData == "string" ? t[i.dicData] : i.dicData || [], e.props = i.props || {}, e.columnType = i.type, e.multiple = i.multiple, e.type) {
|
|
4162
|
+
case "name":
|
|
4163
|
+
a[i.prop] = o(e);
|
|
4164
|
+
break;
|
|
4165
|
+
case "number":
|
|
4166
|
+
a[i.prop] = s(e);
|
|
4167
|
+
break;
|
|
4168
|
+
case "datetime":
|
|
4169
|
+
a[i.prop] = l(e);
|
|
4170
|
+
break;
|
|
4171
|
+
case "word":
|
|
4172
|
+
a[i.prop] = u(e);
|
|
4173
|
+
break;
|
|
4174
|
+
case "url":
|
|
4175
|
+
a[i.prop] = c(e);
|
|
4176
|
+
break;
|
|
4177
|
+
case "county":
|
|
4178
|
+
a[i.prop] = d();
|
|
4179
|
+
break;
|
|
4180
|
+
case "dic":
|
|
4181
|
+
a[i.prop] = f(e);
|
|
4182
|
+
break;
|
|
4183
|
+
}
|
|
4184
|
+
} else i.mock instanceof Function && (a[i.prop] = i.mock(n));
|
|
4185
|
+
});
|
|
4186
|
+
}
|
|
4187
|
+
return p(), a;
|
|
4188
|
+
}, li = {
|
|
4189
|
+
name: "FyForm",
|
|
4190
|
+
mixins: [Gr],
|
|
4191
|
+
provide() {
|
|
4192
|
+
return { formSafe: this };
|
|
4193
|
+
},
|
|
4194
|
+
props: {
|
|
4195
|
+
uploadBefore: Function,
|
|
4196
|
+
uploadAfter: Function,
|
|
4197
|
+
uploadDelete: Function,
|
|
4198
|
+
uploadPreview: Function,
|
|
4199
|
+
uploadError: Function,
|
|
4200
|
+
uploadExceed: Function,
|
|
4201
|
+
status: {
|
|
4202
|
+
type: Boolean,
|
|
4203
|
+
default: !1
|
|
4204
|
+
},
|
|
4205
|
+
isCrud: {
|
|
4206
|
+
type: Boolean,
|
|
4207
|
+
default: !1
|
|
4208
|
+
},
|
|
4209
|
+
modelValue: {
|
|
4210
|
+
type: Object,
|
|
4211
|
+
default: () => ({})
|
|
4212
|
+
}
|
|
4213
|
+
},
|
|
4214
|
+
emits: [
|
|
4215
|
+
"submit",
|
|
4216
|
+
"error",
|
|
4217
|
+
"tab-click",
|
|
4218
|
+
"change",
|
|
4219
|
+
"update:modelValue",
|
|
4220
|
+
"reset-change"
|
|
4221
|
+
],
|
|
4222
|
+
data() {
|
|
4223
|
+
return {
|
|
4224
|
+
activeName: "",
|
|
4225
|
+
labelWidth: 90,
|
|
4226
|
+
allDisabled: !1,
|
|
4227
|
+
optionIndex: [],
|
|
4228
|
+
optionBox: !1,
|
|
4229
|
+
tableOption: {},
|
|
4230
|
+
itemSpanDefault: 12,
|
|
4231
|
+
form: {},
|
|
4232
|
+
formCreate: !1,
|
|
4233
|
+
formList: [],
|
|
4234
|
+
formBind: {}
|
|
4235
|
+
};
|
|
4236
|
+
},
|
|
4237
|
+
computed: {
|
|
4238
|
+
columnSlot() {
|
|
4239
|
+
return Object.keys(this.$slots).filter((e) => !this.propOption.map((e) => e.prop).includes(e));
|
|
4240
|
+
},
|
|
4241
|
+
labelSuffix() {
|
|
4242
|
+
return this.parentOption.labelSuffix || ":";
|
|
4243
|
+
},
|
|
4244
|
+
isMenu() {
|
|
4245
|
+
return this.columnOption.length !== 1;
|
|
4246
|
+
},
|
|
4247
|
+
isDetail() {
|
|
4248
|
+
return this.detail === !0;
|
|
4249
|
+
},
|
|
4250
|
+
isTabs() {
|
|
4251
|
+
return this.parentOption.tabs === !0;
|
|
4252
|
+
},
|
|
4253
|
+
isAdd() {
|
|
4254
|
+
return this.boxType === "add";
|
|
4255
|
+
},
|
|
4256
|
+
isEdit() {
|
|
4257
|
+
return this.boxType === "edit";
|
|
4258
|
+
},
|
|
4259
|
+
isView() {
|
|
4260
|
+
return this.boxType === "view";
|
|
4261
|
+
},
|
|
4262
|
+
gutter() {
|
|
4263
|
+
return Ie((this.parentOption.gutter || 10) / 2);
|
|
4264
|
+
},
|
|
4265
|
+
detail() {
|
|
4266
|
+
return this.parentOption.detail;
|
|
4267
|
+
},
|
|
4268
|
+
disabled() {
|
|
4269
|
+
return this.parentOption.disabled;
|
|
4270
|
+
},
|
|
4271
|
+
readonly() {
|
|
4272
|
+
return this.parentOption.readonly;
|
|
4273
|
+
},
|
|
4274
|
+
tabsType() {
|
|
4275
|
+
return this.parentOption.tabsType;
|
|
4276
|
+
},
|
|
4277
|
+
columnLen() {
|
|
4278
|
+
return this.columnOption.length;
|
|
4279
|
+
},
|
|
4280
|
+
dynamicOption() {
|
|
4281
|
+
let e = [];
|
|
4282
|
+
return this.propOption.forEach((t) => {
|
|
4283
|
+
t.type === "dynamic" && this.vaildDisplay(t) && e.push(t);
|
|
4284
|
+
}), e;
|
|
4285
|
+
},
|
|
4286
|
+
propOption() {
|
|
4287
|
+
let e = [];
|
|
4288
|
+
return this.columnOption.forEach((t) => {
|
|
4289
|
+
t.display !== !1 && t.column.forEach((t) => {
|
|
4290
|
+
e.push(t);
|
|
4291
|
+
});
|
|
4292
|
+
}), e;
|
|
4293
|
+
},
|
|
4294
|
+
parentOption() {
|
|
4295
|
+
return this.tableOption || {};
|
|
4296
|
+
},
|
|
4297
|
+
columnOption() {
|
|
4298
|
+
let e = this.tableOption.column || [], t = S(this.tableOption.group) || [], n = this.tableOption.footer || [];
|
|
4299
|
+
return t.unshift({
|
|
4300
|
+
header: !1,
|
|
4301
|
+
column: e
|
|
4302
|
+
}), n.length !== 0 && t.push({
|
|
4303
|
+
header: !1,
|
|
4304
|
+
column: n
|
|
4305
|
+
}), t.forEach((e) => {
|
|
4306
|
+
e.column = e.column || [], e.column.forEach((e, t) => {
|
|
4307
|
+
e.display !== !1 && !this.isMobile && (e = Ge(e, this.itemSpanDefault, t === 0));
|
|
4308
|
+
}), e.column = qe(e.column), e.column = e.column.sort((e, t) => (t.order || 0) - (e.order || 0));
|
|
4309
|
+
}), t;
|
|
4310
|
+
},
|
|
4311
|
+
menuPosition() {
|
|
4312
|
+
return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center";
|
|
4313
|
+
},
|
|
4314
|
+
boxType() {
|
|
4315
|
+
return this.parentOption.boxType;
|
|
4316
|
+
},
|
|
4317
|
+
isPrint() {
|
|
4318
|
+
return this.parentOption.printBtn === !0;
|
|
4319
|
+
},
|
|
4320
|
+
tabsActive() {
|
|
4321
|
+
return this.tableOption.tabsActive || "1";
|
|
4322
|
+
},
|
|
4323
|
+
isMock() {
|
|
4324
|
+
return this.parentOption.mockBtn === !0;
|
|
4325
|
+
}
|
|
4326
|
+
},
|
|
4327
|
+
watch: {
|
|
4328
|
+
modelValue: {
|
|
4329
|
+
handler() {
|
|
4330
|
+
this.formCreate && this.setForm();
|
|
4331
|
+
},
|
|
4332
|
+
deep: !0
|
|
4333
|
+
},
|
|
4334
|
+
form: {
|
|
4335
|
+
handler() {
|
|
4336
|
+
this.formCreate && (this.setLabel(), this.setVal());
|
|
4337
|
+
},
|
|
4338
|
+
deep: !0
|
|
4339
|
+
},
|
|
4340
|
+
tabsActive: {
|
|
4341
|
+
handler() {
|
|
4342
|
+
this.activeName = this.tabsActive;
|
|
4343
|
+
},
|
|
4344
|
+
immediate: !0
|
|
4345
|
+
},
|
|
4346
|
+
DIC: {
|
|
4347
|
+
handler() {
|
|
4348
|
+
this.setLabel();
|
|
4349
|
+
},
|
|
4350
|
+
deep: !0,
|
|
4351
|
+
immediate: !0
|
|
4352
|
+
},
|
|
4353
|
+
allDisabled: {
|
|
4354
|
+
handler(e) {
|
|
4355
|
+
this.$emit("update:status", e);
|
|
4356
|
+
},
|
|
4357
|
+
deep: !0,
|
|
4358
|
+
immediate: !0
|
|
4359
|
+
}
|
|
4360
|
+
},
|
|
4361
|
+
mounted() {
|
|
4362
|
+
setTimeout(() => {
|
|
4363
|
+
this.dataFormat();
|
|
4364
|
+
});
|
|
4365
|
+
},
|
|
4366
|
+
beforeUnmount() {
|
|
4367
|
+
Object.keys(this.formBind).forEach((e) => {
|
|
4368
|
+
this.formBind[e].forEach((e) => {
|
|
4369
|
+
e();
|
|
4370
|
+
});
|
|
4371
|
+
});
|
|
4372
|
+
},
|
|
4373
|
+
methods: {
|
|
4374
|
+
setPx: Ie,
|
|
4375
|
+
deepClone: S,
|
|
4376
|
+
getComponent: Qe,
|
|
4377
|
+
getPlaceholder: Ke,
|
|
4378
|
+
uploadFun: He,
|
|
4379
|
+
getDisabled(e) {
|
|
4380
|
+
return this.vaildDetail(e) || this.isDetail || this.vaildDisabled(e) || this.allDisabled;
|
|
4381
|
+
},
|
|
4382
|
+
getSpan(e) {
|
|
4383
|
+
return e.span || this.parentOption.span || this.itemSpanDefault;
|
|
4384
|
+
},
|
|
4385
|
+
isGroupShow(e, t) {
|
|
4386
|
+
return this.isTabs ? `${t}` === this.activeName || t === 0 : !0;
|
|
4387
|
+
},
|
|
4388
|
+
dataFormat() {
|
|
4389
|
+
let e = Xe(this.propOption).tableForm, t = this.modelValue, n = {};
|
|
4390
|
+
Object.entries(Object.assign(e, t)).forEach((e) => {
|
|
4391
|
+
let r = e[0], i = e[1];
|
|
4392
|
+
Q(t[r]) ? n[r] = i : n[r] = t[r];
|
|
4393
|
+
}), this.form = n, this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
|
|
4394
|
+
this.formCreate = !0, this.clearValidate();
|
|
4395
|
+
});
|
|
4396
|
+
},
|
|
4397
|
+
setControl() {
|
|
4398
|
+
this.propOption.forEach((e) => {
|
|
4399
|
+
let t = e.prop, n = e.bind, r = e.control;
|
|
4400
|
+
if (!this.formBind[t]) {
|
|
4401
|
+
let i = [];
|
|
4402
|
+
if (n) {
|
|
4403
|
+
let e = this.$watch(`form.${t}`, (e, t) => {
|
|
4404
|
+
e !== t && Le(this.form, n, e);
|
|
4405
|
+
}), r = this.$watch(`form.${n}`, (e, n) => {
|
|
4406
|
+
e !== n && (this.form[t] = e);
|
|
4407
|
+
});
|
|
4408
|
+
i.push(e), i.push(r), this.form[t] = Fe(this.form, n);
|
|
4409
|
+
}
|
|
4410
|
+
if (r) {
|
|
4411
|
+
let n = () => {
|
|
4412
|
+
let t = r(this.form[e.prop], this.form) || {};
|
|
4413
|
+
Object.keys(t).forEach((e) => {
|
|
4414
|
+
let n = Object.assign(this.objectOption[e] || {}, t[e]);
|
|
4415
|
+
this.objectOption[e] = n, t[e].dicData && (this.DIC[e] = t[e].dicData);
|
|
4416
|
+
});
|
|
4417
|
+
}, a = this.$watch(`form.${t}`, () => {
|
|
4418
|
+
n();
|
|
4419
|
+
});
|
|
4420
|
+
i.push(a), n();
|
|
4421
|
+
}
|
|
4422
|
+
this.formBind[t] = i;
|
|
4423
|
+
}
|
|
4424
|
+
});
|
|
4425
|
+
},
|
|
4426
|
+
setForm() {
|
|
4427
|
+
Object.keys(this.modelValue).forEach((e) => {
|
|
4428
|
+
this.form[e] = this.modelValue[e];
|
|
4429
|
+
});
|
|
4430
|
+
},
|
|
4431
|
+
setVal() {
|
|
4432
|
+
this.$emit("update:modelValue", this.form), this.$emit("change", this.form);
|
|
4433
|
+
},
|
|
4434
|
+
setLabel() {
|
|
4435
|
+
this.tableOption.filterNull === !0 && (this.form = C(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = C(this.form, ["$"], !1) : this.propOption.forEach((e) => {
|
|
4436
|
+
let t = this.DIC[e.prop];
|
|
4437
|
+
if (Q(t)) return;
|
|
4438
|
+
let n = Xn(this.form, e, this.tableOption, t);
|
|
4439
|
+
n ? this.form[`$${e.prop}`] = n : delete this.form[`$${e.prop}`];
|
|
4440
|
+
});
|
|
4441
|
+
},
|
|
4442
|
+
handleGroupClick(e) {
|
|
4443
|
+
this.$emit("tab-click", e);
|
|
4444
|
+
},
|
|
4445
|
+
handleTabClick(e, t) {
|
|
4446
|
+
this.$emit("tab-click", e, t);
|
|
4447
|
+
},
|
|
4448
|
+
getLabelWidth(e, t) {
|
|
4449
|
+
let n;
|
|
4450
|
+
return n = Q(e.labelWidth) ? Q(t.labelWidth) ? this.parentOption.labelWidth : t.labelWidth : e.labelWidth, Ie(n, this.labelWidth);
|
|
4451
|
+
},
|
|
4452
|
+
validateField(e) {
|
|
4453
|
+
return this.$refs.form.validateField(e);
|
|
4454
|
+
},
|
|
4455
|
+
validTip(e) {
|
|
4456
|
+
return !e.tip || e.type === "upload";
|
|
4457
|
+
},
|
|
4458
|
+
getPropRef(e) {
|
|
4459
|
+
return this.$refs[e][0];
|
|
4460
|
+
},
|
|
4461
|
+
handleChange(e, t) {
|
|
4462
|
+
this.$nextTick(() => {
|
|
4463
|
+
let n = t.cascader, r = n.join(",");
|
|
4464
|
+
n.forEach((i) => {
|
|
4465
|
+
let a = i, o = this.form[t.prop], s = this.findObject(e, a);
|
|
4466
|
+
Q(s) || (this.formList.includes(r) && n.forEach((e) => {
|
|
4467
|
+
this.form[e] = "", this.DIC[e] = [];
|
|
4468
|
+
}), !(Q(n) || Q(o) || Q(s)) && at({
|
|
4469
|
+
column: s,
|
|
4470
|
+
value: o,
|
|
4471
|
+
form: this.form
|
|
4472
|
+
}).then((e) => {
|
|
4473
|
+
this.formList.includes(r) || this.formList.push(r);
|
|
4474
|
+
let t = e || [];
|
|
4475
|
+
this.DIC[a] = t, !Q(t) && !Q(t) && !Q(s.cascaderIndex) && Q(this.form[a]) && (this.form[a] = t[s.cascaderIndex][(s.props || {}).value || x.value]);
|
|
4476
|
+
}));
|
|
4477
|
+
});
|
|
4478
|
+
});
|
|
4479
|
+
},
|
|
4480
|
+
handlePrint() {
|
|
4481
|
+
this.$Print(this.$el);
|
|
4482
|
+
},
|
|
4483
|
+
propChange(e, t) {
|
|
4484
|
+
t.cascader && this.handleChange(e, t);
|
|
4485
|
+
},
|
|
4486
|
+
handleMock() {
|
|
4487
|
+
this.isMock && (this.columnOption.forEach((e) => {
|
|
4488
|
+
let t = ci(e.column, this.DIC, this.form, this.isMock);
|
|
4489
|
+
Q(t) || Object.keys(t).forEach((e) => {
|
|
4490
|
+
this.form[e] = t[e];
|
|
4491
|
+
});
|
|
4492
|
+
}), this.$nextTick(() => {
|
|
4493
|
+
this.clearValidate(), this.$emit("mock-change", this.form);
|
|
4494
|
+
}));
|
|
4495
|
+
},
|
|
4496
|
+
vaildDetail(e) {
|
|
4497
|
+
let t;
|
|
4498
|
+
if (this.detail) return !1;
|
|
4499
|
+
if (!Q(e.detail)) t = "detail";
|
|
4500
|
+
else if (this.isAdd) t = "addDetail";
|
|
4501
|
+
else if (this.isEdit) t = "editDetail";
|
|
4502
|
+
else if (this.isView) return !1;
|
|
4503
|
+
return t ? e[t] === !0 : !1;
|
|
4504
|
+
},
|
|
4505
|
+
vaildDisabled(e) {
|
|
4506
|
+
let t;
|
|
4507
|
+
if (this.disabled) return !0;
|
|
4508
|
+
if (!Q(e.disabled)) t = "disabled";
|
|
4509
|
+
else if (this.isAdd) t = "addDisabled";
|
|
4510
|
+
else if (this.isEdit) t = "editDisabled";
|
|
4511
|
+
else if (this.isView) return !0;
|
|
4512
|
+
return t ? e[t] === !0 : !1;
|
|
4513
|
+
},
|
|
4514
|
+
vaildDisplay(e) {
|
|
4515
|
+
let t;
|
|
4516
|
+
return Q(e.display) ? this.isAdd ? t = "addDisplay" : this.isEdit ? t = "editDisplay" : this.isView && (t = "viewDisplay") : t = "display", t ? w(e[t], !0) : !0;
|
|
4517
|
+
},
|
|
4518
|
+
clearValidate(e) {
|
|
4519
|
+
var t;
|
|
4520
|
+
(t = this.$refs.form) == null || t.clearValidate(e);
|
|
4521
|
+
},
|
|
4522
|
+
validateCellForm() {
|
|
4523
|
+
return new Promise((e) => {
|
|
4524
|
+
this.$refs.form.validate((t, n) => {
|
|
4525
|
+
e(n);
|
|
4526
|
+
});
|
|
4527
|
+
});
|
|
4528
|
+
},
|
|
4529
|
+
validate(e) {
|
|
4530
|
+
this.$refs.form.validate((t, n) => {
|
|
4531
|
+
let r = [], i = [], a = {};
|
|
4532
|
+
this.dynamicOption.forEach((e) => {
|
|
4533
|
+
let t = e.children.type === "form";
|
|
4534
|
+
i.push(e.prop), t ? Q(this.$refs[e.prop][0].$refs.temp.$refs.main) || this.$refs[e.prop][0].$refs.temp.$refs.main.forEach((e) => {
|
|
4535
|
+
r.push(e.validateCellForm());
|
|
4536
|
+
}) : r.push(this.$refs[e.prop][0].$refs.temp.$refs.main.validateCellForm());
|
|
4537
|
+
}), Promise.all(r).then((t) => {
|
|
4538
|
+
t.forEach((e, t) => {
|
|
4539
|
+
Q(e) || (a[i[t]] = e);
|
|
4540
|
+
});
|
|
4541
|
+
let r = Object.assign(a, n);
|
|
4542
|
+
Q(r) ? (this.show(), e(!0, this.hide)) : e(!1, this.hide, r);
|
|
4543
|
+
});
|
|
4544
|
+
});
|
|
4545
|
+
},
|
|
4546
|
+
resetForm(e = !0) {
|
|
4547
|
+
if (e) {
|
|
4548
|
+
let e = this.propOption.map((e) => e.prop);
|
|
4549
|
+
this.form = ze(this.form, e, (this.tableOption.filterParams || []).concat([this.rowKey]));
|
|
4550
|
+
}
|
|
4551
|
+
this.$nextTick(() => {
|
|
4552
|
+
this.clearValidate(), this.$emit("reset-change");
|
|
4553
|
+
});
|
|
4554
|
+
},
|
|
4555
|
+
resetFields() {
|
|
4556
|
+
this.$refs.form.resetFields();
|
|
4557
|
+
},
|
|
4558
|
+
show() {
|
|
4559
|
+
this.allDisabled = !0;
|
|
4560
|
+
},
|
|
4561
|
+
hide() {
|
|
4562
|
+
this.allDisabled = !1;
|
|
4563
|
+
},
|
|
4564
|
+
submit() {
|
|
4565
|
+
this.validate((e, t) => {
|
|
4566
|
+
e ? this.$emit("submit", C(this.form, ["$"]), this.hide) : this.$emit("error", t);
|
|
4567
|
+
});
|
|
4568
|
+
}
|
|
4569
|
+
}
|
|
4570
|
+
}, ui = ["innerHTML"];
|
|
4571
|
+
function di(e, t, n, r, i, a) {
|
|
4572
|
+
var o;
|
|
4573
|
+
let s = Oe, c = De, l = g, u = si, d = _, f = fe, p = Wn, m = Vn, ee = pe, h = re;
|
|
4574
|
+
return V(), k("div", {
|
|
4575
|
+
class: R(["avue-form", { "avue--detail": a.isDetail }]),
|
|
4576
|
+
style: B({ width: a.setPx(a.parentOption.formWidth, "100%") })
|
|
4577
|
+
}, [N(h, {
|
|
4578
|
+
ref: "form",
|
|
4579
|
+
"status-icon": a.parentOption.statusIcon,
|
|
4580
|
+
model: i.form,
|
|
4581
|
+
"label-suffix": a.labelSuffix,
|
|
4582
|
+
size: ((o = e.AVUE) == null ? void 0 : o.formSize) || e.controlSize,
|
|
4583
|
+
"label-position": a.parentOption.labelPosition,
|
|
4584
|
+
"label-width": a.setPx(a.parentOption.labelWidth, i.labelWidth),
|
|
4585
|
+
onSubmit: t[1] || (t[1] = Z(() => {}, ["prevent"]))
|
|
4586
|
+
}, {
|
|
4587
|
+
default: Y(() => [N(ee, {
|
|
4588
|
+
span: 24,
|
|
4589
|
+
class: R({ "avue-form__tabs": a.isTabs })
|
|
4590
|
+
}, {
|
|
4591
|
+
default: Y(() => [(V(!0), k(T, null, W(a.columnOption, (n, r) => (V(), D(m, {
|
|
4592
|
+
key: n.prop,
|
|
4593
|
+
tabs: a.isTabs,
|
|
4594
|
+
arrow: n.arrow,
|
|
4595
|
+
collapse: n.collapse,
|
|
4596
|
+
display: a.vaildDisplay(n),
|
|
4597
|
+
icon: n.icon,
|
|
4598
|
+
index: r,
|
|
4599
|
+
header: !a.isTabs,
|
|
4600
|
+
active: i.activeName,
|
|
4601
|
+
label: n.label,
|
|
4602
|
+
onChange: a.handleGroupClick
|
|
4603
|
+
}, j({
|
|
4604
|
+
tabs: Y(() => [a.isTabs && r === 1 ? (V(), D(c, {
|
|
4605
|
+
key: 0,
|
|
4606
|
+
modelValue: i.activeName,
|
|
4607
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => i.activeName = e),
|
|
4608
|
+
class: "avue-form__tabs",
|
|
4609
|
+
type: a.tabsType,
|
|
4610
|
+
onTabClick: a.handleTabClick
|
|
4611
|
+
}, {
|
|
4612
|
+
default: Y(() => [(V(!0), k(T, null, W(a.columnOption, (t, n) => (V(), k(T, null, [a.vaildDisplay(t) && n !== 0 ? (V(), D(s, {
|
|
4613
|
+
key: n,
|
|
4614
|
+
name: `${n}`
|
|
4615
|
+
}, {
|
|
4616
|
+
label: Y(() => [A("span", null, [e.getSlotName(t, "H", e.$slots) ? G(e.$slots, e.getSlotName(t, "H"), {
|
|
4617
|
+
key: 0,
|
|
4618
|
+
column: e.column
|
|
4619
|
+
}) : (V(), k(T, { key: 1 }, [A("i", { class: R(t.icon) }, "\xA0", 2), M(" " + q(t.label), 1)], 64))])]),
|
|
4620
|
+
_: 2
|
|
4621
|
+
}, 1032, ["name"])) : O("v-if", !0)], 64))), 256))]),
|
|
4622
|
+
_: 3
|
|
4623
|
+
}, 8, [
|
|
4624
|
+
"modelValue",
|
|
4625
|
+
"type",
|
|
4626
|
+
"onTabClick"
|
|
4627
|
+
])) : O("v-if", !0)]),
|
|
4628
|
+
default: Y(() => [X(A("div", { class: R(["avue-form__group", { "avue-form__group--flex": n.flex === !1 }]) }, [(V(!0), k(T, null, W(n.column, (r, o) => (V(), k(T, null, [a.vaildDisplay(r) ? (V(), D(f, {
|
|
4629
|
+
key: o,
|
|
4630
|
+
style: B({
|
|
4631
|
+
paddingLeft: a.gutter,
|
|
4632
|
+
paddingRight: a.gutter
|
|
4633
|
+
}),
|
|
4634
|
+
span: a.getSpan(r),
|
|
4635
|
+
md: a.getSpan(r),
|
|
4636
|
+
sm: r.smSpan || n.smSpan || 12,
|
|
4637
|
+
xs: r.xsSpan || n.xmSpan || 24,
|
|
4638
|
+
offset: r.offset || n.offset,
|
|
4639
|
+
push: r.push || n.push,
|
|
4640
|
+
pull: r.pull || n.pull,
|
|
4641
|
+
class: R([
|
|
4642
|
+
"avue-form__row",
|
|
4643
|
+
{ "avue--detail avue--detail__column": a.vaildDetail(r) },
|
|
4644
|
+
r.className
|
|
4645
|
+
])
|
|
4646
|
+
}, {
|
|
4647
|
+
default: Y(() => [N(d, {
|
|
4648
|
+
prop: r.prop,
|
|
4649
|
+
label: r.label,
|
|
4650
|
+
rules: r.rules,
|
|
4651
|
+
class: R(`avue-form__item--${r.labelPosition || n.labelPosition || ""}`),
|
|
4652
|
+
"label-position": r.labelPosition || n.labelPosition || a.parentOption.labelPosition,
|
|
4653
|
+
"label-width": a.getLabelWidth(r, n)
|
|
4654
|
+
}, j({
|
|
4655
|
+
default: Y(() => [(V(), D(kt(a.validTip(r) ? "div" : "elTooltip"), {
|
|
4656
|
+
class: "avue-form-item-input-wrapper",
|
|
4657
|
+
disabled: a.validTip(r),
|
|
4658
|
+
content: r.tip || a.getPlaceholder(r),
|
|
4659
|
+
placement: r.tipPlacement
|
|
4660
|
+
}, {
|
|
4661
|
+
default: Y(() => [e.$slots[r.prop] ? G(e.$slots, r.prop, {
|
|
4662
|
+
key: 0,
|
|
4663
|
+
modelValue: i.form[r.prop],
|
|
4664
|
+
column: r,
|
|
4665
|
+
label: i.form[`$${r.prop}`],
|
|
4666
|
+
size: r.size || e.controlSize,
|
|
4667
|
+
readonly: a.readonly || r.readonly,
|
|
4668
|
+
disabled: a.getDisabled(r),
|
|
4669
|
+
dic: e.DIC[r.prop]
|
|
4670
|
+
}) : (V(), D(u, L({
|
|
4671
|
+
key: 1,
|
|
4672
|
+
ref_for: !0,
|
|
4673
|
+
ref: r.prop
|
|
4674
|
+
}, { ref_for: !0 }, a.uploadFun(r), {
|
|
4675
|
+
modelValue: i.form[r.prop],
|
|
4676
|
+
"onUpdate:modelValue": (e) => i.form[r.prop] = e,
|
|
4677
|
+
column: r,
|
|
4678
|
+
dic: e.DIC[r.prop],
|
|
4679
|
+
props: a.parentOption.props,
|
|
4680
|
+
"props-http": a.parentOption.propsHttp,
|
|
4681
|
+
disabled: a.getDisabled(r),
|
|
4682
|
+
readonly: r.readonly || a.readonly,
|
|
4683
|
+
enter: a.parentOption.enter,
|
|
4684
|
+
size: r.size || e.controlSize,
|
|
4685
|
+
"column-slot": a.columnSlot,
|
|
4686
|
+
onEnter: a.submit,
|
|
4687
|
+
onChange: (e) => a.propChange(n.column, r)
|
|
4688
|
+
}), j({
|
|
4689
|
+
default: Y(() => [(V(!0), k(T, null, W(e.getSlotName(r, "T", e.$slots) ? [r] : [], (t) => G(e.$slots, e.getSlotName(t, "T"), L({ ref_for: !0 }, e.scope))), 256))]),
|
|
4690
|
+
_: 2
|
|
4691
|
+
}, [W(a.columnSlot, (t) => ({
|
|
4692
|
+
name: t,
|
|
4693
|
+
fn: Y((n) => [G(e.$slots, t, L({ ref_for: !0 }, n))])
|
|
4694
|
+
}))]), 1040, [
|
|
4695
|
+
"modelValue",
|
|
4696
|
+
"onUpdate:modelValue",
|
|
4697
|
+
"column",
|
|
4698
|
+
"dic",
|
|
4699
|
+
"props",
|
|
4700
|
+
"props-http",
|
|
4701
|
+
"disabled",
|
|
4702
|
+
"readonly",
|
|
4703
|
+
"enter",
|
|
4704
|
+
"size",
|
|
4705
|
+
"column-slot",
|
|
4706
|
+
"onEnter",
|
|
4707
|
+
"onChange"
|
|
4708
|
+
]))]),
|
|
4709
|
+
_: 2
|
|
4710
|
+
}, 1032, [
|
|
4711
|
+
"disabled",
|
|
4712
|
+
"content",
|
|
4713
|
+
"placement"
|
|
4714
|
+
]))]),
|
|
4715
|
+
_: 2
|
|
4716
|
+
}, [e.getSlotName(r, "L", e.$slots) ? {
|
|
4717
|
+
name: "label",
|
|
4718
|
+
fn: Y(() => [G(e.$slots, e.getSlotName(r, "L"), {
|
|
4719
|
+
column: r,
|
|
4720
|
+
modelValue: i.form[r.prop],
|
|
4721
|
+
readonly: r.readonly || a.readonly,
|
|
4722
|
+
disabled: a.getDisabled(r),
|
|
4723
|
+
size: r.size || e.controlSize,
|
|
4724
|
+
dic: e.DIC[r.prop]
|
|
4725
|
+
})]),
|
|
4726
|
+
key: "0"
|
|
4727
|
+
} : r.labelTip ? {
|
|
4728
|
+
name: "label",
|
|
4729
|
+
fn: Y(() => [N(l, {
|
|
4730
|
+
class: "item",
|
|
4731
|
+
effect: "dark",
|
|
4732
|
+
placement: r.labelTipPlacement || "top-start"
|
|
4733
|
+
}, {
|
|
4734
|
+
content: Y(() => [A("div", { innerHTML: r.labelTip }, null, 8, ui)]),
|
|
4735
|
+
default: Y(() => [t[2] || (t[2] = A("i", { class: "el-icon-info" }, null, -1))]),
|
|
4736
|
+
_: 2
|
|
4737
|
+
}, 1032, ["placement"]), A("span", null, q(r.label) + q(a.labelSuffix), 1)]),
|
|
4738
|
+
key: "1"
|
|
4739
|
+
} : void 0, e.getSlotName(r, "E", e.$slots) ? {
|
|
4740
|
+
name: "error",
|
|
4741
|
+
fn: Y((t) => [G(e.$slots, e.getSlotName(r, "E"), L({ ref_for: !0 }, Object.assign(t, {
|
|
4742
|
+
column: r,
|
|
4743
|
+
value: i.form[r.prop],
|
|
4744
|
+
readonly: a.readonly || r.readonly,
|
|
4745
|
+
disabled: a.getDisabled(r),
|
|
4746
|
+
size: r.size || e.controlSize,
|
|
4747
|
+
dic: e.DIC[r.prop]
|
|
4748
|
+
})))]),
|
|
4749
|
+
key: "2"
|
|
4750
|
+
} : void 0]), 1032, [
|
|
4751
|
+
"prop",
|
|
4752
|
+
"label",
|
|
4753
|
+
"rules",
|
|
4754
|
+
"class",
|
|
4755
|
+
"label-position",
|
|
4756
|
+
"label-width"
|
|
4757
|
+
])]),
|
|
4758
|
+
_: 2
|
|
4759
|
+
}, 1032, [
|
|
4760
|
+
"style",
|
|
4761
|
+
"span",
|
|
4762
|
+
"md",
|
|
4763
|
+
"sm",
|
|
4764
|
+
"xs",
|
|
4765
|
+
"offset",
|
|
4766
|
+
"push",
|
|
4767
|
+
"pull",
|
|
4768
|
+
"class"
|
|
4769
|
+
])) : O("v-if", !0), a.vaildDisplay(r) && r.row && r.span !== 24 && r.count ? (V(), k("div", {
|
|
4770
|
+
key: `line${o}`,
|
|
4771
|
+
class: "avue-form__line",
|
|
4772
|
+
style: B({ width: `${r.count / 24 * 100}%` })
|
|
4773
|
+
}, null, 4)) : O("v-if", !0)], 64))), 256)), !a.isDetail && !a.isMenu ? (V(), D(p, { key: 0 }, {
|
|
4774
|
+
menuForm: Y((t) => [G(e.$slots, "menuForm", L({ ref_for: !0 }, t))]),
|
|
4775
|
+
_: 3
|
|
4776
|
+
})) : O("v-if", !0)], 2), [[Mt, a.isGroupShow(n, r)]])]),
|
|
4777
|
+
_: 2
|
|
4778
|
+
}, [e.getSlotName(n, "H", e.$slots) ? {
|
|
4779
|
+
name: "header",
|
|
4780
|
+
fn: Y(() => [G(e.$slots, e.getSlotName(n, "H"), { column: n })]),
|
|
4781
|
+
key: "0"
|
|
4782
|
+
} : void 0]), 1032, [
|
|
4783
|
+
"tabs",
|
|
4784
|
+
"arrow",
|
|
4785
|
+
"collapse",
|
|
4786
|
+
"display",
|
|
4787
|
+
"icon",
|
|
4788
|
+
"index",
|
|
4789
|
+
"header",
|
|
4790
|
+
"active",
|
|
4791
|
+
"label",
|
|
4792
|
+
"onChange"
|
|
4793
|
+
]))), 128)), !a.isDetail && a.isMenu ? (V(), D(p, { key: 0 }, {
|
|
4794
|
+
menuForm: Y((t) => [G(e.$slots, "menuForm", z(F(t)))]),
|
|
4795
|
+
_: 3
|
|
4796
|
+
})) : O("v-if", !0)]),
|
|
4797
|
+
_: 3
|
|
4798
|
+
}, 8, ["class"])]),
|
|
4799
|
+
_: 3
|
|
4800
|
+
}, 8, [
|
|
4801
|
+
"status-icon",
|
|
4802
|
+
"model",
|
|
4803
|
+
"label-suffix",
|
|
4804
|
+
"size",
|
|
4805
|
+
"label-position",
|
|
4806
|
+
"label-width"
|
|
4807
|
+
])], 6);
|
|
4808
|
+
}
|
|
4809
|
+
var fi = /* @__PURE__ */ y(li, [["render", di]]);
|
|
4810
|
+
//#endregion
|
|
4811
|
+
export { kr as i, ri as n, Zr as r, fi as t };
|