@web-utils/component 2.7.19 → 2.7.21
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/chunks/{config.46422d7f.js → config.7dec2bf2.js} +2 -2
- package/dist/chunks/confirmable-mixin.7112b769.js +75 -0
- package/dist/chunks/dataformat.9cc4428a.js +158 -0
- package/dist/chunks/dayjs.b0f2f7d9.js +247 -0
- package/dist/chunks/detail.6619700c.js +29 -0
- package/dist/chunks/dic.9de2fe5a.js +135 -0
- package/dist/chunks/{event.dd6f522d.js → event.fc358074.js} +31 -31
- package/dist/chunks/{form-input-mixin.ff5b58f7.js → form-input-mixin.df413ca8.js} +6 -6
- package/dist/chunks/{form-item-mixin.79f6eaff.js → form-item-mixin.b850e028.js} +18 -18
- package/dist/chunks/{form-pick-mixin.61ad06b2.js → form-pick-mixin.c4e0391b.js} +2 -2
- package/dist/chunks/init.e0133910.js +122 -0
- package/dist/chunks/{input-number-mixin.41a066be.js → input-number-mixin.6849fa63.js} +4 -4
- package/dist/chunks/{mixins.5a78e0db.js → mixins.6a394a6c.js} +4 -4
- package/dist/chunks/{packages.1fc9ccba.js → packages.419bde01.js} +7 -7
- package/dist/chunks/permission.07c49abf.js +16 -0
- package/dist/chunks/slot.a7387ecc.js +27 -0
- package/dist/chunks/{tab-mixin.8c0142e0.js → tab-mixin.51886d91.js} +20 -20
- package/dist/chunks/util.89913643.js +261 -0
- package/dist/chunks/utils.d7f73f8d.js +185 -0
- package/dist/chunks/utils.f44207f4.js +26 -0
- package/dist/chunks/vueComponentNormalizer.bf552d98.js +32 -0
- package/dist/components/address-input/index.js +36 -36
- package/dist/components/address-input/style.css +10 -1
- package/dist/components/affix/index.js +39 -39
- package/dist/components/affix/style.css +4 -1
- package/dist/components/aside-menu/index.js +29 -29
- package/dist/components/aside-menu/style.css +3 -1
- package/dist/components/avatar/index.js +43 -43
- package/dist/components/avatar/style.css +51 -1
- package/dist/components/awesome-button/index.js +28 -28
- package/dist/components/base.css +536 -1
- package/dist/components/capsule-tab/index.js +26 -26
- package/dist/components/capsule-tab/style.css +26 -1
- package/dist/components/card/index.js +49 -49
- package/dist/components/card/style.css +84 -1
- package/dist/components/carousel/index.js +35 -35
- package/dist/components/carousel/style.css +35 -1
- package/dist/components/chat/index.js +203 -203
- package/dist/components/chat/style.css +277 -1
- package/dist/components/chunk-file-uploader/index.js +46 -46
- package/dist/components/chunk-file-uploader/style.css +3 -1
- package/dist/components/chunk-file-uploader-button/index.js +22 -22
- package/dist/components/chunk-file-uploader-button/style.css +16 -1
- package/dist/components/chunk-file-uploader-drop/index.js +27 -27
- package/dist/components/chunk-file-uploader-drop/style.css +11 -1
- package/dist/components/chunk-file-uploader-file/index.js +118 -118
- package/dist/components/chunk-file-uploader-file/style.css +124 -1
- package/dist/components/chunk-file-uploader-files/index.js +27 -27
- package/dist/components/chunk-file-uploader-files/style.css +8 -1
- package/dist/components/chunk-file-uploader-list/index.js +27 -27
- package/dist/components/chunk-file-uploader-list/style.css +8 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +27 -27
- package/dist/components/chunk-file-uploader-un-support/style.css +5 -1
- package/dist/components/code-mirror-editor/index.js +134 -134
- package/dist/components/code-mirror-editor/style.css +11 -1
- package/dist/components/color-picker/index.js +39 -39
- package/dist/components/column/index.js +66 -66
- package/dist/components/column-default/index.js +54 -54
- package/dist/components/column-dynamic/index.js +54 -54
- package/dist/components/column-menu/index.js +128 -128
- package/dist/components/column-slot/index.js +168 -168
- package/dist/components/comment/index.js +33 -33
- package/dist/components/comment/style.css +110 -1
- package/dist/components/confirm-button/index.js +18 -18
- package/dist/components/confirmable/index.js +17 -17
- package/dist/components/context-menu/index.js +89 -89
- package/dist/components/context-menu/style.css +84 -1
- package/dist/components/count-up/index.js +36 -36
- package/dist/components/custom-scrollbar/index.js +45 -45
- package/dist/components/data-box/index.js +41 -41
- package/dist/components/data-box/style.css +52 -1
- package/dist/components/data-card/index.js +38 -38
- package/dist/components/data-card/style.css +35 -1
- package/dist/components/data-cardtext/index.js +33 -33
- package/dist/components/data-cardtext/style.css +30 -1
- package/dist/components/data-display/index.js +37 -37
- package/dist/components/data-display/style.css +31 -1
- package/dist/components/data-icons/index.js +40 -40
- package/dist/components/data-icons/style.css +47 -1
- package/dist/components/data-imgtext/index.js +44 -44
- package/dist/components/data-imgtext/style.css +65 -1
- package/dist/components/data-operatext/index.js +44 -44
- package/dist/components/data-operatext/style.css +72 -1
- package/dist/components/data-panel/index.js +38 -38
- package/dist/components/data-panel/style.css +31 -1
- package/dist/components/data-pay/index.js +60 -60
- package/dist/components/data-pay/style.css +96 -1
- package/dist/components/data-price/index.js +38 -38
- package/dist/components/data-price/style.css +75 -1
- package/dist/components/data-progress/index.js +39 -39
- package/dist/components/data-progress/style.css +24 -1
- package/dist/components/data-rotate/index.js +39 -39
- package/dist/components/data-rotate/style.css +44 -1
- package/dist/components/data-table-picker/index.js +151 -53
- package/dist/components/data-tabs/index.js +39 -39
- package/dist/components/data-tabs/style.css +64 -1
- package/dist/components/dialog-column/index.js +50 -50
- package/dist/components/dialog-excel/index.js +68 -68
- package/dist/components/dialog-filter/index.js +84 -84
- package/dist/components/dialog-form/index.js +89 -89
- package/dist/components/dialog-form/style.css +5 -0
- package/dist/components/dynamic-table/index.js +71 -71
- package/dist/components/dynamic-table/style.css +24 -1
- package/dist/components/e-charts/index.js +95 -94
- package/dist/components/e-charts/style.css +4 -1
- package/dist/components/easy-popup/index.js +87 -0
- package/dist/components/easy-popup/style.css +12 -0
- package/dist/components/editable-progress/index.js +48 -48
- package/dist/components/editable-progress/style.css +33 -1
- package/dist/components/editable-tree/index.js +587 -287
- package/dist/components/editable-tree/style.css +79 -1
- package/dist/components/egd-collapse/index.js +29 -29
- package/dist/components/egd-collapse-item/index.js +51 -51
- package/dist/components/element-dialog/index.js +74 -65
- package/dist/components/element-dialog/style.css +82 -1
- package/dist/components/empty-view/index.js +26 -26
- package/dist/components/empty-view/style.css +11 -1
- package/dist/components/error-view/index.js +25 -25
- package/dist/components/error-view/style.css +11 -1
- package/dist/components/flex-column/index.js +19 -19
- package/dist/components/flex-item/index.js +20 -20
- package/dist/components/flex-row/index.js +19 -19
- package/dist/components/flex-scroller/index.js +24 -24
- package/dist/components/flex-scroller/style.css +14 -1
- package/dist/components/flow/index.js +100 -100
- package/dist/components/flow/style.css +38 -1
- package/dist/components/flow-node/index.js +37 -37
- package/dist/components/flow-viewer/index.js +135 -0
- package/dist/components/flow-viewer/style.css +13 -0
- package/dist/components/form-button/index.js +32 -32
- package/dist/components/form-cascader/index.js +62 -61
- package/dist/components/form-checkbox-group/index.js +61 -61
- package/dist/components/form-checkbox-group/style.css +45 -1
- package/dist/components/form-date-picker/index.js +57 -57
- package/dist/components/form-group/index.js +38 -38
- package/dist/components/form-group/style.css +76 -1
- package/dist/components/form-holder/index.js +30 -30
- package/dist/components/form-input/index.js +50 -50
- package/dist/components/form-input-email/index.js +44 -44
- package/dist/components/form-input-id-card/index.js +49 -49
- package/dist/components/form-input-number/index.js +49 -49
- package/dist/components/form-input-number/style.css +6 -1
- package/dist/components/form-input-phone-number/index.js +45 -45
- package/dist/components/form-input-time/index.js +48 -48
- package/dist/components/form-item/index.js +73 -73
- package/dist/components/form-item/style.css +5 -1
- package/dist/components/form-item-config-provider/index.js +19 -19
- package/dist/components/form-item-group/index.js +65 -65
- package/dist/components/form-item-group/style.css +25 -1
- package/dist/components/form-radio-group/index.js +61 -61
- package/dist/components/form-radio-group/style.css +47 -1
- package/dist/components/form-select/index.js +52 -52
- package/dist/components/form-switch/index.js +45 -45
- package/dist/components/form-temp/index.js +50 -50
- package/dist/components/form-textarea/index.js +44 -44
- package/dist/components/form-view/index.js +143 -142
- package/dist/components/form-view/style.css +155 -1
- package/dist/components/fy-array/index.js +64 -64
- package/dist/components/fy-array/style.css +12 -1
- package/dist/components/fy-article/index.js +34 -34
- package/dist/components/fy-article/style.css +56 -1
- package/dist/components/fy-cascader/index.js +52 -52
- package/dist/components/fy-checkbox/index.js +52 -52
- package/dist/components/fy-checkbox/style.css +9 -1
- package/dist/components/fy-code/index.js +30 -30
- package/dist/components/fy-curd/index.js +317 -317
- package/dist/components/fy-curd/style.css +236 -1
- package/dist/components/fy-date/index.js +45 -45
- package/dist/components/fy-date/style.css +15 -1
- package/dist/components/fy-dialog-form/index.js +115 -115
- package/dist/components/fy-draggable/index.js +120 -120
- package/dist/components/fy-draggable/style.css +136 -1
- package/dist/components/fy-dynamic/index.js +126 -126
- package/dist/components/fy-dynamic/style.css +29 -1
- package/dist/components/fy-empty/index.js +26 -26
- package/dist/components/fy-empty/style.css +18 -1
- package/dist/components/fy-form/index.js +365 -365
- package/dist/components/fy-form/style.css +73 -1
- package/dist/components/fy-form-design/index.js +6906 -433
- package/dist/components/fy-form-design/style.css +560 -1
- package/dist/components/fy-form-menu/index.js +45 -45
- package/dist/components/fy-input/index.js +61 -61
- package/dist/components/fy-input-color/index.js +41 -41
- package/dist/components/fy-input-icon/index.js +70 -70
- package/dist/components/fy-input-icon/style.css +33 -1
- package/dist/components/fy-input-map/index.js +102 -102
- package/dist/components/fy-input-map/style.css +44 -1
- package/dist/components/fy-input-number/index.js +39 -39
- package/dist/components/fy-input-table/index.js +70 -70
- package/dist/components/fy-input-table/style.css +4 -1
- package/dist/components/fy-input-tree/index.js +105 -105
- package/dist/components/fy-input-tree/style.css +19 -1
- package/dist/components/fy-progress/index.js +25 -25
- package/dist/components/fy-radio/index.js +36 -36
- package/dist/components/fy-radio/style.css +6 -1
- package/dist/components/fy-rate/index.js +40 -40
- package/dist/components/fy-rate/style.css +3 -1
- package/dist/components/fy-select/index.js +101 -101
- package/dist/components/fy-select/style.css +19 -1
- package/dist/components/fy-slider/index.js +42 -42
- package/dist/components/fy-switch/index.js +37 -37
- package/dist/components/fy-tabs/index.js +35 -35
- package/dist/components/fy-time/index.js +47 -47
- package/dist/components/fy-title/index.js +23 -23
- package/dist/components/fy-title/style.css +5 -1
- package/dist/components/fy-tree/index.js +157 -157
- package/dist/components/fy-tree/style.css +39 -1
- package/dist/components/fy-u-editor/index.js +99 -99
- package/dist/components/fy-u-editor/style.css +9 -1
- package/dist/components/fy-upload/index.js +270 -270
- package/dist/components/fy-upload/style.css +55 -1
- package/dist/components/guide-steps/index.js +41 -41
- package/dist/components/guide-steps/style.css +28 -1
- package/dist/components/header-menu/index.js +94 -94
- package/dist/components/header-search/index.js +121 -121
- package/dist/components/highlight-j-s/index.js +76 -0
- package/dist/components/highlight-j-s/style.css +18 -0
- package/dist/components/icon-card/index.js +28 -28
- package/dist/components/icon-card/style.css +50 -1
- package/dist/components/icon-temp/index.js +24 -24
- package/dist/components/icon-temp/style.css +17 -1
- package/dist/components/iframe-window/index.js +24 -24
- package/dist/components/iframe-window/style.css +14 -1
- package/dist/components/image-cropper/index.js +117 -117
- package/dist/components/image-cropper/style.css +28 -1
- package/dist/components/image-preview/index.js +127 -127
- package/dist/components/image-preview/style.css +66 -1
- package/dist/components/image-viewer/index.js +35 -35
- package/dist/components/image-viewer/style.css +15 -1
- package/dist/components/input-number/index.js +116 -116
- package/dist/components/input-number/style.css +9 -1
- package/dist/components/input-number-range/index.js +37 -37
- package/dist/components/input-number-range/style.css +6 -1
- package/dist/components/j-s-x-component/index.js +4 -4
- package/dist/components/keep-view-alive/index.js +71 -71
- package/dist/components/keyboard/index.js +182 -182
- package/dist/components/keyboard/style.css +473 -1
- package/dist/components/license/index.js +54 -54
- package/dist/components/loading-view/index.js +25 -25
- package/dist/components/loading-view/style.css +11 -1
- package/dist/components/login/index.js +94 -94
- package/dist/components/login/style.css +19 -1
- package/dist/components/name-avatar/index.js +26 -26
- package/dist/components/name-avatar/style.css +30 -1
- package/dist/components/nav-bar/index.js +22 -22
- package/dist/components/nav-bar/style.css +11 -1
- package/dist/components/not-implement/index.js +22 -22
- package/dist/components/not-implement/style.css +9 -1
- package/dist/components/notice/index.js +55 -55
- package/dist/components/notice/style.css +48 -1
- package/dist/components/page/index.js +20 -20
- package/dist/components/page/style.css +6 -1
- package/dist/components/page-header/index.js +28 -28
- package/dist/components/page-header/style.css +8 -1
- package/dist/components/page-index/index.js +57 -57
- package/dist/components/page-index/style.css +17 -1
- package/dist/components/page-index-top/index.js +46 -46
- package/dist/components/page-skeleton/index.js +28 -28
- package/dist/components/page-skeleton/style.css +17 -1
- package/dist/components/page-skeleton-new/index.js +38 -38
- package/dist/components/page-skeleton-new/style.css +36 -1
- package/dist/components/pageable-table/index.js +140 -139
- package/dist/components/pageable-table/style.css +66 -1
- package/dist/components/pageable-view/index.js +103 -102
- package/dist/components/pageable-view/style.css +63 -1
- package/dist/components/photo-swipe/index.js +64 -64
- package/dist/components/process-designer/index.js +4638 -0
- package/dist/components/process-designer/style.css +1648 -0
- package/dist/components/properties-panel/index.js +4765 -0
- package/dist/components/properties-panel/style.css +106 -0
- package/dist/components/queue/index.js +24 -24
- package/dist/components/record-video/index.js +55 -55
- package/dist/components/record-video/style.css +47 -1
- package/dist/components/resize-observer/index.js +26 -26
- package/dist/components/resize-observer/style.css +25 -1
- package/dist/components/search/index.js +64 -64
- package/dist/components/search/style.css +51 -1
- package/dist/components/search-popover/index.js +98 -98
- package/dist/components/search-popover/style.css +90 -1
- package/dist/components/sign/index.js +66 -66
- package/dist/components/sign/style.css +6 -1
- package/dist/components/sign-panel/index.js +78 -78
- package/dist/components/sign-panel/style.css +91 -1
- package/dist/components/skeleton/index.js +35 -35
- package/dist/components/skeleton/style.css +55 -1
- package/dist/components/split-pane/index.js +88 -88
- package/dist/components/split-pane/style.css +98 -1
- package/dist/components/stateful/index.js +29 -29
- package/dist/components/stateful/style.css +27 -1
- package/dist/components/static-pageable-table/index.js +30 -30
- package/dist/components/static-pageable-table/style.css +3 -1
- package/dist/components/swiper/index.js +69 -69
- package/dist/components/swiper/style.css +37 -1
- package/dist/components/tab/index.js +47 -47
- package/dist/components/tab/style.css +108 -1
- package/dist/components/tab-item/index.js +29 -29
- package/dist/components/table-column/index.js +25 -25
- package/dist/components/table-page/index.js +51 -51
- package/dist/components/table-view/index.js +123 -122
- package/dist/components/table-view/style.css +90 -1
- package/dist/components/tag-render/index.js +39 -39
- package/dist/components/tag-render/style.css +27 -1
- package/dist/components/text-ellipsis/index.js +40 -40
- package/dist/components/text-ellipsis/style.css +3 -1
- package/dist/components/tinymce-editor/index.js +62 -62
- package/dist/components/tinymce-editor/style.css +37 -1
- package/dist/components/tinymce-wrapper/index.js +76 -76
- package/dist/components/tinymce-wrapper/style.css +30 -1
- package/dist/components/toolbar/index.js +51 -51
- package/dist/components/toolbar/style.css +35 -1
- package/dist/components/toolbar-button/index.js +33 -33
- package/dist/components/toolbar-button/style.css +15 -1
- package/dist/components/trigger/index.js +27 -27
- package/dist/components/verify/index.js +33 -33
- package/dist/components/verify/style.css +9 -1
- package/dist/components/vue-tags-input/index.js +137 -137
- package/dist/components/vue-tags-input/style.css +102 -1
- package/dist/components/watermark/index.js +25 -25
- package/dist/components/watermark/style.css +10 -1
- package/dist/index.css +1797 -0
- package/dist/index.es.js +22766 -12431
- package/package.json +18 -6
- package/web-types.json +307 -1
- package/dist/chunks/AfdColumn.vue_vue_type_template_lang.768f2ed2.js +0 -302
- package/dist/chunks/ConfigArray.vue_vue_type_template_lang.66483daa.js +0 -51
- package/dist/chunks/ConfigColor.vue_vue_type_template_lang.cd880091.js +0 -24
- package/dist/chunks/ConfigCustom.vue_vue_type_template_lang.6e03d7fd.js +0 -52
- package/dist/chunks/ConfigDate.vue_vue_type_template_lang.116fbad4.js +0 -104
- package/dist/chunks/ConfigDynamic.vue_vue_type_template_lang.99082e47.js +0 -133
- package/dist/chunks/ConfigEvent.vue_vue_type_template_lang.5e8ed6cc.js +0 -96
- package/dist/chunks/ConfigGroup.vue_vue_type_template_lang.44117322.js +0 -48
- package/dist/chunks/ConfigInput.vue_vue_type_template_lang.cc1eb052.js +0 -96
- package/dist/chunks/ConfigMap.vue_vue_type_template_lang.daee4d38.js +0 -31
- package/dist/chunks/ConfigNumber.vue_vue_type_template_lang.d60231d7.js +0 -130
- package/dist/chunks/ConfigRate.vue_vue_type_style_index_0_scoped_true_lang.cf5d437d.js +0 -125
- package/dist/chunks/ConfigSelect.vue_vue_type_template_lang.dfc91f07.js +0 -488
- package/dist/chunks/ConfigSlider.vue_vue_type_template_lang.27b8cc7b.js +0 -99
- package/dist/chunks/ConfigSwitch.vue_vue_type_style_index_0_scoped_true_lang.4caf1bd0.js +0 -54
- package/dist/chunks/ConfigTable.vue_vue_type_template_lang.b27540fd.js +0 -344
- package/dist/chunks/ConfigTextarea.vue_vue_type_template_lang.5cddf41c.js +0 -88
- package/dist/chunks/ConfigTitle.vue_vue_type_template_lang.57d9deb5.js +0 -87
- package/dist/chunks/ConfigTree.vue_vue_type_style_index_0_scoped_true_lang.89ec5376.js +0 -465
- package/dist/chunks/ConfigUEditor.vue_vue_type_template_lang.9726b4f5.js +0 -240
- package/dist/chunks/ConfigUpload.vue_vue_type_template_lang.129c0ced.js +0 -476
- package/dist/chunks/FormConfig.vue_vue_type_template_lang.82463ce5.js +0 -220
- package/dist/chunks/WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js +0 -1821
- package/dist/chunks/WidgetForm.vue_vue_type_template_lang.d4b05679.js +0 -247
- package/dist/chunks/WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js +0 -271
- package/dist/chunks/WidgetFormItem.vue_vue_type_template_lang.48d55a5c.js +0 -24
- package/dist/chunks/WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js +0 -229
- package/dist/chunks/confirmable-mixin.3a79781b.js +0 -75
- package/dist/chunks/dataformat.65b92bfe.js +0 -158
- package/dist/chunks/detail.d67573b1.js +0 -28
- package/dist/chunks/dic.70feb9b4.js +0 -135
- package/dist/chunks/init.7c58eb34.js +0 -122
- package/dist/chunks/monaco.cefcb9f5.js +0 -290
- package/dist/chunks/permission.ce5d2121.js +0 -16
- package/dist/chunks/slot.4b391395.js +0 -27
- package/dist/chunks/util.23fe58fb.js +0 -261
- package/dist/chunks/utils.97652d86.js +0 -26
- package/dist/chunks/utils.fa73de78.js +0 -185
- package/dist/chunks/vueComponentNormalizer.71e2aa87.js +0 -32
- package/dist/components/afd-column/index.js +0 -57
- package/dist/components/config-array/index.js +0 -28
- package/dist/components/config-color/index.js +0 -28
- package/dist/components/config-custom/index.js +0 -62
- package/dist/components/config-date/index.js +0 -28
- package/dist/components/config-dynamic/index.js +0 -28
- package/dist/components/config-event/index.js +0 -74
- package/dist/components/config-group/index.js +0 -36
- package/dist/components/config-input/index.js +0 -29
- package/dist/components/config-map/index.js +0 -28
- package/dist/components/config-number/index.js +0 -28
- package/dist/components/config-rate/index.js +0 -71
- package/dist/components/config-rate/style.css +0 -1
- package/dist/components/config-select/index.js +0 -90
- package/dist/components/config-slider/index.js +0 -28
- package/dist/components/config-switch/index.js +0 -33
- package/dist/components/config-switch/style.css +0 -1
- package/dist/components/config-table/index.js +0 -122
- package/dist/components/config-textarea/index.js +0 -28
- package/dist/components/config-title/index.js +0 -33
- package/dist/components/config-tree/index.js +0 -122
- package/dist/components/config-tree/style.css +0 -1
- package/dist/components/config-u-editor/index.js +0 -34
- package/dist/components/config-upload/index.js +0 -58
- package/dist/components/form-config/index.js +0 -28
- package/dist/components/fy-dialog-form/style.css +0 -1
- package/dist/components/widget-config/index.js +0 -110
- package/dist/components/widget-form/index.js +0 -71
- package/dist/components/widget-form-group/index.js +0 -96
- package/dist/components/widget-form-item/index.js +0 -71
- package/dist/components/widget-form-table/index.js +0 -95
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { MessageBox, Loading } from "element-ui";
|
|
2
|
+
import { isFunction } from "@web-utils/core";
|
|
3
|
+
async function onClick(e, props, listeners) {
|
|
4
|
+
const { stop, prevent, message, loadable, loadingText, confirmable, confirmType, confirmText } = props;
|
|
5
|
+
stop && e.stopPropagation(), prevent && e.preventDefault();
|
|
6
|
+
const { before, click, cancel, after } = listeners;
|
|
7
|
+
if (isFunction(click))
|
|
8
|
+
try {
|
|
9
|
+
let pass = !0;
|
|
10
|
+
if (isFunction(before) && (pass = await before(e)), pass === !1)
|
|
11
|
+
return;
|
|
12
|
+
confirmable && await MessageBox.confirm(message || confirmText, { type: confirmType });
|
|
13
|
+
let loadingInstance;
|
|
14
|
+
loadable && (loadingInstance = Loading.service({ background: "rgba(0,0,0,0.3)", text: loadingText }));
|
|
15
|
+
try {
|
|
16
|
+
await click(e);
|
|
17
|
+
} catch {
|
|
18
|
+
}
|
|
19
|
+
loadable && loadingInstance.close(), isFunction(after) && await after(e);
|
|
20
|
+
} catch (e2) {
|
|
21
|
+
isFunction(cancel) && await cancel(e2);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const confirmableMixin = {
|
|
25
|
+
functional: !0,
|
|
26
|
+
props: {
|
|
27
|
+
stop: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !0
|
|
30
|
+
},
|
|
31
|
+
prevent: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !0
|
|
34
|
+
},
|
|
35
|
+
text: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
message: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "你确定要删除该记录吗?"
|
|
42
|
+
},
|
|
43
|
+
confirmable: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !0
|
|
46
|
+
},
|
|
47
|
+
confirmText: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "你确定要删除该记录吗?"
|
|
50
|
+
},
|
|
51
|
+
confirmType: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "warning"
|
|
54
|
+
},
|
|
55
|
+
loadable: Boolean,
|
|
56
|
+
loadingText: {
|
|
57
|
+
type: String,
|
|
58
|
+
default: "正在处理中请稍候..."
|
|
59
|
+
},
|
|
60
|
+
tag: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: "i"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
render(createElement, { props, data, children, listeners }) {
|
|
66
|
+
return createElement(props.tag, {
|
|
67
|
+
...data,
|
|
68
|
+
on: { click: (e) => onClick(e, props, listeners) },
|
|
69
|
+
props
|
|
70
|
+
}, children || props.text);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
confirmableMixin as c
|
|
75
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { isBlank } from "@web-utils/core";
|
|
2
|
+
import { n as findObject, M as MULTIPLE_LIST, A as ARRAY_VALUE_LIST, R as RANGE_LIST, p as detailDataType, f as ARRAY_LIST, K as KEY_COMPONENT_NAME, q as createObj, S as SELECT_LIST, c as DIC_SPLIT, j as DATE_LIST, I as INPUT_LIST } from "./util.89913643.js";
|
|
3
|
+
const lang = {
|
|
4
|
+
common: {
|
|
5
|
+
condition: "条件",
|
|
6
|
+
display: "显示",
|
|
7
|
+
hide: "隐藏"
|
|
8
|
+
},
|
|
9
|
+
tip: {
|
|
10
|
+
select: "请选择",
|
|
11
|
+
input: "请输入"
|
|
12
|
+
},
|
|
13
|
+
check: {
|
|
14
|
+
checkAll: "全选"
|
|
15
|
+
},
|
|
16
|
+
upload: {
|
|
17
|
+
upload: "点击上传",
|
|
18
|
+
tip: "将文件拖到此处,或"
|
|
19
|
+
},
|
|
20
|
+
time: {
|
|
21
|
+
start: "开始",
|
|
22
|
+
end: "结束"
|
|
23
|
+
},
|
|
24
|
+
date: {
|
|
25
|
+
start: "开始",
|
|
26
|
+
end: "结束",
|
|
27
|
+
t: "今日",
|
|
28
|
+
y: "昨日",
|
|
29
|
+
n: "近7天",
|
|
30
|
+
a: "全部"
|
|
31
|
+
},
|
|
32
|
+
form: {
|
|
33
|
+
printBtn: "打 印",
|
|
34
|
+
mockBtn: "模 拟",
|
|
35
|
+
submitBtn: "提 交",
|
|
36
|
+
emptyBtn: "清 空"
|
|
37
|
+
},
|
|
38
|
+
crud: {
|
|
39
|
+
filter: {
|
|
40
|
+
addBtn: "新增条件",
|
|
41
|
+
clearBtn: "清空数据",
|
|
42
|
+
resetBtn: "清空条件",
|
|
43
|
+
cancelBtn: "取 消",
|
|
44
|
+
submitBtn: "确 定"
|
|
45
|
+
},
|
|
46
|
+
column: {
|
|
47
|
+
name: "列名",
|
|
48
|
+
hide: "隐藏",
|
|
49
|
+
fixed: "冻结",
|
|
50
|
+
filters: "过滤",
|
|
51
|
+
sortable: "排序",
|
|
52
|
+
index: "顺序",
|
|
53
|
+
width: "宽度"
|
|
54
|
+
},
|
|
55
|
+
tipStartTitle: "当前表格已选择",
|
|
56
|
+
tipEndTitle: "项",
|
|
57
|
+
editTitle: "编 辑",
|
|
58
|
+
copyTitle: "复 制",
|
|
59
|
+
addTitle: "新 增",
|
|
60
|
+
viewTitle: "查 看",
|
|
61
|
+
filterTitle: "过滤条件",
|
|
62
|
+
showTitle: "列显隐",
|
|
63
|
+
menu: "操作",
|
|
64
|
+
addBtn: "新 增",
|
|
65
|
+
show: "显 示",
|
|
66
|
+
hide: "隐 藏",
|
|
67
|
+
open: "展 开",
|
|
68
|
+
shrink: "收 缩",
|
|
69
|
+
printBtn: "打 印",
|
|
70
|
+
excelBtn: "导 出",
|
|
71
|
+
updateBtn: "修 改",
|
|
72
|
+
cancelBtn: "取 消",
|
|
73
|
+
searchBtn: "搜 索",
|
|
74
|
+
emptyBtn: "清 空",
|
|
75
|
+
menuBtn: "功 能",
|
|
76
|
+
saveBtn: "保 存",
|
|
77
|
+
viewBtn: "查 看",
|
|
78
|
+
editBtn: "编 辑",
|
|
79
|
+
copyBtn: "复 制",
|
|
80
|
+
delBtn: "删 除"
|
|
81
|
+
}
|
|
82
|
+
}, getValueByPath = (object, prop) => {
|
|
83
|
+
prop = prop || "";
|
|
84
|
+
const paths = prop.split(".");
|
|
85
|
+
let current = object, result = null;
|
|
86
|
+
for (let i = 0, j = paths.length; i < j; i++) {
|
|
87
|
+
const path = paths[i];
|
|
88
|
+
if (!current)
|
|
89
|
+
break;
|
|
90
|
+
if (i === j - 1) {
|
|
91
|
+
result = current[path];
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
current = current[path];
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}, translate = (path) => getValueByPath(lang, path), calcCascader = (list = []) => (list.forEach((ele) => {
|
|
98
|
+
const cascader = ele.cascader;
|
|
99
|
+
if (!isBlank(cascader)) {
|
|
100
|
+
const parentProp = ele.prop;
|
|
101
|
+
cascader.forEach((citem) => {
|
|
102
|
+
const column = findObject(list, citem);
|
|
103
|
+
column !== -1 && (column.parentProp = parentProp);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}), list);
|
|
107
|
+
let count = 0;
|
|
108
|
+
const calcCount = (ele, spanDefault = 12, init = !1) => {
|
|
109
|
+
init && (count = 0);
|
|
110
|
+
const spanAll = 24;
|
|
111
|
+
return count = count + (ele.span || spanDefault) + (ele.offset || 0), count === spanAll ? count = 0 : count > spanAll ? count = (ele.span || spanDefault) + (ele.offset || 0) : ele.row && count !== spanAll && (ele.count = spanAll - count, count = 0), ele;
|
|
112
|
+
}, initVal = (value, safe) => {
|
|
113
|
+
const { type, multiple, dataType, separator = DIC_SPLIT, alone, emitPath, range } = safe;
|
|
114
|
+
let list = value;
|
|
115
|
+
return MULTIPLE_LIST.includes(type) && multiple === !0 || ARRAY_VALUE_LIST.includes(type) && emitPath !== !1 || RANGE_LIST.includes(type) && range === !0 ? (Array.isArray(list) || (isBlank(list) ? list = [] : list = `${list}`.split(separator) || []), list.forEach((ele, index) => {
|
|
116
|
+
list[index] = detailDataType(ele, dataType);
|
|
117
|
+
}), ARRAY_LIST.includes(type) && isBlank(list) && alone && (list = [""])) : list = detailDataType(list, dataType), list;
|
|
118
|
+
}, getSearchType = (column) => {
|
|
119
|
+
const type = column.type, range = column.searchRange;
|
|
120
|
+
let result = type;
|
|
121
|
+
if (column.searchType)
|
|
122
|
+
return column.searchType;
|
|
123
|
+
if (["radio", "checkbox", "switch"].includes(type))
|
|
124
|
+
result = "select";
|
|
125
|
+
else if (DATE_LIST.includes(type)) {
|
|
126
|
+
const rangeKey = "range";
|
|
127
|
+
range ? type.includes(rangeKey) ? result = type : result = type + rangeKey : result = type.replace(rangeKey, "");
|
|
128
|
+
} else
|
|
129
|
+
["textarea"].includes(type) && (result = "input");
|
|
130
|
+
return result;
|
|
131
|
+
}, getComponent = (type, component) => {
|
|
132
|
+
let result = type || "input";
|
|
133
|
+
if (isBlank(component))
|
|
134
|
+
ARRAY_LIST.includes(type) ? result = "array" : ["time", "timerange"].includes(type) ? result = "time" : DATE_LIST.includes(type) ? result = "date" : ["password", "textarea", "search"].includes(type) ? result = "input" : INPUT_LIST.includes(type) && (result = `input-${type}`);
|
|
135
|
+
else
|
|
136
|
+
return component;
|
|
137
|
+
return KEY_COMPONENT_NAME + result;
|
|
138
|
+
}, formInitVal = (list = []) => {
|
|
139
|
+
let tableForm = {};
|
|
140
|
+
return list.forEach((ele) => {
|
|
141
|
+
ARRAY_VALUE_LIST.includes(ele.type) && ele.emitPath !== !1 || MULTIPLE_LIST.includes(ele.type) && ele.multiple || ele.dataType === "array" ? tableForm[ele.prop] = [] : RANGE_LIST.includes(ele.type) && ele.range === !0 ? tableForm[ele.prop] = [0, 0] : ["rate", "slider", "number"].includes(ele.type) || ele.dataType === "number" ? tableForm[ele.prop] = void 0 : tableForm[ele.prop] = "", ele.bind && (tableForm = createObj(tableForm, ele.bind)), isBlank(ele.value) || (tableForm[ele.prop] = ele.value);
|
|
142
|
+
}), {
|
|
143
|
+
tableForm
|
|
144
|
+
};
|
|
145
|
+
}, getPlaceholder = function(column) {
|
|
146
|
+
const placeholder = column.placeholder, label = column.label;
|
|
147
|
+
return isBlank(placeholder) ? SELECT_LIST.includes(column.type) ? `${translate("tip.select")} ${label}` : `${translate("tip.input")} ${label}` : placeholder;
|
|
148
|
+
};
|
|
149
|
+
export {
|
|
150
|
+
getPlaceholder as a,
|
|
151
|
+
calcCount as b,
|
|
152
|
+
calcCascader as c,
|
|
153
|
+
getSearchType as d,
|
|
154
|
+
formInitVal as f,
|
|
155
|
+
getComponent as g,
|
|
156
|
+
initVal as i,
|
|
157
|
+
translate as t
|
|
158
|
+
};
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import "@web-utils/core";
|
|
2
|
+
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, dayjs_minExports = {}, dayjs_min = {
|
|
3
|
+
get exports() {
|
|
4
|
+
return dayjs_minExports;
|
|
5
|
+
},
|
|
6
|
+
set exports(v) {
|
|
7
|
+
dayjs_minExports = v;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
(function(module, exports) {
|
|
11
|
+
(function(t, e) {
|
|
12
|
+
module.exports = e();
|
|
13
|
+
})(commonjsGlobal, function() {
|
|
14
|
+
var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", f = "month", h = "quarter", c = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
|
|
15
|
+
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
16
|
+
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
17
|
+
} }, m = function(t2, e2, n2) {
|
|
18
|
+
var r2 = String(t2);
|
|
19
|
+
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
20
|
+
}, v = { s: m, z: function(t2) {
|
|
21
|
+
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
22
|
+
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
23
|
+
}, m: function t2(e2, n2) {
|
|
24
|
+
if (e2.date() < n2.date())
|
|
25
|
+
return -t2(n2, e2);
|
|
26
|
+
var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, f), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), f);
|
|
27
|
+
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
28
|
+
}, a: function(t2) {
|
|
29
|
+
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
30
|
+
}, p: function(t2) {
|
|
31
|
+
return { M: f, y: c, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: h }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
|
|
32
|
+
}, u: function(t2) {
|
|
33
|
+
return t2 === void 0;
|
|
34
|
+
} }, g = "en", D = {};
|
|
35
|
+
D[g] = M;
|
|
36
|
+
var p = function(t2) {
|
|
37
|
+
return t2 instanceof _;
|
|
38
|
+
}, S = function t2(e2, n2, r2) {
|
|
39
|
+
var i2;
|
|
40
|
+
if (!e2)
|
|
41
|
+
return g;
|
|
42
|
+
if (typeof e2 == "string") {
|
|
43
|
+
var s2 = e2.toLowerCase();
|
|
44
|
+
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
45
|
+
var u2 = e2.split("-");
|
|
46
|
+
if (!i2 && u2.length > 1)
|
|
47
|
+
return t2(u2[0]);
|
|
48
|
+
} else {
|
|
49
|
+
var a2 = e2.name;
|
|
50
|
+
D[a2] = e2, i2 = a2;
|
|
51
|
+
}
|
|
52
|
+
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
53
|
+
}, w = function(t2, e2) {
|
|
54
|
+
if (p(t2))
|
|
55
|
+
return t2.clone();
|
|
56
|
+
var n2 = typeof e2 == "object" ? e2 : {};
|
|
57
|
+
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
58
|
+
}, O = v;
|
|
59
|
+
O.l = S, O.i = p, O.w = function(t2, e2) {
|
|
60
|
+
return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
61
|
+
};
|
|
62
|
+
var _ = function() {
|
|
63
|
+
function M2(t2) {
|
|
64
|
+
this.$L = S(t2.locale, null, !0), this.parse(t2);
|
|
65
|
+
}
|
|
66
|
+
var m2 = M2.prototype;
|
|
67
|
+
return m2.parse = function(t2) {
|
|
68
|
+
this.$d = function(t3) {
|
|
69
|
+
var e2 = t3.date, n2 = t3.utc;
|
|
70
|
+
if (e2 === null)
|
|
71
|
+
return new Date(NaN);
|
|
72
|
+
if (O.u(e2))
|
|
73
|
+
return new Date();
|
|
74
|
+
if (e2 instanceof Date)
|
|
75
|
+
return new Date(e2);
|
|
76
|
+
if (typeof e2 == "string" && !/Z$/i.test(e2)) {
|
|
77
|
+
var r2 = e2.match($);
|
|
78
|
+
if (r2) {
|
|
79
|
+
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
80
|
+
return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return new Date(e2);
|
|
84
|
+
}(t2), this.$x = t2.x || {}, this.init();
|
|
85
|
+
}, m2.init = function() {
|
|
86
|
+
var t2 = this.$d;
|
|
87
|
+
this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
|
|
88
|
+
}, m2.$utils = function() {
|
|
89
|
+
return O;
|
|
90
|
+
}, m2.isValid = function() {
|
|
91
|
+
return this.$d.toString() !== l;
|
|
92
|
+
}, m2.isSame = function(t2, e2) {
|
|
93
|
+
var n2 = w(t2);
|
|
94
|
+
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
95
|
+
}, m2.isAfter = function(t2, e2) {
|
|
96
|
+
return w(t2) < this.startOf(e2);
|
|
97
|
+
}, m2.isBefore = function(t2, e2) {
|
|
98
|
+
return this.endOf(e2) < w(t2);
|
|
99
|
+
}, m2.$g = function(t2, e2, n2) {
|
|
100
|
+
return O.u(t2) ? this[e2] : this.set(n2, t2);
|
|
101
|
+
}, m2.unix = function() {
|
|
102
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
103
|
+
}, m2.valueOf = function() {
|
|
104
|
+
return this.$d.getTime();
|
|
105
|
+
}, m2.startOf = function(t2, e2) {
|
|
106
|
+
var n2 = this, r2 = !!O.u(e2) || e2, h2 = O.p(t2), l2 = function(t3, e3) {
|
|
107
|
+
var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
|
|
108
|
+
return r2 ? i2 : i2.endOf(a);
|
|
109
|
+
}, $2 = function(t3, e3) {
|
|
110
|
+
return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
111
|
+
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
112
|
+
switch (h2) {
|
|
113
|
+
case c:
|
|
114
|
+
return r2 ? l2(1, 0) : l2(31, 11);
|
|
115
|
+
case f:
|
|
116
|
+
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
117
|
+
case o:
|
|
118
|
+
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
119
|
+
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
120
|
+
case a:
|
|
121
|
+
case d:
|
|
122
|
+
return $2(v2 + "Hours", 0);
|
|
123
|
+
case u:
|
|
124
|
+
return $2(v2 + "Minutes", 1);
|
|
125
|
+
case s:
|
|
126
|
+
return $2(v2 + "Seconds", 2);
|
|
127
|
+
case i:
|
|
128
|
+
return $2(v2 + "Milliseconds", 3);
|
|
129
|
+
default:
|
|
130
|
+
return this.clone();
|
|
131
|
+
}
|
|
132
|
+
}, m2.endOf = function(t2) {
|
|
133
|
+
return this.startOf(t2, !1);
|
|
134
|
+
}, m2.$set = function(t2, e2) {
|
|
135
|
+
var n2, o2 = O.p(t2), h2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = h2 + "Date", n2[d] = h2 + "Date", n2[f] = h2 + "Month", n2[c] = h2 + "FullYear", n2[u] = h2 + "Hours", n2[s] = h2 + "Minutes", n2[i] = h2 + "Seconds", n2[r] = h2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
|
|
136
|
+
if (o2 === f || o2 === c) {
|
|
137
|
+
var y2 = this.clone().set(d, 1);
|
|
138
|
+
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
139
|
+
} else
|
|
140
|
+
l2 && this.$d[l2]($2);
|
|
141
|
+
return this.init(), this;
|
|
142
|
+
}, m2.set = function(t2, e2) {
|
|
143
|
+
return this.clone().$set(t2, e2);
|
|
144
|
+
}, m2.get = function(t2) {
|
|
145
|
+
return this[O.p(t2)]();
|
|
146
|
+
}, m2.add = function(r2, h2) {
|
|
147
|
+
var d2, l2 = this;
|
|
148
|
+
r2 = Number(r2);
|
|
149
|
+
var $2 = O.p(h2), y2 = function(t2) {
|
|
150
|
+
var e2 = w(l2);
|
|
151
|
+
return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
|
|
152
|
+
};
|
|
153
|
+
if ($2 === f)
|
|
154
|
+
return this.set(f, this.$M + r2);
|
|
155
|
+
if ($2 === c)
|
|
156
|
+
return this.set(c, this.$y + r2);
|
|
157
|
+
if ($2 === a)
|
|
158
|
+
return y2(1);
|
|
159
|
+
if ($2 === o)
|
|
160
|
+
return y2(7);
|
|
161
|
+
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
162
|
+
return O.w(m3, this);
|
|
163
|
+
}, m2.subtract = function(t2, e2) {
|
|
164
|
+
return this.add(-1 * t2, e2);
|
|
165
|
+
}, m2.format = function(t2) {
|
|
166
|
+
var e2 = this, n2 = this.$locale();
|
|
167
|
+
if (!this.isValid())
|
|
168
|
+
return n2.invalidDate || l;
|
|
169
|
+
var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, f2 = n2.months, h2 = function(t3, n3, i3, s3) {
|
|
170
|
+
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
|
|
171
|
+
}, c2 = function(t3) {
|
|
172
|
+
return O.s(s2 % 12 || 12, t3, "0");
|
|
173
|
+
}, d2 = n2.meridiem || function(t3, e3, n3) {
|
|
174
|
+
var r3 = t3 < 12 ? "AM" : "PM";
|
|
175
|
+
return n3 ? r3.toLowerCase() : r3;
|
|
176
|
+
}, $2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: a2 + 1, MM: O.s(a2 + 1, 2, "0"), MMM: h2(n2.monthsShort, a2, f2, 3), MMMM: h2(f2, a2), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h2(n2.weekdaysMin, this.$W, o2, 2), ddd: h2(n2.weekdaysShort, this.$W, o2, 3), dddd: o2[this.$W], H: String(s2), HH: O.s(s2, 2, "0"), h: c2(1), hh: c2(2), a: d2(s2, u2, !0), A: d2(s2, u2, !1), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i2 };
|
|
177
|
+
return r2.replace(y, function(t3, e3) {
|
|
178
|
+
return e3 || $2[t3] || i2.replace(":", "");
|
|
179
|
+
});
|
|
180
|
+
}, m2.utcOffset = function() {
|
|
181
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
182
|
+
}, m2.diff = function(r2, d2, l2) {
|
|
183
|
+
var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3);
|
|
184
|
+
return g2 = ($2 = {}, $2[c] = g2 / 12, $2[f] = g2, $2[h] = g2 / 3, $2[o] = (v2 - m3) / 6048e5, $2[a] = (v2 - m3) / 864e5, $2[u] = v2 / n, $2[s] = v2 / e, $2[i] = v2 / t, $2)[y2] || v2, l2 ? g2 : O.a(g2);
|
|
185
|
+
}, m2.daysInMonth = function() {
|
|
186
|
+
return this.endOf(f).$D;
|
|
187
|
+
}, m2.$locale = function() {
|
|
188
|
+
return D[this.$L];
|
|
189
|
+
}, m2.locale = function(t2, e2) {
|
|
190
|
+
if (!t2)
|
|
191
|
+
return this.$L;
|
|
192
|
+
var n2 = this.clone(), r2 = S(t2, e2, !0);
|
|
193
|
+
return r2 && (n2.$L = r2), n2;
|
|
194
|
+
}, m2.clone = function() {
|
|
195
|
+
return O.w(this.$d, this);
|
|
196
|
+
}, m2.toDate = function() {
|
|
197
|
+
return new Date(this.valueOf());
|
|
198
|
+
}, m2.toJSON = function() {
|
|
199
|
+
return this.isValid() ? this.toISOString() : null;
|
|
200
|
+
}, m2.toISOString = function() {
|
|
201
|
+
return this.$d.toISOString();
|
|
202
|
+
}, m2.toString = function() {
|
|
203
|
+
return this.$d.toUTCString();
|
|
204
|
+
}, M2;
|
|
205
|
+
}(), T = _.prototype;
|
|
206
|
+
return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function(t2) {
|
|
207
|
+
T[t2[1]] = function(e2) {
|
|
208
|
+
return this.$g(e2, t2[0], t2[1]);
|
|
209
|
+
};
|
|
210
|
+
}), w.extend = function(t2, e2) {
|
|
211
|
+
return t2.$i || (t2(e2, _, w), t2.$i = !0), w;
|
|
212
|
+
}, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
|
|
213
|
+
return w(1e3 * t2);
|
|
214
|
+
}, w.en = D[g], w.Ls = D, w.p = {}, w;
|
|
215
|
+
});
|
|
216
|
+
})(dayjs_min);
|
|
217
|
+
const dayjs = dayjs_minExports;
|
|
218
|
+
var zhCnExports = {}, zhCn = {
|
|
219
|
+
get exports() {
|
|
220
|
+
return zhCnExports;
|
|
221
|
+
},
|
|
222
|
+
set exports(v) {
|
|
223
|
+
zhCnExports = v;
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
(function(module, exports) {
|
|
227
|
+
(function(e, _) {
|
|
228
|
+
module.exports = _(dayjs_minExports);
|
|
229
|
+
})(commonjsGlobal, function(e) {
|
|
230
|
+
function _(e2) {
|
|
231
|
+
return e2 && typeof e2 == "object" && "default" in e2 ? e2 : { default: e2 };
|
|
232
|
+
}
|
|
233
|
+
var t = _(e), d = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(e2, _2) {
|
|
234
|
+
return _2 === "W" ? e2 + "周" : e2 + "日";
|
|
235
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(e2, _2) {
|
|
236
|
+
var t2 = 100 * e2 + _2;
|
|
237
|
+
return t2 < 600 ? "凌晨" : t2 < 900 ? "早上" : t2 < 1100 ? "上午" : t2 < 1300 ? "中午" : t2 < 1800 ? "下午" : "晚上";
|
|
238
|
+
} };
|
|
239
|
+
return t.default.locale(d, null, !0), d;
|
|
240
|
+
});
|
|
241
|
+
})(zhCn);
|
|
242
|
+
dayjs.locale("zh-cn");
|
|
243
|
+
const toDate = (date) => dayjs(date).toDate(), formatDate = (date, pattern = "YYYY-MM-DD HH:mm:ss") => date ? dayjs(date).format(pattern) : "";
|
|
244
|
+
export {
|
|
245
|
+
formatDate as f,
|
|
246
|
+
toDate as t
|
|
247
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isBlank } from "@web-utils/core";
|
|
2
|
+
import { f as formatDate } from "./dayjs.b0f2f7d9.js";
|
|
3
|
+
import { g as getAsVal, M as MULTIPLE_LIST, A as ARRAY_VALUE_LIST, c as DIC_SPLIT, e as strCorNum, f as ARRAY_LIST, b as DIC_SHOW_SPLIT, h as getPasswordChar, j as DATE_LIST, k as findByValue } from "./util.89913643.js";
|
|
4
|
+
const detail = (row = {}, column = {}, option = {}, dic = []) => {
|
|
5
|
+
let result = row[column.prop];
|
|
6
|
+
const type = column.type, separator = column.separator;
|
|
7
|
+
if (column.bind && (result = getAsVal(row, column.bind)), isBlank(result))
|
|
8
|
+
result = "";
|
|
9
|
+
else {
|
|
10
|
+
const selectFlag = MULTIPLE_LIST.includes(column.type) && column.multiple, arrayFlag = ARRAY_VALUE_LIST.includes(column.type);
|
|
11
|
+
if ((["string", "number"].includes(column.dataType) || selectFlag || arrayFlag) && !Array.isArray(result) && (result = `${result}`.split(separator || DIC_SPLIT), column.dataType === "number" && (result = strCorNum(result))), ARRAY_LIST.includes(type))
|
|
12
|
+
Array.isArray(result) ? result = result.join(separator || DIC_SHOW_SPLIT) : result = result.split(separator || DIC_SPLIT).join(separator || DIC_SHOW_SPLIT);
|
|
13
|
+
else if (type === "password")
|
|
14
|
+
result = getPasswordChar(result, "*");
|
|
15
|
+
else if (DATE_LIST.includes(type) && column.format) {
|
|
16
|
+
const format = column.format.replace("dd", "DD").replace("yyyy", "YYYY"), formatValue = formatDate(Date.now(), "YYYY-MM-DD");
|
|
17
|
+
if (type.indexOf("range") !== -1) {
|
|
18
|
+
let date1 = result[0] || "", date2 = result[1] || "";
|
|
19
|
+
type === "timerange" && date1.length <= 8 && date2.length < 8 && (date1 = `${formatValue} ${date1}`, date2 = `${formatValue} ${date2}`), result = [formatDate(date1, format), formatDate(date2, format)].join(column.separator || "~");
|
|
20
|
+
} else
|
|
21
|
+
type === "time" && result.length <= 8 && (result = `${formatValue} ${result}`), result = formatDate(result, format);
|
|
22
|
+
}
|
|
23
|
+
result = findByValue(dic, result, column.props || option.props);
|
|
24
|
+
}
|
|
25
|
+
return column.formatter && typeof column.formatter == "function" && (result = column.formatter(row, row[column.prop], result, column)), result;
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
detail as d
|
|
29
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { isBlank } from "@web-utils/core";
|
|
2
|
+
import { l as detailDic, m as getObjValue } from "./util.89913643.js";
|
|
3
|
+
const loadCascaderDic = (columnOption, list = []) => new Promise((resolve, reject) => {
|
|
4
|
+
const columnList = [], result = [], networkdic = {};
|
|
5
|
+
columnOption.forEach((ele) => {
|
|
6
|
+
ele.parentProp && columnList.push(ele);
|
|
7
|
+
}), list.forEach((ele, index) => {
|
|
8
|
+
columnList.forEach((column) => {
|
|
9
|
+
column.hide !== !0 && column.dicFlag !== !1 && result.push(
|
|
10
|
+
new Promise((resolve2) => {
|
|
11
|
+
isBlank(ele[column.parentProp]) ? resolve2({
|
|
12
|
+
prop: column.prop,
|
|
13
|
+
data: [],
|
|
14
|
+
index
|
|
15
|
+
}) : column.dicUrl && sendDic({
|
|
16
|
+
url: `${column.dicUrl.replace("{{key}}", ele[column.parentProp])}`,
|
|
17
|
+
props: column.props,
|
|
18
|
+
method: column.dicMethod,
|
|
19
|
+
headers: column.dicHeaders,
|
|
20
|
+
formatter: column.dicFormatter,
|
|
21
|
+
query: column.dicQuery,
|
|
22
|
+
form: ele
|
|
23
|
+
}).then((res) => {
|
|
24
|
+
resolve2({
|
|
25
|
+
prop: column.prop,
|
|
26
|
+
data: res,
|
|
27
|
+
index
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
}), Promise.all(result).then((data) => {
|
|
34
|
+
data.forEach((ele) => {
|
|
35
|
+
isBlank(networkdic[ele.index]) && (networkdic[ele.index] = {}), networkdic[ele.index][ele.prop] = ele.data;
|
|
36
|
+
}), resolve(networkdic);
|
|
37
|
+
});
|
|
38
|
+
}), loadDic = (option) => {
|
|
39
|
+
let ajaxdic = [];
|
|
40
|
+
return new Promise((resolve, reject) => {
|
|
41
|
+
ajaxdic = createdDic(option).ajaxdic, handleDic(ajaxdic).then((res) => {
|
|
42
|
+
resolve(res);
|
|
43
|
+
}).catch((err) => {
|
|
44
|
+
reject(err);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}, loadLocalDic = (option) => {
|
|
48
|
+
const locationdic = {}, alldic = option.dicData || {};
|
|
49
|
+
return option.column.forEach((ele) => {
|
|
50
|
+
ele.dicData && (locationdic[ele.prop] = detailDic(ele.dicData, ele.props, ele.dataType));
|
|
51
|
+
}), Object.assign(alldic, locationdic);
|
|
52
|
+
};
|
|
53
|
+
function createdDic(option) {
|
|
54
|
+
const column = option.column || [], ajaxdic = [], locationdic = {};
|
|
55
|
+
let flagdic = [];
|
|
56
|
+
return column.forEach((ele) => {
|
|
57
|
+
const dicData = ele.dicData, dicUrl = ele.dicUrl, prop = ele.prop, parentProp = ele.parentProp;
|
|
58
|
+
flagdic = flagdic.concat(ele.cascader || []), Array.isArray(dicData) && (locationdic[prop] = dicData), !(ele.dicFlag === !1 || ele.lazy === !0 || flagdic.includes(prop)) && dicUrl && !parentProp && ajaxdic.push({
|
|
59
|
+
url: dicUrl,
|
|
60
|
+
name: prop,
|
|
61
|
+
method: ele.dicMethod,
|
|
62
|
+
headers: column.dicHeaders,
|
|
63
|
+
formatter: ele.dicFormatter,
|
|
64
|
+
props: ele.props,
|
|
65
|
+
dataType: ele.dataType,
|
|
66
|
+
resKey: (ele.props || {}).res,
|
|
67
|
+
query: ele.dicQuery || {}
|
|
68
|
+
});
|
|
69
|
+
}), {
|
|
70
|
+
ajaxdic,
|
|
71
|
+
locationdic
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function handleDic(list) {
|
|
75
|
+
const networkdic = {}, result = [];
|
|
76
|
+
return new Promise((resolve) => {
|
|
77
|
+
list.forEach((ele) => {
|
|
78
|
+
result.push(
|
|
79
|
+
new Promise((resolve2) => {
|
|
80
|
+
sendDic(Object.assign(ele, {
|
|
81
|
+
url: `${ele.url.replace("{{key}}", "")}`
|
|
82
|
+
})).then((res) => {
|
|
83
|
+
res = detailDic(res, ele.props, ele.dataType), resolve2(res);
|
|
84
|
+
}).catch(() => {
|
|
85
|
+
resolve2([]);
|
|
86
|
+
});
|
|
87
|
+
})
|
|
88
|
+
);
|
|
89
|
+
}), Promise.all(result).then((data) => {
|
|
90
|
+
list.forEach((ele, index) => {
|
|
91
|
+
networkdic[ele.name] = data[index];
|
|
92
|
+
}), resolve(networkdic);
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
const sendDic = (params) => {
|
|
97
|
+
let { url, query, method, resKey, props, formatter, headers = {}, value = "", column, form = {} } = params;
|
|
98
|
+
column && (url = column.dicUrl, method = column.dicMethod, headers = column.headers || {}, query = column.dicQuery || {}, formatter = column.dicFormatter, props = column.props);
|
|
99
|
+
const key = "key";
|
|
100
|
+
url = url || "";
|
|
101
|
+
let list = [];
|
|
102
|
+
const data = {};
|
|
103
|
+
return list = url.match(/[^{}]+(?=})/g) || [], list.forEach((ele) => {
|
|
104
|
+
const eleKey = `{{${ele}}}`, eleValue = form[ele];
|
|
105
|
+
ele === key ? url = url.replace(eleKey, value) : url = url.replace(eleKey, eleValue);
|
|
106
|
+
}), method === "post" && (list = Object.keys(query), list.forEach((ele) => {
|
|
107
|
+
const eleKey = query[ele];
|
|
108
|
+
typeof eleKey == "string" && eleKey.match(/\{{|}}/g) ? data[ele] = form[eleKey.replace(/\{{|}}/g, "")] : data[ele] = eleKey;
|
|
109
|
+
})), props && (resKey = (props || {}).res || resKey), new Promise((resolve) => {
|
|
110
|
+
const callback = (res) => {
|
|
111
|
+
let list2 = [];
|
|
112
|
+
typeof formatter == "function" ? list2 = formatter(res.data) : list2 = getObjValue(res.data, resKey), resolve(list2);
|
|
113
|
+
};
|
|
114
|
+
method === "post" ? window.axios.post(url, data, {
|
|
115
|
+
headers
|
|
116
|
+
}).then(function(res) {
|
|
117
|
+
callback(res);
|
|
118
|
+
}).catch(() => [
|
|
119
|
+
resolve([])
|
|
120
|
+
]) : window.axios.get(url, {
|
|
121
|
+
params: query,
|
|
122
|
+
headers
|
|
123
|
+
}).then(function(res) {
|
|
124
|
+
callback(res);
|
|
125
|
+
}).catch(() => [
|
|
126
|
+
resolve([])
|
|
127
|
+
]);
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
export {
|
|
131
|
+
loadDic as a,
|
|
132
|
+
loadCascaderDic as b,
|
|
133
|
+
loadLocalDic as l,
|
|
134
|
+
sendDic as s
|
|
135
|
+
};
|