vxe-table 4.3.5 → 4.3.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/es/button/style.css +465 -341
- package/es/checkbox/style.css +156 -127
- package/es/checkbox-group/style.css +1 -1
- package/es/colgroup/style.css +1 -1
- package/es/column/style.css +1 -1
- package/es/edit/style.css +1 -1
- package/es/export/src/hook.js +1 -0
- package/es/export/style.css +136 -108
- package/es/filter/src/hook.js +1 -1
- package/es/filter/style.css +103 -82
- package/es/form/src/form.js +5 -4
- package/es/form/style.css +201 -168
- package/es/form-gather/style.css +1 -1
- package/es/form-item/style.css +1 -1
- package/es/grid/style.css +61 -50
- package/es/icon/style/iconfont.1669214286403.ttf +0 -0
- package/es/icon/style/iconfont.1669214286403.woff +0 -0
- package/es/icon/style/iconfont.1669214286403.woff2 +0 -0
- package/es/icon/style.css +372 -195
- package/es/iconfont.1669214286403.ttf +0 -0
- package/es/iconfont.1669214286403.woff +0 -0
- package/es/iconfont.1669214286403.woff2 +0 -0
- package/es/input/style.css +771 -595
- package/es/keyboard/style.css +1 -1
- package/es/list/src/list.js +7 -1
- package/es/list/style.css +19 -14
- package/es/loading/style.css +52 -48
- package/es/menu/style.css +79 -59
- package/es/modal/style.css +311 -247
- package/es/optgroup/style.css +1 -1
- package/es/option/style.css +1 -1
- package/es/pager/style.css +307 -257
- package/es/pulldown/src/pulldown.js +9 -3
- package/es/pulldown/style.css +42 -31
- package/es/radio/style.css +184 -151
- package/es/radio-button/style.css +1 -1
- package/es/radio-group/style.css +1 -1
- package/es/select/style.css +108 -79
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/style.css +87 -67
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/table.js +16 -16
- package/es/table/style.css +1025 -835
- package/es/textarea/style.css +57 -41
- package/es/toolbar/style.css +216 -174
- package/es/tools/log.js +1 -1
- package/es/tooltip/style.css +87 -63
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/style.css +424 -243
- package/es/validator/style.css +1 -1
- package/es/vxe-button/style.css +465 -341
- package/es/vxe-checkbox/style.css +156 -127
- package/es/vxe-checkbox-group/style.css +1 -1
- package/es/vxe-colgroup/style.css +1 -1
- package/es/vxe-column/style.css +1 -1
- package/es/vxe-form/style.css +201 -168
- package/es/vxe-form-gather/style.css +1 -1
- package/es/vxe-form-item/style.css +1 -1
- package/es/vxe-grid/style.css +61 -50
- package/es/vxe-icon/style.css +372 -195
- package/es/vxe-input/style.css +771 -595
- package/es/vxe-list/style.css +19 -14
- package/es/vxe-loading/style.css +52 -48
- package/es/vxe-modal/style.css +311 -247
- package/es/vxe-module-edit/style.css +1 -1
- package/es/vxe-module-export/style.css +136 -108
- package/es/vxe-module-filter/style.css +103 -82
- package/es/vxe-module-keyboard/style.css +1 -1
- package/es/vxe-module-menu/style.css +79 -59
- package/es/vxe-module-validator/style.css +1 -1
- package/es/vxe-optgroup/style.css +1 -1
- package/es/vxe-option/style.css +1 -1
- package/es/vxe-pager/style.css +307 -257
- package/es/vxe-pulldown/style.css +42 -31
- package/es/vxe-radio/style.css +184 -151
- package/es/vxe-radio-button/style.css +1 -1
- package/es/vxe-radio-group/style.css +1 -1
- package/es/vxe-select/style.css +108 -79
- package/es/vxe-switch/style.css +87 -67
- package/es/vxe-table/style.css +1025 -835
- package/es/vxe-textarea/style.css +57 -41
- package/es/vxe-toolbar/style.css +216 -174
- package/es/vxe-tooltip/style.css +87 -63
- package/lib/all.js +45 -115
- package/lib/all.min.js +1 -1
- package/lib/button/index.js +1 -7
- package/lib/button/index.min.js +1 -1
- package/lib/button/src/button.js +48 -113
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +465 -341
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/index.js +1 -7
- package/lib/checkbox/index.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +12 -32
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +13 -28
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/checkbox/style/style.css +156 -127
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/checkbox-group/index.js +1 -7
- package/lib/checkbox-group/index.min.js +1 -1
- package/lib/checkbox-group/style/style.css +1 -1
- package/lib/colgroup/index.js +5 -12
- package/lib/colgroup/index.min.js +1 -1
- package/lib/colgroup/style/style.css +1 -1
- package/lib/column/index.js +5 -12
- package/lib/column/index.min.js +1 -1
- package/lib/column/style/style.css +1 -1
- package/lib/dynamics/index.js +1 -5
- package/lib/dynamics/index.min.js +1 -1
- package/lib/edit/index.js +1 -5
- package/lib/edit/index.min.js +1 -1
- package/lib/edit/src/hook.js +102 -248
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/edit/style/style.css +1 -1
- package/lib/export/index.js +4 -19
- package/lib/export/index.min.js +1 -1
- package/lib/export/src/export-panel.js +38 -77
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/hook.js +127 -380
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/import-panel.js +17 -39
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/util.js +10 -52
- package/lib/export/src/util.min.js +1 -1
- package/lib/export/style/style.css +136 -108
- package/lib/export/style/style.min.css +1 -1
- package/lib/filter/index.js +1 -10
- package/lib/filter/index.min.js +1 -1
- package/lib/filter/src/hook.js +31 -82
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/filter/src/panel.js +25 -52
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/filter/style/style.css +103 -82
- package/lib/filter/style/style.min.css +1 -1
- package/lib/footer/index.js +1 -7
- package/lib/footer/index.min.js +1 -1
- package/lib/footer/src/footer.js +51 -96
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/index.js +1 -7
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-config-item.js +27 -56
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-gather.js +3 -12
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +23 -52
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +78 -185
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +1 -9
- package/lib/form/src/render.js +7 -26
- package/lib/form/src/render.min.js +1 -1
- package/lib/form/src/util.js +4 -28
- package/lib/form/src/util.min.js +1 -1
- package/lib/form/style/style.css +201 -168
- package/lib/form/style/style.min.css +1 -1
- package/lib/form-gather/index.js +1 -7
- package/lib/form-gather/index.min.js +1 -1
- package/lib/form-gather/style/style.css +1 -1
- package/lib/form-item/index.js +1 -7
- package/lib/form-item/index.min.js +1 -1
- package/lib/form-item/style/style.css +1 -1
- package/lib/grid/index.js +1 -7
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +97 -315
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +61 -50
- package/lib/grid/style/style.min.css +1 -1
- package/lib/header/index.js +1 -7
- package/lib/header/index.min.js +1 -1
- package/lib/header/src/header.js +47 -87
- package/lib/header/src/header.min.js +1 -1
- package/lib/header/src/util.js +3 -14
- package/lib/header/src/util.min.js +1 -1
- package/lib/hooks/size.js +0 -2
- package/lib/icon/index.js +1 -7
- package/lib/icon/index.min.js +1 -1
- package/lib/icon/src/icon.js +2 -7
- package/lib/icon/style/iconfont.1669214286403.ttf +0 -0
- package/lib/icon/style/iconfont.1669214286403.woff +0 -0
- package/lib/icon/style/iconfont.1669214286403.woff2 +0 -0
- package/lib/icon/style/style.css +372 -195
- package/lib/icon/style/style.min.css +719 -1
- package/lib/iconfont.1669214286403.ttf +0 -0
- package/lib/iconfont.1669214286403.woff +0 -0
- package/lib/iconfont.1669214286403.woff2 +0 -0
- package/lib/index.common.js +3 -10
- package/lib/index.common.min.js +1 -1
- package/lib/index.umd.js +14466 -23839
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.js +1 -7
- package/lib/input/index.min.js +1 -1
- package/lib/input/src/date.js +0 -10
- package/lib/input/src/date.min.js +1 -1
- package/lib/input/src/input.js +217 -553
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/src/number.js +0 -5
- package/lib/input/style/style.css +771 -595
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/index.js +1 -5
- package/lib/keyboard/index.min.js +1 -1
- package/lib/keyboard/src/hook.js +40 -106
- package/lib/keyboard/src/hook.min.js +1 -1
- package/lib/keyboard/style/style.css +1 -1
- package/lib/list/index.js +1 -7
- package/lib/list/index.min.js +1 -1
- package/lib/list/src/list.js +39 -91
- package/lib/list/src/list.min.js +1 -1
- package/lib/list/style/style.css +19 -14
- package/lib/loading/index.js +1 -4
- package/lib/loading/index.min.js +1 -1
- package/lib/loading/src/loading.js +1 -6
- package/lib/loading/style/style.css +52 -48
- package/lib/loading/style/style.min.css +1 -1
- package/lib/locale/lang/zh-HK.js +0 -3
- package/lib/locale/lang/zh-MO.js +0 -3
- package/lib/locale/lang/zh-TW.js +0 -3
- package/lib/menu/index.js +1 -10
- package/lib/menu/index.min.js +1 -1
- package/lib/menu/src/hooks.js +45 -109
- package/lib/menu/src/hooks.min.js +1 -1
- package/lib/menu/src/panel.js +10 -19
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/menu/style/style.css +79 -59
- package/lib/menu/style/style.min.css +1 -1
- package/lib/modal/index.js +5 -36
- package/lib/modal/index.min.js +1 -1
- package/lib/modal/src/modal.js +128 -315
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +311 -247
- package/lib/modal/style/style.min.css +1 -1
- package/lib/optgroup/index.js +1 -7
- package/lib/optgroup/index.min.js +1 -1
- package/lib/optgroup/style/style.css +1 -1
- package/lib/option/index.js +1 -7
- package/lib/option/index.min.js +1 -1
- package/lib/option/style/style.css +1 -1
- package/lib/pager/index.js +1 -7
- package/lib/pager/index.min.js +1 -1
- package/lib/pager/src/pager.js +74 -151
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +307 -257
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/index.js +1 -7
- package/lib/pulldown/index.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +46 -90
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/pulldown/style/style.css +42 -31
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/radio/index.js +1 -7
- package/lib/radio/index.min.js +1 -1
- package/lib/radio/src/button.js +14 -32
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/group.js +11 -22
- package/lib/radio/src/group.min.js +1 -1
- package/lib/radio/src/radio.js +15 -34
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/radio/style/style.css +184 -151
- package/lib/radio/style/style.min.css +1 -1
- package/lib/radio-button/index.js +1 -7
- package/lib/radio-button/index.min.js +1 -1
- package/lib/radio-button/style/style.css +1 -1
- package/lib/radio-group/index.js +1 -7
- package/lib/radio-group/index.min.js +1 -1
- package/lib/radio-group/style/style.css +1 -1
- package/lib/select/index.js +1 -7
- package/lib/select/index.min.js +1 -1
- package/lib/select/src/optgroup.js +1 -5
- package/lib/select/src/option.js +1 -5
- package/lib/select/src/optionInfo.js +1 -9
- package/lib/select/src/select.js +103 -256
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/src/util.js +0 -13
- package/lib/select/src/util.min.js +1 -1
- package/lib/select/style/style.css +108 -79
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +1 -7
- package/lib/switch/index.min.js +1 -1
- package/lib/switch/src/switch.js +16 -35
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/switch/style/style.css +87 -67
- package/lib/switch/style/style.min.css +1 -1
- package/lib/table/index.js +1 -7
- package/lib/table/index.min.js +1 -1
- package/lib/table/src/body.js +143 -262
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +138 -259
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +4 -13
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -35
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/group.js +2 -15
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/props.js +25 -29
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +650 -1593
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +32 -102
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +1025 -835
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/index.js +1 -7
- package/lib/textarea/index.min.js +1 -1
- package/lib/textarea/src/textarea.js +31 -71
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/textarea/style/style.css +57 -41
- package/lib/textarea/style/style.min.css +1 -1
- package/lib/toolbar/index.js +1 -7
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +60 -167
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +216 -174
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +6 -48
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/event.js +8 -20
- package/lib/tools/event.min.js +1 -1
- package/lib/tools/log.js +1 -6
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/resize.js +3 -27
- package/lib/tools/utils.js +0 -16
- package/lib/tools/utils.min.js +1 -1
- package/lib/tools/vn.js +0 -5
- package/lib/tooltip/index.js +1 -8
- package/lib/tooltip/index.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +47 -111
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +87 -63
- package/lib/v-x-e-table/index.js +13 -44
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/commands.js +0 -4
- package/lib/v-x-e-table/src/conf.js +31 -19
- package/lib/v-x-e-table/src/formats.js +0 -4
- package/lib/v-x-e-table/src/hooks.js +0 -3
- package/lib/v-x-e-table/src/interceptor.js +6 -18
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/menus.js +0 -4
- package/lib/v-x-e-table/src/renderer.js +66 -199
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/src/setup.js +1 -6
- package/lib/v-x-e-table/src/store.js +3 -19
- package/lib/v-x-e-table/style/style.css +424 -243
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/validator/index.js +1 -5
- package/lib/validator/index.min.js +1 -1
- package/lib/validator/src/hook.js +50 -116
- package/lib/validator/src/hook.min.js +1 -1
- package/lib/validator/style/style.css +1 -1
- package/lib/vxe-button/index.js +3 -10
- package/lib/vxe-button/index.min.js +1 -1
- package/lib/vxe-button/style/style.css +465 -341
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-checkbox/index.js +3 -10
- package/lib/vxe-checkbox/index.min.js +1 -1
- package/lib/vxe-checkbox/style/style.css +156 -127
- package/lib/vxe-checkbox/style/style.min.css +1 -1
- package/lib/vxe-checkbox-group/index.js +3 -10
- package/lib/vxe-checkbox-group/index.min.js +1 -1
- package/lib/vxe-checkbox-group/style/style.css +1 -1
- package/lib/vxe-colgroup/index.js +3 -10
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-colgroup/style/style.css +1 -1
- package/lib/vxe-column/index.js +3 -10
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-column/style/style.css +1 -1
- package/lib/vxe-form/index.js +3 -10
- package/lib/vxe-form/index.min.js +1 -1
- package/lib/vxe-form/style/style.css +201 -168
- package/lib/vxe-form/style/style.min.css +1 -1
- package/lib/vxe-form-gather/index.js +3 -10
- package/lib/vxe-form-gather/index.min.js +1 -1
- package/lib/vxe-form-gather/style/style.css +1 -1
- package/lib/vxe-form-item/index.js +3 -10
- package/lib/vxe-form-item/index.min.js +1 -1
- package/lib/vxe-form-item/style/style.css +1 -1
- package/lib/vxe-grid/index.js +3 -10
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-grid/style/style.css +61 -50
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-icon/index.js +3 -10
- package/lib/vxe-icon/index.min.js +1 -1
- package/lib/vxe-icon/style/style.css +372 -195
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-input/index.js +3 -10
- package/lib/vxe-input/index.min.js +1 -1
- package/lib/vxe-input/style/style.css +771 -595
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-list/index.js +3 -10
- package/lib/vxe-list/index.min.js +1 -1
- package/lib/vxe-list/style/style.css +19 -14
- package/lib/vxe-loading/index.js +3 -10
- package/lib/vxe-loading/index.min.js +1 -1
- package/lib/vxe-loading/style/style.css +52 -48
- package/lib/vxe-loading/style/style.min.css +1 -1
- package/lib/vxe-modal/index.js +3 -10
- package/lib/vxe-modal/index.min.js +1 -1
- package/lib/vxe-modal/style/style.css +311 -247
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-module-edit/index.js +3 -10
- package/lib/vxe-module-edit/index.min.js +1 -1
- package/lib/vxe-module-edit/style/style.css +1 -1
- package/lib/vxe-module-export/index.js +3 -10
- package/lib/vxe-module-export/index.min.js +1 -1
- package/lib/vxe-module-export/style/style.css +136 -108
- package/lib/vxe-module-export/style/style.min.css +1 -1
- package/lib/vxe-module-filter/index.js +3 -10
- package/lib/vxe-module-filter/index.min.js +1 -1
- package/lib/vxe-module-filter/style/style.css +103 -82
- package/lib/vxe-module-filter/style/style.min.css +1 -1
- package/lib/vxe-module-keyboard/index.js +3 -10
- package/lib/vxe-module-keyboard/index.min.js +1 -1
- package/lib/vxe-module-keyboard/style/style.css +1 -1
- package/lib/vxe-module-menu/index.js +3 -10
- package/lib/vxe-module-menu/index.min.js +1 -1
- package/lib/vxe-module-menu/style/style.css +79 -59
- package/lib/vxe-module-menu/style/style.min.css +1 -1
- package/lib/vxe-module-validator/index.js +3 -10
- package/lib/vxe-module-validator/index.min.js +1 -1
- package/lib/vxe-module-validator/style/style.css +1 -1
- package/lib/vxe-optgroup/index.js +3 -10
- package/lib/vxe-optgroup/index.min.js +1 -1
- package/lib/vxe-optgroup/style/style.css +1 -1
- package/lib/vxe-option/index.js +3 -10
- package/lib/vxe-option/index.min.js +1 -1
- package/lib/vxe-option/style/style.css +1 -1
- package/lib/vxe-pager/index.js +3 -10
- package/lib/vxe-pager/index.min.js +1 -1
- package/lib/vxe-pager/style/style.css +307 -257
- package/lib/vxe-pager/style/style.min.css +1 -1
- package/lib/vxe-pulldown/index.js +3 -10
- package/lib/vxe-pulldown/index.min.js +1 -1
- package/lib/vxe-pulldown/style/style.css +42 -31
- package/lib/vxe-pulldown/style/style.min.css +1 -1
- package/lib/vxe-radio/index.js +3 -10
- package/lib/vxe-radio/index.min.js +1 -1
- package/lib/vxe-radio/style/style.css +184 -151
- package/lib/vxe-radio/style/style.min.css +1 -1
- package/lib/vxe-radio-button/index.js +3 -10
- package/lib/vxe-radio-button/index.min.js +1 -1
- package/lib/vxe-radio-button/style/style.css +1 -1
- package/lib/vxe-radio-group/index.js +3 -10
- package/lib/vxe-radio-group/index.min.js +1 -1
- package/lib/vxe-radio-group/style/style.css +1 -1
- package/lib/vxe-select/index.js +3 -10
- package/lib/vxe-select/index.min.js +1 -1
- package/lib/vxe-select/style/style.css +108 -79
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-switch/index.js +3 -10
- package/lib/vxe-switch/index.min.js +1 -1
- package/lib/vxe-switch/style/style.css +87 -67
- package/lib/vxe-switch/style/style.min.css +1 -1
- package/lib/vxe-table/index.js +3 -10
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +1025 -835
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-textarea/index.js +3 -10
- package/lib/vxe-textarea/index.min.js +1 -1
- package/lib/vxe-textarea/style/style.css +57 -41
- package/lib/vxe-textarea/style/style.min.css +1 -1
- package/lib/vxe-toolbar/index.js +3 -10
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-toolbar/style/style.css +216 -174
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/lib/vxe-tooltip/index.js +3 -10
- package/lib/vxe-tooltip/index.min.js +1 -1
- package/lib/vxe-tooltip/style/style.css +87 -63
- package/package.json +27 -33
- package/packages/export/src/hook.ts +1 -0
- package/packages/filter/src/hook.ts +1 -1
- package/packages/form/src/form.ts +5 -4
- package/packages/list/src/list.ts +8 -2
- package/packages/pulldown/src/pulldown.ts +11 -5
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/table.ts +95 -87
- package/packages/table/src/util.ts +1 -1
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/icon.scss +10 -2
- package/styles/table.scss +1 -1
- package/styles/variable.scss +2 -2
- package/types/column.d.ts +6 -1
- package/types/list.d.ts +4 -4
- package/types/pulldown.d.ts +61 -61
- package/types/table.d.ts +11 -1
package/lib/form/src/form.js
CHANGED
|
@@ -4,52 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _vue = require("vue");
|
|
9
|
-
|
|
10
8
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
11
|
-
|
|
12
9
|
var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
|
|
13
|
-
|
|
14
10
|
var _vXETable = require("../../v-x-e-table");
|
|
15
|
-
|
|
16
11
|
var _utils = require("../../tools/utils");
|
|
17
|
-
|
|
18
12
|
var _log = require("../../tools/log");
|
|
19
|
-
|
|
20
13
|
var _dom = require("../../tools/dom");
|
|
21
|
-
|
|
22
14
|
var _util = require("./util");
|
|
23
|
-
|
|
24
15
|
var _size = require("../../hooks/size");
|
|
25
|
-
|
|
26
16
|
var _formConfigItem = _interopRequireDefault(require("./form-config-item"));
|
|
27
|
-
|
|
28
17
|
var _index = _interopRequireDefault(require("../../loading/index"));
|
|
29
|
-
|
|
30
18
|
var _vn = require("../../tools/vn");
|
|
31
|
-
|
|
32
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
|
|
34
20
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
35
21
|
__assign = Object.assign || function (t) {
|
|
36
22
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
37
23
|
s = arguments[i];
|
|
38
|
-
|
|
39
|
-
for (var p in s) {
|
|
40
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
41
|
-
}
|
|
24
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
42
25
|
}
|
|
43
|
-
|
|
44
26
|
return t;
|
|
45
27
|
};
|
|
46
|
-
|
|
47
28
|
return __assign.apply(this, arguments);
|
|
48
29
|
};
|
|
49
|
-
|
|
50
|
-
var Rule =
|
|
51
|
-
/** @class */
|
|
52
|
-
function () {
|
|
30
|
+
var Rule = /** @class */function () {
|
|
53
31
|
function Rule(rule) {
|
|
54
32
|
Object.assign(this, {
|
|
55
33
|
$options: rule,
|
|
@@ -63,16 +41,15 @@ function () {
|
|
|
63
41
|
maxWidth: rule.maxWidth
|
|
64
42
|
});
|
|
65
43
|
}
|
|
66
|
-
|
|
67
44
|
Object.defineProperty(Rule.prototype, "content", {
|
|
68
|
-
get: function
|
|
45
|
+
get: function () {
|
|
69
46
|
return (0, _utils.getFuncText)(this.$options.content || this.$options.message);
|
|
70
47
|
},
|
|
71
48
|
enumerable: false,
|
|
72
49
|
configurable: true
|
|
73
50
|
});
|
|
74
51
|
Object.defineProperty(Rule.prototype, "message", {
|
|
75
|
-
get: function
|
|
52
|
+
get: function () {
|
|
76
53
|
return this.content;
|
|
77
54
|
},
|
|
78
55
|
enumerable: false,
|
|
@@ -80,46 +57,38 @@ function () {
|
|
|
80
57
|
});
|
|
81
58
|
return Rule;
|
|
82
59
|
}();
|
|
83
|
-
|
|
84
|
-
var validErrorRuleValue = function validErrorRuleValue(rule, val) {
|
|
60
|
+
var validErrorRuleValue = function (rule, val) {
|
|
85
61
|
var type = rule.type,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
62
|
+
min = rule.min,
|
|
63
|
+
max = rule.max,
|
|
64
|
+
pattern = rule.pattern;
|
|
89
65
|
var isNumType = type === 'number';
|
|
90
|
-
var numVal = isNumType ? _xeUtils.default.toNumber(val) : _xeUtils.default.getSize(val);
|
|
91
|
-
|
|
66
|
+
var numVal = isNumType ? _xeUtils.default.toNumber(val) : _xeUtils.default.getSize(val);
|
|
67
|
+
// 判断数值
|
|
92
68
|
if (isNumType && isNaN(val)) {
|
|
93
69
|
return true;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
70
|
+
}
|
|
71
|
+
// 如果存在 min,判断最小值
|
|
97
72
|
if (!_xeUtils.default.eqNull(min) && numVal < _xeUtils.default.toNumber(min)) {
|
|
98
73
|
return true;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
74
|
+
}
|
|
75
|
+
// 如果存在 max,判断最大值
|
|
102
76
|
if (!_xeUtils.default.eqNull(max) && numVal > _xeUtils.default.toNumber(max)) {
|
|
103
77
|
return true;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
}
|
|
79
|
+
// 如果存在 pattern,正则校验
|
|
107
80
|
if (pattern && !(_xeUtils.default.isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
|
|
108
81
|
return true;
|
|
109
82
|
}
|
|
110
|
-
|
|
111
83
|
return false;
|
|
112
84
|
};
|
|
113
|
-
|
|
114
85
|
function getResetValue(value, resetValue) {
|
|
115
86
|
if (_xeUtils.default.isArray(value)) {
|
|
116
87
|
resetValue = [];
|
|
117
88
|
}
|
|
118
|
-
|
|
119
89
|
return resetValue;
|
|
120
90
|
}
|
|
121
|
-
|
|
122
|
-
var _default2 = (0, _vue.defineComponent)({
|
|
91
|
+
var _default = (0, _vue.defineComponent)({
|
|
123
92
|
name: 'VxeForm',
|
|
124
93
|
props: {
|
|
125
94
|
collapseStatus: {
|
|
@@ -130,43 +99,43 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
130
99
|
data: Object,
|
|
131
100
|
size: {
|
|
132
101
|
type: String,
|
|
133
|
-
default: function
|
|
102
|
+
default: function () {
|
|
134
103
|
return _conf.default.form.size || _conf.default.size;
|
|
135
104
|
}
|
|
136
105
|
},
|
|
137
106
|
span: {
|
|
138
107
|
type: [String, Number],
|
|
139
|
-
default: function
|
|
108
|
+
default: function () {
|
|
140
109
|
return _conf.default.form.span;
|
|
141
110
|
}
|
|
142
111
|
},
|
|
143
112
|
align: {
|
|
144
113
|
type: String,
|
|
145
|
-
default: function
|
|
114
|
+
default: function () {
|
|
146
115
|
return _conf.default.form.align;
|
|
147
116
|
}
|
|
148
117
|
},
|
|
149
118
|
titleAlign: {
|
|
150
119
|
type: String,
|
|
151
|
-
default: function
|
|
120
|
+
default: function () {
|
|
152
121
|
return _conf.default.form.titleAlign;
|
|
153
122
|
}
|
|
154
123
|
},
|
|
155
124
|
titleWidth: {
|
|
156
125
|
type: [String, Number],
|
|
157
|
-
default: function
|
|
126
|
+
default: function () {
|
|
158
127
|
return _conf.default.form.titleWidth;
|
|
159
128
|
}
|
|
160
129
|
},
|
|
161
130
|
titleColon: {
|
|
162
131
|
type: Boolean,
|
|
163
|
-
default: function
|
|
132
|
+
default: function () {
|
|
164
133
|
return _conf.default.form.titleColon;
|
|
165
134
|
}
|
|
166
135
|
},
|
|
167
136
|
titleAsterisk: {
|
|
168
137
|
type: Boolean,
|
|
169
|
-
default: function
|
|
138
|
+
default: function () {
|
|
170
139
|
return _conf.default.form.titleAsterisk;
|
|
171
140
|
}
|
|
172
141
|
},
|
|
@@ -180,7 +149,7 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
180
149
|
rules: Object,
|
|
181
150
|
preventSubmit: {
|
|
182
151
|
type: Boolean,
|
|
183
|
-
default: function
|
|
152
|
+
default: function () {
|
|
184
153
|
return _conf.default.form.preventSubmit;
|
|
185
154
|
}
|
|
186
155
|
},
|
|
@@ -188,19 +157,17 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
188
157
|
tooltipConfig: Object,
|
|
189
158
|
customLayout: {
|
|
190
159
|
type: Boolean,
|
|
191
|
-
default: function
|
|
160
|
+
default: function () {
|
|
192
161
|
return _conf.default.form.customLayout;
|
|
193
162
|
}
|
|
194
163
|
}
|
|
195
164
|
},
|
|
196
165
|
emits: ['update:collapseStatus', 'collapse', 'toggle-collapse', 'submit', 'submit-invalid', 'reset'],
|
|
197
|
-
setup: function
|
|
166
|
+
setup: function (props, context) {
|
|
198
167
|
var hasUseTooltip = _vXETable.VXETable.tooltip;
|
|
199
168
|
var slots = context.slots,
|
|
200
|
-
|
|
201
|
-
|
|
169
|
+
emit = context.emit;
|
|
202
170
|
var xID = _xeUtils.default.uniqueId();
|
|
203
|
-
|
|
204
171
|
var computeSize = (0, _size.useSize)(props);
|
|
205
172
|
var reactData = (0, _vue.reactive)({
|
|
206
173
|
collapseAll: props.collapseStatus,
|
|
@@ -236,29 +203,25 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
236
203
|
props: props,
|
|
237
204
|
context: context,
|
|
238
205
|
reactData: reactData,
|
|
239
|
-
getRefMaps: function
|
|
206
|
+
getRefMaps: function () {
|
|
240
207
|
return refMaps;
|
|
241
208
|
},
|
|
242
|
-
getComputeMaps: function
|
|
209
|
+
getComputeMaps: function () {
|
|
243
210
|
return computeMaps;
|
|
244
211
|
}
|
|
245
212
|
};
|
|
246
|
-
|
|
247
|
-
var callSlot = function callSlot(slotFunc, params) {
|
|
213
|
+
var callSlot = function (slotFunc, params) {
|
|
248
214
|
if (slotFunc) {
|
|
249
215
|
if (_xeUtils.default.isString(slotFunc)) {
|
|
250
216
|
slotFunc = slots[slotFunc] || null;
|
|
251
217
|
}
|
|
252
|
-
|
|
253
218
|
if (_xeUtils.default.isFunction(slotFunc)) {
|
|
254
219
|
return (0, _vn.getSlotVNs)(slotFunc(params));
|
|
255
220
|
}
|
|
256
221
|
}
|
|
257
|
-
|
|
258
222
|
return [];
|
|
259
223
|
};
|
|
260
|
-
|
|
261
|
-
var loadItem = function loadItem(list) {
|
|
224
|
+
var loadItem = function (list) {
|
|
262
225
|
if (list.length) {
|
|
263
226
|
if (process.env.NODE_ENV === 'development') {
|
|
264
227
|
list.forEach(function (item) {
|
|
@@ -273,51 +236,41 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
273
236
|
}
|
|
274
237
|
});
|
|
275
238
|
}
|
|
276
|
-
|
|
277
239
|
reactData.staticItems = _xeUtils.default.mapTree(list, function (item) {
|
|
278
240
|
return (0, _util.createItem)($xeform, item);
|
|
279
241
|
}, {
|
|
280
242
|
children: 'children'
|
|
281
243
|
});
|
|
282
244
|
}
|
|
283
|
-
|
|
284
245
|
return (0, _vue.nextTick)();
|
|
285
246
|
};
|
|
286
|
-
|
|
287
|
-
var getItems = function getItems() {
|
|
247
|
+
var getItems = function () {
|
|
288
248
|
var itemList = [];
|
|
289
|
-
|
|
290
249
|
_xeUtils.default.eachTree(reactData.formItems, function (item) {
|
|
291
250
|
itemList.push(item);
|
|
292
251
|
}, {
|
|
293
252
|
children: 'children'
|
|
294
253
|
});
|
|
295
|
-
|
|
296
254
|
return itemList;
|
|
297
255
|
};
|
|
298
|
-
|
|
299
|
-
var getItemByField = function getItemByField(field) {
|
|
256
|
+
var getItemByField = function (field) {
|
|
300
257
|
var rest = _xeUtils.default.findTree(reactData.formItems, function (item) {
|
|
301
258
|
return item.field === field;
|
|
302
259
|
}, {
|
|
303
260
|
children: 'children'
|
|
304
261
|
});
|
|
305
|
-
|
|
306
262
|
return rest ? rest.item : null;
|
|
307
263
|
};
|
|
308
|
-
|
|
309
|
-
var getCollapseStatus = function getCollapseStatus() {
|
|
264
|
+
var getCollapseStatus = function () {
|
|
310
265
|
return reactData.collapseAll;
|
|
311
266
|
};
|
|
312
|
-
|
|
313
|
-
var toggleCollapse = function toggleCollapse() {
|
|
267
|
+
var toggleCollapse = function () {
|
|
314
268
|
var status = !getCollapseStatus();
|
|
315
269
|
reactData.collapseAll = status;
|
|
316
270
|
emit('update:collapseStatus', status);
|
|
317
271
|
return (0, _vue.nextTick)();
|
|
318
272
|
};
|
|
319
|
-
|
|
320
|
-
var toggleCollapseEvent = function toggleCollapseEvent(evnt) {
|
|
273
|
+
var toggleCollapseEvent = function (evnt) {
|
|
321
274
|
toggleCollapse();
|
|
322
275
|
var status = getCollapseStatus();
|
|
323
276
|
formMethods.dispatchEvent('toggle-collapse', {
|
|
@@ -331,11 +284,9 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
331
284
|
data: props.data
|
|
332
285
|
}, evnt);
|
|
333
286
|
};
|
|
334
|
-
|
|
335
|
-
var clearValidate = function clearValidate(fieldOrItem) {
|
|
287
|
+
var clearValidate = function (fieldOrItem) {
|
|
336
288
|
if (fieldOrItem) {
|
|
337
289
|
var item = (0, _util.handleFieldOrItem)($xeform, fieldOrItem);
|
|
338
|
-
|
|
339
290
|
if (item) {
|
|
340
291
|
item.showError = false;
|
|
341
292
|
}
|
|
@@ -344,23 +295,18 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
344
295
|
item.showError = false;
|
|
345
296
|
});
|
|
346
297
|
}
|
|
347
|
-
|
|
348
298
|
return (0, _vue.nextTick)();
|
|
349
299
|
};
|
|
350
|
-
|
|
351
|
-
var reset = function reset() {
|
|
300
|
+
var reset = function () {
|
|
352
301
|
var data = props.data;
|
|
353
302
|
var itemList = getItems();
|
|
354
|
-
|
|
355
303
|
if (data) {
|
|
356
304
|
itemList.forEach(function (item) {
|
|
357
305
|
var field = item.field,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
306
|
+
resetValue = item.resetValue,
|
|
307
|
+
itemRender = item.itemRender;
|
|
361
308
|
if ((0, _utils.isEnableConf)(itemRender)) {
|
|
362
309
|
var compConf = _vXETable.VXETable.renderer.get(itemRender.name);
|
|
363
|
-
|
|
364
310
|
if (compConf && compConf.itemResetMethod) {
|
|
365
311
|
compConf.itemResetMethod({
|
|
366
312
|
data: data,
|
|
@@ -375,50 +321,42 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
375
321
|
}
|
|
376
322
|
});
|
|
377
323
|
}
|
|
378
|
-
|
|
379
324
|
return clearValidate();
|
|
380
325
|
};
|
|
381
|
-
|
|
382
|
-
var resetEvent = function resetEvent(evnt) {
|
|
326
|
+
var resetEvent = function (evnt) {
|
|
383
327
|
evnt.preventDefault();
|
|
384
328
|
reset();
|
|
385
329
|
formMethods.dispatchEvent('reset', {
|
|
386
330
|
data: props.data
|
|
387
331
|
}, evnt);
|
|
388
332
|
};
|
|
389
|
-
|
|
390
|
-
var handleFocus = function handleFocus(fields) {
|
|
333
|
+
var handleFocus = function (fields) {
|
|
391
334
|
var el = refElem.value;
|
|
392
|
-
fields.
|
|
335
|
+
for (var i = 0; i < fields.length; i++) {
|
|
336
|
+
var property = fields[i];
|
|
393
337
|
var item = getItemByField(property);
|
|
394
|
-
|
|
395
338
|
if (item && (0, _utils.isEnableConf)(item.itemRender)) {
|
|
396
339
|
var itemRender = item.itemRender;
|
|
397
|
-
|
|
398
340
|
var compConf = _vXETable.VXETable.renderer.get(itemRender.name);
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
if (!index) {
|
|
341
|
+
var inputElem = null;
|
|
342
|
+
// 定位到第一个
|
|
343
|
+
if (!i) {
|
|
403
344
|
(0, _dom.scrollToView)(el.querySelector(".".concat(item.id)));
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
|
|
345
|
+
}
|
|
346
|
+
// 如果指定了聚焦 class
|
|
407
347
|
if (itemRender.autofocus) {
|
|
408
348
|
inputElem = el.querySelector(".".concat(item.id, " ").concat(itemRender.autofocus));
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
|
|
349
|
+
}
|
|
350
|
+
// 渲染器的聚焦处理
|
|
412
351
|
if (!inputElem && compConf && compConf.autofocus) {
|
|
413
352
|
inputElem = el.querySelector(".".concat(item.id, " ").concat(compConf.autofocus));
|
|
414
353
|
}
|
|
415
|
-
|
|
416
354
|
if (inputElem) {
|
|
417
355
|
inputElem.focus();
|
|
418
|
-
|
|
356
|
+
break;
|
|
419
357
|
}
|
|
420
358
|
}
|
|
421
|
-
}
|
|
359
|
+
}
|
|
422
360
|
};
|
|
423
361
|
/**
|
|
424
362
|
* 校验数据
|
|
@@ -434,24 +372,19 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
434
372
|
* validator=Function({ itemValue, rule, rules, data, property }) 自定义校验,接收一个 Promise
|
|
435
373
|
* trigger=change 触发方式
|
|
436
374
|
*/
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
var validItemRules = function validItemRules(validType, property, val) {
|
|
375
|
+
var validItemRules = function (validType, property, val) {
|
|
440
376
|
var data = props.data,
|
|
441
|
-
|
|
377
|
+
formRules = props.rules;
|
|
442
378
|
var errorRules = [];
|
|
443
379
|
var syncVailds = [];
|
|
444
|
-
|
|
445
380
|
if (property && formRules) {
|
|
446
381
|
var rules_1 = _xeUtils.default.get(formRules, property);
|
|
447
|
-
|
|
448
382
|
if (rules_1) {
|
|
449
383
|
var itemValue_1 = _xeUtils.default.isUndefined(val) ? _xeUtils.default.get(data, property) : val;
|
|
450
384
|
rules_1.forEach(function (rule) {
|
|
451
385
|
var type = rule.type,
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
386
|
+
trigger = rule.trigger,
|
|
387
|
+
required = rule.required;
|
|
455
388
|
if (validType === 'all' || !trigger || validType === trigger) {
|
|
456
389
|
if (_xeUtils.default.isFunction(rule.validator)) {
|
|
457
390
|
var customValid = rule.validator({
|
|
@@ -463,7 +396,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
463
396
|
property: property,
|
|
464
397
|
$form: $xeform
|
|
465
398
|
});
|
|
466
|
-
|
|
467
399
|
if (customValid) {
|
|
468
400
|
if (_xeUtils.default.isError(customValid)) {
|
|
469
401
|
errorRules.push(new Rule({
|
|
@@ -487,7 +419,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
487
419
|
} else {
|
|
488
420
|
var isArrType = type === 'array';
|
|
489
421
|
var hasEmpty = isArrType || _xeUtils.default.isArray(itemValue_1) ? !_xeUtils.default.isArray(itemValue_1) || !itemValue_1.length : (0, _utils.eqEmptyValue)(itemValue_1);
|
|
490
|
-
|
|
491
422
|
if (required ? hasEmpty || validErrorRuleValue(rule, itemValue_1) : !hasEmpty && validErrorRuleValue(rule, itemValue_1)) {
|
|
492
423
|
errorRules.push(new Rule(rule));
|
|
493
424
|
}
|
|
@@ -496,7 +427,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
496
427
|
});
|
|
497
428
|
}
|
|
498
429
|
}
|
|
499
|
-
|
|
500
430
|
return Promise.all(syncVailds).then(function () {
|
|
501
431
|
if (errorRules.length) {
|
|
502
432
|
var rest = {
|
|
@@ -507,28 +437,24 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
507
437
|
}
|
|
508
438
|
});
|
|
509
439
|
};
|
|
510
|
-
|
|
511
440
|
var showErrTime;
|
|
512
|
-
|
|
513
|
-
var beginValidate = function beginValidate(itemList, type, callback) {
|
|
441
|
+
var beginValidate = function (itemList, type, callback) {
|
|
514
442
|
var data = props.data,
|
|
515
|
-
|
|
443
|
+
formRules = props.rules;
|
|
516
444
|
var validOpts = computeValidOpts.value;
|
|
517
445
|
var validRest = {};
|
|
518
446
|
var validFields = [];
|
|
519
447
|
var itemValids = [];
|
|
520
448
|
clearTimeout(showErrTime);
|
|
521
|
-
|
|
522
449
|
if (data && formRules) {
|
|
523
450
|
itemList.forEach(function (item) {
|
|
524
451
|
var field = item.field;
|
|
525
|
-
|
|
526
452
|
if (field && !(0, _util.isHiddenItem)($xeform, item) && (0, _util.isActivetem)($xeform, item)) {
|
|
527
453
|
itemValids.push(validItemRules(type || 'all', field).then(function () {
|
|
528
454
|
item.errRule = null;
|
|
529
455
|
}).catch(function (_a) {
|
|
530
456
|
var rule = _a.rule,
|
|
531
|
-
|
|
457
|
+
rules = _a.rules;
|
|
532
458
|
var rest = {
|
|
533
459
|
rule: rule,
|
|
534
460
|
rules: rules,
|
|
@@ -537,11 +463,9 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
537
463
|
property: field,
|
|
538
464
|
$form: $xeform
|
|
539
465
|
};
|
|
540
|
-
|
|
541
466
|
if (!validRest[field]) {
|
|
542
467
|
validRest[field] = [];
|
|
543
468
|
}
|
|
544
|
-
|
|
545
469
|
validRest[field].push(rest);
|
|
546
470
|
validFields.push(field);
|
|
547
471
|
item.errRule = rule;
|
|
@@ -562,13 +486,11 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
562
486
|
}
|
|
563
487
|
});
|
|
564
488
|
}, 20);
|
|
565
|
-
|
|
566
489
|
if (validOpts.autoPos !== false) {
|
|
567
490
|
(0, _vue.nextTick)(function () {
|
|
568
491
|
handleFocus(validFields);
|
|
569
492
|
});
|
|
570
493
|
}
|
|
571
|
-
|
|
572
494
|
if (callback) {
|
|
573
495
|
callback(validRest);
|
|
574
496
|
resolve();
|
|
@@ -578,27 +500,21 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
578
500
|
});
|
|
579
501
|
});
|
|
580
502
|
}
|
|
581
|
-
|
|
582
503
|
if (callback) {
|
|
583
504
|
callback();
|
|
584
505
|
}
|
|
585
|
-
|
|
586
506
|
return Promise.resolve();
|
|
587
507
|
};
|
|
588
|
-
|
|
589
|
-
var validate = function validate(callback) {
|
|
508
|
+
var validate = function (callback) {
|
|
590
509
|
clearValidate();
|
|
591
510
|
return beginValidate(getItems(), '', callback);
|
|
592
511
|
};
|
|
593
|
-
|
|
594
|
-
var validateField = function validateField(fieldOrItem, callback) {
|
|
512
|
+
var validateField = function (fieldOrItem, callback) {
|
|
595
513
|
var item = (0, _util.handleFieldOrItem)($xeform, fieldOrItem);
|
|
596
514
|
return beginValidate(item ? [item] : [], '', callback);
|
|
597
515
|
};
|
|
598
|
-
|
|
599
|
-
var submitEvent = function submitEvent(evnt) {
|
|
516
|
+
var submitEvent = function (evnt) {
|
|
600
517
|
evnt.preventDefault();
|
|
601
|
-
|
|
602
518
|
if (!props.preventSubmit) {
|
|
603
519
|
clearValidate();
|
|
604
520
|
beginValidate(getItems()).then(function (errMap) {
|
|
@@ -615,26 +531,21 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
615
531
|
});
|
|
616
532
|
}
|
|
617
533
|
};
|
|
618
|
-
|
|
619
|
-
var closeTooltip = function closeTooltip() {
|
|
534
|
+
var closeTooltip = function () {
|
|
620
535
|
var tooltipStore = internalData.tooltipStore;
|
|
621
536
|
var $tooltip = refTooltip.value;
|
|
622
|
-
|
|
623
537
|
if (tooltipStore.visible) {
|
|
624
538
|
Object.assign(tooltipStore, {
|
|
625
539
|
item: null,
|
|
626
540
|
visible: false
|
|
627
541
|
});
|
|
628
|
-
|
|
629
542
|
if ($tooltip) {
|
|
630
543
|
$tooltip.close();
|
|
631
544
|
}
|
|
632
545
|
}
|
|
633
|
-
|
|
634
546
|
return (0, _vue.nextTick)();
|
|
635
547
|
};
|
|
636
|
-
|
|
637
|
-
var triggerTitleTipEvent = function triggerTitleTipEvent(evnt, params) {
|
|
548
|
+
var triggerTitleTipEvent = function (evnt, params) {
|
|
638
549
|
var item = params.item;
|
|
639
550
|
var tooltipStore = internalData.tooltipStore;
|
|
640
551
|
var $tooltip = refTooltip.value;
|
|
@@ -642,35 +553,28 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
642
553
|
var content = (overflowElem.textContent || '').trim();
|
|
643
554
|
var isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
|
|
644
555
|
clearTimeout(internalData.tooltipTimeout);
|
|
645
|
-
|
|
646
556
|
if (tooltipStore.item !== item) {
|
|
647
557
|
closeTooltip();
|
|
648
558
|
}
|
|
649
|
-
|
|
650
559
|
if (content && isCellOverflow) {
|
|
651
560
|
Object.assign(tooltipStore, {
|
|
652
561
|
item: item,
|
|
653
562
|
visible: true
|
|
654
563
|
});
|
|
655
|
-
|
|
656
564
|
if ($tooltip) {
|
|
657
565
|
$tooltip.open(overflowElem, content);
|
|
658
566
|
}
|
|
659
567
|
}
|
|
660
568
|
};
|
|
661
|
-
|
|
662
|
-
var handleTitleTipLeaveEvent = function handleTitleTipLeaveEvent() {
|
|
569
|
+
var handleTitleTipLeaveEvent = function () {
|
|
663
570
|
var tooltipOpts = computeTooltipOpts.value;
|
|
664
571
|
var $tooltip = refTooltip.value;
|
|
665
|
-
|
|
666
572
|
if ($tooltip) {
|
|
667
573
|
$tooltip.setActived(false);
|
|
668
574
|
}
|
|
669
|
-
|
|
670
575
|
if (tooltipOpts.enterable) {
|
|
671
576
|
internalData.tooltipTimeout = setTimeout(function () {
|
|
672
577
|
$tooltip = refTooltip.value;
|
|
673
|
-
|
|
674
578
|
if ($tooltip && !$tooltip.isActived()) {
|
|
675
579
|
closeTooltip();
|
|
676
580
|
}
|
|
@@ -679,22 +583,19 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
679
583
|
closeTooltip();
|
|
680
584
|
}
|
|
681
585
|
};
|
|
682
|
-
|
|
683
|
-
var triggerItemEvent = function triggerItemEvent(evnt, field, itemValue) {
|
|
586
|
+
var triggerItemEvent = function (evnt, field, itemValue) {
|
|
684
587
|
if (field) {
|
|
685
588
|
return validItemRules(evnt ? ['blur'].includes(evnt.type) ? 'blur' : 'change' : 'all', field, itemValue).then(function () {
|
|
686
589
|
clearValidate(field);
|
|
687
590
|
}).catch(function (_a) {
|
|
688
591
|
var rule = _a.rule;
|
|
689
592
|
var item = getItemByField(field);
|
|
690
|
-
|
|
691
593
|
if (item) {
|
|
692
594
|
item.showError = true;
|
|
693
595
|
item.errRule = rule;
|
|
694
596
|
}
|
|
695
597
|
});
|
|
696
598
|
}
|
|
697
|
-
|
|
698
599
|
return (0, _vue.nextTick)();
|
|
699
600
|
};
|
|
700
601
|
/**
|
|
@@ -702,15 +603,12 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
702
603
|
* 如果组件值 v-model 发生 change 时,调用改函数用于更新某一项编辑状态
|
|
703
604
|
* 如果单元格配置了校验规则,则会进行校验
|
|
704
605
|
*/
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
var updateStatus = function updateStatus(scope, itemValue) {
|
|
606
|
+
var updateStatus = function (scope, itemValue) {
|
|
708
607
|
var field = scope.field;
|
|
709
608
|
return triggerItemEvent(new Event('change'), field, itemValue);
|
|
710
609
|
};
|
|
711
|
-
|
|
712
610
|
formMethods = {
|
|
713
|
-
dispatchEvent: function
|
|
611
|
+
dispatchEvent: function (type, params, evnt) {
|
|
714
612
|
emit(type, Object.assign({
|
|
715
613
|
$form: $xeform,
|
|
716
614
|
$event: evnt
|
|
@@ -756,20 +654,17 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
756
654
|
(0, _log.errLog)('vxe.error.errConflicts', ['custom-layout', 'items']);
|
|
757
655
|
}
|
|
758
656
|
}
|
|
759
|
-
|
|
760
657
|
loadItem(props.items || []);
|
|
761
658
|
});
|
|
762
659
|
});
|
|
763
|
-
|
|
764
|
-
var renderVN = function renderVN() {
|
|
660
|
+
var renderVN = function () {
|
|
765
661
|
var _a;
|
|
766
|
-
|
|
767
662
|
var loading = props.loading,
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
var formItems = reactData.formItems;
|
|
772
|
-
|
|
663
|
+
className = props.className,
|
|
664
|
+
data = props.data,
|
|
665
|
+
customLayout = props.customLayout;
|
|
666
|
+
var formItems = reactData.formItems;
|
|
667
|
+
// const formItems: any[] = []
|
|
773
668
|
var vSize = computeSize.value;
|
|
774
669
|
var tooltipOpts = computeTooltipOpts.value;
|
|
775
670
|
var defaultSlot = slots.default;
|
|
@@ -808,7 +703,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
808
703
|
ref: refTooltip
|
|
809
704
|
}, tooltipOpts)) : (0, _vue.createCommentVNode)()]);
|
|
810
705
|
};
|
|
811
|
-
|
|
812
706
|
$xeform.renderVN = renderVN;
|
|
813
707
|
(0, _vue.provide)('$xeform', $xeform);
|
|
814
708
|
(0, _vue.provide)('$xeformgather', null);
|
|
@@ -816,9 +710,8 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
816
710
|
(0, _vue.provide)('$xeformiteminfo', null);
|
|
817
711
|
return $xeform;
|
|
818
712
|
},
|
|
819
|
-
render: function
|
|
713
|
+
render: function () {
|
|
820
714
|
return this.renderVN();
|
|
821
715
|
}
|
|
822
716
|
});
|
|
823
|
-
|
|
824
|
-
exports.default = _default2;
|
|
717
|
+
exports.default = _default;
|