vxe-pc-ui 3.14.5 → 3.14.6
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/LICENSE +21 -21
- package/README.md +134 -134
- package/es/tree/src/tree.js +40 -5
- package/es/tree-select/src/tree-select.js +2 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +8406 -8476
- package/lib/index.umd.min.js +1 -1
- package/lib/tree/src/tree.js +40 -5
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +2 -0
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +89 -89
- package/packages/alert/index.ts +16 -16
- package/packages/alert/src/alert.ts +106 -106
- package/packages/anchor/index.ts +16 -16
- package/packages/anchor/src/anchor-link.ts +158 -158
- package/packages/anchor/src/anchor.ts +267 -267
- package/packages/anchor/src/util.ts +23 -23
- package/packages/anchor-link/index.ts +16 -16
- package/packages/avatar/index.ts +16 -16
- package/packages/avatar/src/avatar.ts +141 -141
- package/packages/backtop/index.ts +16 -16
- package/packages/backtop/src/backtop.ts +330 -330
- package/packages/badge/index.ts +16 -16
- package/packages/badge/src/badge.ts +87 -87
- package/packages/breadcrumb/index.ts +16 -16
- package/packages/breadcrumb/src/breadcrumb-item.ts +118 -118
- package/packages/breadcrumb/src/breadcrumb.ts +89 -89
- package/packages/breadcrumb-item/index.ts +16 -16
- package/packages/button/index.ts +16 -16
- package/packages/button/src/button-group.ts +113 -113
- package/packages/button/src/button.ts +956 -956
- package/packages/button-group/index.ts +16 -16
- package/packages/calendar/index.ts +16 -16
- package/packages/calendar/src/calendar.ts +1527 -1527
- package/packages/card/index.ts +16 -16
- package/packages/card/src/card.ts +162 -162
- package/packages/carousel/index.ts +16 -16
- package/packages/carousel/src/carousel-item.ts +117 -117
- package/packages/carousel/src/carousel.ts +460 -460
- package/packages/carousel/src/util.ts +21 -21
- package/packages/carousel-item/index.ts +16 -16
- package/packages/cascader/index.ts +16 -16
- package/packages/cascader/src/cascader.ts +943 -943
- package/packages/checkbox/index.ts +16 -16
- package/packages/checkbox/src/button.ts +185 -185
- package/packages/checkbox/src/checkbox.ts +189 -189
- package/packages/checkbox/src/group.ts +259 -259
- package/packages/checkbox-button/index.ts +16 -16
- package/packages/checkbox-group/index.ts +16 -16
- package/packages/col/index.ts +16 -16
- package/packages/collapse/index.ts +16 -16
- package/packages/collapse/src/collapse-pane.ts +136 -136
- package/packages/collapse/src/collapse.ts +259 -259
- package/packages/collapse/src/util.ts +21 -21
- package/packages/collapse-pane/index.ts +16 -16
- package/packages/color-picker/index.ts +16 -16
- package/packages/color-picker/src/color-picker.ts +1286 -1286
- package/packages/color-picker/src/util.ts +198 -198
- package/packages/components.ts +307 -307
- package/packages/context-menu/index.ts +54 -54
- package/packages/context-menu/src/context-menu.ts +727 -727
- package/packages/countdown/index.ts +16 -16
- package/packages/countdown/src/countdown.ts +276 -276
- package/packages/date-panel/index.ts +16 -16
- package/packages/date-panel/src/date-panel.ts +2024 -2024
- package/packages/date-panel/src/util.ts +244 -244
- package/packages/date-picker/index.ts +17 -17
- package/packages/date-picker/src/date-picker.ts +1249 -1249
- package/packages/date-range-picker/index.ts +16 -16
- package/packages/date-range-picker/src/date-range-picker.ts +1480 -1480
- package/packages/drawer/index.ts +87 -87
- package/packages/drawer/src/drawer.ts +767 -767
- package/packages/dynamics/index.ts +127 -127
- package/packages/empty/index.ts +16 -16
- package/packages/empty/src/empty.ts +80 -80
- package/packages/form/index.ts +16 -16
- package/packages/form/render/index.ts +617 -617
- package/packages/form/src/form-config-item.ts +84 -84
- package/packages/form/src/form-group.ts +125 -125
- package/packages/form/src/form-item.ts +217 -217
- package/packages/form/src/form.ts +1032 -1032
- package/packages/form/src/itemInfo.ts +80 -80
- package/packages/form/src/render.ts +398 -398
- package/packages/form/src/util.ts +92 -92
- package/packages/form-gather/index.ts +18 -18
- package/packages/form-group/index.ts +16 -16
- package/packages/form-item/index.ts +16 -16
- package/packages/icon/index.ts +16 -16
- package/packages/icon/src/icon.ts +75 -75
- package/packages/icon-picker/index.ts +16 -16
- package/packages/icon-picker/src/icon-picker.ts +753 -753
- package/packages/image/index.ts +16 -16
- package/packages/image/src/group.ts +162 -162
- package/packages/image/src/image.ts +303 -303
- package/packages/image/src/preview.ts +737 -737
- package/packages/image/src/util.ts +62 -62
- package/packages/image-group/index.ts +16 -16
- package/packages/image-preview/index.ts +19 -19
- package/packages/index.ts +8 -8
- package/packages/input/index.ts +16 -16
- package/packages/input/src/input.ts +3187 -3187
- package/packages/language/ar-EG.ts +840 -840
- package/packages/language/de-DE.ts +840 -840
- package/packages/language/en-US.ts +840 -840
- package/packages/language/es-ES.ts +840 -840
- package/packages/language/fr-FR.ts +840 -840
- package/packages/language/hu-HU.ts +840 -840
- package/packages/language/hy-AM.ts +840 -840
- package/packages/language/id-ID.ts +840 -840
- package/packages/language/it-IT.ts +840 -840
- package/packages/language/ja-JP.ts +840 -840
- package/packages/language/ko-KR.ts +840 -840
- package/packages/language/ms-MY.ts +840 -840
- package/packages/language/nb-NO.ts +840 -840
- package/packages/language/pt-BR.ts +840 -840
- package/packages/language/ru-RU.ts +840 -840
- package/packages/language/th-TH.ts +840 -840
- package/packages/language/ug-CN.ts +840 -840
- package/packages/language/uk-UA.ts +840 -840
- package/packages/language/uz-UZ.ts +840 -840
- package/packages/language/vi-VN.ts +840 -840
- package/packages/language/zh-CHT.ts +840 -840
- package/packages/language/zh-CN.ts +840 -840
- package/packages/language/zh-HK.ts +3 -3
- package/packages/language/zh-MO.ts +3 -3
- package/packages/language/zh-TC.ts +3 -3
- package/packages/language/zh-TW.ts +3 -3
- package/packages/layout-aside/index.ts +16 -16
- package/packages/layout-aside/src/layout-aside.ts +115 -115
- package/packages/layout-body/index.ts +16 -16
- package/packages/layout-body/src/layout-body.ts +137 -137
- package/packages/layout-container/index.ts +16 -16
- package/packages/layout-container/src/layout-container.ts +65 -65
- package/packages/layout-footer/index.ts +16 -16
- package/packages/layout-footer/src/layout-footer.ts +53 -53
- package/packages/layout-header/index.ts +16 -16
- package/packages/layout-header/src/layout-header.ts +49 -49
- package/packages/link/index.ts +16 -16
- package/packages/link/src/link.ts +153 -153
- package/packages/list/index.ts +16 -16
- package/packages/list/src/list.ts +492 -492
- package/packages/loading/index.ts +34 -34
- package/packages/loading/src/loading.ts +162 -162
- package/packages/mention/index.ts +16 -16
- package/packages/mention/src/mention.ts +54 -54
- package/packages/menu/index.ts +16 -16
- package/packages/menu/src/menu.ts +632 -632
- package/packages/modal/index.ts +150 -150
- package/packages/modal/src/modal.ts +1668 -1668
- package/packages/notice-bar/index.ts +16 -16
- package/packages/notice-bar/src/notice-bar.ts +182 -182
- package/packages/number-input/index.ts +16 -16
- package/packages/number-input/src/number-input.ts +1255 -1255
- package/packages/number-input/src/util.ts +12 -12
- package/packages/optgroup/index.ts +16 -16
- package/packages/option/index.ts +16 -16
- package/packages/pager/index.ts +16 -16
- package/packages/pager/src/pager.ts +913 -913
- package/packages/password-input/index.ts +16 -16
- package/packages/password-input/src/password-input.ts +466 -466
- package/packages/print/index.ts +18 -18
- package/packages/print/src/page-break.ts +78 -78
- package/packages/print/src/print.ts +266 -266
- package/packages/print/src/util.ts +284 -284
- package/packages/print-page-break/index.ts +14 -14
- package/packages/pulldown/index.ts +16 -16
- package/packages/pulldown/src/pulldown.ts +533 -533
- package/packages/radio/index.ts +16 -16
- package/packages/radio/src/button.ts +221 -221
- package/packages/radio/src/group.ts +252 -252
- package/packages/radio/src/radio.ts +228 -228
- package/packages/radio-button/index.ts +16 -16
- package/packages/radio-group/index.ts +16 -16
- package/packages/rate/index.ts +16 -16
- package/packages/rate/src/rate.ts +199 -199
- package/packages/result/index.ts +16 -16
- package/packages/result/src/result.ts +93 -93
- package/packages/row/index.ts +16 -16
- package/packages/row/src/col.ts +130 -130
- package/packages/row/src/row.ts +106 -106
- package/packages/segmented/index.ts +16 -16
- package/packages/segmented/src/segmented.ts +281 -281
- package/packages/select/index.ts +16 -16
- package/packages/select/src/optgroup.ts +107 -107
- package/packages/select/src/option-info.ts +20 -20
- package/packages/select/src/option.ts +103 -103
- package/packages/select/src/select.ts +2001 -2001
- package/packages/select/src/util.ts +47 -47
- package/packages/slider/index.ts +16 -16
- package/packages/slider/src/slider.ts +332 -332
- package/packages/split/index.ts +16 -16
- package/packages/split-pane/index.ts +17 -17
- package/packages/splitter/index.ts +16 -16
- package/packages/splitter/src/splitter-panel.ts +171 -171
- package/packages/splitter/src/splitter.ts +1032 -1032
- package/packages/splitter/src/util.ts +21 -21
- package/packages/splitter-panel/index.ts +16 -16
- package/packages/steps/index.ts +16 -16
- package/packages/steps/src/steps.ts +57 -57
- package/packages/switch/index.ts +16 -16
- package/packages/switch/src/switch.ts +279 -279
- package/packages/tab-pane/index.ts +16 -16
- package/packages/table-select/index.ts +16 -16
- package/packages/table-select/src/table-select.ts +904 -904
- package/packages/tabs/index.ts +16 -16
- package/packages/tabs/src/tab-pane.ts +137 -137
- package/packages/tabs/src/tabs.ts +1014 -1014
- package/packages/tabs/src/util.ts +21 -21
- package/packages/tag/index.ts +16 -16
- package/packages/tag/src/tag.ts +195 -195
- package/packages/text/index.ts +16 -16
- package/packages/text/src/text.ts +267 -267
- package/packages/text-ellipsis/index.ts +16 -16
- package/packages/text-ellipsis/src/text-ellipsis.ts +291 -291
- package/packages/textarea/index.ts +16 -16
- package/packages/textarea/src/textarea.ts +436 -436
- package/packages/timeline/index.ts +16 -16
- package/packages/timeline/src/timeline-item.ts +41 -41
- package/packages/timeline/src/timeline.ts +54 -54
- package/packages/timeline-item/index.ts +16 -16
- package/packages/tip/index.ts +19 -19
- package/packages/tip/src/tip.ts +112 -112
- package/packages/tooltip/index.ts +16 -16
- package/packages/tooltip/src/tooltip.ts +669 -669
- package/packages/tour/index.ts +16 -16
- package/packages/tour/src/tour.ts +54 -54
- package/packages/tree/index.ts +16 -16
- package/packages/tree/src/store.ts +15 -15
- package/packages/tree/src/tree.ts +3122 -3080
- package/packages/tree/src/util.ts +44 -44
- package/packages/tree-select/index.ts +16 -16
- package/packages/tree-select/src/tree-select.ts +1118 -1116
- package/packages/ui/index.ts +697 -697
- package/packages/ui/src/anime.ts +52 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +279 -279
- package/packages/ui/src/log.ts +6 -6
- package/packages/ui/src/utils.ts +49 -49
- package/packages/ui/src/vn.ts +60 -60
- package/packages/upload/index.ts +20 -20
- package/packages/upload/src/upload.ts +2129 -2129
- package/packages/upload/src/util.ts +109 -109
- package/packages/vxe-u-i/index.ts +4 -4
- package/packages/watermark/index.ts +31 -31
- package/packages/watermark/src/util.ts +176 -176
- package/packages/watermark/src/watermark.ts +166 -166
- package/styles/all.scss +90 -90
- package/styles/base.scss +16 -16
- package/styles/components/alert.scss +101 -101
- package/styles/components/anchor.scss +44 -44
- package/styles/components/avatar.scss +115 -115
- package/styles/components/backtop.scss +82 -82
- package/styles/components/badge.scss +45 -45
- package/styles/components/breadcrumb.scss +29 -29
- package/styles/components/button-group.scss +30 -30
- package/styles/components/button.scss +415 -415
- package/styles/components/calendar.scss +471 -471
- package/styles/components/card.scss +121 -121
- package/styles/components/carousel.scss +184 -184
- package/styles/components/cascader.scss +140 -140
- package/styles/components/checkbox-button.scss +57 -57
- package/styles/components/checkbox.scss +81 -81
- package/styles/components/collapse.scss +56 -56
- package/styles/components/color-picker.scss +409 -409
- package/styles/components/context-menu.scss +102 -102
- package/styles/components/countdown.scss +35 -35
- package/styles/components/date-panel.scss +505 -505
- package/styles/components/date-picker.scss +247 -247
- package/styles/components/date-range-picker.scss +252 -252
- package/styles/components/drawer.scss +298 -298
- package/styles/components/empty.scss +79 -79
- package/styles/components/form.scss +668 -668
- package/styles/components/icon-picker.scss +211 -211
- package/styles/components/icon.scss +1048 -1048
- package/styles/components/image-group.scss +2 -2
- package/styles/components/image-preview.scss +215 -215
- package/styles/components/image.scss +16 -16
- package/styles/components/input.scss +846 -846
- package/styles/components/layout-aside.scss +22 -22
- package/styles/components/layout-body.scss +14 -14
- package/styles/components/layout-container.scss +13 -13
- package/styles/components/layout-footer.scss +14 -14
- package/styles/components/layout-header.scss +11 -11
- package/styles/components/link.scss +115 -115
- package/styles/components/list.scss +40 -40
- package/styles/components/loading.scss +137 -137
- package/styles/components/menu.scss +150 -150
- package/styles/components/modal.scss +480 -480
- package/styles/components/notice-bar.scss +91 -91
- package/styles/components/number-input.scss +283 -283
- package/styles/components/old-icon.scss +4 -4
- package/styles/components/pager.scss +282 -282
- package/styles/components/password-input.scss +374 -374
- package/styles/components/print.scss +3 -3
- package/styles/components/pulldown.scss +75 -75
- package/styles/components/radio-button.scss +57 -57
- package/styles/components/radio.scss +79 -79
- package/styles/components/rate.scss +76 -76
- package/styles/components/result.scss +91 -91
- package/styles/components/row.scss +69 -69
- package/styles/components/segmented.scss +215 -215
- package/styles/components/select.scss +244 -244
- package/styles/components/slider.scss +139 -139
- package/styles/components/split.scss +1 -1
- package/styles/components/splitter.scss +318 -318
- package/styles/components/switch.scss +128 -128
- package/styles/components/table-select.scss +105 -105
- package/styles/components/tabs.scss +745 -745
- package/styles/components/tag.scss +184 -184
- package/styles/components/text-ellipsis.scss +130 -130
- package/styles/components/text.scss +123 -123
- package/styles/components/textarea.scss +106 -106
- package/styles/components/tip.scss +97 -97
- package/styles/components/tooltip.scss +141 -141
- package/styles/components/tree-select.scss +166 -166
- package/styles/components/tree.scss +294 -294
- package/styles/components/upload.scss +497 -497
- package/styles/components/watermark.scss +26 -26
- package/styles/helpers/baseMixin.scss +95 -95
- package/styles/helpers/baseVar.scss +3 -3
- package/styles/helpers/placement.scss +38 -38
- package/styles/theme/base.scss +214 -214
- package/styles/theme/dark.scss +119 -119
- package/styles/theme/light.scss +118 -118
- package/styles/variable.scss +111 -111
- package/types/all.d.ts +328 -328
- package/types/components/alert.d.ts +80 -80
- package/types/components/anchor-link.d.ts +84 -84
- package/types/components/anchor.d.ts +84 -84
- package/types/components/avatar.d.ts +81 -81
- package/types/components/backtop.d.ts +115 -115
- package/types/components/badge.d.ts +69 -69
- package/types/components/breadcrumb-item.d.ts +73 -73
- package/types/components/breadcrumb.d.ts +80 -80
- package/types/components/button-group.d.ts +113 -113
- package/types/components/button.d.ts +314 -314
- package/types/components/calendar.d.ts +254 -254
- package/types/components/card.d.ts +86 -86
- package/types/components/carousel-item.d.ts +68 -68
- package/types/components/carousel.d.ts +126 -126
- package/types/components/cascader.d.ts +250 -250
- package/types/components/checkbox-button.d.ts +93 -93
- package/types/components/checkbox-group.d.ts +135 -135
- package/types/components/checkbox.d.ts +115 -115
- package/types/components/col.d.ts +73 -73
- package/types/components/colgroup.d.ts +131 -131
- package/types/components/collapse-pane.d.ts +82 -82
- package/types/components/collapse.d.ts +115 -115
- package/types/components/color-picker.d.ts +164 -164
- package/types/components/column.d.ts +852 -852
- package/types/components/context-menu.d.ts +301 -301
- package/types/components/countdown.d.ts +99 -99
- package/types/components/date-panel.d.ts +269 -269
- package/types/components/date-picker.d.ts +322 -322
- package/types/components/date-range-picker.d.ts +336 -336
- package/types/components/drawer.d.ts +295 -295
- package/types/components/empty.d.ts +71 -71
- package/types/components/flow-design.d.ts +78 -78
- package/types/components/flow-view.d.ts +78 -78
- package/types/components/form-design.d.ts +364 -364
- package/types/components/form-gather.d.ts +72 -72
- package/types/components/form-group.d.ts +63 -63
- package/types/components/form-item.d.ts +405 -405
- package/types/components/form-view.d.ts +175 -175
- package/types/components/form.d.ts +463 -463
- package/types/components/gantt-module/gantt-view.d.ts +171 -171
- package/types/components/gantt-module/index.d.ts +1 -1
- package/types/components/gantt-plugins/extend-gantt-chart.d.ts +132 -132
- package/types/components/gantt-plugins/index.d.ts +1 -1
- package/types/components/gantt.d.ts +1201 -1201
- package/types/components/grid.d.ts +1038 -1038
- package/types/components/icon-picker.d.ts +185 -185
- package/types/components/icon.d.ts +80 -80
- package/types/components/image-group.d.ts +120 -120
- package/types/components/image-preview.d.ts +159 -159
- package/types/components/image.d.ts +166 -166
- package/types/components/input.d.ts +425 -425
- package/types/components/layout-aside.d.ts +73 -73
- package/types/components/layout-body.d.ts +84 -84
- package/types/components/layout-container.d.ts +66 -66
- package/types/components/layout-footer.d.ts +66 -66
- package/types/components/layout-header.d.ts +64 -64
- package/types/components/link.d.ts +104 -104
- package/types/components/list-design.d.ts +177 -177
- package/types/components/list-view.d.ts +190 -190
- package/types/components/list.d.ts +196 -196
- package/types/components/loading.d.ts +96 -96
- package/types/components/mention.d.ts +70 -70
- package/types/components/menu.d.ts +203 -203
- package/types/components/modal.d.ts +540 -540
- package/types/components/notice-bar.d.ts +95 -95
- package/types/components/number-input.d.ts +300 -300
- package/types/components/optgroup.d.ts +81 -81
- package/types/components/option.d.ts +95 -95
- package/types/components/pager.d.ts +322 -322
- package/types/components/password-input.d.ts +129 -129
- package/types/components/print-page-break.d.ts +62 -62
- package/types/components/print.d.ts +199 -199
- package/types/components/pulldown.d.ts +226 -226
- package/types/components/radio-button.d.ts +104 -104
- package/types/components/radio-group.d.ts +136 -136
- package/types/components/radio.d.ts +121 -121
- package/types/components/rate.d.ts +75 -75
- package/types/components/result.d.ts +77 -77
- package/types/components/row.d.ts +72 -72
- package/types/components/segmented.d.ts +117 -117
- package/types/components/select.d.ts +519 -519
- package/types/components/slider.d.ts +117 -117
- package/types/components/split-pane.d.ts +135 -135
- package/types/components/split.d.ts +318 -318
- package/types/components/splitter-panel.d.ts +98 -98
- package/types/components/splitter.d.ts +283 -283
- package/types/components/steps.d.ts +61 -61
- package/types/components/switch.d.ts +124 -124
- package/types/components/tab-pane.d.ts +107 -107
- package/types/components/table-module/custom.d.ts +115 -115
- package/types/components/table-module/edit.d.ts +245 -245
- package/types/components/table-module/export.d.ts +96 -96
- package/types/components/table-module/filter.d.ts +140 -140
- package/types/components/table-module/index.d.ts +7 -7
- package/types/components/table-module/keyboard.d.ts +26 -26
- package/types/components/table-module/menu.d.ts +26 -26
- package/types/components/table-module/validator.d.ts +53 -53
- package/types/components/table-plugins/extend-cell-area.d.ts +768 -768
- package/types/components/table-plugins/extend-pivot-table.d.ts +68 -68
- package/types/components/table-plugins/filters-combination.d.ts +15 -15
- package/types/components/table-plugins/filters-complex-input.d.ts +9 -9
- package/types/components/table-plugins/index.d.ts +4 -4
- package/types/components/table-select.d.ts +216 -216
- package/types/components/table.d.ts +7496 -7496
- package/types/components/tabs.d.ts +324 -324
- package/types/components/tag.d.ts +107 -107
- package/types/components/text-ellipsis.d.ts +105 -105
- package/types/components/text.d.ts +115 -115
- package/types/components/textarea.d.ts +237 -237
- package/types/components/timeline-item.d.ts +68 -68
- package/types/components/timeline.d.ts +70 -70
- package/types/components/tip.d.ts +76 -76
- package/types/components/toolbar.d.ts +329 -329
- package/types/components/tooltip.d.ts +169 -169
- package/types/components/tour.d.ts +70 -70
- package/types/components/tree-select.d.ts +299 -299
- package/types/components/tree.d.ts +836 -826
- package/types/components/upload.d.ts +432 -432
- package/types/components/watermark.d.ts +113 -113
- package/types/index.d.ts +4 -4
- package/types/ui/commands.d.ts +57 -57
- package/types/ui/formats.d.ts +62 -62
- package/types/ui/global-config.d.ts +254 -254
- package/types/ui/global-icon.d.ts +292 -292
- package/types/ui/hooks.d.ts +11 -11
- package/types/ui/index.d.ts +95 -95
- package/types/ui/interceptor.d.ts +54 -54
- package/types/ui/menus.d.ts +77 -77
- package/types/ui/renderer.d.ts +1042 -1042
- package/types/ui/validators.d.ts +38 -38
- /package/es/icon/{iconfont.1778223321885.ttf → iconfont.1778317204332.ttf} +0 -0
- /package/es/icon/{iconfont.1778223321885.woff → iconfont.1778317204332.woff} +0 -0
- /package/es/icon/{iconfont.1778223321885.woff2 → iconfont.1778317204332.woff2} +0 -0
- /package/es/{iconfont.1778223321885.ttf → iconfont.1778317204332.ttf} +0 -0
- /package/es/{iconfont.1778223321885.woff → iconfont.1778317204332.woff} +0 -0
- /package/es/{iconfont.1778223321885.woff2 → iconfont.1778317204332.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1778223321885.ttf → iconfont.1778317204332.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1778223321885.woff → iconfont.1778317204332.woff} +0 -0
- /package/lib/icon/style/{iconfont.1778223321885.woff2 → iconfont.1778317204332.woff2} +0 -0
- /package/lib/{iconfont.1778223321885.ttf → iconfont.1778317204332.ttf} +0 -0
- /package/lib/{iconfont.1778223321885.woff → iconfont.1778317204332.woff} +0 -0
- /package/lib/{iconfont.1778223321885.woff2 → iconfont.1778317204332.woff2} +0 -0
|
@@ -1,463 +1,463 @@
|
|
|
1
|
-
import { CreateElement } from 'vue'
|
|
2
|
-
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentSlotType } from '@vxe-ui/core'
|
|
3
|
-
import { VxeFormItemPropTypes, VxeFormItemProps } from './form-item'
|
|
4
|
-
import { VxeGridConstructor } from './grid'
|
|
5
|
-
|
|
6
|
-
/* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types,@typescript-eslint/no-unused-vars */
|
|
7
|
-
|
|
8
|
-
export declare const VxeForm: DefineVxeComponentApp<VxeFormProps, VxeFormEventProps, VxeFormSlots, VxeFormMethods>
|
|
9
|
-
export type VxeFormComponent = DefineVxeComponentOptions<VxeFormProps>
|
|
10
|
-
|
|
11
|
-
export type VxeFormInstance<D = any> = DefineVxeComponentInstance<{
|
|
12
|
-
reactData: FormReactData
|
|
13
|
-
internalData: FormInternalData
|
|
14
|
-
$xeGrid: VxeGridConstructor | null
|
|
15
|
-
}, VxeFormProps<D>, VxeFormPrivateComputed, VxeFormMethods<D>>
|
|
16
|
-
|
|
17
|
-
export type VxeFormConstructor<D = any> = VxeFormInstance<D>
|
|
18
|
-
|
|
19
|
-
export interface FormPrivateRef {
|
|
20
|
-
}
|
|
21
|
-
export interface VxeFormPrivateRef extends FormPrivateRef { }
|
|
22
|
-
|
|
23
|
-
export namespace VxeFormPropTypes {
|
|
24
|
-
export type Size = VxeComponentSizeType
|
|
25
|
-
export type CollapseStatus = boolean
|
|
26
|
-
export type Loading = boolean
|
|
27
|
-
export type Data = any
|
|
28
|
-
export type Span = string | number
|
|
29
|
-
export type Align = 'left' | 'center' | 'right' | '' | null
|
|
30
|
-
export type VerticalAlign = 'center' | '' | null
|
|
31
|
-
export type Border = boolean
|
|
32
|
-
export type TitleBackground = boolean
|
|
33
|
-
export type TitleBold = boolean
|
|
34
|
-
export type TitleAlign = Align
|
|
35
|
-
export type TitleWidth = string | number
|
|
36
|
-
export type TitleColon = boolean
|
|
37
|
-
export type TitleAsterisk = boolean
|
|
38
|
-
export type TitleOverflow = boolean | 'ellipsis' | 'title' | 'tooltip' | '' | null
|
|
39
|
-
export type Vertical = boolean
|
|
40
|
-
export type Padding = boolean
|
|
41
|
-
|
|
42
|
-
interface ClassNameParams {
|
|
43
|
-
$form: VxeFormConstructor
|
|
44
|
-
data: any
|
|
45
|
-
items: VxeFormDefines.ItemInfo[]
|
|
46
|
-
}
|
|
47
|
-
export type ClassName = string | ((params: ClassNameParams) => string)
|
|
48
|
-
|
|
49
|
-
export type Items = VxeFormItemProps[]
|
|
50
|
-
|
|
51
|
-
export type Readonly = boolean
|
|
52
|
-
export type Disabled = boolean
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* 校验规则配置项
|
|
56
|
-
*/
|
|
57
|
-
export interface Rules<D = any> {
|
|
58
|
-
[field: string]: VxeFormDefines.FormRule<D>[]
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export type PreventSubmit = boolean
|
|
62
|
-
export type ValidConfig = {
|
|
63
|
-
autoPos?: boolean
|
|
64
|
-
/**
|
|
65
|
-
* 当校验不通过时在对应项显示错误提示
|
|
66
|
-
*/
|
|
67
|
-
showErrorMessage?: boolean
|
|
68
|
-
/**
|
|
69
|
-
* 是否显示错误项背景色
|
|
70
|
-
*/
|
|
71
|
-
showErrorBackground?: boolean
|
|
72
|
-
/**
|
|
73
|
-
* 当校验不通过时在对应项显示错误图标
|
|
74
|
-
*/
|
|
75
|
-
showErrorIcon?: boolean
|
|
76
|
-
/**
|
|
77
|
-
* 自定义错误图标
|
|
78
|
-
*/
|
|
79
|
-
errorIcon?: boolean
|
|
80
|
-
/**
|
|
81
|
-
* 提示消息主题样式
|
|
82
|
-
*/
|
|
83
|
-
theme?: 'normal' | 'beautify' | ''
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* 已废弃,被 showErrorMessage 替换
|
|
87
|
-
* @deprecated
|
|
88
|
-
*/
|
|
89
|
-
showMessage?: boolean
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* 提示信息配置项
|
|
94
|
-
*/
|
|
95
|
-
export interface TooltipConfig {
|
|
96
|
-
theme?: 'dark' | 'light'
|
|
97
|
-
enterable?: boolean
|
|
98
|
-
leaveDelay?: number
|
|
99
|
-
leaveMethod?: (params: { $event: Event }) => boolean
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export interface CollapseConfig {
|
|
103
|
-
foldIcon?: string
|
|
104
|
-
unfoldIcon?: string
|
|
105
|
-
foldButtonText?: string
|
|
106
|
-
unfoldButtonText?: string
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export type CustomLayout = boolean
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* 额外的参数
|
|
113
|
-
*/
|
|
114
|
-
export type Params = any
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export interface VxeFormProps<D = any> {
|
|
118
|
-
size?: VxeFormPropTypes.Size
|
|
119
|
-
collapseStatus?: VxeFormPropTypes.CollapseStatus
|
|
120
|
-
loading?: VxeFormPropTypes.Loading
|
|
121
|
-
data?: D
|
|
122
|
-
span?: VxeFormPropTypes.Span
|
|
123
|
-
align?: VxeFormPropTypes.Align
|
|
124
|
-
verticalAlign?: VxeFormPropTypes.VerticalAlign
|
|
125
|
-
border?: VxeFormPropTypes.Border
|
|
126
|
-
titleBackground?: VxeFormPropTypes.TitleBackground
|
|
127
|
-
titleBold?: VxeFormPropTypes.TitleBold
|
|
128
|
-
titleAlign?: VxeFormPropTypes.TitleAlign
|
|
129
|
-
/**
|
|
130
|
-
* 所有标题默认宽度,支持 px,auto
|
|
131
|
-
*/
|
|
132
|
-
titleWidth?: VxeFormPropTypes.TitleWidth
|
|
133
|
-
titleColon?: VxeFormPropTypes.TitleColon
|
|
134
|
-
titleAsterisk?: VxeFormPropTypes.TitleAsterisk
|
|
135
|
-
titleOverflow?: VxeFormPropTypes.TitleOverflow
|
|
136
|
-
vertical?: VxeFormPropTypes.Vertical
|
|
137
|
-
padding?: VxeFormPropTypes.Padding
|
|
138
|
-
className?: VxeFormPropTypes.ClassName
|
|
139
|
-
readonly?: VxeFormPropTypes.Readonly
|
|
140
|
-
disabled?: VxeFormPropTypes.Disabled
|
|
141
|
-
items?: VxeFormPropTypes.Items
|
|
142
|
-
rules?: VxeFormPropTypes.Rules<D>
|
|
143
|
-
preventSubmit?: VxeFormPropTypes.PreventSubmit
|
|
144
|
-
validConfig?: VxeFormPropTypes.ValidConfig
|
|
145
|
-
tooltipConfig?: VxeFormPropTypes.TooltipConfig
|
|
146
|
-
collapseConfig?: VxeFormPropTypes.CollapseConfig
|
|
147
|
-
customLayout?: VxeFormPropTypes.CustomLayout
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* 额外的参数
|
|
151
|
-
*/
|
|
152
|
-
params?: VxeFormPropTypes.Params
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface FormPrivateComputed {
|
|
156
|
-
computeSize: VxeFormPropTypes.Size
|
|
157
|
-
computeValidOpts: VxeFormPropTypes.ValidConfig
|
|
158
|
-
computeTooltipOpts: VxeFormPropTypes.TooltipConfig
|
|
159
|
-
computeCollapseOpts: VxeFormPropTypes.CollapseConfig
|
|
160
|
-
computeAutoItemWidthList: VxeFormDefines.ItemInfo[]
|
|
161
|
-
}
|
|
162
|
-
export interface VxeFormPrivateComputed extends FormPrivateComputed { }
|
|
163
|
-
|
|
164
|
-
export interface FormReactData {
|
|
165
|
-
collapseAll: boolean
|
|
166
|
-
staticItems: any[]
|
|
167
|
-
formItems: VxeFormDefines.ItemInfo[]
|
|
168
|
-
itemWidth: number
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export interface FormInternalData {
|
|
172
|
-
meTimeout: undefined | number
|
|
173
|
-
stTimeout: undefined | number
|
|
174
|
-
tooltipStore: {
|
|
175
|
-
item: VxeFormDefines.ItemInfo | null
|
|
176
|
-
visible: boolean
|
|
177
|
-
}
|
|
178
|
-
itemFormatCache: Record<string, {
|
|
179
|
-
field: string
|
|
180
|
-
formatData?: {
|
|
181
|
-
value?: any
|
|
182
|
-
label?: any
|
|
183
|
-
}
|
|
184
|
-
}>
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export interface FormMethods<D = any> {
|
|
188
|
-
dispatchEvent(type: ValueOf<VxeFormEmits>, params: Record<string, any>, evnt: Event | null): void
|
|
189
|
-
/**
|
|
190
|
-
* 重置表单
|
|
191
|
-
*/
|
|
192
|
-
reset(): Promise<any>
|
|
193
|
-
/**
|
|
194
|
-
* 对表单进行校验,参数为一个回调函数。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
|
|
195
|
-
* @param callback 回调函数
|
|
196
|
-
*/
|
|
197
|
-
validate(callback?: (errMap?: VxeFormDefines.ValidateErrorMapParams) => void): Promise<VxeFormDefines.ValidateErrorMapParams | void>
|
|
198
|
-
/**
|
|
199
|
-
* 对表单指定项进行校验,参数为一个回调函数。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
|
|
200
|
-
* @param field 字段名
|
|
201
|
-
* @param callback 回调函数
|
|
202
|
-
*/
|
|
203
|
-
validateField(field: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[] | null, callback?: (errMap?: VxeFormDefines.ValidateErrorMapParams) => void): Promise<VxeFormDefines.ValidateErrorMapParams | void>
|
|
204
|
-
/**
|
|
205
|
-
* 手动清除校验状态,如果指定 field 则清除指定的项,否则清除整个表单
|
|
206
|
-
* @param field 字段名
|
|
207
|
-
*/
|
|
208
|
-
clearValidate(field?: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[] | null): Promise<any>
|
|
209
|
-
/**
|
|
210
|
-
* 更新项状态
|
|
211
|
-
* 当使用自定义渲染时可能会用到
|
|
212
|
-
* @param params 插槽对象
|
|
213
|
-
*/
|
|
214
|
-
updateStatus(
|
|
215
|
-
params: {
|
|
216
|
-
field: VxeFormItemPropTypes.Field
|
|
217
|
-
},
|
|
218
|
-
itemValue?: any
|
|
219
|
-
): void
|
|
220
|
-
/**
|
|
221
|
-
* 获取表单项列表
|
|
222
|
-
*/
|
|
223
|
-
getItems(): VxeFormDefines.ItemInfo[]
|
|
224
|
-
/**
|
|
225
|
-
* 根据列的字段名获取表单项
|
|
226
|
-
* @param field 字段名
|
|
227
|
-
*
|
|
228
|
-
*/
|
|
229
|
-
getItemByField(field: VxeFormItemPropTypes.Field): VxeFormDefines.ItemInfo | null
|
|
230
|
-
/**
|
|
231
|
-
* 关闭 tooltip 提示
|
|
232
|
-
*/
|
|
233
|
-
closeTooltip(): Promise<any>
|
|
234
|
-
/**
|
|
235
|
-
* 手动切换折叠状态
|
|
236
|
-
*/
|
|
237
|
-
toggleCollapse(): Promise<any>
|
|
238
|
-
/**
|
|
239
|
-
* 重新计算表单
|
|
240
|
-
*/
|
|
241
|
-
recalculate(): Promise<void>
|
|
242
|
-
}
|
|
243
|
-
export interface VxeFormMethods<D = any> extends FormMethods<D> { }
|
|
244
|
-
|
|
245
|
-
export interface FormPrivateMethods {
|
|
246
|
-
/**
|
|
247
|
-
* @private
|
|
248
|
-
*/
|
|
249
|
-
callSlot<T>(slotFunc: ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T, h: CreateElement): VxeComponentSlotType[]
|
|
250
|
-
/**
|
|
251
|
-
* @private
|
|
252
|
-
*/
|
|
253
|
-
triggerItemEvent(evnt: Event | { type: string }, field: string, itemValue?: any): Promise<any>
|
|
254
|
-
/**
|
|
255
|
-
* @private
|
|
256
|
-
*/
|
|
257
|
-
toggleCollapseEvent(evnt: Event): void
|
|
258
|
-
/**
|
|
259
|
-
* @private
|
|
260
|
-
*/
|
|
261
|
-
triggerTitleTipEvent(evnt: MouseEvent, params: {
|
|
262
|
-
item: VxeFormDefines.ItemInfo
|
|
263
|
-
}): void
|
|
264
|
-
/**
|
|
265
|
-
* @private
|
|
266
|
-
*/
|
|
267
|
-
handleSubmitEvent(evnt: Event): void
|
|
268
|
-
/**
|
|
269
|
-
* @private
|
|
270
|
-
*/
|
|
271
|
-
handleTitleTipLeaveEvent(): void
|
|
272
|
-
/**
|
|
273
|
-
* @private
|
|
274
|
-
*/
|
|
275
|
-
handleValidIconEvent(evnt: Event, params: {
|
|
276
|
-
item: VxeFormDefines.ItemInfo
|
|
277
|
-
}): void
|
|
278
|
-
}
|
|
279
|
-
export interface VxeFormPrivateMethods extends FormPrivateMethods { }
|
|
280
|
-
|
|
281
|
-
export type VxeFormEmits = [
|
|
282
|
-
'update:collapseStatus',
|
|
283
|
-
'collapse',
|
|
284
|
-
'toggle-collapse',
|
|
285
|
-
'submit',
|
|
286
|
-
'submit-invalid',
|
|
287
|
-
'reset'
|
|
288
|
-
]
|
|
289
|
-
|
|
290
|
-
export namespace VxeFormDefines {
|
|
291
|
-
export class ItemInfo {
|
|
292
|
-
id: string
|
|
293
|
-
|
|
294
|
-
title: VxeFormItemPropTypes.Title
|
|
295
|
-
field: VxeFormItemPropTypes.Field
|
|
296
|
-
span: VxeFormItemPropTypes.Span
|
|
297
|
-
align: VxeFormItemPropTypes.Align
|
|
298
|
-
verticalAlign: VxeFormItemPropTypes.VerticalAlign
|
|
299
|
-
titleBackground: VxeFormItemPropTypes.TitleBold
|
|
300
|
-
titleBold: VxeFormItemPropTypes.TitleBold
|
|
301
|
-
titleAlign: VxeFormItemPropTypes.TitleAlign
|
|
302
|
-
titleWidth: VxeFormItemPropTypes.TitleWidth
|
|
303
|
-
titleColon: VxeFormItemPropTypes.TitleColon
|
|
304
|
-
titleAsterisk: VxeFormItemPropTypes.TitleAsterisk
|
|
305
|
-
titlePrefix: VxeFormItemPropTypes.TitlePrefix
|
|
306
|
-
titleSuffix: VxeFormItemPropTypes.TitleSuffix
|
|
307
|
-
titleOverflow: VxeFormItemPropTypes.TitleOverflow
|
|
308
|
-
showTitle: VxeFormItemPropTypes.ShowTitle
|
|
309
|
-
vertical: VxeFormItemPropTypes.Vertical
|
|
310
|
-
padding: VxeFormItemPropTypes.Padding
|
|
311
|
-
resetValue: VxeFormItemPropTypes.ResetValue
|
|
312
|
-
visibleMethod: VxeFormItemPropTypes.VisibleMethod
|
|
313
|
-
visible: VxeFormItemPropTypes.Visible
|
|
314
|
-
showContent: VxeFormItemPropTypes.ShowContent
|
|
315
|
-
folding: VxeFormItemPropTypes.Folding
|
|
316
|
-
collapseNode: VxeFormItemPropTypes.CollapseNode
|
|
317
|
-
className: VxeFormItemPropTypes.ClassName
|
|
318
|
-
contentClassName: VxeFormItemPropTypes.ContentClassName
|
|
319
|
-
contentStyle: VxeFormItemPropTypes.ContentStyle
|
|
320
|
-
titleClassName: VxeFormItemPropTypes.TitleClassName
|
|
321
|
-
titleStyle: VxeFormItemPropTypes.TitleStyle
|
|
322
|
-
readonly: VxeFormItemPropTypes.Readonly
|
|
323
|
-
itemRender: VxeFormItemPropTypes.ItemRender
|
|
324
|
-
rules: VxeFormItemPropTypes.Rules
|
|
325
|
-
formatter: VxeFormItemPropTypes.Formatter
|
|
326
|
-
// 渲染属性
|
|
327
|
-
showError: boolean
|
|
328
|
-
showIconMsg: boolean
|
|
329
|
-
errRule: any
|
|
330
|
-
slots: VxeFormItemPropTypes.Slots
|
|
331
|
-
children: ItemInfo[]
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export interface FormRule<D = any> {
|
|
335
|
-
/**
|
|
336
|
-
* 是否必填
|
|
337
|
-
*/
|
|
338
|
-
required?: boolean
|
|
339
|
-
/**
|
|
340
|
-
* 最小长度/值
|
|
341
|
-
*/
|
|
342
|
-
min?: number
|
|
343
|
-
/**
|
|
344
|
-
* 最大长度/值
|
|
345
|
-
*/
|
|
346
|
-
max?: number
|
|
347
|
-
/**
|
|
348
|
-
* 指定字段
|
|
349
|
-
*/
|
|
350
|
-
field?: string
|
|
351
|
-
/**
|
|
352
|
-
* 数据类型
|
|
353
|
-
*/
|
|
354
|
-
type?: 'number' | 'string' | 'array' | '' | null
|
|
355
|
-
/**
|
|
356
|
-
* 使用正则表达式校验
|
|
357
|
-
*/
|
|
358
|
-
pattern?: string | RegExp
|
|
359
|
-
/**
|
|
360
|
-
* 使用自定义校验函数,接收一个 Promise
|
|
361
|
-
* @param params 参数
|
|
362
|
-
*/
|
|
363
|
-
validator?: string | ((params: RuleValidatorParams<D>) => void | Error | Promise<void>)
|
|
364
|
-
/**
|
|
365
|
-
* 提示消息
|
|
366
|
-
*/
|
|
367
|
-
content?: string
|
|
368
|
-
trigger?: 'change' | '' | null
|
|
369
|
-
maxWidth?: number
|
|
370
|
-
/**
|
|
371
|
-
* @deprecated 已废弃,请使用 content
|
|
372
|
-
*/
|
|
373
|
-
message?: string
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
export interface RuleValidatorParams<D = any> {
|
|
377
|
-
$form: VxeFormConstructor
|
|
378
|
-
itemValue: any
|
|
379
|
-
rule: VxeFormDefines.FormRule<D>
|
|
380
|
-
rules: VxeFormDefines.FormRule<D>[]
|
|
381
|
-
data: D
|
|
382
|
-
field: string
|
|
383
|
-
}
|
|
384
|
-
export interface ValidateErrorParams<D = any> {
|
|
385
|
-
$form: VxeFormConstructor,
|
|
386
|
-
rule: VxeFormDefines.FormRule<D>
|
|
387
|
-
data: any
|
|
388
|
-
field: string
|
|
389
|
-
/**
|
|
390
|
-
* @deprecated
|
|
391
|
-
*/
|
|
392
|
-
property: string
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
export interface ProvideItemInfo {
|
|
396
|
-
itemConfig: ItemInfo
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
export interface ValidateErrorMapParams {
|
|
400
|
-
[field: string]: ValidateErrorParams[]
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
interface FormEventParams<D = any> extends VxeComponentEventParams {
|
|
404
|
-
$form: VxeFormConstructor<D>
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
interface FormBaseParams<D = any> {
|
|
408
|
-
data: D
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export interface CollapseParams<D = any> extends FormBaseParams<D> { }
|
|
412
|
-
export interface CollapseEventParams<D = any> extends FormEventParams<D>, CollapseParams<D> { }
|
|
413
|
-
|
|
414
|
-
export interface SubmitParams<D = any> extends FormBaseParams<D> { }
|
|
415
|
-
export interface SubmitEventParams<D = any> extends FormEventParams<D>, SubmitParams<D> { }
|
|
416
|
-
|
|
417
|
-
export interface SubmitInvalidParams<D = any> extends FormBaseParams<D> { }
|
|
418
|
-
export interface SubmitInvalidEventParams<D = any> extends FormEventParams<D>, SubmitInvalidParams<D> { }
|
|
419
|
-
|
|
420
|
-
export interface ResetParams<D = any> extends FormBaseParams<D> { }
|
|
421
|
-
export interface ResetEventParams<D = any> extends FormEventParams<D>, ResetParams<D> { }
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
export type VxeFormEventProps = {
|
|
425
|
-
onCollapse?: VxeFormEvents.Collapse
|
|
426
|
-
onSubmit?: VxeFormEvents.Submit
|
|
427
|
-
onSubmitInvalid?: VxeFormEvents.SubmitInvalid
|
|
428
|
-
onReset?: VxeFormEvents.Reset
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
export interface VxeFormListeners<D = any> {
|
|
432
|
-
collapse?: VxeFormEvents.Collapse<D>
|
|
433
|
-
submit?: VxeFormEvents.Submit<D>
|
|
434
|
-
submitInvalid?: VxeFormEvents.SubmitInvalid<D>
|
|
435
|
-
reset?: VxeFormEvents.Reset<D>
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
export namespace VxeFormEvents {
|
|
439
|
-
export type Collapse<D = any> = (params: VxeFormDefines.CollapseEventParams<D>) => void
|
|
440
|
-
export type Submit<D = any> = (params: VxeFormDefines.SubmitEventParams<D>) => void
|
|
441
|
-
export type SubmitInvalid<D = any> = (params: VxeFormDefines.SubmitInvalidEventParams<D>) => void
|
|
442
|
-
export type Reset<D = any> = (params: VxeFormDefines.ResetEventParams<D>) => void
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
export namespace VxeFormSlotTypes {
|
|
446
|
-
export interface DefaultSlotParams {}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
export interface VxeFormSlots {
|
|
450
|
-
/**
|
|
451
|
-
* 自定义插槽模板
|
|
452
|
-
*/
|
|
453
|
-
[key: string]: ((params: {
|
|
454
|
-
$form: VxeFormConstructor
|
|
455
|
-
|
|
456
|
-
[key: string]: any
|
|
457
|
-
}) => any) | undefined
|
|
458
|
-
|
|
459
|
-
default: (params: VxeFormSlotTypes.DefaultSlotParams) => any
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
export const Form: typeof VxeForm
|
|
463
|
-
export default VxeForm
|
|
1
|
+
import { CreateElement } from 'vue'
|
|
2
|
+
import { DefineVxeComponentApp, DefineVxeComponentOptions, DefineVxeComponentInstance, VxeComponentEventParams, VxeComponentSizeType, ValueOf, VxeComponentSlotType } from '@vxe-ui/core'
|
|
3
|
+
import { VxeFormItemPropTypes, VxeFormItemProps } from './form-item'
|
|
4
|
+
import { VxeGridConstructor } from './grid'
|
|
5
|
+
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/ban-types,@typescript-eslint/no-unused-vars */
|
|
7
|
+
|
|
8
|
+
export declare const VxeForm: DefineVxeComponentApp<VxeFormProps, VxeFormEventProps, VxeFormSlots, VxeFormMethods>
|
|
9
|
+
export type VxeFormComponent = DefineVxeComponentOptions<VxeFormProps>
|
|
10
|
+
|
|
11
|
+
export type VxeFormInstance<D = any> = DefineVxeComponentInstance<{
|
|
12
|
+
reactData: FormReactData
|
|
13
|
+
internalData: FormInternalData
|
|
14
|
+
$xeGrid: VxeGridConstructor | null
|
|
15
|
+
}, VxeFormProps<D>, VxeFormPrivateComputed, VxeFormMethods<D>>
|
|
16
|
+
|
|
17
|
+
export type VxeFormConstructor<D = any> = VxeFormInstance<D>
|
|
18
|
+
|
|
19
|
+
export interface FormPrivateRef {
|
|
20
|
+
}
|
|
21
|
+
export interface VxeFormPrivateRef extends FormPrivateRef { }
|
|
22
|
+
|
|
23
|
+
export namespace VxeFormPropTypes {
|
|
24
|
+
export type Size = VxeComponentSizeType
|
|
25
|
+
export type CollapseStatus = boolean
|
|
26
|
+
export type Loading = boolean
|
|
27
|
+
export type Data = any
|
|
28
|
+
export type Span = string | number
|
|
29
|
+
export type Align = 'left' | 'center' | 'right' | '' | null
|
|
30
|
+
export type VerticalAlign = 'center' | '' | null
|
|
31
|
+
export type Border = boolean
|
|
32
|
+
export type TitleBackground = boolean
|
|
33
|
+
export type TitleBold = boolean
|
|
34
|
+
export type TitleAlign = Align
|
|
35
|
+
export type TitleWidth = string | number
|
|
36
|
+
export type TitleColon = boolean
|
|
37
|
+
export type TitleAsterisk = boolean
|
|
38
|
+
export type TitleOverflow = boolean | 'ellipsis' | 'title' | 'tooltip' | '' | null
|
|
39
|
+
export type Vertical = boolean
|
|
40
|
+
export type Padding = boolean
|
|
41
|
+
|
|
42
|
+
interface ClassNameParams {
|
|
43
|
+
$form: VxeFormConstructor
|
|
44
|
+
data: any
|
|
45
|
+
items: VxeFormDefines.ItemInfo[]
|
|
46
|
+
}
|
|
47
|
+
export type ClassName = string | ((params: ClassNameParams) => string)
|
|
48
|
+
|
|
49
|
+
export type Items = VxeFormItemProps[]
|
|
50
|
+
|
|
51
|
+
export type Readonly = boolean
|
|
52
|
+
export type Disabled = boolean
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 校验规则配置项
|
|
56
|
+
*/
|
|
57
|
+
export interface Rules<D = any> {
|
|
58
|
+
[field: string]: VxeFormDefines.FormRule<D>[]
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type PreventSubmit = boolean
|
|
62
|
+
export type ValidConfig = {
|
|
63
|
+
autoPos?: boolean
|
|
64
|
+
/**
|
|
65
|
+
* 当校验不通过时在对应项显示错误提示
|
|
66
|
+
*/
|
|
67
|
+
showErrorMessage?: boolean
|
|
68
|
+
/**
|
|
69
|
+
* 是否显示错误项背景色
|
|
70
|
+
*/
|
|
71
|
+
showErrorBackground?: boolean
|
|
72
|
+
/**
|
|
73
|
+
* 当校验不通过时在对应项显示错误图标
|
|
74
|
+
*/
|
|
75
|
+
showErrorIcon?: boolean
|
|
76
|
+
/**
|
|
77
|
+
* 自定义错误图标
|
|
78
|
+
*/
|
|
79
|
+
errorIcon?: boolean
|
|
80
|
+
/**
|
|
81
|
+
* 提示消息主题样式
|
|
82
|
+
*/
|
|
83
|
+
theme?: 'normal' | 'beautify' | ''
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 已废弃,被 showErrorMessage 替换
|
|
87
|
+
* @deprecated
|
|
88
|
+
*/
|
|
89
|
+
showMessage?: boolean
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 提示信息配置项
|
|
94
|
+
*/
|
|
95
|
+
export interface TooltipConfig {
|
|
96
|
+
theme?: 'dark' | 'light'
|
|
97
|
+
enterable?: boolean
|
|
98
|
+
leaveDelay?: number
|
|
99
|
+
leaveMethod?: (params: { $event: Event }) => boolean
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface CollapseConfig {
|
|
103
|
+
foldIcon?: string
|
|
104
|
+
unfoldIcon?: string
|
|
105
|
+
foldButtonText?: string
|
|
106
|
+
unfoldButtonText?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type CustomLayout = boolean
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 额外的参数
|
|
113
|
+
*/
|
|
114
|
+
export type Params = any
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface VxeFormProps<D = any> {
|
|
118
|
+
size?: VxeFormPropTypes.Size
|
|
119
|
+
collapseStatus?: VxeFormPropTypes.CollapseStatus
|
|
120
|
+
loading?: VxeFormPropTypes.Loading
|
|
121
|
+
data?: D
|
|
122
|
+
span?: VxeFormPropTypes.Span
|
|
123
|
+
align?: VxeFormPropTypes.Align
|
|
124
|
+
verticalAlign?: VxeFormPropTypes.VerticalAlign
|
|
125
|
+
border?: VxeFormPropTypes.Border
|
|
126
|
+
titleBackground?: VxeFormPropTypes.TitleBackground
|
|
127
|
+
titleBold?: VxeFormPropTypes.TitleBold
|
|
128
|
+
titleAlign?: VxeFormPropTypes.TitleAlign
|
|
129
|
+
/**
|
|
130
|
+
* 所有标题默认宽度,支持 px,auto
|
|
131
|
+
*/
|
|
132
|
+
titleWidth?: VxeFormPropTypes.TitleWidth
|
|
133
|
+
titleColon?: VxeFormPropTypes.TitleColon
|
|
134
|
+
titleAsterisk?: VxeFormPropTypes.TitleAsterisk
|
|
135
|
+
titleOverflow?: VxeFormPropTypes.TitleOverflow
|
|
136
|
+
vertical?: VxeFormPropTypes.Vertical
|
|
137
|
+
padding?: VxeFormPropTypes.Padding
|
|
138
|
+
className?: VxeFormPropTypes.ClassName
|
|
139
|
+
readonly?: VxeFormPropTypes.Readonly
|
|
140
|
+
disabled?: VxeFormPropTypes.Disabled
|
|
141
|
+
items?: VxeFormPropTypes.Items
|
|
142
|
+
rules?: VxeFormPropTypes.Rules<D>
|
|
143
|
+
preventSubmit?: VxeFormPropTypes.PreventSubmit
|
|
144
|
+
validConfig?: VxeFormPropTypes.ValidConfig
|
|
145
|
+
tooltipConfig?: VxeFormPropTypes.TooltipConfig
|
|
146
|
+
collapseConfig?: VxeFormPropTypes.CollapseConfig
|
|
147
|
+
customLayout?: VxeFormPropTypes.CustomLayout
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 额外的参数
|
|
151
|
+
*/
|
|
152
|
+
params?: VxeFormPropTypes.Params
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface FormPrivateComputed {
|
|
156
|
+
computeSize: VxeFormPropTypes.Size
|
|
157
|
+
computeValidOpts: VxeFormPropTypes.ValidConfig
|
|
158
|
+
computeTooltipOpts: VxeFormPropTypes.TooltipConfig
|
|
159
|
+
computeCollapseOpts: VxeFormPropTypes.CollapseConfig
|
|
160
|
+
computeAutoItemWidthList: VxeFormDefines.ItemInfo[]
|
|
161
|
+
}
|
|
162
|
+
export interface VxeFormPrivateComputed extends FormPrivateComputed { }
|
|
163
|
+
|
|
164
|
+
export interface FormReactData {
|
|
165
|
+
collapseAll: boolean
|
|
166
|
+
staticItems: any[]
|
|
167
|
+
formItems: VxeFormDefines.ItemInfo[]
|
|
168
|
+
itemWidth: number
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface FormInternalData {
|
|
172
|
+
meTimeout: undefined | number
|
|
173
|
+
stTimeout: undefined | number
|
|
174
|
+
tooltipStore: {
|
|
175
|
+
item: VxeFormDefines.ItemInfo | null
|
|
176
|
+
visible: boolean
|
|
177
|
+
}
|
|
178
|
+
itemFormatCache: Record<string, {
|
|
179
|
+
field: string
|
|
180
|
+
formatData?: {
|
|
181
|
+
value?: any
|
|
182
|
+
label?: any
|
|
183
|
+
}
|
|
184
|
+
}>
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface FormMethods<D = any> {
|
|
188
|
+
dispatchEvent(type: ValueOf<VxeFormEmits>, params: Record<string, any>, evnt: Event | null): void
|
|
189
|
+
/**
|
|
190
|
+
* 重置表单
|
|
191
|
+
*/
|
|
192
|
+
reset(): Promise<any>
|
|
193
|
+
/**
|
|
194
|
+
* 对表单进行校验,参数为一个回调函数。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
|
|
195
|
+
* @param callback 回调函数
|
|
196
|
+
*/
|
|
197
|
+
validate(callback?: (errMap?: VxeFormDefines.ValidateErrorMapParams) => void): Promise<VxeFormDefines.ValidateErrorMapParams | void>
|
|
198
|
+
/**
|
|
199
|
+
* 对表单指定项进行校验,参数为一个回调函数。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
|
|
200
|
+
* @param field 字段名
|
|
201
|
+
* @param callback 回调函数
|
|
202
|
+
*/
|
|
203
|
+
validateField(field: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[] | null, callback?: (errMap?: VxeFormDefines.ValidateErrorMapParams) => void): Promise<VxeFormDefines.ValidateErrorMapParams | void>
|
|
204
|
+
/**
|
|
205
|
+
* 手动清除校验状态,如果指定 field 则清除指定的项,否则清除整个表单
|
|
206
|
+
* @param field 字段名
|
|
207
|
+
*/
|
|
208
|
+
clearValidate(field?: VxeFormItemPropTypes.Field | VxeFormItemPropTypes.Field[] | VxeFormDefines.ItemInfo | VxeFormDefines.ItemInfo[] | null): Promise<any>
|
|
209
|
+
/**
|
|
210
|
+
* 更新项状态
|
|
211
|
+
* 当使用自定义渲染时可能会用到
|
|
212
|
+
* @param params 插槽对象
|
|
213
|
+
*/
|
|
214
|
+
updateStatus(
|
|
215
|
+
params: {
|
|
216
|
+
field: VxeFormItemPropTypes.Field
|
|
217
|
+
},
|
|
218
|
+
itemValue?: any
|
|
219
|
+
): void
|
|
220
|
+
/**
|
|
221
|
+
* 获取表单项列表
|
|
222
|
+
*/
|
|
223
|
+
getItems(): VxeFormDefines.ItemInfo[]
|
|
224
|
+
/**
|
|
225
|
+
* 根据列的字段名获取表单项
|
|
226
|
+
* @param field 字段名
|
|
227
|
+
*
|
|
228
|
+
*/
|
|
229
|
+
getItemByField(field: VxeFormItemPropTypes.Field): VxeFormDefines.ItemInfo | null
|
|
230
|
+
/**
|
|
231
|
+
* 关闭 tooltip 提示
|
|
232
|
+
*/
|
|
233
|
+
closeTooltip(): Promise<any>
|
|
234
|
+
/**
|
|
235
|
+
* 手动切换折叠状态
|
|
236
|
+
*/
|
|
237
|
+
toggleCollapse(): Promise<any>
|
|
238
|
+
/**
|
|
239
|
+
* 重新计算表单
|
|
240
|
+
*/
|
|
241
|
+
recalculate(): Promise<void>
|
|
242
|
+
}
|
|
243
|
+
export interface VxeFormMethods<D = any> extends FormMethods<D> { }
|
|
244
|
+
|
|
245
|
+
export interface FormPrivateMethods {
|
|
246
|
+
/**
|
|
247
|
+
* @private
|
|
248
|
+
*/
|
|
249
|
+
callSlot<T>(slotFunc: ((params: T) => VxeComponentSlotType | VxeComponentSlotType[]) | string | null, params: T, h: CreateElement): VxeComponentSlotType[]
|
|
250
|
+
/**
|
|
251
|
+
* @private
|
|
252
|
+
*/
|
|
253
|
+
triggerItemEvent(evnt: Event | { type: string }, field: string, itemValue?: any): Promise<any>
|
|
254
|
+
/**
|
|
255
|
+
* @private
|
|
256
|
+
*/
|
|
257
|
+
toggleCollapseEvent(evnt: Event): void
|
|
258
|
+
/**
|
|
259
|
+
* @private
|
|
260
|
+
*/
|
|
261
|
+
triggerTitleTipEvent(evnt: MouseEvent, params: {
|
|
262
|
+
item: VxeFormDefines.ItemInfo
|
|
263
|
+
}): void
|
|
264
|
+
/**
|
|
265
|
+
* @private
|
|
266
|
+
*/
|
|
267
|
+
handleSubmitEvent(evnt: Event): void
|
|
268
|
+
/**
|
|
269
|
+
* @private
|
|
270
|
+
*/
|
|
271
|
+
handleTitleTipLeaveEvent(): void
|
|
272
|
+
/**
|
|
273
|
+
* @private
|
|
274
|
+
*/
|
|
275
|
+
handleValidIconEvent(evnt: Event, params: {
|
|
276
|
+
item: VxeFormDefines.ItemInfo
|
|
277
|
+
}): void
|
|
278
|
+
}
|
|
279
|
+
export interface VxeFormPrivateMethods extends FormPrivateMethods { }
|
|
280
|
+
|
|
281
|
+
export type VxeFormEmits = [
|
|
282
|
+
'update:collapseStatus',
|
|
283
|
+
'collapse',
|
|
284
|
+
'toggle-collapse',
|
|
285
|
+
'submit',
|
|
286
|
+
'submit-invalid',
|
|
287
|
+
'reset'
|
|
288
|
+
]
|
|
289
|
+
|
|
290
|
+
export namespace VxeFormDefines {
|
|
291
|
+
export class ItemInfo {
|
|
292
|
+
id: string
|
|
293
|
+
|
|
294
|
+
title: VxeFormItemPropTypes.Title
|
|
295
|
+
field: VxeFormItemPropTypes.Field
|
|
296
|
+
span: VxeFormItemPropTypes.Span
|
|
297
|
+
align: VxeFormItemPropTypes.Align
|
|
298
|
+
verticalAlign: VxeFormItemPropTypes.VerticalAlign
|
|
299
|
+
titleBackground: VxeFormItemPropTypes.TitleBold
|
|
300
|
+
titleBold: VxeFormItemPropTypes.TitleBold
|
|
301
|
+
titleAlign: VxeFormItemPropTypes.TitleAlign
|
|
302
|
+
titleWidth: VxeFormItemPropTypes.TitleWidth
|
|
303
|
+
titleColon: VxeFormItemPropTypes.TitleColon
|
|
304
|
+
titleAsterisk: VxeFormItemPropTypes.TitleAsterisk
|
|
305
|
+
titlePrefix: VxeFormItemPropTypes.TitlePrefix
|
|
306
|
+
titleSuffix: VxeFormItemPropTypes.TitleSuffix
|
|
307
|
+
titleOverflow: VxeFormItemPropTypes.TitleOverflow
|
|
308
|
+
showTitle: VxeFormItemPropTypes.ShowTitle
|
|
309
|
+
vertical: VxeFormItemPropTypes.Vertical
|
|
310
|
+
padding: VxeFormItemPropTypes.Padding
|
|
311
|
+
resetValue: VxeFormItemPropTypes.ResetValue
|
|
312
|
+
visibleMethod: VxeFormItemPropTypes.VisibleMethod
|
|
313
|
+
visible: VxeFormItemPropTypes.Visible
|
|
314
|
+
showContent: VxeFormItemPropTypes.ShowContent
|
|
315
|
+
folding: VxeFormItemPropTypes.Folding
|
|
316
|
+
collapseNode: VxeFormItemPropTypes.CollapseNode
|
|
317
|
+
className: VxeFormItemPropTypes.ClassName
|
|
318
|
+
contentClassName: VxeFormItemPropTypes.ContentClassName
|
|
319
|
+
contentStyle: VxeFormItemPropTypes.ContentStyle
|
|
320
|
+
titleClassName: VxeFormItemPropTypes.TitleClassName
|
|
321
|
+
titleStyle: VxeFormItemPropTypes.TitleStyle
|
|
322
|
+
readonly: VxeFormItemPropTypes.Readonly
|
|
323
|
+
itemRender: VxeFormItemPropTypes.ItemRender
|
|
324
|
+
rules: VxeFormItemPropTypes.Rules
|
|
325
|
+
formatter: VxeFormItemPropTypes.Formatter
|
|
326
|
+
// 渲染属性
|
|
327
|
+
showError: boolean
|
|
328
|
+
showIconMsg: boolean
|
|
329
|
+
errRule: any
|
|
330
|
+
slots: VxeFormItemPropTypes.Slots
|
|
331
|
+
children: ItemInfo[]
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export interface FormRule<D = any> {
|
|
335
|
+
/**
|
|
336
|
+
* 是否必填
|
|
337
|
+
*/
|
|
338
|
+
required?: boolean
|
|
339
|
+
/**
|
|
340
|
+
* 最小长度/值
|
|
341
|
+
*/
|
|
342
|
+
min?: number
|
|
343
|
+
/**
|
|
344
|
+
* 最大长度/值
|
|
345
|
+
*/
|
|
346
|
+
max?: number
|
|
347
|
+
/**
|
|
348
|
+
* 指定字段
|
|
349
|
+
*/
|
|
350
|
+
field?: string
|
|
351
|
+
/**
|
|
352
|
+
* 数据类型
|
|
353
|
+
*/
|
|
354
|
+
type?: 'number' | 'string' | 'array' | '' | null
|
|
355
|
+
/**
|
|
356
|
+
* 使用正则表达式校验
|
|
357
|
+
*/
|
|
358
|
+
pattern?: string | RegExp
|
|
359
|
+
/**
|
|
360
|
+
* 使用自定义校验函数,接收一个 Promise
|
|
361
|
+
* @param params 参数
|
|
362
|
+
*/
|
|
363
|
+
validator?: string | ((params: RuleValidatorParams<D>) => void | Error | Promise<void>)
|
|
364
|
+
/**
|
|
365
|
+
* 提示消息
|
|
366
|
+
*/
|
|
367
|
+
content?: string
|
|
368
|
+
trigger?: 'change' | '' | null
|
|
369
|
+
maxWidth?: number
|
|
370
|
+
/**
|
|
371
|
+
* @deprecated 已废弃,请使用 content
|
|
372
|
+
*/
|
|
373
|
+
message?: string
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export interface RuleValidatorParams<D = any> {
|
|
377
|
+
$form: VxeFormConstructor
|
|
378
|
+
itemValue: any
|
|
379
|
+
rule: VxeFormDefines.FormRule<D>
|
|
380
|
+
rules: VxeFormDefines.FormRule<D>[]
|
|
381
|
+
data: D
|
|
382
|
+
field: string
|
|
383
|
+
}
|
|
384
|
+
export interface ValidateErrorParams<D = any> {
|
|
385
|
+
$form: VxeFormConstructor,
|
|
386
|
+
rule: VxeFormDefines.FormRule<D>
|
|
387
|
+
data: any
|
|
388
|
+
field: string
|
|
389
|
+
/**
|
|
390
|
+
* @deprecated
|
|
391
|
+
*/
|
|
392
|
+
property: string
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export interface ProvideItemInfo {
|
|
396
|
+
itemConfig: ItemInfo
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export interface ValidateErrorMapParams {
|
|
400
|
+
[field: string]: ValidateErrorParams[]
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
interface FormEventParams<D = any> extends VxeComponentEventParams {
|
|
404
|
+
$form: VxeFormConstructor<D>
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
interface FormBaseParams<D = any> {
|
|
408
|
+
data: D
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export interface CollapseParams<D = any> extends FormBaseParams<D> { }
|
|
412
|
+
export interface CollapseEventParams<D = any> extends FormEventParams<D>, CollapseParams<D> { }
|
|
413
|
+
|
|
414
|
+
export interface SubmitParams<D = any> extends FormBaseParams<D> { }
|
|
415
|
+
export interface SubmitEventParams<D = any> extends FormEventParams<D>, SubmitParams<D> { }
|
|
416
|
+
|
|
417
|
+
export interface SubmitInvalidParams<D = any> extends FormBaseParams<D> { }
|
|
418
|
+
export interface SubmitInvalidEventParams<D = any> extends FormEventParams<D>, SubmitInvalidParams<D> { }
|
|
419
|
+
|
|
420
|
+
export interface ResetParams<D = any> extends FormBaseParams<D> { }
|
|
421
|
+
export interface ResetEventParams<D = any> extends FormEventParams<D>, ResetParams<D> { }
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export type VxeFormEventProps = {
|
|
425
|
+
onCollapse?: VxeFormEvents.Collapse
|
|
426
|
+
onSubmit?: VxeFormEvents.Submit
|
|
427
|
+
onSubmitInvalid?: VxeFormEvents.SubmitInvalid
|
|
428
|
+
onReset?: VxeFormEvents.Reset
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export interface VxeFormListeners<D = any> {
|
|
432
|
+
collapse?: VxeFormEvents.Collapse<D>
|
|
433
|
+
submit?: VxeFormEvents.Submit<D>
|
|
434
|
+
submitInvalid?: VxeFormEvents.SubmitInvalid<D>
|
|
435
|
+
reset?: VxeFormEvents.Reset<D>
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export namespace VxeFormEvents {
|
|
439
|
+
export type Collapse<D = any> = (params: VxeFormDefines.CollapseEventParams<D>) => void
|
|
440
|
+
export type Submit<D = any> = (params: VxeFormDefines.SubmitEventParams<D>) => void
|
|
441
|
+
export type SubmitInvalid<D = any> = (params: VxeFormDefines.SubmitInvalidEventParams<D>) => void
|
|
442
|
+
export type Reset<D = any> = (params: VxeFormDefines.ResetEventParams<D>) => void
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export namespace VxeFormSlotTypes {
|
|
446
|
+
export interface DefaultSlotParams {}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export interface VxeFormSlots {
|
|
450
|
+
/**
|
|
451
|
+
* 自定义插槽模板
|
|
452
|
+
*/
|
|
453
|
+
[key: string]: ((params: {
|
|
454
|
+
$form: VxeFormConstructor
|
|
455
|
+
|
|
456
|
+
[key: string]: any
|
|
457
|
+
}) => any) | undefined
|
|
458
|
+
|
|
459
|
+
default: (params: VxeFormSlotTypes.DefaultSlotParams) => any
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export const Form: typeof VxeForm
|
|
463
|
+
export default VxeForm
|