@web-utils/component 5.0.0-beta03 → 5.0.0-beta04
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/chunks/DialogForm.BzmXN481.mjs +37816 -0
- package/chunks/ElementDialog.BrqPs1yL.mjs +198 -0
- package/chunks/FormTemp.DWB4CV8h.mjs +251 -0
- package/chunks/FyButton.DGd1yE_h.mjs +27 -0
- package/chunks/{FyCurd.DqJuCLNW.mjs → FyCurd.DmIW6Tjw.mjs} +490 -483
- package/chunks/{FyForm.CgyGhetD.mjs → FyForm.Dh77gj0Z.mjs} +149 -149
- package/chunks/{FyUEditor.uvZS8UgS.mjs → FyUEditor.BMGigcYw.mjs} +7 -7
- package/chunks/{FyUpload.DoBEuYcC.mjs → FyUpload.Y_mVdD0K.mjs} +77 -77
- package/chunks/{MonacoEditor.Bq9d6JSz.mjs → MonacoEditor.DQ1vPh6D.mjs} +8 -8
- package/chunks/dataformat.BpAzVPYN.mjs +165 -0
- package/chunks/{dic.NZCGhtA7.mjs → dic.N2PNjL8o.mjs} +1 -1
- package/chunks/{event.CmOTnori.mjs → event.BevSLXu4.mjs} +8 -9
- package/chunks/{util.g-WQEec9.mjs → util.Cdt7t08t.mjs} +35 -50
- package/dialog/index.d.ts +14 -0
- package/dialog/props.d.ts +101 -0
- package/dialog-form/index.mjs +2 -145
- package/element-dialog/index.mjs +1 -1
- package/element-dialog/style.css +1 -1
- package/fy-array/index.mjs +7 -7
- package/fy-button/index.mjs +2 -0
- package/fy-button/style.css +1 -0
- package/fy-cascader/index.mjs +2 -2
- package/fy-checkbox/index.mjs +2 -2
- package/fy-curd/index.mjs +1 -1
- package/fy-curd/style.css +1 -1
- package/fy-date/index.mjs +2 -2
- package/fy-date/style.css +1 -1
- package/fy-dynamic/index.mjs +15 -15
- package/fy-empty/index.mjs +4 -4
- package/fy-form/index.mjs +1 -1
- package/fy-input/index.mjs +3 -3
- package/fy-input-color/index.mjs +2 -2
- package/fy-input-map/index.mjs +36 -34
- package/fy-input-number/index.mjs +2 -2
- package/fy-input-table/index.mjs +40 -38
- package/fy-input-tree/index.mjs +17 -17
- package/fy-radio/index.mjs +2 -2
- package/fy-rate/index.mjs +2 -2
- package/fy-select/index.mjs +29 -29
- package/fy-slider/index.mjs +5 -5
- package/fy-switch/index.mjs +2 -2
- package/fy-tabs/index.mjs +1 -1
- package/fy-time/index.mjs +7 -7
- package/fy-title/index.mjs +2 -2
- package/fy-tree/index.mjs +76 -74
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +1 -1
- package/icon-temp/index.mjs +1 -1
- package/index.d.ts +2 -141
- package/index.mjs +31 -178
- package/monaco-editor/index.mjs +1 -1
- package/package.json +4 -4
- package/web-types.json +2431 -20044
- package/address-input/index.mjs +0 -76
- package/address-input/style.css +0 -1
- package/affix/index.mjs +0 -72
- package/affix/style.css +0 -1
- package/aside-menu/index.mjs +0 -20
- package/aside-menu/style.css +0 -1
- package/avatar/index.mjs +0 -94
- package/avatar/style.css +0 -1
- package/awesome-button/index.mjs +0 -49
- package/base.css +0 -1
- package/capsule-tab/index.mjs +0 -27
- package/capsule-tab/style.css +0 -1
- package/card/index.mjs +0 -86
- package/card/style.css +0 -1
- package/carousel/index.mjs +0 -46
- package/carousel/style.css +0 -1
- package/chat/index.mjs +0 -432
- package/chat/style.css +0 -1
- package/chunk-file-uploader/index.mjs +0 -2
- package/chunk-file-uploader/style.css +0 -1
- package/chunks/ChunkFileUploader.C3EA0e5t.mjs +0 -114
- package/chunks/EditableTree.CV8b95tW.mjs +0 -639
- package/chunks/ElementBaseInfo.lW0iwU10.mjs +0 -208
- package/chunks/ElementDialog.DWhAJsUn.mjs +0 -520
- package/chunks/ElementForm.C7yebHWH.mjs +0 -600
- package/chunks/ElementListeners.B_SjC8dp.mjs +0 -635
- package/chunks/ElementMultiInstance.Xw27Z5mm.mjs +0 -289
- package/chunks/ElementOtherConfig.DnNmAhKn.mjs +0 -50
- package/chunks/ElementProperties.DKr9JE_O.mjs +0 -187
- package/chunks/ElementTaskConfig.CPjsXlpS.mjs +0 -442
- package/chunks/FlowCondition.BA7GF34X.mjs +0 -193
- package/chunks/FlowDesigner.DH1ypcUw.mjs +0 -5100
- package/chunks/FormBlock.D6kZl7sm.mjs +0 -117
- package/chunks/FormCascader.BXL8lKww.mjs +0 -1229
- package/chunks/FormInputTime.DzTPiDNh.mjs +0 -1775
- package/chunks/FormItem.B8iPLduv.mjs +0 -89
- package/chunks/FormItemGroup.CCGqEapT.mjs +0 -154
- package/chunks/FormSelect.t0jbTL_K.mjs +0 -1475
- package/chunks/FormSwitch.uoFQ-xp_.mjs +0 -298
- package/chunks/FormTemp.CeHtEZQe.mjs +0 -144
- package/chunks/FyFormDesign.DIIK7mXK.mjs +0 -5521
- package/chunks/ImagePreview.DDFrZgo5.mjs +0 -649
- package/chunks/Keyboard.DBspwbYo.mjs +0 -379
- package/chunks/PageableTable.DR-REJN5.mjs +0 -659
- package/chunks/RecordVideo.CKTY-gk9.mjs +0 -116
- package/chunks/SignalAndMessage.CL2u19it.mjs +0 -189
- package/chunks/SplitPane.DNNid7WB.mjs +0 -219
- package/chunks/TableColumn.Cq9Bvevm.mjs +0 -186
- package/chunks/TableView.DMWMaGLA.mjs +0 -477
- package/chunks/Toolbar.DytZ6fO0.mjs +0 -219
- package/chunks/ToolbarButton.AlTszc53.mjs +0 -107
- package/chunks/UserTaskListeners.Qfm8hKWP.mjs +0 -581
- package/chunks/VueCron.BmPnLuu3.mjs +0 -1787
- package/chunks/VueTreeSelect.GHx4Z2lG.mjs +0 -1877
- package/chunks/button.gVyl7Y__.mjs +0 -927
- package/chunks/checkbox.AmhCpaBZ.mjs +0 -438
- package/chunks/chunk.A6TnG60p.mjs +0 -13
- package/chunks/confirmable-mixin.BZtxXY0h.mjs +0 -273
- package/chunks/constants.Dw7hXt67.mjs +0 -4
- package/chunks/core.Blrh_Fjl.mjs +0 -51
- package/chunks/dataformat.F7GtAoiN.mjs +0 -144
- package/chunks/dictionary.BqVLM7Lf.mjs +0 -87
- package/chunks/dictionary.DXYdZefs.mjs +0 -19
- package/chunks/event.ZRs4J5TN.mjs +0 -4
- package/chunks/focus-trap.CuUc8N2C.mjs +0 -211
- package/chunks/form-input.DdSb45Tz.mjs +0 -34
- package/chunks/form-item.fYYCXvCs.mjs +0 -716
- package/chunks/form-pick.BEC7lrNH.mjs +0 -7
- package/chunks/form-validate.JFOV_f-C.mjs +0 -11
- package/chunks/icon.AJYLfX1m.mjs +0 -26
- package/chunks/icon.niAg1zTC.mjs +0 -251
- package/chunks/init.CtUEiRbU.mjs +0 -115
- package/chunks/input.B_wW4aF-.mjs +0 -548
- package/chunks/install.BJl2MN77.mjs +0 -73
- package/chunks/message-box.wGWcYSSd.mjs +0 -463
- package/chunks/message.DnTACuzV.mjs +0 -401
- package/chunks/overlay.Rhu_rfhx.mjs +0 -122
- package/chunks/photo-swipe.BvBJGc5x.mjs +0 -55
- package/chunks/radio.BMkZBhl5.mjs +0 -274
- package/chunks/scroll.BJIpzi2Q.mjs +0 -28
- package/chunks/scrollbar.CvxOszy3.mjs +0 -345
- package/chunks/slot.CZCo32Cw.mjs +0 -25
- package/chunks/style.CraPDfJA.mjs +0 -325
- package/chunks/sub-table-plus-props.DvS8aKT4.mjs +0 -28
- package/chunks/tab-mixin.C9DSz8xu.mjs +0 -70
- package/chunks/tag.B6yUaGj-.mjs +0 -141
- package/chunks/teleport.87mkIv8m.mjs +0 -22
- package/chunks/tooltip.Dzjs7LZ8.mjs +0 -1926
- package/chunks/typescript.D0a40c7B.mjs +0 -4
- package/chunks/use-aria.B9uqqWAE.mjs +0 -17
- package/chunks/use-composition.BMPJBvYs.mjs +0 -47
- package/chunks/use-deprecated.vx6LTDA_.mjs +0 -12
- package/chunks/use-empty-values.CxYKjLV9.mjs +0 -81
- package/chunks/use-form-item.DMDTkMq9.mjs +0 -48
- package/chunks/use-global-config.Dkt91Ob3.mjs +0 -57
- package/chunks/use-id.CyzdvfQn.mjs +0 -15
- package/chunks/use-locale.CBoQRFjH.mjs +0 -188
- package/chunks/use-size.CoorvF12.mjs +0 -18
- package/chunks/util.fjuzrmWz.mjs +0 -103
- package/chunks/utilSelf.Bv7FtUNb.mjs +0 -46
- package/chunks/utils.C37EhJ-u.mjs +0 -60
- package/chunks/utils.C8RvIGLM.mjs +0 -14
- package/chunks/validator.Drv0r2Nb.mjs +0 -5
- package/chunks/vnode.raM3wMJz.mjs +0 -14
- package/code-mirror-editor/index.mjs +0 -99
- package/code-mirror-editor/style.css +0 -1
- package/comment/index.mjs +0 -62
- package/comment/style.css +0 -1
- package/configComponents.d.ts +0 -29
- package/configComponents.mjs +0 -42
- package/confirm-button/index.mjs +0 -35
- package/confirmable/index.mjs +0 -8
- package/context-menu/index.mjs +0 -196
- package/context-menu/style.css +0 -1
- package/count-up/index.mjs +0 -99
- package/custom-scrollbar/index.mjs +0 -93
- package/data-box/index.mjs +0 -64
- package/data-box/style.css +0 -1
- package/data-card/index.mjs +0 -60
- package/data-card/style.css +0 -1
- package/data-card-text/index.mjs +0 -64
- package/data-card-text/style.css +0 -1
- package/data-display/index.mjs +0 -71
- package/data-display/style.css +0 -1
- package/data-icons/index.mjs +0 -70
- package/data-icons/style.css +0 -1
- package/data-imgtext/index.mjs +0 -67
- package/data-imgtext/style.css +0 -1
- package/data-operatext/index.mjs +0 -51
- package/data-operatext/style.css +0 -1
- package/data-panel/index.mjs +0 -57
- package/data-panel/style.css +0 -1
- package/data-pay/index.mjs +0 -105
- package/data-pay/style.css +0 -1
- package/data-price/index.mjs +0 -48
- package/data-price/style.css +0 -1
- package/data-progress/index.mjs +0 -67
- package/data-progress/style.css +0 -1
- package/data-rotate/index.mjs +0 -61
- package/data-rotate/style.css +0 -1
- package/data-table-picker/index.mjs +0 -116
- package/data-tabs/index.mjs +0 -67
- package/data-tabs/style.css +0 -1
- package/dynamic-table/index.mjs +0 -165
- package/dynamic-table/style.css +0 -1
- package/e-charts/index.mjs +0 -176
- package/e-charts/style.css +0 -1
- package/easy-popup/index.mjs +0 -92
- package/easy-popup/style.css +0 -1
- package/editable-progress/index.mjs +0 -113
- package/editable-progress/style.css +0 -1
- package/editable-tree/index.mjs +0 -2
- package/editable-tree/style.css +0 -1
- package/element-listeners/style.css +0 -1
- package/element-multi-instance/style.css +0 -1
- package/ellipsis/index.mjs +0 -124
- package/ellipsis/style.css +0 -1
- package/empty-view/index.mjs +0 -46
- package/empty-view/style.css +0 -1
- package/error-view/index.mjs +0 -37
- package/error-view/style.css +0 -1
- package/flex-column/index.mjs +0 -35
- package/flex-item/index.mjs +0 -61
- package/flex-row/index.mjs +0 -34
- package/flex-scroller/index.mjs +0 -29
- package/flex-scroller/style.css +0 -1
- package/flow/index.mjs +0 -240
- package/flow/style.css +0 -1
- package/flow-designer/index.mjs +0 -2
- package/flow-designer/style.css +0 -1
- package/flow-node/index.mjs +0 -56
- package/flow-viewer/index.mjs +0 -160
- package/flow-viewer/style.css +0 -1
- package/form-block/index.mjs +0 -2
- package/form-block/style.css +0 -1
- package/form-button/index.mjs +0 -36
- package/form-card/index.mjs +0 -14
- package/form-cascader/index.mjs +0 -2
- package/form-checkbox/index.mjs +0 -90
- package/form-checkbox-group/index.mjs +0 -162
- package/form-checkbox-group/style.css +0 -1
- package/form-date-picker/index.mjs +0 -156
- package/form-holder/index.mjs +0 -134
- package/form-holder/style.css +0 -1
- package/form-input/index.mjs +0 -114
- package/form-input-cron-expression/index.mjs +0 -98
- package/form-input-cron-expression/style.css +0 -1
- package/form-input-email/index.mjs +0 -66
- package/form-input-id-card/index.mjs +0 -74
- package/form-input-phone-number/index.mjs +0 -73
- package/form-input-tag/index.mjs +0 -89
- package/form-input-time/index.mjs +0 -2
- package/form-item/index.mjs +0 -2
- package/form-item/style.css +0 -1
- package/form-item-config-provider/index.mjs +0 -47
- package/form-item-group/index.mjs +0 -2
- package/form-item-group/style.css +0 -1
- package/form-radio-group/index.mjs +0 -162
- package/form-radio-group/style.css +0 -1
- package/form-select/index.mjs +0 -2
- package/form-select/style.css +0 -1
- package/form-switch/index.mjs +0 -2
- package/form-table/index.mjs +0 -132
- package/form-table-plus/index.mjs +0 -165
- package/form-textarea/index.mjs +0 -91
- package/form-tree-select/index.mjs +0 -90
- package/form-tree-select/style.css +0 -1
- package/form-tree-select-multiple/index.mjs +0 -93
- package/form-view/index.mjs +0 -280
- package/form-view/style.css +0 -1
- package/fy-article/index.mjs +0 -73
- package/fy-article/style.css +0 -1
- package/fy-code/index.mjs +0 -48
- package/fy-draggable/index.mjs +0 -323
- package/fy-draggable/style.css +0 -1
- package/fy-form-design/index.mjs +0 -2
- package/fy-form-design/style.css +0 -1
- package/fy-input-icon/index.mjs +0 -134
- package/fy-input-icon/style.css +0 -1
- package/fy-progress/index.mjs +0 -36
- package/guide-steps/index.mjs +0 -73
- package/guide-steps/style.css +0 -1
- package/helper-function.d.ts +0 -5
- package/helper-function.mjs +0 -58
- package/highlight-j-s/index.mjs +0 -51
- package/highlight-j-s/style.css +0 -1
- package/icon-card/index.mjs +0 -34
- package/icon-card/style.css +0 -1
- package/iframe-window/index.mjs +0 -40
- package/iframe-window/style.css +0 -1
- package/image-cropper/index.mjs +0 -152
- package/image-cropper/style.css +0 -1
- package/image-preview/index.mjs +0 -2
- package/image-preview/style.css +0 -1
- package/image-viewer/index.mjs +0 -70
- package/image-viewer/style.css +0 -1
- package/input-number-range/index.mjs +0 -76
- package/input-number-range/style.css +0 -1
- package/j-s-x-component/index.mjs +0 -14
- package/keyboard/index.mjs +0 -2
- package/keyboard/style.css +0 -1
- package/license/index.mjs +0 -106
- package/loading-view/index.mjs +0 -39
- package/loading-view/style.css +0 -1
- package/name-avatar/index.mjs +0 -61
- package/name-avatar/style.css +0 -1
- package/nav-bar/index.mjs +0 -34
- package/nav-bar/style.css +0 -1
- package/not-implement/index.mjs +0 -10
- package/not-implement/style.css +0 -1
- package/notice/index.mjs +0 -97
- package/notice/style.css +0 -1
- package/page/index.mjs +0 -19
- package/page/style.css +0 -1
- package/page-header/index.mjs +0 -27
- package/page-header/style.css +0 -1
- package/page-index/index.mjs +0 -121
- package/page-index/style.css +0 -1
- package/page-index-top/index.mjs +0 -80
- package/page-skeleton/index.mjs +0 -49
- package/page-skeleton/style.css +0 -1
- package/page-skeleton-new/index.mjs +0 -79
- package/page-skeleton-new/style.css +0 -1
- package/pageable-table/index.mjs +0 -2
- package/pageable-table/style.css +0 -1
- package/pageable-view/index.mjs +0 -280
- package/pageable-view/style.css +0 -1
- package/photo-swipe/index.d.ts +0 -8
- package/photo-swipe/index.mjs +0 -33
- package/picker-table-view/index.mjs +0 -221
- package/present-view/index.mjs +0 -271
- package/present-view/style.css +0 -1
- package/queue/index.mjs +0 -46
- package/queue/style.css +0 -1
- package/record-video/index.mjs +0 -2
- package/record-video/style.css +0 -1
- package/resize-observer/index.mjs +0 -45
- package/resize-observer/style.css +0 -1
- package/search/index.mjs +0 -116
- package/search/style.css +0 -1
- package/sign/index.mjs +0 -104
- package/sign/style.css +0 -1
- package/sign-panel/index.mjs +0 -183
- package/sign-panel/style.css +0 -1
- package/skeleton/index.mjs +0 -51
- package/skeleton/style.css +0 -1
- package/skeleton-panel/index.mjs +0 -34
- package/skeleton-panel/style.css +0 -1
- package/split-pane/index.mjs +0 -3
- package/split-pane/style.css +0 -1
- package/stateful/index.mjs +0 -71
- package/stateful/style.css +0 -1
- package/static-pageable-table/index.mjs +0 -69
- package/static-pageable-table/style.css +0 -1
- package/sub-table/index.mjs +0 -505
- package/sub-table/style.css +0 -1
- package/sub-table-plus/index.mjs +0 -590
- package/sub-table-plus/style.css +0 -1
- package/swiper/index.mjs +0 -128
- package/swiper/style.css +0 -1
- package/tab/index.mjs +0 -117
- package/tab/style.css +0 -1
- package/tab-item/index.mjs +0 -49
- package/table-column/index.mjs +0 -2
- package/table-column/style.css +0 -1
- package/table-view/index.mjs +0 -3
- package/table-view/style.css +0 -1
- package/tabs-view/index.mjs +0 -109
- package/tabs-view/style.css +0 -1
- package/tag-render/index.mjs +0 -84
- package/tag-render/style.css +0 -1
- package/text-ellipsis/index.mjs +0 -95
- package/text-ellipsis/style.css +0 -1
- package/toolbar/index.mjs +0 -2
- package/toolbar/style.css +0 -1
- package/toolbar-button/index.mjs +0 -2
- package/verify/index.mjs +0 -58
- package/verify/style.css +0 -1
- package/video/index.d.ts +0 -10
- package/vue-cron/index.mjs +0 -2
- package/vue-cron/style.css +0 -1
- package/vue-qr-code/index.mjs +0 -32
- package/vue-quill-editor/index.mjs +0 -127
- package/vue-quill-editor/style.css +0 -1
- package/vue-tags-input/index.mjs +0 -348
- package/vue-tags-input/style.css +0 -1
- package/vue-tree-select/index.mjs +0 -2
- package/vue-tree-select/style.css +0 -1
- package/vue-video-player/index.mjs +0 -136
- package/vue-video-player/style.css +0 -1
- package/watermark/index.mjs +0 -47
- package/watermark/style.css +0 -1
- package/x-input-tag/index.mjs +0 -142
- package/x-input-tag/style.css +0 -1
- /package/chunks/{_plugin-vue_export-helper.7vrlOII_.mjs → _plugin-vue_export-helper.CTBRVsXt.mjs} +0 -0
- /package/chunks/{packages.CONbEH13.mjs → packages.W76nKiMk.mjs} +0 -0
- /package/chunks/{permission.8WDtOmzA.mjs → permission.ZYdXiCsn.mjs} +0 -0
|
@@ -1,716 +0,0 @@
|
|
|
1
|
-
import "./chunk.A6TnG60p.mjs";
|
|
2
|
-
import { i as e } from "./use-size.CoorvF12.mjs";
|
|
3
|
-
import { _ as t, d as n, m as r, o as i, p as a, r as o, t as s } from "./install.BJl2MN77.mjs";
|
|
4
|
-
import { F as c, M as l, N as u, O as d, R as f, b as p, j as m, k as h, n as g, w as ee } from "./style.CraPDfJA.mjs";
|
|
5
|
-
import { i as te } from "./use-form-item.DMDTkMq9.mjs";
|
|
6
|
-
import { t as ne } from "./use-id.CyzdvfQn.mjs";
|
|
7
|
-
import { n as _, t as v } from "./constants.Dw7hXt67.mjs";
|
|
8
|
-
import { t as y } from "./typescript.D0a40c7B.mjs";
|
|
9
|
-
import { n as b, u as x } from "./util.fjuzrmWz.mjs";
|
|
10
|
-
import { Fragment as S, TransitionGroup as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as re, createElementVNode as D, createTextVNode as ie, createVNode as O, defineComponent as k, inject as A, nextTick as ae, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as oe, onMounted as se, onUpdated as N, openBlock as P, provide as ce, reactive as F, ref as I, renderSlot as L, resolveDynamicComponent as le, toDisplayString as ue, toRefs as de, unref as R, useSlots as fe, watch as z, withCtx as B } from "vue";
|
|
11
|
-
import { castArray as V, cloneDeep as H } from "lodash-unified";
|
|
12
|
-
import pe from "async-validator";
|
|
13
|
-
var U = m({
|
|
14
|
-
...m({
|
|
15
|
-
size: {
|
|
16
|
-
type: String,
|
|
17
|
-
values: e
|
|
18
|
-
},
|
|
19
|
-
disabled: Boolean
|
|
20
|
-
}),
|
|
21
|
-
model: Object,
|
|
22
|
-
rules: { type: l(Object) },
|
|
23
|
-
labelPosition: {
|
|
24
|
-
type: String,
|
|
25
|
-
values: [
|
|
26
|
-
"left",
|
|
27
|
-
"right",
|
|
28
|
-
"top"
|
|
29
|
-
],
|
|
30
|
-
default: "right"
|
|
31
|
-
},
|
|
32
|
-
requireAsteriskPosition: {
|
|
33
|
-
type: String,
|
|
34
|
-
values: ["left", "right"],
|
|
35
|
-
default: "left"
|
|
36
|
-
},
|
|
37
|
-
labelWidth: {
|
|
38
|
-
type: [String, Number],
|
|
39
|
-
default: ""
|
|
40
|
-
},
|
|
41
|
-
labelSuffix: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: ""
|
|
44
|
-
},
|
|
45
|
-
inline: Boolean,
|
|
46
|
-
inlineMessage: Boolean,
|
|
47
|
-
statusIcon: Boolean,
|
|
48
|
-
showMessage: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: !0
|
|
51
|
-
},
|
|
52
|
-
validateOnRuleChange: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: !0
|
|
55
|
-
},
|
|
56
|
-
hideRequiredAsterisk: Boolean,
|
|
57
|
-
scrollToError: Boolean,
|
|
58
|
-
scrollIntoViewOptions: {
|
|
59
|
-
type: l([Object, Boolean]),
|
|
60
|
-
default: !0
|
|
61
|
-
}
|
|
62
|
-
}), me = { validate: (e, r, i) => (n(e) || t(e)) && c(r) && t(i) }, he = m({
|
|
63
|
-
label: String,
|
|
64
|
-
labelWidth: { type: [String, Number] },
|
|
65
|
-
labelPosition: {
|
|
66
|
-
type: String,
|
|
67
|
-
values: [
|
|
68
|
-
"left",
|
|
69
|
-
"right",
|
|
70
|
-
"top",
|
|
71
|
-
""
|
|
72
|
-
],
|
|
73
|
-
default: ""
|
|
74
|
-
},
|
|
75
|
-
prop: { type: l([String, Array]) },
|
|
76
|
-
required: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: void 0
|
|
79
|
-
},
|
|
80
|
-
rules: { type: l([Object, Array]) },
|
|
81
|
-
error: String,
|
|
82
|
-
validateStatus: {
|
|
83
|
-
type: String,
|
|
84
|
-
values: [
|
|
85
|
-
"",
|
|
86
|
-
"error",
|
|
87
|
-
"validating",
|
|
88
|
-
"success"
|
|
89
|
-
]
|
|
90
|
-
},
|
|
91
|
-
for: String,
|
|
92
|
-
inlineMessage: {
|
|
93
|
-
type: Boolean,
|
|
94
|
-
default: void 0
|
|
95
|
-
},
|
|
96
|
-
showMessage: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
default: !0
|
|
99
|
-
},
|
|
100
|
-
size: {
|
|
101
|
-
type: String,
|
|
102
|
-
values: e
|
|
103
|
-
}
|
|
104
|
-
}), ge = (e) => [...new Set(e)], _e = (e) => !e && e !== 0 ? [] : n(e) ? e : [e], W = "ElForm";
|
|
105
|
-
function G() {
|
|
106
|
-
let e = I([]), t = w(() => {
|
|
107
|
-
if (!e.value.length) return "0";
|
|
108
|
-
let t = Math.max(...e.value);
|
|
109
|
-
return t ? `${t}px` : "";
|
|
110
|
-
});
|
|
111
|
-
function n(n) {
|
|
112
|
-
let r = e.value.indexOf(n);
|
|
113
|
-
return r === -1 && t.value === "0" && d(W, `unexpected width ${n}`), r;
|
|
114
|
-
}
|
|
115
|
-
function r(t, r) {
|
|
116
|
-
if (t && r) {
|
|
117
|
-
let i = n(r);
|
|
118
|
-
e.value.splice(i, 1, t);
|
|
119
|
-
} else t && e.value.push(t);
|
|
120
|
-
}
|
|
121
|
-
function i(t) {
|
|
122
|
-
let r = n(t);
|
|
123
|
-
r > -1 && e.value.splice(r, 1);
|
|
124
|
-
}
|
|
125
|
-
return {
|
|
126
|
-
autoLabelWidth: t,
|
|
127
|
-
registerLabelWidth: r,
|
|
128
|
-
deregisterLabelWidth: i
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
var K = (e, t) => {
|
|
132
|
-
let r = V(t).map((e) => n(e) ? e.join(".") : e);
|
|
133
|
-
return r.length > 0 ? e.filter((e) => e.propString && r.includes(e.propString)) : e;
|
|
134
|
-
}, q = "ElForm", ve = /* @__PURE__ */ k({
|
|
135
|
-
name: q,
|
|
136
|
-
__name: "form",
|
|
137
|
-
props: U,
|
|
138
|
-
emits: me,
|
|
139
|
-
setup(e, { expose: t, emit: r }) {
|
|
140
|
-
let o = e, s = r, c = I(), l = F([]), f = /* @__PURE__ */ new Map(), p = te(), m = i("form"), h = w(() => {
|
|
141
|
-
let { labelPosition: e, inline: t } = o;
|
|
142
|
-
return [
|
|
143
|
-
m.b(),
|
|
144
|
-
m.m(p.value || "default"),
|
|
145
|
-
{
|
|
146
|
-
[m.m(`label-${e}`)]: e,
|
|
147
|
-
[m.m("inline")]: t
|
|
148
|
-
}
|
|
149
|
-
];
|
|
150
|
-
}), g = (e) => K(l, [e])[0], ee = (e) => {
|
|
151
|
-
l.push(e), e.propString && (f.has(e.propString) ? e.setInitialValue(f.get(e.propString)) : f.set(e.propString, H(e.fieldValue)));
|
|
152
|
-
}, ne = (e) => {
|
|
153
|
-
e.prop && l.splice(l.indexOf(e), 1);
|
|
154
|
-
}, _ = (e) => {
|
|
155
|
-
if (!o.model) {
|
|
156
|
-
d(q, "model is required for setInitialValues to work.");
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
if (!e) {
|
|
160
|
-
d(q, "initModel is required for setInitialValues to work.");
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
for (let t of f.keys()) f.set(t, H(u(e, t).value));
|
|
164
|
-
l.forEach((t) => {
|
|
165
|
-
t.prop && t.setInitialValue(u(e, t.prop).value);
|
|
166
|
-
});
|
|
167
|
-
}, y = (e = []) => {
|
|
168
|
-
if (!o.model) {
|
|
169
|
-
d(q, "model is required for resetFields to work.");
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
K(l, e).forEach((e) => e.resetField());
|
|
173
|
-
let t = new Set(l.map((e) => e.propString).filter(Boolean)), r = e.length > 0 ? V(e).map((e) => n(e) ? e.join(".") : e) : [...f.keys()];
|
|
174
|
-
for (let e of r) !t.has(e) && f.has(e) && (u(o.model, e).value = H(f.get(e)));
|
|
175
|
-
}, b = (e = []) => {
|
|
176
|
-
K(l, e).forEach((e) => e.clearValidate());
|
|
177
|
-
}, x = w(() => {
|
|
178
|
-
let e = !!o.model;
|
|
179
|
-
return e || d(q, "model is required for validate to work."), e;
|
|
180
|
-
}), S = (e) => {
|
|
181
|
-
if (l.length === 0) return [];
|
|
182
|
-
let t = K(l, e);
|
|
183
|
-
return t.length ? t : (d(q, "please pass correct props!"), []);
|
|
184
|
-
}, C = async (e) => E(void 0, e), T = async (e = []) => {
|
|
185
|
-
if (!x.value) return !1;
|
|
186
|
-
let t = S(e);
|
|
187
|
-
if (t.length === 0) return !0;
|
|
188
|
-
let n = {};
|
|
189
|
-
for (let e of t) try {
|
|
190
|
-
await e.validate(""), e.validateState === "error" && !e.error && e.resetField();
|
|
191
|
-
} catch (e) {
|
|
192
|
-
n = {
|
|
193
|
-
...n,
|
|
194
|
-
...e
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
return Object.keys(n).length === 0 ? !0 : Promise.reject(n);
|
|
198
|
-
}, E = async (e = [], t) => {
|
|
199
|
-
let n = !1, r = !a(t);
|
|
200
|
-
try {
|
|
201
|
-
return n = await T(e), n === !0 && await (t == null ? void 0 : t(n)), n;
|
|
202
|
-
} catch (e) {
|
|
203
|
-
if (e instanceof Error) throw e;
|
|
204
|
-
let a = e;
|
|
205
|
-
if (o.scrollToError) {
|
|
206
|
-
var i;
|
|
207
|
-
c.value && ((i = c.value.querySelector(`.${m.b()}-item.is-error`)) == null || i.scrollIntoView(o.scrollIntoViewOptions));
|
|
208
|
-
}
|
|
209
|
-
return !n && await (t == null ? void 0 : t(!1, a)), r && Promise.reject(a);
|
|
210
|
-
}
|
|
211
|
-
}, D = (e) => {
|
|
212
|
-
var t;
|
|
213
|
-
let n = g(e);
|
|
214
|
-
n && ((t = n.$el) == null || t.scrollIntoView(o.scrollIntoViewOptions));
|
|
215
|
-
};
|
|
216
|
-
return z(() => o.rules, () => {
|
|
217
|
-
o.validateOnRuleChange && C().catch((e) => d(e));
|
|
218
|
-
}, {
|
|
219
|
-
deep: !0,
|
|
220
|
-
flush: "post"
|
|
221
|
-
}), ce(v, F({
|
|
222
|
-
...de(o),
|
|
223
|
-
emit: s,
|
|
224
|
-
resetFields: y,
|
|
225
|
-
clearValidate: b,
|
|
226
|
-
validateField: E,
|
|
227
|
-
getField: g,
|
|
228
|
-
addField: ee,
|
|
229
|
-
removeField: ne,
|
|
230
|
-
setInitialValues: _,
|
|
231
|
-
...G()
|
|
232
|
-
})), t({
|
|
233
|
-
validate: C,
|
|
234
|
-
validateField: E,
|
|
235
|
-
resetFields: y,
|
|
236
|
-
clearValidate: b,
|
|
237
|
-
scrollToField: D,
|
|
238
|
-
getField: g,
|
|
239
|
-
fields: l,
|
|
240
|
-
setInitialValues: _
|
|
241
|
-
}), (e, t) => (P(), re("form", {
|
|
242
|
-
ref_key: "formRef",
|
|
243
|
-
ref: c,
|
|
244
|
-
class: j(h.value)
|
|
245
|
-
}, [L(e.$slots, "default")], 2));
|
|
246
|
-
}
|
|
247
|
-
}), J = "ElLabelWrap", ye = /* @__PURE__ */ k({
|
|
248
|
-
name: J,
|
|
249
|
-
props: {
|
|
250
|
-
isAutoWidth: Boolean,
|
|
251
|
-
updateAll: Boolean
|
|
252
|
-
},
|
|
253
|
-
setup(e, { slots: t }) {
|
|
254
|
-
let n = A(v, void 0), r = A(_);
|
|
255
|
-
r || h(J, "usage: <el-form-item><label-wrap /></el-form-item>");
|
|
256
|
-
let a = i("form"), o = I(), s = I(0), c = () => {
|
|
257
|
-
var e;
|
|
258
|
-
if ((e = o.value) != null && e.firstElementChild) {
|
|
259
|
-
let e = window.getComputedStyle(o.value.firstElementChild).width;
|
|
260
|
-
return Math.ceil(Number.parseFloat(e));
|
|
261
|
-
} else return 0;
|
|
262
|
-
}, l = (r = "update") => {
|
|
263
|
-
ae(() => {
|
|
264
|
-
t.default && e.isAutoWidth && (r === "update" ? s.value = c() : r === "remove" && (n == null || n.deregisterLabelWidth(s.value)));
|
|
265
|
-
});
|
|
266
|
-
}, u = () => l("update");
|
|
267
|
-
return se(() => {
|
|
268
|
-
u();
|
|
269
|
-
}), oe(() => {
|
|
270
|
-
l("remove");
|
|
271
|
-
}), N(() => u()), z(s, (t, r) => {
|
|
272
|
-
e.updateAll && (n == null || n.registerLabelWidth(t, r));
|
|
273
|
-
}), p(w(() => {
|
|
274
|
-
var e;
|
|
275
|
-
return ((e = o.value) == null ? void 0 : e.firstElementChild) ?? null;
|
|
276
|
-
}), u), () => {
|
|
277
|
-
var i;
|
|
278
|
-
if (!t) return null;
|
|
279
|
-
let { isAutoWidth: c } = e;
|
|
280
|
-
if (c) {
|
|
281
|
-
var l;
|
|
282
|
-
let e = n == null ? void 0 : n.autoLabelWidth, i = r == null ? void 0 : r.hasLabel, c = {};
|
|
283
|
-
if (i && e && e !== "auto") {
|
|
284
|
-
let t = Math.max(0, Number.parseInt(e, 10) - s.value), i = (r.labelPosition || n.labelPosition) === "left" ? "marginRight" : "marginLeft";
|
|
285
|
-
t && (c[i] = `${t}px`);
|
|
286
|
-
}
|
|
287
|
-
return O("div", {
|
|
288
|
-
ref: o,
|
|
289
|
-
class: [a.be("item", "label-wrap")],
|
|
290
|
-
style: c
|
|
291
|
-
}, [(l = t.default) == null ? void 0 : l.call(t)]);
|
|
292
|
-
} else return O(S, { ref: o }, [(i = t.default) == null ? void 0 : i.call(t)]);
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
}), be = ["role", "aria-labelledby"], Y = /* @__PURE__ */ k({
|
|
296
|
-
name: "ElFormItem",
|
|
297
|
-
__name: "form-item",
|
|
298
|
-
props: he,
|
|
299
|
-
setup(e, { expose: t }) {
|
|
300
|
-
let r = e, o = fe(), s = A(v, void 0), l = A(_, void 0), d = te(void 0, { formItem: !1 }), f = i("form-item"), p = ne().value, m = I([]), h = I(""), y = ee(h, 100), b = I(""), x = I(), S, k = !1, N = w(() => r.labelPosition || (s == null ? void 0 : s.labelPosition)), U = w(() => N.value === "top" ? {} : { width: g(r.labelWidth ?? (s == null ? void 0 : s.labelWidth)) }), me = w(() => {
|
|
301
|
-
if (N.value === "top" || s != null && s.inline || !r.label && !r.labelWidth && ve) return {};
|
|
302
|
-
let e = g(r.labelWidth ?? (s == null ? void 0 : s.labelWidth));
|
|
303
|
-
return !r.label && !o.label ? { marginLeft: e } : {};
|
|
304
|
-
}), he = w(() => [
|
|
305
|
-
f.b(),
|
|
306
|
-
f.m(d.value),
|
|
307
|
-
f.is("error", h.value === "error"),
|
|
308
|
-
f.is("validating", h.value === "validating"),
|
|
309
|
-
f.is("success", h.value === "success"),
|
|
310
|
-
f.is("required", Ce.value || r.required),
|
|
311
|
-
f.is("no-asterisk", s == null ? void 0 : s.hideRequiredAsterisk),
|
|
312
|
-
(s == null ? void 0 : s.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
|
|
313
|
-
{
|
|
314
|
-
[f.m("feedback")]: s == null ? void 0 : s.statusIcon,
|
|
315
|
-
[f.m(`label-${N.value}`)]: N.value
|
|
316
|
-
}
|
|
317
|
-
]), ge = w(() => c(r.inlineMessage) ? r.inlineMessage : (s == null ? void 0 : s.inlineMessage) || !1), _e = w(() => [f.e("error"), { [f.em("error", "inline")]: ge.value }]), W = w(() => r.prop ? n(r.prop) ? r.prop.join(".") : r.prop : ""), G = w(() => !!(r.label || o.label)), K = w(() => r.for ?? (m.value.length === 1 ? m.value[0] : void 0)), q = w(() => !K.value && G.value), ve = !!l, J = w(() => {
|
|
318
|
-
let e = s == null ? void 0 : s.model;
|
|
319
|
-
if (!(!e || !r.prop)) return u(e, r.prop).value;
|
|
320
|
-
}), Y = w(() => {
|
|
321
|
-
let { required: e } = r, t = [];
|
|
322
|
-
r.rules && t.push(...V(r.rules));
|
|
323
|
-
let n = s == null ? void 0 : s.rules;
|
|
324
|
-
if (n && r.prop) {
|
|
325
|
-
let e = u(n, r.prop).value;
|
|
326
|
-
e && t.push(...V(e));
|
|
327
|
-
}
|
|
328
|
-
if (e !== void 0) {
|
|
329
|
-
let n = t.map((e, t) => [e, t]).filter(([e]) => "required" in e);
|
|
330
|
-
if (n.length > 0) for (let [r, i] of n) r.required !== e && (t[i] = {
|
|
331
|
-
...r,
|
|
332
|
-
required: e
|
|
333
|
-
});
|
|
334
|
-
else t.push({ required: e });
|
|
335
|
-
}
|
|
336
|
-
return t;
|
|
337
|
-
}), xe = w(() => Y.value.length > 0), Se = (e) => Y.value.filter((t) => !t.trigger || !e ? !0 : n(t.trigger) ? t.trigger.includes(e) : t.trigger === e).map(({ trigger: e, ...t }) => t), Ce = w(() => Y.value.some((e) => e.required)), we = w(() => y.value === "error" && r.showMessage && ((s == null ? void 0 : s.showMessage) ?? !0)), X = w(() => `${r.label || ""}${(s == null ? void 0 : s.labelSuffix) || ""}`), Z = (e) => {
|
|
338
|
-
h.value = e;
|
|
339
|
-
}, Te = (e) => {
|
|
340
|
-
var t;
|
|
341
|
-
let { errors: n, fields: i } = e;
|
|
342
|
-
(!n || !i) && console.error(e), Z("error"), b.value = n ? (n == null || (t = n[0]) == null ? void 0 : t.message) ?? `${r.prop} is required` : "", s == null || s.emit("validate", r.prop, !1, b.value);
|
|
343
|
-
}, Ee = () => {
|
|
344
|
-
Z("success"), s == null || s.emit("validate", r.prop, !0, "");
|
|
345
|
-
}, De = async (e) => {
|
|
346
|
-
let t = W.value;
|
|
347
|
-
return new pe({ [t]: e }).validate({ [t]: J.value }, { firstFields: !0 }).then(() => (Ee(), !0)).catch((e) => (Te(e), Promise.reject(e)));
|
|
348
|
-
}, Oe = async (e, t) => {
|
|
349
|
-
if (k || !r.prop) return !1;
|
|
350
|
-
let n = a(t);
|
|
351
|
-
if (!xe.value) return t == null || t(!1), !1;
|
|
352
|
-
let i = Se(e);
|
|
353
|
-
return i.length === 0 ? (t == null || t(!0), !0) : (Z("validating"), De(i).then(() => (t == null || t(!0), !0)).catch((e) => {
|
|
354
|
-
let { fields: r } = e;
|
|
355
|
-
return t == null || t(!1, r), n ? !1 : Promise.reject(r);
|
|
356
|
-
}));
|
|
357
|
-
}, Q = () => {
|
|
358
|
-
Z(""), b.value = "", k = !1;
|
|
359
|
-
}, $ = async () => {
|
|
360
|
-
let e = s == null ? void 0 : s.model;
|
|
361
|
-
if (!e || !r.prop) return;
|
|
362
|
-
let t = u(e, r.prop);
|
|
363
|
-
k = !0, t.value = H(S), await ae(), Q(), k = !1;
|
|
364
|
-
}, ke = (e) => {
|
|
365
|
-
m.value.includes(e) || m.value.push(e);
|
|
366
|
-
}, Ae = (e) => {
|
|
367
|
-
m.value = m.value.filter((t) => t !== e);
|
|
368
|
-
}, je = (e) => {
|
|
369
|
-
S = H(e);
|
|
370
|
-
};
|
|
371
|
-
z(() => r.error, (e) => {
|
|
372
|
-
b.value = e || "", Z(e ? "error" : "");
|
|
373
|
-
}, { immediate: !0 }), z(() => r.validateStatus, (e) => Z(e || ""));
|
|
374
|
-
let Me = F({
|
|
375
|
-
...de(r),
|
|
376
|
-
$el: x,
|
|
377
|
-
size: d,
|
|
378
|
-
validateMessage: b,
|
|
379
|
-
validateState: h,
|
|
380
|
-
labelId: p,
|
|
381
|
-
inputIds: m,
|
|
382
|
-
isGroup: q,
|
|
383
|
-
hasLabel: G,
|
|
384
|
-
fieldValue: J,
|
|
385
|
-
addInputId: ke,
|
|
386
|
-
removeInputId: Ae,
|
|
387
|
-
resetField: $,
|
|
388
|
-
clearValidate: Q,
|
|
389
|
-
validate: Oe,
|
|
390
|
-
propString: W,
|
|
391
|
-
setInitialValue: je
|
|
392
|
-
});
|
|
393
|
-
return ce(_, Me), se(() => {
|
|
394
|
-
r.prop && (je(J.value), s == null || s.addField(Me));
|
|
395
|
-
}), oe(() => {
|
|
396
|
-
s == null || s.removeField(Me);
|
|
397
|
-
}), t({
|
|
398
|
-
size: d,
|
|
399
|
-
validateMessage: b,
|
|
400
|
-
validateState: h,
|
|
401
|
-
validate: Oe,
|
|
402
|
-
clearValidate: Q,
|
|
403
|
-
resetField: $,
|
|
404
|
-
setInitialValue: je
|
|
405
|
-
}), (t, n) => {
|
|
406
|
-
var r;
|
|
407
|
-
return P(), re("div", {
|
|
408
|
-
ref_key: "formItemRef",
|
|
409
|
-
ref: x,
|
|
410
|
-
class: j(he.value),
|
|
411
|
-
role: q.value ? "group" : void 0,
|
|
412
|
-
"aria-labelledby": q.value ? R(p) : void 0
|
|
413
|
-
}, [O(R(ye), {
|
|
414
|
-
"is-auto-width": U.value.width === "auto",
|
|
415
|
-
"update-all": ((r = R(s)) == null ? void 0 : r.labelWidth) === "auto"
|
|
416
|
-
}, {
|
|
417
|
-
default: B(() => [e.label || t.$slots.label ? (P(), T(le(K.value ? "label" : "div"), {
|
|
418
|
-
key: 0,
|
|
419
|
-
id: R(p),
|
|
420
|
-
for: K.value,
|
|
421
|
-
class: j(R(f).e("label")),
|
|
422
|
-
style: M(U.value)
|
|
423
|
-
}, {
|
|
424
|
-
default: B(() => [L(t.$slots, "label", { label: X.value }, () => [ie(ue(X.value), 1)])]),
|
|
425
|
-
_: 3
|
|
426
|
-
}, 8, [
|
|
427
|
-
"id",
|
|
428
|
-
"for",
|
|
429
|
-
"class",
|
|
430
|
-
"style"
|
|
431
|
-
])) : E("v-if", !0)]),
|
|
432
|
-
_: 3
|
|
433
|
-
}, 8, ["is-auto-width", "update-all"]), D("div", {
|
|
434
|
-
class: j(R(f).e("content")),
|
|
435
|
-
style: M(me.value)
|
|
436
|
-
}, [L(t.$slots, "default"), O(C, { name: `${R(f).namespace.value}-zoom-in-top` }, {
|
|
437
|
-
default: B(() => [we.value ? L(t.$slots, "error", {
|
|
438
|
-
key: 0,
|
|
439
|
-
error: b.value
|
|
440
|
-
}, () => [D("div", { class: j(_e.value) }, ue(b.value), 3)]) : E("v-if", !0)]),
|
|
441
|
-
_: 3
|
|
442
|
-
}, 8, ["name"])], 6)], 10, be);
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
s(ve, { FormItem: Y });
|
|
447
|
-
var xe = o(Y), Se = m({
|
|
448
|
-
tag: {
|
|
449
|
-
type: String,
|
|
450
|
-
default: "div"
|
|
451
|
-
},
|
|
452
|
-
span: {
|
|
453
|
-
type: Number,
|
|
454
|
-
default: 24
|
|
455
|
-
},
|
|
456
|
-
offset: {
|
|
457
|
-
type: Number,
|
|
458
|
-
default: 0
|
|
459
|
-
},
|
|
460
|
-
pull: {
|
|
461
|
-
type: Number,
|
|
462
|
-
default: 0
|
|
463
|
-
},
|
|
464
|
-
push: {
|
|
465
|
-
type: Number,
|
|
466
|
-
default: 0
|
|
467
|
-
},
|
|
468
|
-
xs: {
|
|
469
|
-
type: l([Number, Object]),
|
|
470
|
-
default: () => y({})
|
|
471
|
-
},
|
|
472
|
-
sm: {
|
|
473
|
-
type: l([Number, Object]),
|
|
474
|
-
default: () => y({})
|
|
475
|
-
},
|
|
476
|
-
md: {
|
|
477
|
-
type: l([Number, Object]),
|
|
478
|
-
default: () => y({})
|
|
479
|
-
},
|
|
480
|
-
lg: {
|
|
481
|
-
type: l([Number, Object]),
|
|
482
|
-
default: () => y({})
|
|
483
|
-
},
|
|
484
|
-
xl: {
|
|
485
|
-
type: l([Number, Object]),
|
|
486
|
-
default: () => y({})
|
|
487
|
-
}
|
|
488
|
-
}), Ce = Symbol("rowContextKey"), we = s(/* @__PURE__ */ k({
|
|
489
|
-
name: "ElCol",
|
|
490
|
-
__name: "col",
|
|
491
|
-
props: Se,
|
|
492
|
-
setup(e) {
|
|
493
|
-
let t = e, { gutter: n } = A(Ce, { gutter: w(() => 0) }), a = i("col"), o = w(() => {
|
|
494
|
-
let e = {};
|
|
495
|
-
return n.value && (e.paddingLeft = e.paddingRight = `${n.value / 2}px`), e;
|
|
496
|
-
}), s = w(() => {
|
|
497
|
-
let e = [];
|
|
498
|
-
return [
|
|
499
|
-
"span",
|
|
500
|
-
"offset",
|
|
501
|
-
"pull",
|
|
502
|
-
"push"
|
|
503
|
-
].forEach((n) => {
|
|
504
|
-
let r = t[n];
|
|
505
|
-
f(r) && (n === "span" ? e.push(a.b(`${t[n]}`)) : r > 0 && e.push(a.b(`${n}-${t[n]}`)));
|
|
506
|
-
}), [
|
|
507
|
-
"xs",
|
|
508
|
-
"sm",
|
|
509
|
-
"md",
|
|
510
|
-
"lg",
|
|
511
|
-
"xl"
|
|
512
|
-
].forEach((n) => {
|
|
513
|
-
f(t[n]) ? e.push(a.b(`${n}-${t[n]}`)) : r(t[n]) && Object.entries(t[n]).forEach(([t, r]) => {
|
|
514
|
-
e.push(t === "span" ? a.b(`${n}-${r}`) : a.b(`${n}-${t}-${r}`));
|
|
515
|
-
});
|
|
516
|
-
}), n.value && e.push(a.is("guttered")), [a.b(), e];
|
|
517
|
-
});
|
|
518
|
-
return (t, n) => (P(), T(le(e.tag), {
|
|
519
|
-
class: j(s.value),
|
|
520
|
-
style: M(o.value)
|
|
521
|
-
}, {
|
|
522
|
-
default: B(() => [L(t.$slots, "default")]),
|
|
523
|
-
_: 3
|
|
524
|
-
}, 8, ["class", "style"]));
|
|
525
|
-
}
|
|
526
|
-
})), X = ["span"], Z = x(we), Te = Z.filter((e) => !X.includes(e)), Ee = [
|
|
527
|
-
"label",
|
|
528
|
-
"prop",
|
|
529
|
-
"rules",
|
|
530
|
-
"labelWidth",
|
|
531
|
-
"required"
|
|
532
|
-
], De = x(xe), Oe = De.filter((e) => !Ee.includes(e)), Q = [
|
|
533
|
-
"wrapCol",
|
|
534
|
-
"wrapFormItem",
|
|
535
|
-
"unwrap",
|
|
536
|
-
"prefixConfig",
|
|
537
|
-
"block",
|
|
538
|
-
"prefixPick",
|
|
539
|
-
"picker",
|
|
540
|
-
"half",
|
|
541
|
-
"tips",
|
|
542
|
-
"hideLabel",
|
|
543
|
-
"fixedSpan",
|
|
544
|
-
...Z,
|
|
545
|
-
...De
|
|
546
|
-
], $ = [
|
|
547
|
-
"disabled",
|
|
548
|
-
"size",
|
|
549
|
-
"statusIcon",
|
|
550
|
-
"inlineMessage",
|
|
551
|
-
"autoLabelWidth",
|
|
552
|
-
"hideRequiredAsterisk",
|
|
553
|
-
"$emit",
|
|
554
|
-
"validate",
|
|
555
|
-
"clearValidate"
|
|
556
|
-
], ke = [
|
|
557
|
-
"$emit",
|
|
558
|
-
"validate",
|
|
559
|
-
"clearValidate"
|
|
560
|
-
], Ae = {
|
|
561
|
-
name: "FormInput",
|
|
562
|
-
inject: {
|
|
563
|
-
elForm: { default: {} },
|
|
564
|
-
formItemGroup: { default: {} },
|
|
565
|
-
formHolder: { default: {} }
|
|
566
|
-
},
|
|
567
|
-
provide() {
|
|
568
|
-
return {
|
|
569
|
-
elForm: this.proxyForm,
|
|
570
|
-
formItemGroup: this
|
|
571
|
-
};
|
|
572
|
-
},
|
|
573
|
-
props: {
|
|
574
|
-
embed: Boolean,
|
|
575
|
-
disabled: Boolean,
|
|
576
|
-
fixedSpan: Number,
|
|
577
|
-
wrapCol: {
|
|
578
|
-
type: Boolean,
|
|
579
|
-
default: !0
|
|
580
|
-
},
|
|
581
|
-
wrapFormItem: {
|
|
582
|
-
type: Boolean,
|
|
583
|
-
default: !0
|
|
584
|
-
},
|
|
585
|
-
unwrap: Boolean,
|
|
586
|
-
half: Boolean,
|
|
587
|
-
prefixConfig: Boolean,
|
|
588
|
-
prefixAdd: Boolean,
|
|
589
|
-
prefixPick: Boolean,
|
|
590
|
-
block: Boolean,
|
|
591
|
-
formItemClass: String,
|
|
592
|
-
tips: String,
|
|
593
|
-
trigger: {
|
|
594
|
-
type: String,
|
|
595
|
-
default: "blur"
|
|
596
|
-
},
|
|
597
|
-
hideLabel: Boolean,
|
|
598
|
-
labelColspan: [Number, String],
|
|
599
|
-
inputColspan: [Number, String],
|
|
600
|
-
labelRowspan: [Number, String],
|
|
601
|
-
inputRowspan: [Number, String],
|
|
602
|
-
prop: String,
|
|
603
|
-
label: String,
|
|
604
|
-
labelWidth: String,
|
|
605
|
-
required: Boolean,
|
|
606
|
-
rules: [Object, Array],
|
|
607
|
-
error: String,
|
|
608
|
-
showMessage: {
|
|
609
|
-
type: Boolean,
|
|
610
|
-
default: !0
|
|
611
|
-
},
|
|
612
|
-
inlineMessage: {
|
|
613
|
-
type: [String, Boolean],
|
|
614
|
-
default: ""
|
|
615
|
-
},
|
|
616
|
-
size: String,
|
|
617
|
-
validateStatus: String,
|
|
618
|
-
for: String,
|
|
619
|
-
span: {
|
|
620
|
-
type: Number,
|
|
621
|
-
default: 12
|
|
622
|
-
},
|
|
623
|
-
offset: Number,
|
|
624
|
-
push: Number,
|
|
625
|
-
pull: Number,
|
|
626
|
-
xs: [Number, Object],
|
|
627
|
-
sm: [Number, Object],
|
|
628
|
-
md: [Number, Object],
|
|
629
|
-
lg: [Number, Object],
|
|
630
|
-
xl: [Number, Object],
|
|
631
|
-
tag: String
|
|
632
|
-
},
|
|
633
|
-
data() {
|
|
634
|
-
let e = {};
|
|
635
|
-
return $.forEach((t) => {
|
|
636
|
-
e[t] = null;
|
|
637
|
-
}), { proxyForm: e };
|
|
638
|
-
},
|
|
639
|
-
computed: {
|
|
640
|
-
prefix() {
|
|
641
|
-
return this.prefixConfig ? "请配置" : this.prefixPick || this.picker ? "请选择" : this.prefixAdd ? "请添加" : "请输入";
|
|
642
|
-
},
|
|
643
|
-
message() {
|
|
644
|
-
var e;
|
|
645
|
-
return `${this.prefix}${((e = this.label) == null ? void 0 : e.replace(":", "")) || ""}`;
|
|
646
|
-
},
|
|
647
|
-
computeRules() {
|
|
648
|
-
var e;
|
|
649
|
-
let t = [...this.rules || []], n = t.find((e) => e.required);
|
|
650
|
-
if (this.required || n || (e = this.formHolder.requiredFields) != null && e.includes(this.prop)) {
|
|
651
|
-
let e = t.find((e) => e.required);
|
|
652
|
-
e ? e.ref ? e.label = e.label || this.label : e.message = e.message || this.message : t.unshift(this.getRequireRule());
|
|
653
|
-
}
|
|
654
|
-
return t.concat(this.getRules());
|
|
655
|
-
},
|
|
656
|
-
computeSpan() {
|
|
657
|
-
return this.block ? 24 : this.span;
|
|
658
|
-
},
|
|
659
|
-
formItemProps() {
|
|
660
|
-
return b({
|
|
661
|
-
...this.$props,
|
|
662
|
-
...this.$attrs
|
|
663
|
-
}, Q);
|
|
664
|
-
},
|
|
665
|
-
elFormItemProps() {
|
|
666
|
-
return b({
|
|
667
|
-
...this.$props,
|
|
668
|
-
...this.$attrs
|
|
669
|
-
}, Oe);
|
|
670
|
-
},
|
|
671
|
-
elColProps() {
|
|
672
|
-
return b({
|
|
673
|
-
...this.$props,
|
|
674
|
-
...this.$attrs
|
|
675
|
-
}, Te);
|
|
676
|
-
},
|
|
677
|
-
formCfg() {
|
|
678
|
-
let e = { disabled: this.disabled };
|
|
679
|
-
return $.forEach((t) => {
|
|
680
|
-
e[t] = this.elForm[t];
|
|
681
|
-
}), e;
|
|
682
|
-
}
|
|
683
|
-
},
|
|
684
|
-
watch: {
|
|
685
|
-
computeRules() {
|
|
686
|
-
var e, t;
|
|
687
|
-
(e = this.elForm) == null || (t = e.clearValidate) == null || t.call(e, this.prop);
|
|
688
|
-
},
|
|
689
|
-
formCfg: {
|
|
690
|
-
immediate: !0,
|
|
691
|
-
handler() {
|
|
692
|
-
var e;
|
|
693
|
-
this.proxyForm.disabled = (e = this.formHolder.enabledFields) != null && e.includes(this.prop) ? !1 : (this.elForm || {}).disabled, $.forEach((e) => {
|
|
694
|
-
if (e !== "disabled") if (ke.includes(e)) {
|
|
695
|
-
var t;
|
|
696
|
-
this.proxyForm[e] = (t = this.elForm[e]) == null ? void 0 : t.bind(this.elForm);
|
|
697
|
-
} else this.proxyForm[e] = this.elForm[e];
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
},
|
|
702
|
-
methods: {
|
|
703
|
-
getRules() {
|
|
704
|
-
return [];
|
|
705
|
-
},
|
|
706
|
-
getRequireRule() {
|
|
707
|
-
return {
|
|
708
|
-
required: !0,
|
|
709
|
-
trigger: this.trigger,
|
|
710
|
-
message: this.message
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
};
|
|
715
|
-
//#endregion
|
|
716
|
-
export { ge as i, _e as n, V as r, Ae as t };
|