@web-utils/component 2.0.14 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/components/address-input/index.js → address-input/index.mjs} +9 -9
- package/affix/index.mjs +102 -0
- package/affix/style.css +1 -0
- package/aside-menu/index.mjs +58 -0
- package/avatar/index.mjs +106 -0
- package/avatar/style.css +1 -0
- package/awesome-button/index.mjs +112 -0
- package/base.css +1 -0
- package/{dist/components/capsule-tab/index.js → capsule-tab/index.mjs} +10 -10
- package/{dist/components/capsule-tab → capsule-tab}/style.css +1 -1
- package/card/index.mjs +126 -0
- package/card/style.css +1 -0
- package/carousel/index.mjs +70 -0
- package/carousel/style.css +1 -0
- package/chat/index.mjs +576 -0
- package/chat/style.css +1 -0
- package/{dist/components/chunk-file-uploader/index.js → chunk-file-uploader/index.mjs} +8 -6
- package/chunks/FormTemp.FX8xmbVB.mjs +165 -0
- package/chunks/confirmable-mixin.rTUMhoRH.mjs +106 -0
- package/chunks/dataformat.X_61lMA7.mjs +158 -0
- package/chunks/dic.6tk91Dmq.mjs +130 -0
- package/chunks/event.NHA7rYFE.mjs +236 -0
- package/{dist/chunks/76680a03.js → chunks/form-input-mixin.IKogWBfn.mjs} +2 -2
- package/{dist/chunks/b4acd3a6.js → chunks/form-item-mixin.BilKDUlK.mjs} +28 -14
- package/{dist/chunks/f71045fc.js → chunks/index.LGsb2aDq.mjs} +7 -6
- package/chunks/init.Ac4dKUJB.mjs +122 -0
- package/chunks/json-beautifier.fUZFSW5j.mjs +126 -0
- package/chunks/packages.v6r2Hr7E.mjs +58 -0
- package/chunks/permission.E9kZbW48.mjs +16 -0
- package/chunks/slot.j1uMmBnG.mjs +27 -0
- package/{dist/chunks/8c0142e0.js → chunks/tab-mixin.tM9jcRT8.mjs} +1 -1
- package/chunks/util.C2Bhx22L.mjs +259 -0
- package/{dist/chunks/5d4282fb.js → chunks/vueComponentNormalizer.JwmUNtgn.mjs} +3 -1
- package/{dist/components/code-mirror-editor/index.js → code-mirror-editor/index.mjs} +41 -38
- package/code-mirror-editor/style.css +1 -0
- package/{dist/components/color-picker/index.js → color-picker/index.mjs} +41 -23
- package/comment/index.mjs +90 -0
- package/comment/style.css +1 -0
- package/{dist/components/confirm-button/index.js → confirm-button/index.mjs} +2 -2
- package/{dist/components/confirmable/index.js → confirmable/index.mjs} +2 -2
- package/{dist/components/context-menu/index.js → context-menu/index.mjs} +27 -15
- package/context-menu/style.css +1 -0
- package/count-up/index.mjs +131 -0
- package/custom-scrollbar/index.mjs +116 -0
- package/data-box/index.mjs +97 -0
- package/data-box/style.css +1 -0
- package/data-card/index.mjs +98 -0
- package/data-card/style.css +1 -0
- package/data-cardtext/index.mjs +82 -0
- package/data-cardtext/style.css +1 -0
- package/data-display/index.mjs +97 -0
- package/data-display/style.css +1 -0
- package/data-icons/index.mjs +104 -0
- package/data-icons/style.css +1 -0
- package/data-imgtext/index.mjs +106 -0
- package/data-imgtext/style.css +1 -0
- package/data-operatext/index.mjs +99 -0
- package/data-operatext/style.css +1 -0
- package/data-panel/index.mjs +93 -0
- package/data-panel/style.css +1 -0
- package/data-pay/index.mjs +152 -0
- package/data-pay/style.css +1 -0
- package/data-price/index.mjs +84 -0
- package/data-price/style.css +1 -0
- package/data-progress/index.mjs +97 -0
- package/data-progress/style.css +1 -0
- package/data-rotate/index.mjs +96 -0
- package/data-rotate/style.css +1 -0
- package/{dist/components/data-table-picker/index.js → data-table-picker/index.mjs} +22 -22
- package/data-tabs/index.mjs +94 -0
- package/data-tabs/style.css +1 -0
- package/dialog-form/index.mjs +148 -0
- package/dialog-form/style.css +1 -0
- package/{dist/components/dynamic-table/index.js → dynamic-table/index.mjs} +11 -11
- package/dynamic-table/style.css +1 -0
- package/{dist/components/e-charts/index.js → e-charts/index.mjs} +33 -46
- package/easy-popup/index.mjs +136 -0
- package/easy-popup/style.css +1 -0
- package/{dist/components/editable-progress/index.js → editable-progress/index.mjs} +1 -1
- package/editable-progress/style.css +1 -0
- package/editable-tree/index.mjs +844 -0
- package/editable-tree/style.css +1 -0
- package/{dist/components/egd-collapse/index.js → egd-collapse/index.mjs} +1 -1
- package/{dist/components/egd-collapse-item/index.js → egd-collapse-item/index.mjs} +14 -12
- package/{dist/components/element-dialog/index.js → element-dialog/index.mjs} +88 -35
- package/element-dialog/style.css +1 -0
- package/{dist/components/empty-view/index.js → empty-view/index.mjs} +9 -9
- package/empty-view/style.css +1 -0
- package/{dist/components/error-view/index.js → error-view/index.mjs} +13 -13
- package/error-view/style.css +1 -0
- package/flex-column/index.mjs +62 -0
- package/flex-item/index.mjs +81 -0
- package/flex-row/index.mjs +62 -0
- package/{dist/components/flex-scroller/index.js → flex-scroller/index.mjs} +5 -5
- package/flex-scroller/style.css +1 -0
- package/flow/index.mjs +277 -0
- package/flow/style.css +1 -0
- package/flow-designer/index.mjs +10184 -0
- package/flow-designer/style.css +1 -0
- package/flow-node/index.mjs +102 -0
- package/flow-viewer/index.mjs +209 -0
- package/flow-viewer/style.css +1 -0
- package/form-block/index.mjs +156 -0
- package/form-block/style.css +1 -0
- package/form-button/index.mjs +58 -0
- package/{dist/components/form-cascader/index.js → form-cascader/index.mjs} +41 -29
- package/{dist/components/form-checkbox-group/index.js → form-checkbox-group/index.mjs} +47 -36
- package/form-checkbox-group/style.css +1 -0
- package/{dist/components/form-date-picker/index.js → form-date-picker/index.mjs} +45 -36
- package/form-holder/index.mjs +129 -0
- package/{dist/components/form-input/index.js → form-input/index.mjs} +34 -23
- package/{dist/components/form-input-email/index.js → form-input-email/index.mjs} +36 -25
- package/{dist/components/form-input-id-card/index.js → form-input-id-card/index.mjs} +35 -24
- package/{dist/components/form-input-number/index.js → form-input-number/index.mjs} +40 -29
- package/{dist/components/form-input-phone-number/index.js → form-input-phone-number/index.mjs} +37 -26
- package/form-input-tag/index.mjs +108 -0
- package/{dist/components/form-input-time/index.js → form-input-time/index.mjs} +40 -29
- package/form-item/index.mjs +147 -0
- package/{dist/components/form-item → form-item}/style.css +1 -1
- package/{dist/components/form-item-config-provider/index.js → form-item-config-provider/index.mjs} +1 -1
- package/{dist/components/form-item-group/index.js → form-item-group/index.mjs} +4 -4
- package/form-item-group/style.css +1 -0
- package/{dist/components/form-radio-group/index.js → form-radio-group/index.mjs} +51 -40
- package/form-radio-group/style.css +1 -0
- package/{dist/components/form-select/index.js → form-select/index.mjs} +40 -29
- package/{dist/components/form-switch/index.js → form-switch/index.mjs} +35 -24
- package/form-textarea/index.mjs +113 -0
- package/{dist/components/form-view/index.js → form-view/index.mjs} +72 -44
- package/form-view/style.css +1 -0
- package/fy-array/index.mjs +158 -0
- package/fy-array/style.css +1 -0
- package/fy-article/index.mjs +93 -0
- package/fy-article/style.css +1 -0
- package/fy-cascader/index.mjs +132 -0
- package/fy-checkbox/index.mjs +117 -0
- package/fy-checkbox/style.css +1 -0
- package/fy-code/index.mjs +66 -0
- package/fy-curd/index.mjs +3119 -0
- package/fy-curd/style.css +1 -0
- package/fy-date/index.mjs +84 -0
- package/fy-date/style.css +1 -0
- package/fy-draggable/index.mjs +382 -0
- package/fy-draggable/style.css +1 -0
- package/fy-dynamic/index.mjs +337 -0
- package/fy-dynamic/style.css +1 -0
- package/fy-empty/index.mjs +59 -0
- package/fy-empty/style.css +1 -0
- package/fy-form/index.mjs +993 -0
- package/fy-form/style.css +1 -0
- package/fy-form-design/index.mjs +7483 -0
- package/fy-form-design/style.css +1 -0
- package/fy-input/index.mjs +171 -0
- package/fy-input-color/index.mjs +101 -0
- package/fy-input-icon/index.mjs +169 -0
- package/fy-input-icon/style.css +1 -0
- package/fy-input-map/index.mjs +279 -0
- package/fy-input-map/style.css +1 -0
- package/fy-input-number/index.mjs +87 -0
- package/fy-input-table/index.mjs +172 -0
- package/fy-input-table/style.css +1 -0
- package/fy-input-tree/index.mjs +267 -0
- package/fy-input-tree/style.css +1 -0
- package/fy-progress/index.mjs +60 -0
- package/fy-radio/index.mjs +70 -0
- package/fy-radio/style.css +1 -0
- package/fy-rate/index.mjs +106 -0
- package/fy-rate/style.css +1 -0
- package/fy-select/index.mjs +225 -0
- package/fy-select/style.css +1 -0
- package/fy-slider/index.mjs +79 -0
- package/fy-switch/index.mjs +74 -0
- package/fy-tabs/index.mjs +92 -0
- package/fy-time/index.mjs +95 -0
- package/fy-title/index.mjs +40 -0
- package/fy-title/style.css +1 -0
- package/fy-tree/index.mjs +433 -0
- package/fy-tree/style.css +1 -0
- package/fy-u-editor/index.mjs +398 -0
- package/fy-u-editor/style.css +1 -0
- package/fy-upload/index.mjs +592 -0
- package/fy-upload/style.css +1 -0
- package/{dist/components/guide-steps/index.js → guide-steps/index.mjs} +12 -12
- package/{dist/components/guide-steps → guide-steps}/style.css +1 -1
- package/highlight-j-s/index.mjs +76 -0
- package/highlight-j-s/style.css +1 -0
- package/{dist/components/icon-card/index.js → icon-card/index.mjs} +9 -9
- package/{dist/components/icon-card → icon-card}/style.css +1 -1
- package/icon-temp/index.mjs +50 -0
- package/icon-temp/style.css +1 -0
- package/{dist/components/iframe-window/index.js → iframe-window/index.mjs} +5 -5
- package/iframe-window/style.css +1 -0
- package/image-cropper/index.mjs +249 -0
- package/image-cropper/style.css +1 -0
- package/image-preview/index.mjs +260 -0
- package/image-preview/style.css +1 -0
- package/{dist/components/image-viewer/index.js → image-viewer/index.mjs} +5 -5
- package/image-viewer/style.css +1 -0
- package/index.mjs +627 -0
- package/{dist/components/input-number/index.js → input-number/index.mjs} +2 -2
- package/{dist/components/input-number-range/index.js → input-number-range/index.mjs} +7 -7
- package/input-number-range/style.css +1 -0
- package/{dist/components/keep-view-alive/index.js → keep-view-alive/index.mjs} +6 -2
- package/keyboard/index.mjs +384 -0
- package/keyboard/style.css +1 -0
- package/license/index.mjs +134 -0
- package/{dist/components/loading-view/index.js → loading-view/index.mjs} +5 -5
- package/loading-view/style.css +1 -0
- package/login/index.mjs +250 -0
- package/login/style.css +1 -0
- package/monaco-editor/index.mjs +197 -0
- package/name-avatar/index.mjs +66 -0
- package/name-avatar/style.css +1 -0
- package/{dist/components/nav-bar/index.js → nav-bar/index.mjs} +8 -8
- package/nav-bar/style.css +1 -0
- package/not-implement/index.mjs +35 -0
- package/not-implement/style.css +1 -0
- package/notice/index.mjs +143 -0
- package/notice/style.css +1 -0
- package/package.json +41 -148
- package/{dist/components/page/index.js → page/index.mjs} +8 -8
- package/{dist/components/page-header/index.js → page-header/index.mjs} +6 -6
- package/{dist/components/page-index/index.js → page-index/index.mjs} +58 -34
- package/page-index/style.css +1 -0
- package/page-index-top/index.mjs +141 -0
- package/page-skeleton/index.mjs +67 -0
- package/page-skeleton/style.css +1 -0
- package/{dist/components/page-skeleton-new/index.js → page-skeleton-new/index.mjs} +3 -3
- package/page-skeleton-new/style.css +1 -0
- package/{dist/components/pageable-table/index.js → pageable-table/index.mjs} +149 -100
- package/pageable-table/style.css +1 -0
- package/{dist/components/pageable-view/index.js → pageable-view/index.mjs} +118 -68
- package/pageable-view/style.css +1 -0
- package/photo-swipe/index.mjs +129 -0
- package/present-view/index.mjs +365 -0
- package/present-view/style.css +1 -0
- package/queue/index.mjs +71 -0
- package/queue/style.css +1 -0
- package/record-video/index.mjs +173 -0
- package/record-video/style.css +1 -0
- package/{dist/components/resize-observer/index.js → resize-observer/index.mjs} +6 -6
- package/resize-observer/style.css +1 -0
- package/search/index.mjs +143 -0
- package/search/style.css +1 -0
- package/{dist/components/search-popover/index.js → search-popover/index.mjs} +64 -43
- package/search-popover/style.css +1 -0
- package/sign/index.mjs +132 -0
- package/sign/style.css +1 -0
- package/{dist/components/sign-panel/index.js → sign-panel/index.mjs} +18 -5
- package/sign-panel/style.css +1 -0
- package/skeleton/index.mjs +82 -0
- package/skeleton/style.css +1 -0
- package/{dist/components/split-pane/index.js → split-pane/index.mjs} +125 -28
- package/split-pane/style.css +1 -0
- package/{dist/components/stateful/index.js → stateful/index.mjs} +12 -12
- package/{dist/components/stateful → stateful}/style.css +1 -1
- package/{dist/components/static-pageable-table/index.js → static-pageable-table/index.mjs} +10 -10
- package/static-pageable-table/style.css +1 -0
- package/{dist/components/swiper/index.js → swiper/index.mjs} +49 -24
- package/swiper/style.css +1 -0
- package/{dist/components/tab/index.js → tab/index.mjs} +4 -2
- package/tab/style.css +1 -0
- package/{dist/components/tab-item/index.js → tab-item/index.mjs} +3 -3
- package/{dist/components/table-column/index.js → table-column/index.mjs} +35 -22
- package/{dist/components/table-view/index.js → table-view/index.mjs} +91 -64
- package/table-view/style.css +1 -0
- package/{dist/components/tag-render/index.js → tag-render/index.mjs} +45 -26
- package/tag-render/style.css +1 -0
- package/text-ellipsis/index.mjs +108 -0
- package/text-ellipsis/style.css +1 -0
- package/{dist/components/tinymce-wrapper/index.js → tinymce-editor/index.mjs} +446 -71
- package/tinymce-editor/style.css +1 -0
- package/{dist/components/toolbar/index.js → toolbar/index.mjs} +21 -21
- package/toolbar/style.css +1 -0
- package/toolbar-button/index.mjs +108 -0
- package/toolbar-button/style.css +1 -0
- package/verify/index.mjs +80 -0
- package/verify/style.css +1 -0
- package/vue-cron/index.mjs +1410 -0
- package/vue-cron/style.css +1 -0
- package/vue-qr-code/index.mjs +83 -0
- package/vue-quill-editor/index.mjs +117 -0
- package/vue-quill-editor/style.css +1 -0
- package/{dist/components/vue-tags-input/index.js → vue-tags-input/index.mjs} +115 -1
- package/vue-tags-input/style.css +1 -0
- package/vue-tree-select/index.mjs +2881 -0
- package/vue-tree-select/style.css +1 -0
- package/vue-video-player/index.mjs +192 -0
- package/vue-video-player/style.css +1 -0
- package/watermark/index.mjs +95 -0
- package/watermark/style.css +1 -0
- package/web-types.json +14033 -2752
- package/x-input-tag/index.mjs +203 -0
- package/x-input-tag/style.css +1 -0
- package/README.md +0 -27
- package/dist/chunks/3a79781b.js +0 -75
- package/dist/chunks/5a78e0db.js +0 -16
- package/dist/chunks/97652d86.js +0 -26
- package/dist/components/aside-menu/index.js +0 -58
- package/dist/components/awesome-button/index.js +0 -82
- package/dist/components/base.css +0 -1
- package/dist/components/chunk-file-uploader-button/index.js +0 -60
- package/dist/components/chunk-file-uploader-button/style.css +0 -1
- package/dist/components/chunk-file-uploader-drop/index.js +0 -65
- package/dist/components/chunk-file-uploader-drop/style.css +0 -1
- package/dist/components/chunk-file-uploader-file/index.js +0 -311
- package/dist/components/chunk-file-uploader-file/style.css +0 -1
- package/dist/components/chunk-file-uploader-files/index.js +0 -49
- package/dist/components/chunk-file-uploader-files/style.css +0 -1
- package/dist/components/chunk-file-uploader-list/index.js +0 -50
- package/dist/components/chunk-file-uploader-list/style.css +0 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +0 -51
- package/dist/components/chunk-file-uploader-un-support/style.css +0 -1
- package/dist/components/code-mirror-editor/style.css +0 -1
- package/dist/components/context-menu/style.css +0 -1
- package/dist/components/custom-scrollbar/index.js +0 -149
- package/dist/components/dynamic-table/style.css +0 -1
- package/dist/components/editable-progress/style.css +0 -1
- package/dist/components/editable-tree/index.js +0 -789
- package/dist/components/editable-tree/style.css +0 -1
- package/dist/components/element-dialog/style.css +0 -1
- package/dist/components/empty-view/style.css +0 -1
- package/dist/components/error-view/style.css +0 -1
- package/dist/components/flex-column/index.js +0 -50
- package/dist/components/flex-item/index.js +0 -66
- package/dist/components/flex-row/index.js +0 -50
- package/dist/components/flex-scroller/style.css +0 -1
- package/dist/components/form-button/index.js +0 -80
- package/dist/components/form-checkbox-group/style.css +0 -1
- package/dist/components/form-holder/index.js +0 -90
- package/dist/components/form-item/index.js +0 -119
- package/dist/components/form-item-group/style.css +0 -1
- package/dist/components/form-radio-group/style.css +0 -1
- package/dist/components/form-textarea/index.js +0 -102
- package/dist/components/form-view/style.css +0 -1
- package/dist/components/iframe-window/style.css +0 -1
- package/dist/components/image-viewer/style.css +0 -1
- package/dist/components/input-number-range/style.css +0 -1
- package/dist/components/loading-view/style.css +0 -1
- package/dist/components/nav-bar/style.css +0 -1
- package/dist/components/not-implement/index.js +0 -35
- package/dist/components/not-implement/style.css +0 -1
- package/dist/components/page-index/style.css +0 -1
- package/dist/components/page-index-top/index.js +0 -119
- package/dist/components/page-skeleton/index.js +0 -56
- package/dist/components/page-skeleton/style.css +0 -1
- package/dist/components/page-skeleton-new/style.css +0 -1
- package/dist/components/pageable-table/style.css +0 -1
- package/dist/components/pageable-view/style.css +0 -1
- package/dist/components/photo-swipe/index.js +0 -187
- package/dist/components/photo-swipe/style.css +0 -1
- package/dist/components/resize-observer/style.css +0 -1
- package/dist/components/search-popover/style.css +0 -1
- package/dist/components/sign-panel/style.css +0 -1
- package/dist/components/split-pane/style.css +0 -1
- package/dist/components/static-pageable-table/style.css +0 -1
- package/dist/components/swiper/style.css +0 -1
- package/dist/components/tab/style.css +0 -1
- package/dist/components/table-view/style.css +0 -1
- package/dist/components/tag-render/style.css +0 -1
- package/dist/components/tinymce-editor/index.js +0 -173
- package/dist/components/tinymce-editor/style.css +0 -1
- package/dist/components/tinymce-wrapper/style.css +0 -1
- package/dist/components/toolbar/style.css +0 -1
- package/dist/components/toolbar-button/index.js +0 -90
- package/dist/components/toolbar-button/style.css +0 -1
- package/dist/components/trigger/index.js +0 -71
- package/dist/components/vue-tags-input/style.css +0 -1
- package/dist/components/watermark/index.js +0 -63
- package/dist/components/watermark/style.css +0 -1
- package/dist/components/x-dialog/index.js +0 -173
- package/dist/components/x-dialog/style.css +0 -1
- package/dist/index.css +0 -2060
- package/dist/index.es.js +0 -13236
- /package/{dist/components/address-input → address-input}/style.css +0 -0
- /package/{dist/components/aside-menu → aside-menu}/style.css +0 -0
- /package/{dist/components/chunk-file-uploader → chunk-file-uploader}/style.css +0 -0
- /package/{dist/chunks/61ad06b2.js → chunks/form-pick-mixin.y-qhZJi6.mjs} +0 -0
- /package/{dist/chunks/41a066be.js → chunks/input-number-mixin.GE2zr_3s.mjs} +0 -0
- /package/{dist/components/e-charts → e-charts}/style.css +0 -0
- /package/{dist/components/form-input-number → form-input-number}/style.css +0 -0
- /package/{dist/components/input-number → input-number}/style.css +0 -0
- /package/{dist/components/j-s-x-component/index.js → j-s-x-component/index.mjs} +0 -0
- /package/{dist/components/page → page}/style.css +0 -0
- /package/{dist/components/page-header → page-header}/style.css +0 -0
|
@@ -0,0 +1,993 @@
|
|
|
1
|
+
var D = (e, i, r) => new Promise((s, p) => {
|
|
2
|
+
var t = (o) => {
|
|
3
|
+
try {
|
|
4
|
+
a(r.next(o));
|
|
5
|
+
} catch (d) {
|
|
6
|
+
p(d);
|
|
7
|
+
}
|
|
8
|
+
}, l = (o) => {
|
|
9
|
+
try {
|
|
10
|
+
a(r.throw(o));
|
|
11
|
+
} catch (d) {
|
|
12
|
+
p(d);
|
|
13
|
+
}
|
|
14
|
+
}, a = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(t, l);
|
|
15
|
+
a((r = r.apply(e, i)).next());
|
|
16
|
+
});
|
|
17
|
+
import { F as B, d as I } from "../chunks/FormTemp.FX8xmbVB.mjs";
|
|
18
|
+
import { i as M } from "../chunks/init.Ac4dKUJB.mjs";
|
|
19
|
+
import { s as y, d as x, u as L, x as V, p as A, j as S, a as W, o as R, y as G } from "../chunks/util.C2Bhx22L.mjs";
|
|
20
|
+
import { d as H, c as U, a as q, b as K, f as J } from "../chunks/dataformat.X_61lMA7.mjs";
|
|
21
|
+
import { s as Q } from "../chunks/dic.6tk91Dmq.mjs";
|
|
22
|
+
import { p as X } from "../chunks/packages.v6r2Hr7E.mjs";
|
|
23
|
+
import { isBlank as u } from "@web-utils/core";
|
|
24
|
+
import { n as $ } from "../chunks/vueComponentNormalizer.JwmUNtgn.mjs";
|
|
25
|
+
const Y = (e, i, r, s) => {
|
|
26
|
+
if (!s)
|
|
27
|
+
return;
|
|
28
|
+
if (!window.Mock) {
|
|
29
|
+
X.logs("mock");
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const t = (window.Mock || {}).Random, l = {};
|
|
33
|
+
function a({ en: c }) {
|
|
34
|
+
return c ? t.name(!0) : t.cname();
|
|
35
|
+
}
|
|
36
|
+
function o({ max: c, min: n, precision: f }) {
|
|
37
|
+
if (f) {
|
|
38
|
+
const h = `${t.float(n, c, f)}`, m = h.indexOf(".") + 1;
|
|
39
|
+
return Number(h.substring(0, m + f));
|
|
40
|
+
} else
|
|
41
|
+
return t.integer(n, c);
|
|
42
|
+
}
|
|
43
|
+
function d({ header: c }) {
|
|
44
|
+
let n = t.url();
|
|
45
|
+
const f = n.indexOf("://");
|
|
46
|
+
return c === !1 ? n = n.substring(f + 3) : n = `http://${n.substring(f + 3)}`, n;
|
|
47
|
+
}
|
|
48
|
+
function w({ format: c, now: n }) {
|
|
49
|
+
return n ? t.now(c) : t.datetime(c);
|
|
50
|
+
}
|
|
51
|
+
function T({ min: c, max: n }) {
|
|
52
|
+
return t.csentence(c, n);
|
|
53
|
+
}
|
|
54
|
+
function N() {
|
|
55
|
+
return t.county(!0);
|
|
56
|
+
}
|
|
57
|
+
function P({ dic: c, props: n, columnType: f, multiple: h }) {
|
|
58
|
+
const m = n.value || "value", b = c.length;
|
|
59
|
+
if (["checkbox"].includes(f) || h) {
|
|
60
|
+
const _ = o({ min: 1, max: b }), v = [];
|
|
61
|
+
for (let g = 0; g < _; g++) {
|
|
62
|
+
let O = !0;
|
|
63
|
+
for (; O; ) {
|
|
64
|
+
const j = o({ min: 0, max: b - 1 }), k = c[j][m];
|
|
65
|
+
v.includes(k) || (v.push(k), O = !1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return v;
|
|
69
|
+
} else {
|
|
70
|
+
const _ = o({ min: 0, max: b - 1 });
|
|
71
|
+
return c[_][m];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function z() {
|
|
75
|
+
Object.keys(e).forEach((c) => {
|
|
76
|
+
const n = e[c];
|
|
77
|
+
if (n.mock && typeof n.mock == "object") {
|
|
78
|
+
const f = n.mock;
|
|
79
|
+
switch (f.dic = typeof n.dicData == "string" ? i[n.dicData] : n.dicData || [], f.props = n.props || {}, f.columnType = n.type, f.multiple = n.multiple, f.type) {
|
|
80
|
+
case "name":
|
|
81
|
+
l[n.prop] = a(f);
|
|
82
|
+
break;
|
|
83
|
+
case "number":
|
|
84
|
+
l[n.prop] = o(f);
|
|
85
|
+
break;
|
|
86
|
+
case "datetime":
|
|
87
|
+
l[n.prop] = w(f);
|
|
88
|
+
break;
|
|
89
|
+
case "word":
|
|
90
|
+
l[n.prop] = T(f);
|
|
91
|
+
break;
|
|
92
|
+
case "url":
|
|
93
|
+
l[n.prop] = d(f);
|
|
94
|
+
break;
|
|
95
|
+
case "county":
|
|
96
|
+
l[n.prop] = N();
|
|
97
|
+
break;
|
|
98
|
+
case "dic":
|
|
99
|
+
l[n.prop] = P(f);
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
} else
|
|
103
|
+
n.mock instanceof Function && (l[n.prop] = n.mock(r));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return z(), l;
|
|
107
|
+
};
|
|
108
|
+
var Z = function() {
|
|
109
|
+
var e = this, i = e.$createElement, r = e._self._c || i;
|
|
110
|
+
return e.display ? r("div", {
|
|
111
|
+
class: ["avue-group", {
|
|
112
|
+
"avue-group--header": !e.isHeader,
|
|
113
|
+
"avue-group__arrow": !e.arrow
|
|
114
|
+
}]
|
|
115
|
+
}, [e._t("tabs"), r("ElCollapse", {
|
|
116
|
+
attrs: {
|
|
117
|
+
value: e.text
|
|
118
|
+
},
|
|
119
|
+
on: {
|
|
120
|
+
change: e.handleChange
|
|
121
|
+
},
|
|
122
|
+
model: {
|
|
123
|
+
value: e.activeName,
|
|
124
|
+
callback: function(s) {
|
|
125
|
+
e.activeName = s;
|
|
126
|
+
},
|
|
127
|
+
expression: "activeName"
|
|
128
|
+
}
|
|
129
|
+
}, [r("ElCollapseItem", {
|
|
130
|
+
attrs: {
|
|
131
|
+
name: 1,
|
|
132
|
+
disabled: !e.arrow
|
|
133
|
+
},
|
|
134
|
+
scopedSlots: e._u([{
|
|
135
|
+
key: "title",
|
|
136
|
+
fn: function() {
|
|
137
|
+
return [r("div", {
|
|
138
|
+
staticClass: "avue-group__header"
|
|
139
|
+
}, [e._t("header", function() {
|
|
140
|
+
return [e.icon ? r("i", {
|
|
141
|
+
class: [e.icon, "avue-group__icon"]
|
|
142
|
+
}) : e._e(), e.label ? r("h1", {
|
|
143
|
+
staticClass: "avue-group__title"
|
|
144
|
+
}, [e._v(" " + e._s(e.label) + " ")]) : e._e()];
|
|
145
|
+
})], 2)];
|
|
146
|
+
},
|
|
147
|
+
proxy: !0
|
|
148
|
+
}], null, !0)
|
|
149
|
+
}, [e._t("default")], 2)], 1)], 2) : e._e();
|
|
150
|
+
}, ee = [];
|
|
151
|
+
const te = {
|
|
152
|
+
name: "FormGroup",
|
|
153
|
+
props: {
|
|
154
|
+
arrow: {
|
|
155
|
+
type: Boolean,
|
|
156
|
+
default: !0
|
|
157
|
+
},
|
|
158
|
+
collapse: {
|
|
159
|
+
type: Boolean,
|
|
160
|
+
default: !0
|
|
161
|
+
},
|
|
162
|
+
header: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: !0
|
|
165
|
+
},
|
|
166
|
+
icon: {
|
|
167
|
+
type: String
|
|
168
|
+
},
|
|
169
|
+
display: {
|
|
170
|
+
type: Boolean,
|
|
171
|
+
default: !0
|
|
172
|
+
},
|
|
173
|
+
label: {
|
|
174
|
+
type: String
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
data() {
|
|
178
|
+
return {
|
|
179
|
+
activeName: ""
|
|
180
|
+
};
|
|
181
|
+
},
|
|
182
|
+
computed: {
|
|
183
|
+
text() {
|
|
184
|
+
return this.collapse ? 1 : 0;
|
|
185
|
+
},
|
|
186
|
+
isHeader() {
|
|
187
|
+
return this.$slots.header && this.header || (this.label || this.icon) && this.header;
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
watch: {
|
|
191
|
+
text(e) {
|
|
192
|
+
this.activeName = [e];
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
created() {
|
|
196
|
+
this.activeName = [this.text];
|
|
197
|
+
},
|
|
198
|
+
methods: {
|
|
199
|
+
handleChange(e) {
|
|
200
|
+
this.$emit("change", e);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}, F = {};
|
|
204
|
+
var ie = /* @__PURE__ */ $(
|
|
205
|
+
te,
|
|
206
|
+
Z,
|
|
207
|
+
ee,
|
|
208
|
+
!1,
|
|
209
|
+
re,
|
|
210
|
+
null,
|
|
211
|
+
null,
|
|
212
|
+
null
|
|
213
|
+
);
|
|
214
|
+
function re(e) {
|
|
215
|
+
for (let i in F)
|
|
216
|
+
this[i] = F[i];
|
|
217
|
+
}
|
|
218
|
+
const se = /* @__PURE__ */ function() {
|
|
219
|
+
return ie.exports;
|
|
220
|
+
}();
|
|
221
|
+
var ae = function() {
|
|
222
|
+
var e = this, i = e.$createElement, r = e._self._c || i;
|
|
223
|
+
return e.formSafe.parentOption.menuBtn !== !1 ? r("ElCol", {
|
|
224
|
+
class: ["menu", e.formSafe.menuPosition, "no-print"],
|
|
225
|
+
style: e.styleName,
|
|
226
|
+
attrs: {
|
|
227
|
+
span: e.menuSpan,
|
|
228
|
+
md: e.menuSpan
|
|
229
|
+
}
|
|
230
|
+
}, [r("ElFormItem", {
|
|
231
|
+
staticStyle: {
|
|
232
|
+
"text-align": "center"
|
|
233
|
+
},
|
|
234
|
+
attrs: {
|
|
235
|
+
"label-width": "0px"
|
|
236
|
+
}
|
|
237
|
+
}, [e.formSafe.isMock ? r("ElButton", {
|
|
238
|
+
attrs: {
|
|
239
|
+
type: "primary",
|
|
240
|
+
size: e.formSafe.controlSize,
|
|
241
|
+
icon: "el-icon-edit-outline",
|
|
242
|
+
disabled: e.formSafe.allDisabled
|
|
243
|
+
},
|
|
244
|
+
on: {
|
|
245
|
+
click: e.formSafe.handleMock
|
|
246
|
+
}
|
|
247
|
+
}, [e._v(" " + e._s(e.formSafe.parentOption.mockText || "模拟") + " ")]) : e._e(), e.formSafe.isPrint ? r("ElButton", {
|
|
248
|
+
attrs: {
|
|
249
|
+
type: "primary",
|
|
250
|
+
size: e.formSafe.controlSize,
|
|
251
|
+
icon: "el-icon-printer",
|
|
252
|
+
disabled: e.formSafe.allDisabled
|
|
253
|
+
},
|
|
254
|
+
on: {
|
|
255
|
+
click: e.formSafe.handlePrint
|
|
256
|
+
}
|
|
257
|
+
}, [e._v(" " + e._s(e.formSafe.parentOption.printText || "打印") + " ")]) : e._e(), e.formSafe.parentOption.submitBtn !== !1 ? r("ElButton", {
|
|
258
|
+
attrs: {
|
|
259
|
+
type: "primary",
|
|
260
|
+
size: e.formSafe.controlSize,
|
|
261
|
+
icon: e.formSafe.parentOption.submitIcon || "el-icon-check",
|
|
262
|
+
loading: e.formSafe.allDisabled
|
|
263
|
+
},
|
|
264
|
+
on: {
|
|
265
|
+
click: e.formSafe.submit
|
|
266
|
+
}
|
|
267
|
+
}, [e._v(" " + e._s(e.formSafe.parentOption.submitText || "提交") + " ")]) : e._e(), e.formSafe.parentOption.emptyBtn !== !1 ? r("ElButton", {
|
|
268
|
+
attrs: {
|
|
269
|
+
icon: e.formSafe.parentOption.emptyIcon || "el-icon-delete",
|
|
270
|
+
size: e.formSafe.controlSize,
|
|
271
|
+
disabled: e.formSafe.allDisabled
|
|
272
|
+
},
|
|
273
|
+
on: {
|
|
274
|
+
click: e.formSafe.resetForm
|
|
275
|
+
}
|
|
276
|
+
}, [e._v(" " + e._s(e.formSafe.parentOption.emptyText || "清空") + " ")]) : e._e(), e._t("menuForm", null, {
|
|
277
|
+
disabled: e.formSafe.allDisabled,
|
|
278
|
+
size: e.formSafe.controlSize
|
|
279
|
+
})], 2)], 1) : e._e();
|
|
280
|
+
}, oe = [];
|
|
281
|
+
const ne = {
|
|
282
|
+
name: "FyFormMenu",
|
|
283
|
+
inject: ["formSafe"],
|
|
284
|
+
computed: {
|
|
285
|
+
menuSpan() {
|
|
286
|
+
return this.formSafe.parentOption.menuSpan || 24;
|
|
287
|
+
},
|
|
288
|
+
styleName() {
|
|
289
|
+
return this.menuSpan !== 24 ? {
|
|
290
|
+
padding: 0
|
|
291
|
+
} : {};
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}, C = {};
|
|
295
|
+
var le = /* @__PURE__ */ $(
|
|
296
|
+
ne,
|
|
297
|
+
ae,
|
|
298
|
+
oe,
|
|
299
|
+
!1,
|
|
300
|
+
pe,
|
|
301
|
+
null,
|
|
302
|
+
null,
|
|
303
|
+
null
|
|
304
|
+
);
|
|
305
|
+
function pe(e) {
|
|
306
|
+
for (let i in C)
|
|
307
|
+
this[i] = C[i];
|
|
308
|
+
}
|
|
309
|
+
const fe = /* @__PURE__ */ function() {
|
|
310
|
+
return le.exports;
|
|
311
|
+
}();
|
|
312
|
+
var ue = function() {
|
|
313
|
+
var e = this, i = e.$createElement, r = e._self._c || i;
|
|
314
|
+
return r("div", {
|
|
315
|
+
class: ["avue-form", {
|
|
316
|
+
"avue--detail": e.isDetail
|
|
317
|
+
}],
|
|
318
|
+
style: {
|
|
319
|
+
width: e.setPx(e.parentOption.formWidth, "100%")
|
|
320
|
+
}
|
|
321
|
+
}, [r("ElForm", {
|
|
322
|
+
ref: "form",
|
|
323
|
+
attrs: {
|
|
324
|
+
"status-icon": e.parentOption.statusIcon,
|
|
325
|
+
model: e.form,
|
|
326
|
+
"label-suffix": e.labelSuffix,
|
|
327
|
+
size: e.$AVUE.formSize || e.controlSize,
|
|
328
|
+
"label-position": e.parentOption.labelPosition,
|
|
329
|
+
"label-width": e.setPx(e.parentOption.labelWidth, e.labelWidth)
|
|
330
|
+
},
|
|
331
|
+
nativeOn: {
|
|
332
|
+
submit: function(s) {
|
|
333
|
+
s.preventDefault();
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}, [r("ElRow", {
|
|
337
|
+
class: {
|
|
338
|
+
"avue-form__tabs": e.isTabs
|
|
339
|
+
},
|
|
340
|
+
attrs: {
|
|
341
|
+
span: 24
|
|
342
|
+
}
|
|
343
|
+
}, [e._l(e.columnOption, function(s, p) {
|
|
344
|
+
return r("FormGroup", {
|
|
345
|
+
key: s.prop,
|
|
346
|
+
attrs: {
|
|
347
|
+
tabs: e.isTabs,
|
|
348
|
+
arrow: s.arrow,
|
|
349
|
+
collapse: s.collapse,
|
|
350
|
+
display: e.vaildDisplay(s),
|
|
351
|
+
icon: s.icon,
|
|
352
|
+
index: p,
|
|
353
|
+
header: !e.isTabs,
|
|
354
|
+
active: e.activeName,
|
|
355
|
+
label: s.label
|
|
356
|
+
},
|
|
357
|
+
on: {
|
|
358
|
+
change: e.handleGroupClick
|
|
359
|
+
},
|
|
360
|
+
scopedSlots: e._u([{
|
|
361
|
+
key: "tabs",
|
|
362
|
+
fn: function() {
|
|
363
|
+
return [e.isTabs && p === 1 ? r("ElTabs", {
|
|
364
|
+
staticClass: "avue-form__tabs",
|
|
365
|
+
attrs: {
|
|
366
|
+
type: e.tabsType
|
|
367
|
+
},
|
|
368
|
+
on: {
|
|
369
|
+
"tab-click": e.handleTabClick
|
|
370
|
+
},
|
|
371
|
+
model: {
|
|
372
|
+
value: e.activeName,
|
|
373
|
+
callback: function(t) {
|
|
374
|
+
e.activeName = t;
|
|
375
|
+
},
|
|
376
|
+
expression: "activeName"
|
|
377
|
+
}
|
|
378
|
+
}, [e._l(e.columnOption, function(t, l) {
|
|
379
|
+
return [e.vaildDisplay(t) && l !== 0 ? r("ElTabPane", {
|
|
380
|
+
key: l,
|
|
381
|
+
attrs: {
|
|
382
|
+
name: `${l}`
|
|
383
|
+
},
|
|
384
|
+
scopedSlots: e._u([{
|
|
385
|
+
key: "label",
|
|
386
|
+
fn: function() {
|
|
387
|
+
return [r("span", [e.getSlotName(t, "H", e.$scopedSlots) ? e._t(e.getSlotName(t, "H"), null, {
|
|
388
|
+
column: e.column
|
|
389
|
+
}) : [r("i", {
|
|
390
|
+
class: t.icon
|
|
391
|
+
}, [e._v(" ")]), e._v(" " + e._s(t.label) + " ")]], 2)];
|
|
392
|
+
},
|
|
393
|
+
proxy: !0
|
|
394
|
+
}], null, !0)
|
|
395
|
+
}) : e._e()];
|
|
396
|
+
})], 2) : e._e()];
|
|
397
|
+
},
|
|
398
|
+
proxy: !0
|
|
399
|
+
}, e.getSlotName(s, "H", e.$scopedSlots) ? {
|
|
400
|
+
key: "header",
|
|
401
|
+
fn: function() {
|
|
402
|
+
return [e._t(e.getSlotName(s, "H"), null, {
|
|
403
|
+
column: s
|
|
404
|
+
})];
|
|
405
|
+
},
|
|
406
|
+
proxy: !0
|
|
407
|
+
} : null], null, !0)
|
|
408
|
+
}, [r("div", {
|
|
409
|
+
directives: [{
|
|
410
|
+
name: "show",
|
|
411
|
+
rawName: "v-show",
|
|
412
|
+
value: e.isGroupShow(s, p),
|
|
413
|
+
expression: "isGroupShow(item, index)"
|
|
414
|
+
}],
|
|
415
|
+
class: ["avue-form__group", {
|
|
416
|
+
"avue-form__group--flex": s.flex === !1
|
|
417
|
+
}]
|
|
418
|
+
}, [e._l(s.column, function(t, l) {
|
|
419
|
+
return [e.vaildDisplay(t) ? r("ElCol", {
|
|
420
|
+
key: l,
|
|
421
|
+
class: ["avue-form__row", {
|
|
422
|
+
"avue--detail avue--detail__column": e.vaildDetail(t)
|
|
423
|
+
}, t.className],
|
|
424
|
+
style: {
|
|
425
|
+
paddingLeft: e.gutter,
|
|
426
|
+
paddingRight: e.gutter
|
|
427
|
+
},
|
|
428
|
+
attrs: {
|
|
429
|
+
span: e.getSpan(t),
|
|
430
|
+
md: e.getSpan(t),
|
|
431
|
+
sm: t.smSpan || s.smSpan || 12,
|
|
432
|
+
xs: t.xsSpan || s.xmSpan || 24,
|
|
433
|
+
offset: t.offset || s.offset,
|
|
434
|
+
push: t.push || s.push,
|
|
435
|
+
pull: t.pull || s.pull
|
|
436
|
+
}
|
|
437
|
+
}, [r("ElFormItem", {
|
|
438
|
+
class: `avue-form__item--${t.labelPosition || s.labelPosition || ""}`,
|
|
439
|
+
attrs: {
|
|
440
|
+
prop: t.prop,
|
|
441
|
+
label: t.label,
|
|
442
|
+
rules: t.rules,
|
|
443
|
+
"label-position": t.labelPosition || s.labelPosition || e.parentOption.labelPosition,
|
|
444
|
+
"label-width": e.getLabelWidth(t, s)
|
|
445
|
+
},
|
|
446
|
+
scopedSlots: e._u([e.getSlotName(t, "L", e.$scopedSlots) ? {
|
|
447
|
+
key: "label",
|
|
448
|
+
fn: function() {
|
|
449
|
+
return [e._t(e.getSlotName(t, "L"), null, {
|
|
450
|
+
column: t,
|
|
451
|
+
value: e.form[t.prop],
|
|
452
|
+
readonly: t.readonly || e.readonly,
|
|
453
|
+
disabled: e.getDisabled(t),
|
|
454
|
+
size: t.size || e.controlSize,
|
|
455
|
+
dic: e.DIC[t.prop]
|
|
456
|
+
})];
|
|
457
|
+
},
|
|
458
|
+
proxy: !0
|
|
459
|
+
} : t.labelTip ? {
|
|
460
|
+
key: "label",
|
|
461
|
+
fn: function() {
|
|
462
|
+
return [r("ElTooltip", {
|
|
463
|
+
staticClass: "item",
|
|
464
|
+
attrs: {
|
|
465
|
+
effect: "dark",
|
|
466
|
+
placement: t.labelTipPlacement || "top-start"
|
|
467
|
+
},
|
|
468
|
+
scopedSlots: e._u([{
|
|
469
|
+
key: "content",
|
|
470
|
+
fn: function() {
|
|
471
|
+
return [r("div", {
|
|
472
|
+
domProps: {
|
|
473
|
+
innerHTML: e._s(t.labelTip)
|
|
474
|
+
}
|
|
475
|
+
})];
|
|
476
|
+
},
|
|
477
|
+
proxy: !0
|
|
478
|
+
}], null, !0)
|
|
479
|
+
}, [r("i", {
|
|
480
|
+
staticClass: "el-icon-info"
|
|
481
|
+
})]), r("span", [e._v(" " + e._s(t.label) + e._s(e.labelSuffix))])];
|
|
482
|
+
},
|
|
483
|
+
proxy: !0
|
|
484
|
+
} : null, e.getSlotName(t, "E", e.$scopedSlots) ? {
|
|
485
|
+
key: "error",
|
|
486
|
+
fn: function(a) {
|
|
487
|
+
return [e._t(e.getSlotName(t, "E"), null, null, Object.assign(a, {
|
|
488
|
+
column: t,
|
|
489
|
+
value: e.form[t.prop],
|
|
490
|
+
readonly: e.readonly || t.readonly,
|
|
491
|
+
disabled: e.getDisabled(t),
|
|
492
|
+
size: t.size || e.controlSize,
|
|
493
|
+
dic: e.DIC[t.prop]
|
|
494
|
+
}))];
|
|
495
|
+
}
|
|
496
|
+
} : null], null, !0)
|
|
497
|
+
}, [r(e.validTip(t) ? "div" : "elTooltip", {
|
|
498
|
+
tag: "Component",
|
|
499
|
+
attrs: {
|
|
500
|
+
disabled: e.validTip(t),
|
|
501
|
+
content: t.tip || e.getPlaceholder(t),
|
|
502
|
+
placement: t.tipPlacement
|
|
503
|
+
}
|
|
504
|
+
}, [e.$scopedSlots[t.prop] ? e._t(t.prop, null, {
|
|
505
|
+
value: e.form[t.prop],
|
|
506
|
+
column: t,
|
|
507
|
+
label: e.form[`$${t.prop}`],
|
|
508
|
+
size: t.size || e.controlSize,
|
|
509
|
+
readonly: e.readonly || t.readonly,
|
|
510
|
+
disabled: e.getDisabled(t),
|
|
511
|
+
dic: e.DIC[t.prop]
|
|
512
|
+
}) : r("FormTemp", e._b({
|
|
513
|
+
ref: t.prop,
|
|
514
|
+
refInFor: !0,
|
|
515
|
+
attrs: {
|
|
516
|
+
column: t,
|
|
517
|
+
dic: e.DIC[t.prop],
|
|
518
|
+
props: e.parentOption.props,
|
|
519
|
+
"props-http": e.parentOption.propsHttp,
|
|
520
|
+
disabled: e.getDisabled(t),
|
|
521
|
+
readonly: t.readonly || e.readonly,
|
|
522
|
+
enter: e.parentOption.enter,
|
|
523
|
+
size: t.size || e.controlSize,
|
|
524
|
+
"column-slot": e.columnSlot
|
|
525
|
+
},
|
|
526
|
+
on: {
|
|
527
|
+
enter: e.submit,
|
|
528
|
+
change: function(a) {
|
|
529
|
+
return e.propChange(s.column, t);
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
scopedSlots: e._u([e._l(e.getSlotName(t, "T", e.$scopedSlots) ? [t] : [], function(a) {
|
|
533
|
+
return {
|
|
534
|
+
key: e.getSlotName(t, "T"),
|
|
535
|
+
fn: function(o) {
|
|
536
|
+
return [e._t(e.getSlotName(a, "T"), null, null, o)];
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
}), e._l(e.columnSlot, function(a) {
|
|
540
|
+
return {
|
|
541
|
+
key: a,
|
|
542
|
+
fn: function(o) {
|
|
543
|
+
return [e._t(a, null, null, o)];
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
})], null, !0),
|
|
547
|
+
model: {
|
|
548
|
+
value: e.form[t.prop],
|
|
549
|
+
callback: function(a) {
|
|
550
|
+
e.$set(e.form, t.prop, a);
|
|
551
|
+
},
|
|
552
|
+
expression: "form[column.prop]"
|
|
553
|
+
}
|
|
554
|
+
}, "FormTemp", e.uploadFun(t), !1))], 2)], 1)], 1) : e._e(), e.vaildDisplay(t) && t.row && t.span !== 24 && t.count ? r("div", {
|
|
555
|
+
key: `line${l}`,
|
|
556
|
+
staticClass: "avue-form__line",
|
|
557
|
+
style: {
|
|
558
|
+
width: `${t.count / 24 * 100}%`
|
|
559
|
+
}
|
|
560
|
+
}) : e._e()];
|
|
561
|
+
}), !e.isDetail && !e.isMenu ? r("FyFormMenu", {
|
|
562
|
+
scopedSlots: e._u([{
|
|
563
|
+
key: "menuForm",
|
|
564
|
+
fn: function(t) {
|
|
565
|
+
return [e._t("menuForm", null, null, t)];
|
|
566
|
+
}
|
|
567
|
+
}], null, !0)
|
|
568
|
+
}) : e._e()], 2)]);
|
|
569
|
+
}), !e.isDetail && e.isMenu ? r("FyFormMenu", {
|
|
570
|
+
scopedSlots: e._u([{
|
|
571
|
+
key: "menuForm",
|
|
572
|
+
fn: function(s) {
|
|
573
|
+
return [e._t("menuForm", null, null, s)];
|
|
574
|
+
}
|
|
575
|
+
}], null, !0)
|
|
576
|
+
}) : e._e()], 2)], 1)], 1);
|
|
577
|
+
}, ce = [];
|
|
578
|
+
const de = {
|
|
579
|
+
name: "FyForm",
|
|
580
|
+
components: { FormTemp: B, FyFormMenu: fe, FormGroup: se },
|
|
581
|
+
mixins: [M],
|
|
582
|
+
provide() {
|
|
583
|
+
return {
|
|
584
|
+
formSafe: this
|
|
585
|
+
};
|
|
586
|
+
},
|
|
587
|
+
props: {
|
|
588
|
+
uploadBefore: Function,
|
|
589
|
+
uploadAfter: Function,
|
|
590
|
+
uploadDelete: Function,
|
|
591
|
+
uploadPreview: Function,
|
|
592
|
+
uploadError: Function,
|
|
593
|
+
uploadExceed: Function,
|
|
594
|
+
status: {
|
|
595
|
+
type: Boolean,
|
|
596
|
+
default: !1
|
|
597
|
+
},
|
|
598
|
+
isCrud: {
|
|
599
|
+
type: Boolean,
|
|
600
|
+
default: !1
|
|
601
|
+
},
|
|
602
|
+
value: {
|
|
603
|
+
type: Object,
|
|
604
|
+
required: !0,
|
|
605
|
+
default: () => ({})
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
data() {
|
|
609
|
+
return {
|
|
610
|
+
activeName: "",
|
|
611
|
+
labelWidth: 90,
|
|
612
|
+
allDisabled: !1,
|
|
613
|
+
optionIndex: [],
|
|
614
|
+
optionBox: !1,
|
|
615
|
+
tableOption: {},
|
|
616
|
+
itemSpanDefault: 12,
|
|
617
|
+
form: {},
|
|
618
|
+
formCreate: !1,
|
|
619
|
+
formList: [],
|
|
620
|
+
formBind: {}
|
|
621
|
+
};
|
|
622
|
+
},
|
|
623
|
+
computed: {
|
|
624
|
+
columnSlot() {
|
|
625
|
+
return Object.keys(this.$scopedSlots).filter((e) => !this.propOption.map((i) => i.prop).includes(e));
|
|
626
|
+
},
|
|
627
|
+
labelSuffix() {
|
|
628
|
+
return this.parentOption.labelSuffix || ":";
|
|
629
|
+
},
|
|
630
|
+
isMenu() {
|
|
631
|
+
return this.columnOption.length !== 1;
|
|
632
|
+
},
|
|
633
|
+
isDetail() {
|
|
634
|
+
return this.detail === !0;
|
|
635
|
+
},
|
|
636
|
+
isTabs() {
|
|
637
|
+
return this.parentOption.tabs === !0;
|
|
638
|
+
},
|
|
639
|
+
isAdd() {
|
|
640
|
+
return this.boxType === "add";
|
|
641
|
+
},
|
|
642
|
+
isEdit() {
|
|
643
|
+
return this.boxType === "edit";
|
|
644
|
+
},
|
|
645
|
+
isView() {
|
|
646
|
+
return this.boxType === "view";
|
|
647
|
+
},
|
|
648
|
+
gutter() {
|
|
649
|
+
return y((this.parentOption.gutter || 10) / 2);
|
|
650
|
+
},
|
|
651
|
+
detail() {
|
|
652
|
+
return this.parentOption.detail;
|
|
653
|
+
},
|
|
654
|
+
disabled() {
|
|
655
|
+
return this.parentOption.disabled;
|
|
656
|
+
},
|
|
657
|
+
readonly() {
|
|
658
|
+
return this.parentOption.readonly;
|
|
659
|
+
},
|
|
660
|
+
tabsType() {
|
|
661
|
+
return this.parentOption.tabsType;
|
|
662
|
+
},
|
|
663
|
+
columnLen() {
|
|
664
|
+
return this.columnOption.length;
|
|
665
|
+
},
|
|
666
|
+
dynamicOption() {
|
|
667
|
+
const e = [];
|
|
668
|
+
return this.propOption.forEach((i) => {
|
|
669
|
+
i.type === "dynamic" && this.vaildDisplay(i) && e.push(i);
|
|
670
|
+
}), e;
|
|
671
|
+
},
|
|
672
|
+
propOption() {
|
|
673
|
+
const e = [];
|
|
674
|
+
return this.columnOption.forEach((i) => {
|
|
675
|
+
i.display !== !1 && i.column.forEach((r) => {
|
|
676
|
+
e.push(r);
|
|
677
|
+
});
|
|
678
|
+
}), e;
|
|
679
|
+
},
|
|
680
|
+
parentOption() {
|
|
681
|
+
return this.tableOption || {};
|
|
682
|
+
},
|
|
683
|
+
columnOption() {
|
|
684
|
+
const e = this.tableOption.column || [], i = x(this.tableOption.group) || [], r = this.tableOption.footer || [];
|
|
685
|
+
return i.unshift({
|
|
686
|
+
header: !1,
|
|
687
|
+
column: e
|
|
688
|
+
}), r.length !== 0 && i.push({
|
|
689
|
+
header: !1,
|
|
690
|
+
column: r
|
|
691
|
+
}), i.forEach((s) => {
|
|
692
|
+
s.column = s.column || [], s.column.forEach((p, t) => {
|
|
693
|
+
p.display !== !1 && !this.isMobile && (p = H(p, this.itemSpanDefault, t === 0));
|
|
694
|
+
}), s.column = U(s.column), s.column = s.column.sort((p, t) => (t.order || 0) - (p.order || 0));
|
|
695
|
+
}), i;
|
|
696
|
+
},
|
|
697
|
+
menuPosition: function() {
|
|
698
|
+
return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center";
|
|
699
|
+
},
|
|
700
|
+
boxType: function() {
|
|
701
|
+
return this.parentOption.boxType;
|
|
702
|
+
},
|
|
703
|
+
isPrint() {
|
|
704
|
+
return this.parentOption.printBtn === !0;
|
|
705
|
+
},
|
|
706
|
+
tabsActive() {
|
|
707
|
+
return this.tableOption.tabsActive || "1";
|
|
708
|
+
},
|
|
709
|
+
isMock() {
|
|
710
|
+
return this.parentOption.mockBtn === !0;
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
watch: {
|
|
714
|
+
value: {
|
|
715
|
+
handler() {
|
|
716
|
+
this.formCreate && this.setForm();
|
|
717
|
+
},
|
|
718
|
+
deep: !0
|
|
719
|
+
},
|
|
720
|
+
form: {
|
|
721
|
+
handler() {
|
|
722
|
+
this.formCreate && (this.setLabel(), this.setVal());
|
|
723
|
+
},
|
|
724
|
+
deep: !0
|
|
725
|
+
},
|
|
726
|
+
tabsActive: {
|
|
727
|
+
handler() {
|
|
728
|
+
this.activeName = this.tabsActive;
|
|
729
|
+
},
|
|
730
|
+
immediate: !0
|
|
731
|
+
},
|
|
732
|
+
DIC: {
|
|
733
|
+
handler() {
|
|
734
|
+
this.setLabel();
|
|
735
|
+
},
|
|
736
|
+
deep: !0,
|
|
737
|
+
immediate: !0
|
|
738
|
+
},
|
|
739
|
+
allDisabled: {
|
|
740
|
+
handler(e) {
|
|
741
|
+
this.$emit("update:status", e);
|
|
742
|
+
},
|
|
743
|
+
deep: !0,
|
|
744
|
+
immediate: !0
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
mounted() {
|
|
748
|
+
setTimeout(() => {
|
|
749
|
+
this.dataFormat();
|
|
750
|
+
});
|
|
751
|
+
},
|
|
752
|
+
beforeDestroy() {
|
|
753
|
+
Object.keys(this.formBind).forEach((e) => {
|
|
754
|
+
this.formBind[e].forEach((i) => {
|
|
755
|
+
i();
|
|
756
|
+
});
|
|
757
|
+
});
|
|
758
|
+
},
|
|
759
|
+
methods: {
|
|
760
|
+
setPx: y,
|
|
761
|
+
deepClone: x,
|
|
762
|
+
getComponent: q,
|
|
763
|
+
getPlaceholder: K,
|
|
764
|
+
uploadFun: L,
|
|
765
|
+
getDisabled(e) {
|
|
766
|
+
return this.vaildDetail(e) || this.isDetail || this.vaildDisabled(e) || this.allDisabled;
|
|
767
|
+
},
|
|
768
|
+
getSpan(e) {
|
|
769
|
+
return e.span || this.parentOption.span || this.itemSpanDefault;
|
|
770
|
+
},
|
|
771
|
+
isGroupShow(e, i) {
|
|
772
|
+
return this.isTabs ? `${i}` === this.activeName || i === 0 : !0;
|
|
773
|
+
},
|
|
774
|
+
// 初始化表单
|
|
775
|
+
dataFormat() {
|
|
776
|
+
const e = J(this.propOption).tableForm, i = this.value, r = {};
|
|
777
|
+
Object.entries(Object.assign(e, i)).forEach((s) => {
|
|
778
|
+
const p = s[0], t = s[1];
|
|
779
|
+
u(i[p]) ? r[p] = t : r[p] = i[p];
|
|
780
|
+
}), this.$set(this, "form", r), this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
|
|
781
|
+
this.formCreate = !0, this.clearValidate();
|
|
782
|
+
});
|
|
783
|
+
},
|
|
784
|
+
setControl() {
|
|
785
|
+
this.propOption.forEach((e) => {
|
|
786
|
+
const i = e.prop, r = e.bind, s = e.control;
|
|
787
|
+
if (!this.formBind[i]) {
|
|
788
|
+
const p = [];
|
|
789
|
+
if (r) {
|
|
790
|
+
const t = this.$watch(`form.${i}`, (a, o) => {
|
|
791
|
+
a !== o && V(this.form, r, a);
|
|
792
|
+
}), l = this.$watch(`form.${r}`, (a, o) => {
|
|
793
|
+
a !== o && this.$set(this.form, i, a);
|
|
794
|
+
});
|
|
795
|
+
p.push(t), p.push(l), this.$set(this.form, i, A(this.form, r));
|
|
796
|
+
}
|
|
797
|
+
if (s) {
|
|
798
|
+
const t = () => {
|
|
799
|
+
const a = s(this.form[e.prop], this.form) || {};
|
|
800
|
+
Object.keys(a).forEach((o) => {
|
|
801
|
+
const d = Object.assign(this.objectOption[o] || {}, a[o]);
|
|
802
|
+
this.$set(this.objectOption, o, d), a[o].dicData && (this.DIC[o] = a[o].dicData);
|
|
803
|
+
});
|
|
804
|
+
}, l = this.$watch(`form.${i}`, () => {
|
|
805
|
+
t();
|
|
806
|
+
});
|
|
807
|
+
p.push(l), t();
|
|
808
|
+
}
|
|
809
|
+
this.formBind[i] = p;
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
},
|
|
813
|
+
setForm() {
|
|
814
|
+
Object.keys(this.value).forEach((e) => {
|
|
815
|
+
this.$set(this.form, e, this.value[e]);
|
|
816
|
+
});
|
|
817
|
+
},
|
|
818
|
+
setVal() {
|
|
819
|
+
this.$emit("input", this.form), this.$emit("change", this.form);
|
|
820
|
+
},
|
|
821
|
+
setLabel() {
|
|
822
|
+
this.tableOption.filterNull === !0 && (this.form = S(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = S(this.form, ["$"], !1) : this.propOption.forEach((e) => {
|
|
823
|
+
const i = this.DIC[e.prop];
|
|
824
|
+
if (u(i))
|
|
825
|
+
return;
|
|
826
|
+
const r = I(this.form, e, this.tableOption, i);
|
|
827
|
+
r ? this.$set(this.form, `$${e.prop}`, r) : this.$delete(this.form, `$${e.prop}`);
|
|
828
|
+
});
|
|
829
|
+
},
|
|
830
|
+
handleGroupClick(e) {
|
|
831
|
+
this.$emit("tab-click", e);
|
|
832
|
+
},
|
|
833
|
+
handleTabClick(e, i) {
|
|
834
|
+
this.$emit("tab-click", e, i);
|
|
835
|
+
},
|
|
836
|
+
getLabelWidth(e, i) {
|
|
837
|
+
let r;
|
|
838
|
+
return u(e.labelWidth) ? u(i.labelWidth) ? r = this.parentOption.labelWidth : r = i.labelWidth : r = e.labelWidth, y(r, this.labelWidth);
|
|
839
|
+
},
|
|
840
|
+
// 对部分表单字段进行校验的方法
|
|
841
|
+
validateField(e) {
|
|
842
|
+
return this.$refs.form.validateField(e);
|
|
843
|
+
},
|
|
844
|
+
validTip(e) {
|
|
845
|
+
return !e.tip || e.type === "upload";
|
|
846
|
+
},
|
|
847
|
+
getPropRef(e) {
|
|
848
|
+
return this.$refs[e][0];
|
|
849
|
+
},
|
|
850
|
+
handleChange(e, i) {
|
|
851
|
+
this.$nextTick(() => {
|
|
852
|
+
const r = i.cascader, s = r.join(",");
|
|
853
|
+
r.forEach((p) => {
|
|
854
|
+
const t = p, l = this.form[i.prop], a = this.findObject(e, t);
|
|
855
|
+
u(a) || (this.formList.includes(s) && r.forEach((o) => {
|
|
856
|
+
this.form[o] = "", this.$set(this.DIC, o, []);
|
|
857
|
+
}), !(u(r) || u(l) || u(a)) && Q({
|
|
858
|
+
column: a,
|
|
859
|
+
value: l,
|
|
860
|
+
form: this.form
|
|
861
|
+
}).then((o) => {
|
|
862
|
+
this.formList.includes(s) || this.formList.push(s);
|
|
863
|
+
const d = o || [];
|
|
864
|
+
this.$set(this.DIC, t, d), !u(d) && !u(d) && !u(a.cascaderIndex) && u(this.form[t]) && (this.form[t] = d[a.cascaderIndex][(a.props || {}).value || W.value]);
|
|
865
|
+
}));
|
|
866
|
+
});
|
|
867
|
+
});
|
|
868
|
+
},
|
|
869
|
+
handlePrint() {
|
|
870
|
+
this.$Print(this.$el);
|
|
871
|
+
},
|
|
872
|
+
propChange(e, i) {
|
|
873
|
+
i.cascader && this.handleChange(e, i);
|
|
874
|
+
},
|
|
875
|
+
handleMock() {
|
|
876
|
+
this.isMock && (this.columnOption.forEach((e) => {
|
|
877
|
+
const i = Y(e.column, this.DIC, this.form, this.isMock);
|
|
878
|
+
u(i) || Object.keys(i).forEach((r) => {
|
|
879
|
+
this.form[r] = i[r];
|
|
880
|
+
});
|
|
881
|
+
}), this.$nextTick(() => {
|
|
882
|
+
this.clearValidate(), this.$emit("mock-change", this.form);
|
|
883
|
+
}));
|
|
884
|
+
},
|
|
885
|
+
vaildDetail(e) {
|
|
886
|
+
let i;
|
|
887
|
+
if (this.detail)
|
|
888
|
+
return !1;
|
|
889
|
+
if (!u(e.detail))
|
|
890
|
+
i = "detail";
|
|
891
|
+
else if (this.isAdd)
|
|
892
|
+
i = "addDetail";
|
|
893
|
+
else if (this.isEdit)
|
|
894
|
+
i = "editDetail";
|
|
895
|
+
else if (this.isView)
|
|
896
|
+
return !1;
|
|
897
|
+
return i ? e[i] === !0 : !1;
|
|
898
|
+
},
|
|
899
|
+
// 验证表单是否禁止
|
|
900
|
+
vaildDisabled(e) {
|
|
901
|
+
let i;
|
|
902
|
+
if (this.disabled)
|
|
903
|
+
return !0;
|
|
904
|
+
if (!u(e.disabled))
|
|
905
|
+
i = "disabled";
|
|
906
|
+
else if (this.isAdd)
|
|
907
|
+
i = "addDisabled";
|
|
908
|
+
else if (this.isEdit)
|
|
909
|
+
i = "editDisabled";
|
|
910
|
+
else if (this.isView)
|
|
911
|
+
return !0;
|
|
912
|
+
return i ? e[i] === !0 : !1;
|
|
913
|
+
},
|
|
914
|
+
// 验证表单是否显隐
|
|
915
|
+
vaildDisplay(e) {
|
|
916
|
+
let i;
|
|
917
|
+
return u(e.display) ? this.isAdd ? i = "addDisplay" : this.isEdit ? i = "editDisplay" : this.isView && (i = "viewDisplay") : i = "display", i ? R(e[i], !0) : !0;
|
|
918
|
+
},
|
|
919
|
+
clearValidate(e) {
|
|
920
|
+
return D(this, null, function* () {
|
|
921
|
+
var i;
|
|
922
|
+
(i = this.$refs.form) == null || i.clearValidate(e);
|
|
923
|
+
});
|
|
924
|
+
},
|
|
925
|
+
validateCellForm() {
|
|
926
|
+
return new Promise((e) => {
|
|
927
|
+
this.$refs.form.validate((i, r) => {
|
|
928
|
+
e(r);
|
|
929
|
+
});
|
|
930
|
+
});
|
|
931
|
+
},
|
|
932
|
+
validate(e) {
|
|
933
|
+
this.$refs.form.validate((i, r) => {
|
|
934
|
+
const s = [], p = [], t = {};
|
|
935
|
+
this.dynamicOption.forEach((l) => {
|
|
936
|
+
const a = l.children.type === "form";
|
|
937
|
+
p.push(l.prop), a ? u(this.$refs[l.prop][0].$refs.temp.$refs.main) || this.$refs[l.prop][0].$refs.temp.$refs.main.forEach((o) => {
|
|
938
|
+
s.push(o.validateCellForm());
|
|
939
|
+
}) : s.push(this.$refs[l.prop][0].$refs.temp.$refs.main.validateCellForm());
|
|
940
|
+
}), Promise.all(s).then((l) => {
|
|
941
|
+
l.forEach((o, d) => {
|
|
942
|
+
u(o) || (t[p[d]] = o);
|
|
943
|
+
});
|
|
944
|
+
const a = Object.assign(t, r);
|
|
945
|
+
u(a) ? (this.show(), e(!0, this.hide)) : e(!1, this.hide, a);
|
|
946
|
+
});
|
|
947
|
+
});
|
|
948
|
+
},
|
|
949
|
+
resetForm(e = !0) {
|
|
950
|
+
if (e) {
|
|
951
|
+
const i = this.propOption.map((r) => r.prop);
|
|
952
|
+
this.form = G(this.form, i, (this.tableOption.filterParams || []).concat([this.rowKey]));
|
|
953
|
+
}
|
|
954
|
+
this.$nextTick(() => {
|
|
955
|
+
this.clearValidate(), this.$emit("reset-change");
|
|
956
|
+
});
|
|
957
|
+
},
|
|
958
|
+
resetFields() {
|
|
959
|
+
this.$refs.form.resetFields();
|
|
960
|
+
},
|
|
961
|
+
show() {
|
|
962
|
+
this.allDisabled = !0;
|
|
963
|
+
},
|
|
964
|
+
hide() {
|
|
965
|
+
this.allDisabled = !1;
|
|
966
|
+
},
|
|
967
|
+
submit() {
|
|
968
|
+
this.validate((e, i) => {
|
|
969
|
+
e ? this.$emit("submit", S(this.form, ["$"]), this.hide) : this.$emit("error", i);
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}, E = {};
|
|
974
|
+
var he = /* @__PURE__ */ $(
|
|
975
|
+
de,
|
|
976
|
+
ue,
|
|
977
|
+
ce,
|
|
978
|
+
!1,
|
|
979
|
+
me,
|
|
980
|
+
null,
|
|
981
|
+
null,
|
|
982
|
+
null
|
|
983
|
+
);
|
|
984
|
+
function me(e) {
|
|
985
|
+
for (let i in E)
|
|
986
|
+
this[i] = E[i];
|
|
987
|
+
}
|
|
988
|
+
const De = /* @__PURE__ */ function() {
|
|
989
|
+
return he.exports;
|
|
990
|
+
}();
|
|
991
|
+
export {
|
|
992
|
+
De as default
|
|
993
|
+
};
|