@web-utils/form-ui 1.0.0-beta8 → 1.0.0-beta81
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.d.ts +52 -0
- package/address-input/index.mjs +2 -0
- package/address-input/style.css +1 -0
- package/affix/index.d.ts +30 -0
- package/affix/index.mjs +48 -0
- package/affix/style.css +1 -0
- package/api/index.d.ts +66 -0
- package/api/index.mjs +42 -0
- package/awesome-button/index.d.ts +60 -0
- package/awesome-button/index.mjs +49 -0
- package/base.css +1 -1
- package/capsule-tab/index.d.ts +30 -0
- package/capsule-tab/index.mjs +2 -0
- package/capsule-tab/style.css +1 -0
- package/card/index.d.ts +41 -0
- package/card/index.mjs +90 -0
- package/card/style.css +1 -0
- package/chunks/6dNVtIN32.mjs +89 -0
- package/chunks/6eDDQWcr.mjs +69 -0
- package/chunks/B1MSrc6f.mjs +8 -0
- package/chunks/B1luuf_A2.mjs +111 -0
- package/chunks/B5c0s3IR.mjs +449 -0
- package/chunks/B7vR8-_Y2.mjs +31 -0
- package/chunks/B9JhKxrE2.mjs +63 -0
- package/chunks/BAG_R87k2.mjs +60 -0
- package/chunks/BK88Er_k.mjs +30 -0
- package/chunks/BM5LdxU72.mjs +95 -0
- package/chunks/BNe8qLhE2.mjs +87 -0
- package/chunks/BQ7zKN-6.mjs +37 -0
- package/chunks/BQytQPLa.mjs +780 -0
- package/chunks/BXnK2ccC.mjs +32 -0
- package/chunks/BZNDljpR2.mjs +515 -0
- package/chunks/BhHMGhJ8.mjs +109 -0
- package/chunks/BiY3yiiP2.mjs +108 -0
- package/chunks/Bs926z902.mjs +200 -0
- package/chunks/BsqIRxSS.mjs +67 -0
- package/chunks/BwL9Xz1F.mjs +46 -0
- package/chunks/C-iN5MJZ.mjs +57 -0
- package/chunks/C-zPVdz-.mjs +198 -0
- package/chunks/C8h_P_kl2.mjs +206 -0
- package/chunks/CDZvVLNL.mjs +99 -0
- package/chunks/CHdaMU5-.mjs +26 -0
- package/chunks/CHmZyvFr.mjs +63 -0
- package/chunks/CI0pkCeM.mjs +58 -0
- package/chunks/CLn5E7NV.mjs +17 -0
- package/chunks/CUaecRXx.mjs +4794 -0
- package/chunks/C_QfuxeQ.mjs +98 -0
- package/chunks/CaY7oZQ3.mjs +30 -0
- package/chunks/Cb7kjZa-.mjs +661 -0
- package/chunks/CgAtZ1l2.mjs +61 -0
- package/chunks/ClVh1Lek.mjs +130 -0
- package/chunks/CnkvV3PU2.mjs +42 -0
- package/chunks/CrFP0Lhs.mjs +68 -0
- package/chunks/Ctx93AFS.mjs +54 -0
- package/chunks/CvlbrpKg2.mjs +145 -0
- package/chunks/CvncYLo32.mjs +34 -0
- package/chunks/D3SYExuc.mjs +39 -0
- package/chunks/D3xCUp_E.mjs +26 -0
- package/chunks/DCqyZyF6.mjs +52 -0
- package/chunks/DIMxdcyy2.mjs +25 -0
- package/chunks/DK4GzYEk2.mjs +29 -0
- package/chunks/DLOrxYRD2.mjs +29 -0
- package/chunks/DNaB9zOb2.mjs +27 -0
- package/chunks/D_q3C3v4.mjs +595 -0
- package/chunks/DbcxJ45j.mjs +298 -0
- package/chunks/DdACGFy3.mjs +90 -0
- package/chunks/DgH_4qOn2.mjs +210 -0
- package/chunks/Dkw6LNCq2.mjs +379 -0
- package/chunks/Dodxnwze.mjs +60 -0
- package/chunks/DokYQ49m.mjs +29 -0
- package/chunks/Dw36QZhr2.mjs +419 -0
- package/chunks/DzCIClcZ.mjs +155 -0
- package/chunks/FZqu01np2.mjs +1354 -0
- package/chunks/KOJEsarR2.mjs +217 -0
- package/chunks/LivIWUWt.mjs +50 -0
- package/chunks/PEU1JRcN2.mjs +64 -0
- package/chunks/SInS7QSL.mjs +17 -0
- package/chunks/V-Js6hNd.mjs +179 -0
- package/chunks/X-ckP2Hj.mjs +40 -0
- package/chunks/fh36J3y1.mjs +26 -0
- package/chunks/mm9J6HEd2.mjs +34 -0
- package/chunks/mnqSaATq.mjs +184 -0
- package/chunks/mqi8hesW2.mjs +613 -0
- package/chunks/tVHVSu5h.mjs +1798 -0
- package/chunks/tfaGdZX2.mjs +647 -0
- package/chunks/tqW2DSco.mjs +199 -0
- package/chunks/tzjUpVIj.mjs +37 -0
- package/code-mirror-editor/index.d.ts +50 -0
- package/code-mirror-editor/index.mjs +99 -0
- package/code-mirror-editor/style.css +1 -0
- package/confirm-button/index.d.ts +122 -0
- package/confirm-button/index.mjs +35 -0
- package/confirmable/index.d.ts +93 -0
- package/confirmable/index.mjs +8 -0
- package/constants/index.d.ts +73 -0
- package/constants/index.mjs +4 -0
- package/context-menu/index.d.ts +183 -0
- package/context-menu/index.mjs +196 -0
- package/context-menu/style.css +1 -0
- package/count-up/index.d.ts +70 -0
- package/count-up/index.mjs +94 -0
- package/custom-scrollbar/index.d.ts +49 -0
- package/custom-scrollbar/index.mjs +93 -0
- package/data-box/index.d.ts +30 -0
- package/data-box/index.mjs +2 -0
- package/data-box/style.css +1 -0
- package/data-card/index.d.ts +20 -0
- package/data-card/index.mjs +64 -0
- package/data-card/style.css +1 -0
- package/data-card-text/index.d.ts +21 -0
- package/data-card-text/index.mjs +68 -0
- package/data-card-text/style.css +1 -0
- package/data-display/index.d.ts +20 -0
- package/data-display/index.mjs +74 -0
- package/data-display/style.css +1 -0
- package/data-icons/index.d.ts +21 -0
- package/data-icons/index.mjs +75 -0
- package/data-icons/style.css +1 -0
- package/data-imgtext/index.d.ts +18 -0
- package/data-imgtext/index.mjs +72 -0
- package/data-imgtext/style.css +1 -0
- package/data-operatext/index.d.ts +17 -0
- package/data-operatext/index.mjs +55 -0
- package/data-operatext/style.css +1 -0
- package/data-panel/index.d.ts +19 -0
- package/data-panel/index.mjs +62 -0
- package/data-panel/style.css +1 -0
- package/data-pay/index.d.ts +19 -0
- package/data-pay/index.mjs +111 -0
- package/data-pay/style.css +1 -0
- package/data-price/index.d.ts +17 -0
- package/data-price/index.mjs +52 -0
- package/data-price/style.css +1 -0
- package/data-progress/index.d.ts +19 -0
- package/data-progress/index.mjs +73 -0
- package/data-progress/style.css +1 -0
- package/data-rotate/index.d.ts +21 -0
- package/data-rotate/index.mjs +2 -0
- package/data-rotate/style.css +1 -0
- package/data-table-picker/index.d.ts +61 -0
- package/data-table-picker/index.mjs +120 -0
- package/data-tabs/index.d.ts +21 -0
- package/data-tabs/index.mjs +2 -0
- package/data-tabs/style.css +1 -0
- package/dict-render/index.d.ts +28 -0
- package/dict-render/index.mjs +2 -0
- package/e-charts/index.d.ts +79 -0
- package/e-charts/index.mjs +179 -0
- package/e-charts/style.css +1 -0
- package/easy-popup/index.d.ts +114 -0
- package/easy-popup/index.mjs +92 -0
- package/easy-popup/style.css +1 -0
- package/editable-progress/index.d.ts +68 -0
- package/editable-progress/index.mjs +121 -0
- package/editable-progress/style.css +1 -0
- package/editable-tree/index.d.ts +281 -0
- package/editable-tree/index.mjs +596 -0
- package/editable-tree/style.css +1 -0
- package/element-dialog/index.d.ts +341 -18
- package/element-dialog/index.mjs +2 -91
- package/element-dialog/style.css +1 -1
- package/element-listeners/style.css +1 -0
- package/element-multi-instance/style.css +1 -0
- package/element-resize-observer/index.d.ts +8 -0
- package/element-resize-observer/index.mjs +40 -0
- package/element-resize-observer/style.css +1 -0
- package/empty-view/index.d.ts +2 -2
- package/empty-view/index.mjs +1 -1
- package/error-view/index.d.ts +25 -0
- package/error-view/index.mjs +37 -0
- package/error-view/style.css +1 -0
- package/flex-box/index.d.ts +44 -0
- package/flex-box/index.mjs +2 -0
- package/flex-column/index.d.ts +41 -0
- package/flex-column/index.mjs +2 -0
- package/flex-item/index.d.ts +77 -0
- package/flex-item/index.mjs +2 -0
- package/flex-row/index.d.ts +41 -0
- package/flex-row/index.mjs +2 -0
- package/flex-scroll-area/index.d.ts +1 -1
- package/flex-scroll-area/index.mjs +1 -1
- package/flex-scroller/index.d.ts +26 -0
- package/flex-scroller/index.mjs +29 -0
- package/flex-scroller/style.css +1 -0
- package/flow-designer/index.d.ts +286 -0
- package/flow-designer/index.mjs +2 -0
- package/flow-designer/style.css +1 -0
- package/flow-viewer/index.d.ts +62 -0
- package/flow-viewer/index.mjs +159 -0
- package/flow-viewer/style.css +1 -0
- package/form-advice/index.mjs +13 -12
- package/form-button/index.d.ts +123 -0
- package/form-button/index.mjs +36 -0
- package/form-card/index.d.ts +14 -0
- package/form-card/index.mjs +18 -0
- package/form-cascader/index.d.ts +478 -0
- package/form-cascader/index.mjs +2 -0
- package/form-checkbox/index.d.ts +237 -30
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.d.ts +373 -0
- package/form-checkbox-group/index.mjs +2 -0
- package/form-checkbox-group/style.css +1 -0
- package/form-date-picker/index.d.ts +375 -29
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.d.ts +89 -22
- package/form-holder/index.mjs +1 -1
- package/form-holder/style.css +1 -1
- package/form-image/index.d.ts +137 -23
- package/form-image/index.mjs +1 -1
- package/form-input/index.d.ts +282 -50
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.d.ts +223 -0
- package/form-input-cron-expression/index.mjs +2 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.d.ts +296 -25
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.d.ts +296 -25
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.d.ts +237 -29
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.d.ts +296 -25
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.d.ts +269 -1
- package/form-input-tag/index.mjs +1 -3
- package/form-input-time/index.d.ts +440 -1
- package/form-input-time/index.mjs +1 -3
- package/form-item/index.d.ts +190 -0
- package/form-item/index.mjs +2 -0
- package/form-item/style.css +1 -0
- package/form-item-config-provider/index.d.ts +23 -3
- package/form-item-config-provider/index.mjs +7 -7
- package/form-item-group/index.d.ts +91 -17
- package/form-item-group/index.mjs +2 -78
- package/form-item-group/style.css +1 -1
- package/form-radio-group/index.d.ts +295 -28
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.d.ts +244 -24
- package/form-rate/index.mjs +1 -1
- package/form-red-table/index.mjs +27 -26
- package/form-row/index.d.ts +2 -2
- package/form-row/index.mjs +1 -1
- package/form-select/index.d.ts +527 -28
- package/form-select/index.mjs +1 -1
- package/form-slider/index.d.ts +273 -26
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.d.ts +264 -26
- package/form-switch/index.mjs +1 -1
- package/form-table/index.d.ts +287 -0
- package/form-table/index.mjs +2 -0
- package/form-table-plus/index.d.ts +266 -0
- package/form-table-plus/index.mjs +2 -0
- package/form-text/index.d.ts +157 -23
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.d.ts +351 -0
- package/form-textarea/index.mjs +2 -0
- package/form-time-select/index.d.ts +325 -0
- package/form-time-select/index.mjs +2 -0
- package/form-tree-select/index.d.ts +715 -0
- package/form-tree-select/index.mjs +2 -0
- package/form-tree-select/style.css +1 -0
- package/form-tree-select-multiple/index.d.ts +717 -0
- package/form-tree-select-multiple/index.mjs +2 -0
- package/form-view/index.d.ts +225 -1
- package/form-view/index.mjs +280 -6
- package/form-view/style.css +1 -0
- package/guide-steps/index.d.ts +31 -0
- package/guide-steps/index.mjs +77 -0
- package/guide-steps/style.css +1 -0
- package/helper/dictionary.d.ts +29 -0
- package/helper/dictionary.mjs +97 -0
- package/helper/form-item.d.ts +17 -0
- package/helper/form-item.mjs +27 -0
- package/helper/input.d.ts +49 -0
- package/helper/input.mjs +2 -0
- package/helper/sub-table-plus.d.ts +98 -0
- package/helper/sub-table-plus.mjs +4 -0
- package/highlight-j-s/index.d.ts +18 -0
- package/highlight-j-s/index.mjs +51 -0
- package/highlight-j-s/style.css +1 -0
- package/hook/useDictionary.d.ts +60 -0
- package/hook/useDictionary.mjs +15 -0
- package/hook/useVisibilityChange.d.ts +4 -0
- package/hook/useVisibilityChange.mjs +14 -0
- package/iframe-window/index.d.ts +9 -0
- package/iframe-window/index.mjs +37 -0
- package/iframe-window/style.css +1 -0
- package/image-cropper/index.d.ts +365 -0
- package/image-cropper/index.mjs +156 -0
- package/image-cropper/style.css +1 -0
- package/image-preview/index.d.ts +61 -0
- package/image-preview/index.mjs +201 -0
- package/image-preview/style.css +1 -0
- package/image-viewer/index.d.ts +25 -0
- package/image-viewer/index.mjs +70 -0
- package/image-viewer/style.css +1 -0
- package/index.css +2 -0
- package/index.d.ts +120 -36
- package/index.mjs +122 -62
- package/input-number-range/index.d.ts +41 -0
- package/input-number-range/index.mjs +77 -0
- package/input-number-range/style.css +1 -0
- package/keyboard/index.d.ts +64 -0
- package/keyboard/index.mjs +2 -0
- package/keyboard/style.css +1 -0
- package/loading-view/index.d.ts +65 -0
- package/loading-view/index.mjs +39 -0
- package/loading-view/style.css +1 -0
- package/name-avatar/index.d.ts +62 -0
- package/name-avatar/index.mjs +61 -0
- package/name-avatar/style.css +1 -0
- package/nav-bar/index.d.ts +21 -0
- package/nav-bar/index.mjs +37 -0
- package/nav-bar/style.css +1 -0
- package/package.json +29 -7
- package/page/index.d.ts +21 -0
- package/page/index.mjs +17 -0
- package/page/style.css +1 -0
- package/page-header/index.d.ts +27 -0
- package/page-header/index.mjs +25 -0
- package/page-header/style.css +1 -0
- package/page-index/index.d.ts +82 -0
- package/page-index/index.mjs +124 -0
- package/page-index/style.css +1 -0
- package/page-index-top/index.d.ts +38 -0
- package/page-index-top/index.mjs +87 -0
- package/page-skeleton/index.d.ts +30 -0
- package/page-skeleton/index.mjs +44 -0
- package/page-skeleton/style.css +1 -0
- package/page-skeleton-new/index.d.ts +34 -0
- package/page-skeleton-new/index.mjs +80 -0
- package/page-skeleton-new/style.css +1 -0
- package/pageable-table/index.d.ts +400 -0
- package/pageable-table/index.mjs +2 -0
- package/pageable-table/style.css +1 -0
- package/photo-swipe/index.d.ts +18 -0
- package/photo-swipe/index.mjs +2 -0
- package/props/cascader.d.ts +326 -0
- package/props/cascader.mjs +145 -0
- package/props/checkbox-group.d.ts +213 -0
- package/props/checkbox-group.mjs +83 -0
- package/props/checkbox.d.ts +205 -0
- package/props/checkbox.mjs +74 -0
- package/props/col.d.ts +74 -0
- package/props/col.mjs +32 -0
- package/props/common.d.ts +114 -0
- package/props/common.mjs +18 -0
- package/props/date.d.ts +336 -0
- package/props/date.mjs +158 -0
- package/props/form-item.d.ts +144 -0
- package/props/form-item.mjs +73 -0
- package/props/form.d.ts +157 -0
- package/props/form.mjs +89 -0
- package/props/image.d.ts +102 -0
- package/props/image.mjs +10 -0
- package/props/input-cron.d.ts +102 -0
- package/props/input-cron.mjs +16 -0
- package/props/input-number.d.ts +216 -0
- package/props/input-number.mjs +72 -0
- package/props/input-tag.d.ts +123 -0
- package/props/input-tag.mjs +33 -0
- package/props/input.d.ts +299 -0
- package/props/input.mjs +97 -0
- package/props/radio-group.d.ts +205 -0
- package/props/radio-group.mjs +84 -0
- package/props/rate.d.ts +211 -0
- package/props/rate.mjs +66 -0
- package/props/select.d.ts +450 -0
- package/props/select.mjs +218 -0
- package/props/slide.d.ts +235 -0
- package/props/slide.mjs +72 -0
- package/props/switch.d.ts +229 -0
- package/props/switch.mjs +80 -0
- package/props/text.d.ts +127 -0
- package/props/text.mjs +22 -0
- package/props/textarea.d.ts +266 -0
- package/props/textarea.mjs +82 -0
- package/props/time-select.d.ts +216 -0
- package/props/time-select.mjs +67 -0
- package/props/time.d.ts +304 -0
- package/props/time.mjs +138 -0
- package/props/tree-select-multiple.d.ts +324 -0
- package/props/tree-select-multiple.mjs +16 -0
- package/props/tree-select.d.ts +326 -0
- package/props/tree-select.mjs +25 -0
- package/props/tree.d.ts +76 -0
- package/props/tree.mjs +75 -0
- package/props/vue-tree-select.d.ts +458 -0
- package/props/vue-tree-select.mjs +213 -0
- package/resolver/components.d.ts +2 -0
- package/resolver/components.mjs +4 -0
- package/resolver/index.mjs +29 -0
- package/sign-panel/index.d.ts +85 -0
- package/sign-panel/index.mjs +183 -0
- package/sign-panel/style.css +1 -0
- package/skeleton-panel/index.d.ts +27 -0
- package/skeleton-panel/index.mjs +38 -0
- package/skeleton-panel/style.css +1 -0
- package/split-pane/index.d.ts +106 -0
- package/split-pane/index.mjs +2 -0
- package/split-pane/style.css +1 -0
- package/stateful/index.d.ts +92 -0
- package/stateful/index.mjs +67 -0
- package/stateful/style.css +1 -0
- package/sub-table/index.d.ts +109 -0
- package/sub-table/index.mjs +2 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.d.ts +109 -0
- package/sub-table-plus/index.mjs +2 -0
- package/sub-table-plus/style.css +1 -0
- package/swiper/index.d.ts +27 -0
- package/swiper/index.mjs +126 -0
- package/swiper/style.css +1 -0
- package/table-column/index.d.ts +163 -0
- package/table-column/index.mjs +2 -0
- package/table-column/style.css +1 -0
- package/table-column-def/index.d.ts +97 -0
- package/table-column-def/index.mjs +11 -0
- package/table-view/index.d.ts +345 -1
- package/table-view/index.mjs +472 -6
- package/table-view/style.css +1 -0
- package/tag-render/index.d.ts +48 -0
- package/tag-render/index.mjs +86 -0
- package/tag-render/style.css +1 -0
- package/text-ellipsis/index.d.ts +111 -0
- package/text-ellipsis/index.mjs +124 -0
- package/text-ellipsis/style.css +1 -0
- package/toolbar/index.d.ts +128 -1
- package/toolbar/index.mjs +1 -8
- package/toolbar/style.css +1 -0
- package/toolbar-button/index.d.ts +188 -1
- package/toolbar-button/index.mjs +1 -8
- package/toolbar-button/style.css +1 -0
- package/vue-cron/index.d.ts +191 -0
- package/vue-cron/index.mjs +2 -0
- package/vue-cron/style.css +1 -0
- package/vue-qr-code/index.d.ts +47 -0
- package/vue-qr-code/index.mjs +32 -0
- package/vue-tags-input/index.d.ts +373 -0
- package/vue-tags-input/index.mjs +350 -0
- package/vue-tags-input/style.css +1 -0
- package/vue-tree-select/index.d.ts +1489 -0
- package/vue-tree-select/index.mjs +2 -0
- package/vue-tree-select/style.css +1 -0
- package/vue-video-player/index.d.ts +117 -0
- package/vue-video-player/index.mjs +136 -0
- package/vue-video-player/style.css +1 -0
- package/watermark/index.d.ts +97 -0
- package/watermark/index.mjs +2 -0
- package/watermark/style.css +1 -0
- package/web-types.json +1 -1
- package/x-input-tag/index.d.ts +2 -0
- package/x-input-tag/index.mjs +232 -0
- package/x-input-tag/style.css +1 -0
- package/year-calendar/index.d.ts +99 -0
- package/year-calendar/index.mjs +2 -0
- package/year-calendar/style.css +1 -0
- package/chunks/1glrRdhD.mjs +0 -23
- package/chunks/6Ukll2os.mjs +0 -149
- package/chunks/78hGOZc9.mjs +0 -43
- package/chunks/BID1Rr2O.mjs +0 -32
- package/chunks/BMkPC2kt.mjs +0 -28
- package/chunks/BPJNSq9M.mjs +0 -4
- package/chunks/BaExlbMY.mjs +0 -32
- package/chunks/BeIZhqg_.mjs +0 -167
- package/chunks/BmQGmui_.mjs +0 -54
- package/chunks/BnycM8aG.mjs +0 -74
- package/chunks/BooKKkk0.mjs +0 -36
- package/chunks/Bpox2cVQ.mjs +0 -92
- package/chunks/Bs_IYr3X.mjs +0 -94
- package/chunks/BuZDN2DV.mjs +0 -28
- package/chunks/C4JpDEWP.mjs +0 -35
- package/chunks/DAjuA2O6.mjs +0 -28
- package/chunks/Dywq0t6V.mjs +0 -47
- package/chunks/GlsJxLiF.mjs +0 -35
- package/chunks/pFgf4c4i.mjs +0 -47
- package/chunks/zb_1Xy1W.mjs +0 -74
- package/constants.d.ts +0 -7
- package/constants.mjs +0 -4
- package/form-check-box-group/index.d.ts +0 -119
- package/form-check-box-group/index.mjs +0 -2
- package/form-item-x/index.d.ts +0 -75
- package/form-item-x/index.mjs +0 -2
- package/input/style.css +0 -1
- package/json-editor/index.d.ts +0 -32
- package/json-editor/index.mjs +0 -2
- package/json-editor/style.css +0 -1
- package/resolver.mjs +0 -81
- /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { allProps as e, predicate as t } from "../props/checkbox.mjs";
|
|
2
|
+
import { n, o as r } from "./DzCIClcZ.mjs";
|
|
3
|
+
import { ElCheckbox as i } from "element-plus/es";
|
|
4
|
+
import "element-plus/es/components/base/style/css";
|
|
5
|
+
import { createVNode as a, mergeProps as o, useModel as s } from "vue";
|
|
6
|
+
import "element-plus/es/components/checkbox/style/css";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/components/form/FormCheckbox.vue
|
|
9
|
+
var c = {
|
|
10
|
+
name: "FormCheckbox",
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
props: { ...e },
|
|
13
|
+
emits: { ...n },
|
|
14
|
+
setup(e, { emit: n, slots: c, attrs: l }) {
|
|
15
|
+
let u = s(e, "modelValue"), { render: d, disabled: f, listeners: p, inputProps: m } = r(e, {
|
|
16
|
+
emit: n,
|
|
17
|
+
slots: c,
|
|
18
|
+
attrs: l,
|
|
19
|
+
predicate: t
|
|
20
|
+
});
|
|
21
|
+
return () => d({ vNodes: a(i, o(m.value, p.value, {
|
|
22
|
+
label: e.labelValue,
|
|
23
|
+
modelValue: u.value,
|
|
24
|
+
"onUpdate:modelValue": (e) => u.value = e,
|
|
25
|
+
trueValue: e.trueLabel ?? e.trueValue,
|
|
26
|
+
falseValue: e.falseLabel ?? e.falseValue,
|
|
27
|
+
disabled: f.value
|
|
28
|
+
}), { default: c.default }) });
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { c as t };
|
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { s as e } from "./ClVh1Lek.mjs";
|
|
2
|
+
import { t } from "./B1MSrc6f.mjs";
|
|
3
|
+
import { t as n } from "./Cb7kjZa-.mjs";
|
|
4
|
+
import { cellClickHandlerContextKey as r } from "../constants/index.mjs";
|
|
5
|
+
import { t as i } from "./mnqSaATq.mjs";
|
|
6
|
+
import { t as a } from "./tzjUpVIj.mjs";
|
|
7
|
+
import { n as o } from "./DzCIClcZ.mjs";
|
|
8
|
+
import { t as s } from "./CI0pkCeM.mjs";
|
|
9
|
+
import { t as c } from "./BXnK2ccC.mjs";
|
|
10
|
+
import { t as l } from "./CrFP0Lhs.mjs";
|
|
11
|
+
import { t as u } from "./CDZvVLNL.mjs";
|
|
12
|
+
import { t as d } from "./CgAtZ1l2.mjs";
|
|
13
|
+
import { t as f } from "./BQ7zKN-6.mjs";
|
|
14
|
+
import { t as p } from "./fh36J3y1.mjs";
|
|
15
|
+
import { t as m } from "./BiY3yiiP2.mjs";
|
|
16
|
+
import ee from "../table-column-def/index.mjs";
|
|
17
|
+
import { ElMessage as h, formContextKey as g, formItemContextKey as _ } from "element-plus/es";
|
|
18
|
+
import "element-plus/es/components/base/style/css";
|
|
19
|
+
import { Fragment as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as C, createTextVNode as w, createVNode as T, mergeProps as E, normalizeClass as D, openBlock as O, renderList as k, renderSlot as A, resolveComponent as j, toDisplayString as M, toHandlers as N, withCtx as P, withModifiers as F } from "vue";
|
|
20
|
+
import { findTreeChildren as I, isFunction as L } from "@web-utils/core";
|
|
21
|
+
import "element-plus/es/components/message/style/css";
|
|
22
|
+
import { cloneDeep as R } from "@web-utils/integrations/lodash";
|
|
23
|
+
//#region src/components/table/sub-table-plus.ts
|
|
24
|
+
var z = {
|
|
25
|
+
modelValue: Array,
|
|
26
|
+
prop: String,
|
|
27
|
+
columns: Array,
|
|
28
|
+
descs: Array,
|
|
29
|
+
ascs: Array,
|
|
30
|
+
limit: {
|
|
31
|
+
type: Number,
|
|
32
|
+
default: Infinity
|
|
33
|
+
},
|
|
34
|
+
disabled: Boolean,
|
|
35
|
+
showSummary: Boolean,
|
|
36
|
+
selection: Boolean,
|
|
37
|
+
index: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !0
|
|
40
|
+
},
|
|
41
|
+
selectionWidth: String,
|
|
42
|
+
toolbarMenus: Array,
|
|
43
|
+
handleMenus: Array,
|
|
44
|
+
fetchApi: Function,
|
|
45
|
+
delApi: Function,
|
|
46
|
+
bottomAddButton: Boolean,
|
|
47
|
+
initRow: Function,
|
|
48
|
+
onRowDbClick: Function,
|
|
49
|
+
showMessage: Boolean,
|
|
50
|
+
pageSize: Number
|
|
51
|
+
}, B = {
|
|
52
|
+
name: "SubTablePlus",
|
|
53
|
+
inject: {
|
|
54
|
+
elForm: {
|
|
55
|
+
from: g,
|
|
56
|
+
default: ""
|
|
57
|
+
},
|
|
58
|
+
elFormItem: {
|
|
59
|
+
from: _,
|
|
60
|
+
default: ""
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
provide() {
|
|
64
|
+
return { [r]: this.rowDbClick };
|
|
65
|
+
},
|
|
66
|
+
props: { ...z },
|
|
67
|
+
emits: {
|
|
68
|
+
...o,
|
|
69
|
+
"add-row": null
|
|
70
|
+
},
|
|
71
|
+
data() {
|
|
72
|
+
return {
|
|
73
|
+
rows: [],
|
|
74
|
+
selectedRows: []
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
computed: {
|
|
78
|
+
enabled() {
|
|
79
|
+
return !this.disabled;
|
|
80
|
+
},
|
|
81
|
+
hasToolBarMenu() {
|
|
82
|
+
var e;
|
|
83
|
+
return (e = this.toolbarMenus) == null ? void 0 : e.length;
|
|
84
|
+
},
|
|
85
|
+
hasHandleMenus() {
|
|
86
|
+
var e;
|
|
87
|
+
return (e = this.handleMenus) == null ? void 0 : e.length;
|
|
88
|
+
},
|
|
89
|
+
rowProps() {
|
|
90
|
+
let e = {};
|
|
91
|
+
return this.columns && this.columns.map((e) => e.prop).forEach((t) => {
|
|
92
|
+
e[t] = null;
|
|
93
|
+
}), e;
|
|
94
|
+
},
|
|
95
|
+
listeners() {
|
|
96
|
+
return e(this.$attrs);
|
|
97
|
+
},
|
|
98
|
+
filteredColumns() {
|
|
99
|
+
return this.columns.filter((e) => e.label && !e.hide && !e.slot);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
watch: {
|
|
103
|
+
modelValue: {
|
|
104
|
+
deep: !0,
|
|
105
|
+
immediate: !0,
|
|
106
|
+
handler(e) {
|
|
107
|
+
this.rows = e || [];
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
rows: {
|
|
111
|
+
deep: !0,
|
|
112
|
+
immediate: !0,
|
|
113
|
+
handler(e) {
|
|
114
|
+
this.$emit("update:modelValue", e);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
getCellType(e, t) {
|
|
120
|
+
return L(t.getType) ? t.getType(e, t) : t.type;
|
|
121
|
+
},
|
|
122
|
+
getInputAttr(e, t, n) {
|
|
123
|
+
var r;
|
|
124
|
+
let i = {};
|
|
125
|
+
return t.attrs && t.getAttrs ? i = {
|
|
126
|
+
...t.attrs,
|
|
127
|
+
...t.getAttrs(e)
|
|
128
|
+
} : t.attrs ? i = { ...t.attrs } : t.getAttrs && (i = t.getAttrs(e)), i.wrapCol = !1, i.label = t.label, i.ouType = t.ouType, i.labelKey = t.labelKey, i.valueKey = t.valueKey, i.required = t.required, i.prop = this.prop ? `${this.prop}[${n}].${t.prop}` : null, i.modelValue = e[t.prop], i.disabled = (r = t.isDisabled) == null ? void 0 : r.call(t, e), i;
|
|
129
|
+
},
|
|
130
|
+
onInput(e, t, n) {
|
|
131
|
+
n.setValue ? n.setValue(e, t, n, this.rows) : n.setVal !== !1 && (e[n.prop] = t);
|
|
132
|
+
},
|
|
133
|
+
onBlur(e, t) {
|
|
134
|
+
t.onBlur && t.onBlur(e, t, this.rows);
|
|
135
|
+
},
|
|
136
|
+
onSelectionChange(e) {
|
|
137
|
+
this.selectedRows = e;
|
|
138
|
+
},
|
|
139
|
+
async remove(e, t) {
|
|
140
|
+
try {
|
|
141
|
+
if (this.delApi) try {
|
|
142
|
+
await this.delApi([e.id]), h.success("删除成功!"), this.refresh();
|
|
143
|
+
} catch {
|
|
144
|
+
h.error("删除失败!");
|
|
145
|
+
}
|
|
146
|
+
else this.rows.splice(t, 1);
|
|
147
|
+
} catch {}
|
|
148
|
+
},
|
|
149
|
+
async add(e, t) {
|
|
150
|
+
if (this.fetchApi) this.addRow();
|
|
151
|
+
else {
|
|
152
|
+
var n;
|
|
153
|
+
let e = R(this.rowProps), r = await ((n = this.initRow) == null ? void 0 : n.call(this, e, t));
|
|
154
|
+
t === -1 ? this.rows.push(r || e) : this.rows.splice(t + 1, 0, r || e);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
addRow() {
|
|
158
|
+
this.$emit("add-row");
|
|
159
|
+
},
|
|
160
|
+
async delRow() {
|
|
161
|
+
if (!this.selectedRows.length) {
|
|
162
|
+
h.warning("请选择要删除的记录!");
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
try {
|
|
166
|
+
if (this.delApi) try {
|
|
167
|
+
await this.delApi(this.selectedRows.map((e) => e.id)), h.success("删除成功!"), this.refresh();
|
|
168
|
+
} catch {
|
|
169
|
+
h.error("删除失败!");
|
|
170
|
+
}
|
|
171
|
+
else this.$emit("update:modelValue", this.rows.filter((e) => !this.selectedRows.includes(e)));
|
|
172
|
+
} catch {}
|
|
173
|
+
},
|
|
174
|
+
refresh() {
|
|
175
|
+
this.$refs.table.getPage();
|
|
176
|
+
},
|
|
177
|
+
getVal(e, t, n) {
|
|
178
|
+
var r, i;
|
|
179
|
+
if (L(n.getVal)) return n.getVal(e, t, n);
|
|
180
|
+
if (n.type === "select" && (r = n.attrs) != null && r.options) {
|
|
181
|
+
let r = n.attrs.options.find((n) => n.modelValue === e[t.property] || n.code === e[t.property]);
|
|
182
|
+
if (r) return r.label || r.name;
|
|
183
|
+
}
|
|
184
|
+
if (n.type === "checkbox1") return e[t.property] === !0 || e[t.property] === "1" || e[t.property] === "Y" ? "是" : "否";
|
|
185
|
+
if (n.type === "cascader" && (i = n.attrs) != null && i.options) {
|
|
186
|
+
let [r] = I(n.attrs.options, (r) => r[n.attrs.valueKey || "value"] === e[t.property]);
|
|
187
|
+
if (r) return r[n.attrs.valueKey || "label"];
|
|
188
|
+
}
|
|
189
|
+
return e[t.property];
|
|
190
|
+
},
|
|
191
|
+
reloadTable() {
|
|
192
|
+
var e;
|
|
193
|
+
(e = this.$refs.table) == null || e.reload();
|
|
194
|
+
},
|
|
195
|
+
async refreshTable() {
|
|
196
|
+
var e;
|
|
197
|
+
await ((e = this.$refs.table) == null ? void 0 : e.getPage());
|
|
198
|
+
},
|
|
199
|
+
removeSelectedRows() {
|
|
200
|
+
this.$emit("update:modelValue", this.modelValue.filter((e) => !this.selectedRows.includes(e)));
|
|
201
|
+
},
|
|
202
|
+
rowDbClick(...e) {
|
|
203
|
+
var t;
|
|
204
|
+
(t = this.onRowDbClick) == null || t.call(this, ...e);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}, V = { class: "table-header flex-row" }, H = { class: "flex-item" }, U = { class: "flex-not-shrink" }, W = {
|
|
208
|
+
key: 0,
|
|
209
|
+
style: { color: "#f56c6c" }
|
|
210
|
+
}, G = ["title"], K = ["onClick"], q = {
|
|
211
|
+
key: 0,
|
|
212
|
+
class: "flex-row vertical-center horizon-center",
|
|
213
|
+
style: {
|
|
214
|
+
padding: "10px",
|
|
215
|
+
border: "1px solid #ebeef5",
|
|
216
|
+
"border-top": "none"
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
function J(e, t, r, o, h, g) {
|
|
220
|
+
var _, I;
|
|
221
|
+
let L = i, R = l, z = c, B = p, J = j("FormInputUser"), Y = j("FormInputDepartment"), X = m, Z = d, Q = s, te = u, ne = f, re = a, $ = ee, ie = n;
|
|
222
|
+
return O(), x("div", { class: D(["sub-table-plus", { "hide-message": !e.showMessage }]) }, [
|
|
223
|
+
T(ie, E(e.$attrs, {
|
|
224
|
+
ref: "table",
|
|
225
|
+
"auto-height": "",
|
|
226
|
+
data: e.fetchApi ? null : h.rows,
|
|
227
|
+
api: e.fetchApi,
|
|
228
|
+
"payload-style": "body",
|
|
229
|
+
"show-summary": e.showSummary,
|
|
230
|
+
descs: e.descs,
|
|
231
|
+
ascs: e.ascs,
|
|
232
|
+
"page-size": e.pageSize,
|
|
233
|
+
"selection-width": e.selectionWidth,
|
|
234
|
+
"hide-on-single-page": "",
|
|
235
|
+
selection: e.selection,
|
|
236
|
+
index: e.index,
|
|
237
|
+
"row-db-click": g.rowDbClick,
|
|
238
|
+
onRowDblclick: g.rowDbClick
|
|
239
|
+
}, N(g.listeners), { onSelectionChange: g.onSelectionChange }), C({
|
|
240
|
+
default: P(() => [
|
|
241
|
+
A(e.$slots, "columns", { columns: e.columns }, () => [(O(!0), x(v, null, k(g.filteredColumns, (t) => (O(), y($, {
|
|
242
|
+
key: t.prop,
|
|
243
|
+
label: t.label,
|
|
244
|
+
width: t.width,
|
|
245
|
+
"dict-type": t.dictType,
|
|
246
|
+
clickable: t.clickable,
|
|
247
|
+
align: t.align,
|
|
248
|
+
prop: t.prop,
|
|
249
|
+
options: t.options,
|
|
250
|
+
"show-overflow-tooltip": !t.editable && t.showOverflowTooltip
|
|
251
|
+
}, {
|
|
252
|
+
header: P(() => [!e.disabled && t.required ? (O(), x("span", W, "*")) : b("v-if", !0), S("span", { title: t.label }, M(t.label), 9, G)]),
|
|
253
|
+
default: P(({ row: n, column: r, $index: i }) => [
|
|
254
|
+
b("tag 插槽"),
|
|
255
|
+
A(e.$slots, "tag", {
|
|
256
|
+
row: n,
|
|
257
|
+
column: r,
|
|
258
|
+
index: i
|
|
259
|
+
}),
|
|
260
|
+
b("列默认插槽,名字和 prop 保持一致"),
|
|
261
|
+
A(e.$slots, t.prop, {
|
|
262
|
+
row: n,
|
|
263
|
+
column: r,
|
|
264
|
+
wrapCol: !1,
|
|
265
|
+
index: i,
|
|
266
|
+
prop: e.prop ? `${e.prop}[${i}].${t.prop}` : null,
|
|
267
|
+
required: t.required,
|
|
268
|
+
editable: t.editable
|
|
269
|
+
}, () => {
|
|
270
|
+
var e;
|
|
271
|
+
return [g.enabled && t.editable === !0 ? (O(), x(v, { key: 0 }, [g.getCellType(n, t) === "input" ? (O(), y(R, E({
|
|
272
|
+
key: 0,
|
|
273
|
+
ref_for: !0
|
|
274
|
+
}, g.getInputAttr(n, t, i), {
|
|
275
|
+
onBlur: () => g.onBlur(n, t),
|
|
276
|
+
"onUpdate:modelValue": (e) => g.onInput(n, e, t)
|
|
277
|
+
}), null, 16, ["onBlur", "onUpdate:modelValue"])) : g.getCellType(n, t) === "checkbox1" ? (O(), y(z, E({
|
|
278
|
+
key: 1,
|
|
279
|
+
ref_for: !0
|
|
280
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "inputPhoneNumber" ? (O(), y(B, E({
|
|
281
|
+
key: 2,
|
|
282
|
+
ref_for: !0
|
|
283
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "user" ? (O(), x(v, { key: 3 }, [t.single ? (O(), y(J, E({
|
|
284
|
+
key: 0,
|
|
285
|
+
ref_for: !0
|
|
286
|
+
}, g.getInputAttr(n, t, i), {
|
|
287
|
+
id: n[r.idProp || `${r.property}Id`],
|
|
288
|
+
"onUpdate:id": (e) => n[r.idProp || `${r.property}Id`] = e,
|
|
289
|
+
name: n[r.property],
|
|
290
|
+
"onUpdate:name": (e) => n[r.property] = e,
|
|
291
|
+
"onUpdate:modelValue": (e) => g.onInput(n, e, t)
|
|
292
|
+
}), null, 16, [
|
|
293
|
+
"id",
|
|
294
|
+
"onUpdate:id",
|
|
295
|
+
"name",
|
|
296
|
+
"onUpdate:name",
|
|
297
|
+
"onUpdate:modelValue"
|
|
298
|
+
])) : (O(), y(J, E({
|
|
299
|
+
key: 1,
|
|
300
|
+
ref_for: !0
|
|
301
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"]))], 64)) : g.getCellType(n, t) === "department" ? (O(), x(v, { key: 4 }, [t.single ? (O(), y(Y, E({
|
|
302
|
+
key: 0,
|
|
303
|
+
ref_for: !0
|
|
304
|
+
}, g.getInputAttr(n, t, i), {
|
|
305
|
+
name: n[r.property],
|
|
306
|
+
"onUpdate:name": (e) => n[r.property] = e,
|
|
307
|
+
"onUpdate:modelValue": (e) => g.onInput(n, e, t)
|
|
308
|
+
}), null, 16, [
|
|
309
|
+
"name",
|
|
310
|
+
"onUpdate:name",
|
|
311
|
+
"onUpdate:modelValue"
|
|
312
|
+
])) : (O(), y(Y, E({
|
|
313
|
+
key: 1,
|
|
314
|
+
ref_for: !0
|
|
315
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"]))], 64)) : g.getCellType(n, t) === "select" ? (O(), y(X, E({
|
|
316
|
+
key: 5,
|
|
317
|
+
ref_for: !0
|
|
318
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "datePicker" ? (O(), y(Z, E({
|
|
319
|
+
key: 6,
|
|
320
|
+
ref_for: !0
|
|
321
|
+
}, g.getInputAttr(n, t, i), {
|
|
322
|
+
start: n[t.start],
|
|
323
|
+
"onUpdate:start": (e) => n[t.start] = e,
|
|
324
|
+
end: n[t.end],
|
|
325
|
+
"onUpdate:end": (e) => n[t.end] = e,
|
|
326
|
+
"onUpdate:modelValue": (e) => g.onInput(n, e, t)
|
|
327
|
+
}), null, 16, [
|
|
328
|
+
"start",
|
|
329
|
+
"onUpdate:start",
|
|
330
|
+
"end",
|
|
331
|
+
"onUpdate:end",
|
|
332
|
+
"onUpdate:modelValue"
|
|
333
|
+
])) : g.getCellType(n, t) === "cascader" ? (O(), y(Q, E({
|
|
334
|
+
key: 7,
|
|
335
|
+
ref_for: !0
|
|
336
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "checkbox" ? (O(), y(te, E({
|
|
337
|
+
key: 8,
|
|
338
|
+
ref_for: !0
|
|
339
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : g.getCellType(n, t) === "number" ? (O(), y(ne, E({
|
|
340
|
+
key: 9,
|
|
341
|
+
ref_for: !0
|
|
342
|
+
}, g.getInputAttr(n, t, i), { "onUpdate:modelValue": (e) => g.onInput(n, e, t) }), null, 16, ["onUpdate:modelValue"])) : (O(), x(v, { key: 10 }, [w(M(g.getVal(n, r, t)), 1)], 64))], 64)) : t.dictType || (e = t.options) != null && e.length ? (O(), y(re, {
|
|
343
|
+
key: 1,
|
|
344
|
+
"dict-type": t.dictType,
|
|
345
|
+
"id-as-value": t.idAsValue,
|
|
346
|
+
"label-as-value": t.labelAsValue,
|
|
347
|
+
column: r,
|
|
348
|
+
row: n,
|
|
349
|
+
options: t.options
|
|
350
|
+
}, null, 8, [
|
|
351
|
+
"dict-type",
|
|
352
|
+
"id-as-value",
|
|
353
|
+
"label-as-value",
|
|
354
|
+
"column",
|
|
355
|
+
"row",
|
|
356
|
+
"options"
|
|
357
|
+
])) : (O(), x(v, { key: 2 }, [w(M(g.getVal(n, r, t)), 1)], 64))];
|
|
358
|
+
})
|
|
359
|
+
]),
|
|
360
|
+
_: 2
|
|
361
|
+
}, 1032, [
|
|
362
|
+
"label",
|
|
363
|
+
"width",
|
|
364
|
+
"dict-type",
|
|
365
|
+
"clickable",
|
|
366
|
+
"align",
|
|
367
|
+
"prop",
|
|
368
|
+
"options",
|
|
369
|
+
"show-overflow-tooltip"
|
|
370
|
+
]))), 128))]),
|
|
371
|
+
A(e.$slots, "handle", {
|
|
372
|
+
add: g.add,
|
|
373
|
+
remove: g.remove
|
|
374
|
+
}),
|
|
375
|
+
!e.disabled && g.hasHandleMenus ? (O(), y($, {
|
|
376
|
+
key: 0,
|
|
377
|
+
label: "操作",
|
|
378
|
+
width: "80",
|
|
379
|
+
align: "center",
|
|
380
|
+
prop: "menu"
|
|
381
|
+
}, {
|
|
382
|
+
header: P(({ column: t, $index: n }) => [A(e.$slots, "handle-column-header", {
|
|
383
|
+
column: t,
|
|
384
|
+
index: n
|
|
385
|
+
}, () => [w(M(t.label), 1)])]),
|
|
386
|
+
default: P(({ row: t, $index: n }) => {
|
|
387
|
+
var r, i, a;
|
|
388
|
+
return [(r = e.handleMenus) != null && r.includes("add") && ((i = e.modelValue) == null ? void 0 : i.length) < e.limit ? (O(), x("i", {
|
|
389
|
+
key: 0,
|
|
390
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
391
|
+
style: {
|
|
392
|
+
"margin-right": "5px",
|
|
393
|
+
"font-size": "20px",
|
|
394
|
+
cursor: "pointer"
|
|
395
|
+
},
|
|
396
|
+
title: "添加",
|
|
397
|
+
onClick: F((e) => g.add(t, n), ["stop"])
|
|
398
|
+
}, null, 8, K)) : b("v-if", !0), (a = e.handleMenus) != null && a.includes("delete") ? (O(), y(L, {
|
|
399
|
+
key: 1,
|
|
400
|
+
class: "el-icon-error sub-table-handle-button table-button-remove",
|
|
401
|
+
confirm: "",
|
|
402
|
+
text: "",
|
|
403
|
+
title: "删除",
|
|
404
|
+
message: "您确定要删除该行吗?",
|
|
405
|
+
onClick: F((e) => g.remove(t, n), ["stop"])
|
|
406
|
+
}, null, 8, ["onClick"])) : b("v-if", !0)];
|
|
407
|
+
}),
|
|
408
|
+
_: 3
|
|
409
|
+
})) : b("v-if", !0)
|
|
410
|
+
]),
|
|
411
|
+
_: 2
|
|
412
|
+
}, [!e.disabled || g.hasToolBarMenu ? {
|
|
413
|
+
name: "toolbar",
|
|
414
|
+
fn: P(() => [S("div", V, [A(e.$slots, "toolbar", {
|
|
415
|
+
addRow: g.addRow,
|
|
416
|
+
delRow: g.delRow,
|
|
417
|
+
refresh: g.refresh
|
|
418
|
+
}, () => [S("div", H, [A(e.$slots, "toolbar-left", {
|
|
419
|
+
addRow: g.addRow,
|
|
420
|
+
delRow: g.delRow,
|
|
421
|
+
refresh: g.refresh
|
|
422
|
+
}, () => {
|
|
423
|
+
var n, r, i;
|
|
424
|
+
return [
|
|
425
|
+
(n = e.toolbarMenus) != null && n.includes("add") ? (O(), y(L, {
|
|
426
|
+
key: 0,
|
|
427
|
+
class: "table-header-button add",
|
|
428
|
+
icon: "el-icon-circle-plus",
|
|
429
|
+
type: "text",
|
|
430
|
+
onClick: g.addRow
|
|
431
|
+
}, {
|
|
432
|
+
default: P(() => [...t[2] || (t[2] = [w(" 添加 ", -1)])]),
|
|
433
|
+
_: 1
|
|
434
|
+
}, 8, ["onClick"])) : b("v-if", !0),
|
|
435
|
+
(r = e.toolbarMenus) != null && r.includes("delete") ? (O(), y(L, {
|
|
436
|
+
key: 1,
|
|
437
|
+
disabled: h.selectedRows.length <= 0,
|
|
438
|
+
class: "table-header-button remove",
|
|
439
|
+
confirm: "",
|
|
440
|
+
message: "您确定要删除选中的记录吗?",
|
|
441
|
+
icon: "el-icon-error",
|
|
442
|
+
text: "",
|
|
443
|
+
onClick: g.delRow
|
|
444
|
+
}, {
|
|
445
|
+
default: P(() => [...t[3] || (t[3] = [w(" 删除 ", -1)])]),
|
|
446
|
+
_: 1
|
|
447
|
+
}, 8, ["disabled", "onClick"])) : b("v-if", !0),
|
|
448
|
+
(i = e.toolbarMenus) != null && i.includes("refresh") ? (O(), y(L, {
|
|
449
|
+
key: 2,
|
|
450
|
+
class: "table-header-button refresh",
|
|
451
|
+
icon: "el-icon-refresh-left",
|
|
452
|
+
text: "",
|
|
453
|
+
disabled: !1,
|
|
454
|
+
onClick: g.refresh
|
|
455
|
+
}, {
|
|
456
|
+
default: P(() => [...t[4] || (t[4] = [w(" 刷新 ", -1)])]),
|
|
457
|
+
_: 1
|
|
458
|
+
}, 8, ["onClick"])) : b("v-if", !0)
|
|
459
|
+
];
|
|
460
|
+
}), A(e.$slots, "toolbar-left-append", {
|
|
461
|
+
addRow: g.addRow,
|
|
462
|
+
delRow: g.delRow,
|
|
463
|
+
refresh: g.refresh
|
|
464
|
+
})]), S("div", U, [A(e.$slots, "toolbar-right", {
|
|
465
|
+
removeSelectedRows: g.removeSelectedRows,
|
|
466
|
+
selectedRows: h.selectedRows
|
|
467
|
+
})])])])]),
|
|
468
|
+
key: "0"
|
|
469
|
+
} : void 0, e.bottomAddButton ? {
|
|
470
|
+
name: "empty",
|
|
471
|
+
fn: P(() => [S("i", {
|
|
472
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
473
|
+
style: {
|
|
474
|
+
"font-size": "20px",
|
|
475
|
+
cursor: "pointer"
|
|
476
|
+
},
|
|
477
|
+
title: "添加",
|
|
478
|
+
onClick: t[0] || (t[0] = F((t) => {
|
|
479
|
+
var n;
|
|
480
|
+
return g.add(null, ((n = e.modelValue) == null ? void 0 : n.length) ?? 0);
|
|
481
|
+
}, ["stop"]))
|
|
482
|
+
})]),
|
|
483
|
+
key: "1"
|
|
484
|
+
} : void 0]), 1040, [
|
|
485
|
+
"data",
|
|
486
|
+
"api",
|
|
487
|
+
"show-summary",
|
|
488
|
+
"descs",
|
|
489
|
+
"ascs",
|
|
490
|
+
"page-size",
|
|
491
|
+
"selection-width",
|
|
492
|
+
"selection",
|
|
493
|
+
"index",
|
|
494
|
+
"row-db-click",
|
|
495
|
+
"onRowDblclick",
|
|
496
|
+
"onSelectionChange"
|
|
497
|
+
]),
|
|
498
|
+
b("底部添加按钮"),
|
|
499
|
+
!e.disabled && e.bottomAddButton && ((_ = e.modelValue) == null ? void 0 : _.length) < e.limit && ((I = e.modelValue) == null ? void 0 : I.length) > 0 ? (O(), x("div", q, [S("i", {
|
|
500
|
+
class: "el-icon-circle-plus sub-table-handle-button table-button-add",
|
|
501
|
+
style: {
|
|
502
|
+
"font-size": "20px",
|
|
503
|
+
cursor: "pointer"
|
|
504
|
+
},
|
|
505
|
+
title: "添加",
|
|
506
|
+
onClick: t[1] || (t[1] = F((t) => {
|
|
507
|
+
var n;
|
|
508
|
+
return g.add(null, ((n = e.modelValue) == null ? void 0 : n.length) ?? 0);
|
|
509
|
+
}, ["stop"]))
|
|
510
|
+
})])) : b("v-if", !0)
|
|
511
|
+
], 2);
|
|
512
|
+
}
|
|
513
|
+
var Y = /* @__PURE__ */ t(B, [["render", J]]);
|
|
514
|
+
//#endregion
|
|
515
|
+
export { z as n, Y as t };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { m as e } from "./ClVh1Lek.mjs";
|
|
2
|
+
import { formHolderContextKey as t, formViewContextKey as n } from "../constants/index.mjs";
|
|
3
|
+
import { allProps as r, predicate as i } from "../props/form.mjs";
|
|
4
|
+
import a from "../form-advice/index.mjs";
|
|
5
|
+
import o from "../form-red-table/index.mjs";
|
|
6
|
+
import { ElForm as s, ElRow as c } from "element-plus/es";
|
|
7
|
+
import "element-plus/es/components/base/style/css";
|
|
8
|
+
import { computed as l, createVNode as u, inject as d, mergeProps as f, nextTick as p, provide as m, reactive as h, toRef as g, useTemplateRef as _ } from "vue";
|
|
9
|
+
import { animate as v } from "@web-utils/core";
|
|
10
|
+
import "element-plus/es/components/row/style/css";
|
|
11
|
+
import "element-plus/es/components/form/style/css";
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/components/form/FormHolder.vue
|
|
14
|
+
var y = {
|
|
15
|
+
name: "FormHolder",
|
|
16
|
+
inheritAttrs: !1,
|
|
17
|
+
props: { ...r },
|
|
18
|
+
emits: {},
|
|
19
|
+
setup(r, { slots: y, expose: b, attrs: x }) {
|
|
20
|
+
let { autoBindProps: S, listeners: C } = e(r, { predicate: i }), w = d(n, null), T = _("form"), E = l(() => r.notTableForm === void 0 ? (w == null ? void 0 : w.tableForm) === void 0 ? !1 : w == null ? void 0 : w.tableForm : !r.notTableForm), D = l(() => E.value ? !1 : r.showMessage), O = l(() => {
|
|
21
|
+
let e = {};
|
|
22
|
+
return r.disabledFields && r.disabledFields.forEach((t) => {
|
|
23
|
+
e[t] = !0;
|
|
24
|
+
}), e;
|
|
25
|
+
}), k = l(() => {
|
|
26
|
+
let e = {};
|
|
27
|
+
return r.enabledFields && r.enabledFields.length && r.enabledFields.forEach((t) => {
|
|
28
|
+
e[t] = !0;
|
|
29
|
+
}), e;
|
|
30
|
+
}), A = l(() => {
|
|
31
|
+
let e = {};
|
|
32
|
+
return r.requiredFields && r.requiredFields.length && r.requiredFields.forEach((t) => {
|
|
33
|
+
e[t] = !0;
|
|
34
|
+
}), e;
|
|
35
|
+
}), j = l(() => r.disabled === !0 ? !0 : r.disabled), M = g(() => r.enabledFields), N = g(() => r.requiredFields), P = g(() => r.disabledFields), F = async () => {
|
|
36
|
+
await p();
|
|
37
|
+
let e = T.value.$el.querySelector(".el-form-item.is-error");
|
|
38
|
+
e && e.scrollIntoView({
|
|
39
|
+
block: "center",
|
|
40
|
+
inline: "center",
|
|
41
|
+
behavior: "smooth"
|
|
42
|
+
});
|
|
43
|
+
}, I = h({
|
|
44
|
+
tableForm: E,
|
|
45
|
+
disabled: j,
|
|
46
|
+
enabledFields: M,
|
|
47
|
+
requiredFields: N,
|
|
48
|
+
enabledFieldsMap: k,
|
|
49
|
+
disabledFieldsMap: O,
|
|
50
|
+
requiredFieldsMap: A,
|
|
51
|
+
disabledFields: P,
|
|
52
|
+
scrollIntoRequiredField: F,
|
|
53
|
+
formRef: T,
|
|
54
|
+
validate: async () => {
|
|
55
|
+
try {
|
|
56
|
+
return await T.value.validate();
|
|
57
|
+
} catch {
|
|
58
|
+
throw await F(), T.value.$el.querySelectorAll(".el-form-item.is-error .el-form-item__content > :first-child").forEach((e) => {
|
|
59
|
+
v(e, "breathe-animation");
|
|
60
|
+
}), Error("表单验证不通过!");
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
validateField: (e) => T.value.validateField(e),
|
|
64
|
+
resetFields: (e) => T.value.resetFields(e),
|
|
65
|
+
scrollToField: (e) => T.value.scrollToField(e),
|
|
66
|
+
clearValidate: (e) => T.value.clearValidate(e),
|
|
67
|
+
getField: () => T.value.getField(),
|
|
68
|
+
setInitialValues: (e) => T.value.setInitialValues(e),
|
|
69
|
+
getFields: () => T.value.fields
|
|
70
|
+
});
|
|
71
|
+
return m(t, I), b(I), () => u(s, f(C.value, S.value, x, {
|
|
72
|
+
ref: "form",
|
|
73
|
+
class: [
|
|
74
|
+
"form-holder",
|
|
75
|
+
"clear-fix",
|
|
76
|
+
{ "red-form": E }
|
|
77
|
+
],
|
|
78
|
+
"show-message": D.value
|
|
79
|
+
}), { default: () => {
|
|
80
|
+
if (E.value) {
|
|
81
|
+
var e, t, n;
|
|
82
|
+
return [
|
|
83
|
+
(e = y.top) == null ? void 0 : e.call(y),
|
|
84
|
+
u(o, {
|
|
85
|
+
class: { "hide-error-message": E.value },
|
|
86
|
+
columns: r.columns,
|
|
87
|
+
"col-count": r.colCount
|
|
88
|
+
}, { default: () => {
|
|
89
|
+
var e;
|
|
90
|
+
return [(e = y.default) == null ? void 0 : e.call(y), r.showAdvice ? u(a, {
|
|
91
|
+
"label-colspan": r.commentLabelColspan,
|
|
92
|
+
"value-colspan": r.commentValueColspan
|
|
93
|
+
}, null) : null];
|
|
94
|
+
} }),
|
|
95
|
+
(t = y.bottom) == null ? void 0 : t.call(y),
|
|
96
|
+
u("div", { class: "red-form-footer" }, [(n = y.footer) == null ? void 0 : n.call(y)])
|
|
97
|
+
];
|
|
98
|
+
} else {
|
|
99
|
+
var i;
|
|
100
|
+
return r.wrapRow ? u(c, null, { default: () => {
|
|
101
|
+
var e;
|
|
102
|
+
return [(e = y.default) == null ? void 0 : e.call(y)];
|
|
103
|
+
} }) : (i = y.default) == null ? void 0 : i.call(y);
|
|
104
|
+
}
|
|
105
|
+
} });
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
//#endregion
|
|
109
|
+
export { y as t };
|