vxe-table 4.3.4 → 4.3.6-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/footer/src/footer.js +3 -3
- 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/header/src/header.js +10 -5
- 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 +406 -178
- 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/locale/lang/en-US.js +0 -1
- package/es/locale/lang/ja-JP.js +0 -1
- package/es/locale/lang/zh-CN.js +0 -1
- package/es/locale/lang/zh-TC.js +0 -1
- 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 +36 -40
- 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 +458 -226
- 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 +406 -178
- 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 +54 -99
- 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 +57 -92
- 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 +406 -178
- 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 +14514 -23890
- 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/en-US.js +0 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +0 -1
- package/lib/locale/lang/ja-JP.js +0 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +0 -1
- package/lib/locale/lang/zh-CN.js +0 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +0 -1
- package/lib/locale/lang/zh-HK.js +0 -3
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +0 -1
- package/lib/locale/lang/zh-MO.js +0 -3
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +0 -1
- package/lib/locale/lang/zh-TC.js +0 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +0 -1
- package/lib/locale/lang/zh-TW.js +0 -3
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +0 -1
- 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 +670 -1620
- 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 +458 -226
- 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 +406 -178
- 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/footer/src/footer.ts +3 -3
- package/packages/form/src/form.ts +5 -4
- package/packages/header/src/header.ts +13 -9
- package/packages/list/src/list.ts +8 -2
- package/packages/locale/lang/en-US.ts +0 -1
- package/packages/locale/lang/ja-JP.ts +0 -1
- package/packages/locale/lang/zh-CN.ts +0 -1
- package/packages/locale/lang/zh-TC.ts +0 -1
- 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 +117 -113
- 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 +78 -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
|
@@ -18,7 +18,7 @@ import VxeLoading from '../../loading/index'
|
|
|
18
18
|
import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible, colToVisible, getCellValue, setCellValue, handleFieldOrColumn, toTreePathSeq, restoreScrollLocation, restoreScrollListener, XEBodyScrollElement } from './util'
|
|
19
19
|
import { getSlotVNs } from '../../tools/vn'
|
|
20
20
|
|
|
21
|
-
import { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, VxeTooltipInstance, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, VxeTableMethods, TableMethods, VxeMenuPanelInstance, VxeTableDefines, VxeTableProps } from '../../../types/all'
|
|
21
|
+
import { VxeGridConstructor, VxeGridPrivateMethods, VxeTableConstructor, TableReactData, TableInternalData, VxeTablePropTypes, VxeToolbarConstructor, VxeTooltipInstance, TablePrivateMethods, VxeTablePrivateRef, VxeTablePrivateComputed, VxeTablePrivateMethods, VxeTableMethods, TableMethods, VxeMenuPanelInstance, VxeTableDefines, VxeTableProps, VxeColumnPropTypes } from '../../../types/all'
|
|
22
22
|
|
|
23
23
|
const isWebkit = browse['-webkit'] && !browse.edge
|
|
24
24
|
|
|
@@ -698,7 +698,7 @@ export default defineComponent({
|
|
|
698
698
|
return { rowHeight: 0, visibleSize: 8 }
|
|
699
699
|
}
|
|
700
700
|
|
|
701
|
-
const calculateMergerOffserIndex = (list: any, offsetItem: any, type: 'row' | 'col') => {
|
|
701
|
+
const calculateMergerOffserIndex = (list: any[], offsetItem: any, type: 'row' | 'col') => {
|
|
702
702
|
for (let mcIndex = 0, len = list.length; mcIndex < len; mcIndex++) {
|
|
703
703
|
const mergeItem = list[mcIndex]
|
|
704
704
|
const { startIndex, endIndex } = offsetItem
|
|
@@ -727,8 +727,8 @@ export default defineComponent({
|
|
|
727
727
|
if (treeConfig && merges.length) {
|
|
728
728
|
errLog('vxe.error.noTree', ['merge-cells | merge-footer-items'])
|
|
729
729
|
}
|
|
730
|
-
merges.forEach((item
|
|
731
|
-
let { row, col, rowspan, colspan }
|
|
730
|
+
merges.forEach((item) => {
|
|
731
|
+
let { row, col, rowspan, colspan } = item
|
|
732
732
|
if (rowList && XEUtils.isNumber(row)) {
|
|
733
733
|
row = rowList[row]
|
|
734
734
|
}
|
|
@@ -739,7 +739,7 @@ export default defineComponent({
|
|
|
739
739
|
rowspan = XEUtils.toNumber(rowspan) || 1
|
|
740
740
|
colspan = XEUtils.toNumber(colspan) || 1
|
|
741
741
|
if (rowspan > 1 || colspan > 1) {
|
|
742
|
-
const mcIndex = XEUtils.findIndexOf(mList, item => (item._row === row || getRowid($xetable, item._row) === getRowid($xetable, row)) && (item._col.id === col || item._col.id === col.id))
|
|
742
|
+
const mcIndex = XEUtils.findIndexOf(mList, item => (item._row === row || getRowid($xetable, item._row) === getRowid($xetable, row)) && ((item as any)._col.id === col || item._col.id === (col as VxeTableDefines.ColumnInfo).id))
|
|
743
743
|
const mergeItem = mList[mcIndex]
|
|
744
744
|
if (mergeItem) {
|
|
745
745
|
mergeItem.rowspan = rowspan
|
|
@@ -767,7 +767,7 @@ export default defineComponent({
|
|
|
767
767
|
}
|
|
768
768
|
|
|
769
769
|
const removeMerges = (merges: VxeTableDefines.MergeOptions | VxeTableDefines.MergeOptions[], mList: VxeTableDefines.MergeItem[], rowList?: any) => {
|
|
770
|
-
const rest:
|
|
770
|
+
const rest: VxeTableDefines.MergeItem[] = []
|
|
771
771
|
if (merges) {
|
|
772
772
|
const { treeConfig } = props
|
|
773
773
|
const { visibleColumn } = internalData
|
|
@@ -777,15 +777,15 @@ export default defineComponent({
|
|
|
777
777
|
if (treeConfig && merges.length) {
|
|
778
778
|
errLog('vxe.error.noTree', ['merge-cells | merge-footer-items'])
|
|
779
779
|
}
|
|
780
|
-
merges.forEach((item
|
|
781
|
-
let { row, col }
|
|
780
|
+
merges.forEach((item) => {
|
|
781
|
+
let { row, col } = item
|
|
782
782
|
if (rowList && XEUtils.isNumber(row)) {
|
|
783
783
|
row = rowList[row]
|
|
784
784
|
}
|
|
785
785
|
if (XEUtils.isNumber(col)) {
|
|
786
786
|
col = visibleColumn[col]
|
|
787
787
|
}
|
|
788
|
-
const mcIndex = XEUtils.findIndexOf(mList, item => (item._row === row || getRowid($xetable, item._row) === getRowid($xetable, row)) && (item._col.id === col || item._col.id === col.id))
|
|
788
|
+
const mcIndex = XEUtils.findIndexOf(mList, item => (item._row === row || getRowid($xetable, item._row) === getRowid($xetable, row)) && ((item as any)._col.id === col || item._col.id === (col as VxeTableDefines.ColumnInfo).id))
|
|
789
789
|
if (mcIndex > -1) {
|
|
790
790
|
const rItems = mList.splice(mcIndex, 1)
|
|
791
791
|
rest.push(rItems[0])
|
|
@@ -797,7 +797,7 @@ export default defineComponent({
|
|
|
797
797
|
|
|
798
798
|
const clearAllSort = () => {
|
|
799
799
|
const { tableFullColumn } = internalData
|
|
800
|
-
tableFullColumn.forEach((column
|
|
800
|
+
tableFullColumn.forEach((column) => {
|
|
801
801
|
column.order = null
|
|
802
802
|
})
|
|
803
803
|
}
|
|
@@ -833,7 +833,13 @@ export default defineComponent({
|
|
|
833
833
|
const isResizable = storage === true || (storage && storage.resizable)
|
|
834
834
|
const isVisible = storage === true || (storage && storage.visible)
|
|
835
835
|
if (customConfig && (isResizable || isVisible)) {
|
|
836
|
-
const customMap:
|
|
836
|
+
const customMap: {
|
|
837
|
+
[key: string]: {
|
|
838
|
+
field?: VxeColumnPropTypes.Field
|
|
839
|
+
resizeWidth?: number
|
|
840
|
+
visible?: boolean
|
|
841
|
+
}
|
|
842
|
+
} = {}
|
|
837
843
|
if (!id) {
|
|
838
844
|
errLog('vxe.error.reqProp', ['id'])
|
|
839
845
|
return
|
|
@@ -841,7 +847,7 @@ export default defineComponent({
|
|
|
841
847
|
if (isResizable) {
|
|
842
848
|
const columnWidthStorage = getCustomStorageMap(resizableStorageKey)[id]
|
|
843
849
|
if (columnWidthStorage) {
|
|
844
|
-
XEUtils.each(columnWidthStorage, (resizeWidth, field) => {
|
|
850
|
+
XEUtils.each(columnWidthStorage, (resizeWidth: number, field) => {
|
|
845
851
|
customMap[field] = { field, resizeWidth }
|
|
846
852
|
})
|
|
847
853
|
}
|
|
@@ -850,16 +856,16 @@ export default defineComponent({
|
|
|
850
856
|
const columnVisibleStorage = getCustomStorageMap(visibleStorageKey)[id]
|
|
851
857
|
if (columnVisibleStorage) {
|
|
852
858
|
const colVisibles = columnVisibleStorage.split('|')
|
|
853
|
-
const colHides = colVisibles[0] ? colVisibles[0].split(',') : []
|
|
854
|
-
const colShows = colVisibles[1] ? colVisibles[1].split(',') : []
|
|
855
|
-
colHides.forEach((field
|
|
859
|
+
const colHides: string[] = colVisibles[0] ? colVisibles[0].split(',') : []
|
|
860
|
+
const colShows: string[] = colVisibles[1] ? colVisibles[1].split(',') : []
|
|
861
|
+
colHides.forEach((field) => {
|
|
856
862
|
if (customMap[field]) {
|
|
857
863
|
customMap[field].visible = false
|
|
858
864
|
} else {
|
|
859
865
|
customMap[field] = { field, visible: false }
|
|
860
866
|
}
|
|
861
867
|
})
|
|
862
|
-
colShows.forEach((field
|
|
868
|
+
colShows.forEach((field) => {
|
|
863
869
|
if (customMap[field]) {
|
|
864
870
|
customMap[field].visible = true
|
|
865
871
|
} else {
|
|
@@ -868,8 +874,10 @@ export default defineComponent({
|
|
|
868
874
|
})
|
|
869
875
|
}
|
|
870
876
|
}
|
|
871
|
-
const keyMap:
|
|
872
|
-
|
|
877
|
+
const keyMap: {
|
|
878
|
+
[key: string]: VxeTableDefines.ColumnInfo
|
|
879
|
+
} = {}
|
|
880
|
+
XEUtils.eachTree(collectColumn, (column) => {
|
|
873
881
|
const colKey = column.getKey()
|
|
874
882
|
if (colKey) {
|
|
875
883
|
keyMap[colKey] = column
|
|
@@ -900,11 +908,11 @@ export default defineComponent({
|
|
|
900
908
|
const mouseOpts = computeMouseOpts.value
|
|
901
909
|
const isGroup = collectColumn.some(hasChildrenList)
|
|
902
910
|
let isAllOverflow = !!props.showOverflow
|
|
903
|
-
let expandColumn:
|
|
904
|
-
let treeNodeColumn:
|
|
905
|
-
let checkboxColumn:
|
|
906
|
-
let radioColumn:
|
|
907
|
-
let hasFixed:
|
|
911
|
+
let expandColumn: VxeTableDefines.ColumnInfo | undefined
|
|
912
|
+
let treeNodeColumn: VxeTableDefines.ColumnInfo | undefined
|
|
913
|
+
let checkboxColumn: VxeTableDefines.ColumnInfo | undefined
|
|
914
|
+
let radioColumn: VxeTableDefines.ColumnInfo | undefined
|
|
915
|
+
let hasFixed: VxeColumnPropTypes.Fixed | undefined
|
|
908
916
|
const handleFunc = (column: VxeTableDefines.ColumnInfo, index: number, items: VxeTableDefines.ColumnInfo[], path?: string[], parent?: VxeTableDefines.ColumnInfo) => {
|
|
909
917
|
const { id: colid, field, fixed, type, treeNode } = column
|
|
910
918
|
const rest = { column, colid, index, items, parent }
|
|
@@ -1014,32 +1022,32 @@ export default defineComponent({
|
|
|
1014
1022
|
const { columnStore } = reactData
|
|
1015
1023
|
const { resizeList, pxMinList, pxList, scaleList, scaleMinList, autoList } = columnStore
|
|
1016
1024
|
// 最小宽
|
|
1017
|
-
pxMinList.forEach((column
|
|
1018
|
-
const minWidth =
|
|
1025
|
+
pxMinList.forEach((column) => {
|
|
1026
|
+
const minWidth = XEUtils.toInteger(column.minWidth)
|
|
1019
1027
|
tableWidth += minWidth
|
|
1020
1028
|
column.renderWidth = minWidth
|
|
1021
1029
|
})
|
|
1022
1030
|
// 最小百分比
|
|
1023
|
-
scaleMinList.forEach((column
|
|
1024
|
-
const scaleWidth = Math.floor(
|
|
1031
|
+
scaleMinList.forEach((column) => {
|
|
1032
|
+
const scaleWidth = Math.floor(XEUtils.toInteger(column.minWidth) * meanWidth)
|
|
1025
1033
|
tableWidth += scaleWidth
|
|
1026
1034
|
column.renderWidth = scaleWidth
|
|
1027
1035
|
})
|
|
1028
1036
|
// 固定百分比
|
|
1029
|
-
scaleList.forEach((column
|
|
1030
|
-
const scaleWidth = Math.floor(
|
|
1037
|
+
scaleList.forEach((column) => {
|
|
1038
|
+
const scaleWidth = Math.floor(XEUtils.toInteger(column.width) * meanWidth)
|
|
1031
1039
|
tableWidth += scaleWidth
|
|
1032
1040
|
column.renderWidth = scaleWidth
|
|
1033
1041
|
})
|
|
1034
1042
|
// 固定宽
|
|
1035
|
-
pxList.forEach((column
|
|
1036
|
-
const width =
|
|
1043
|
+
pxList.forEach((column) => {
|
|
1044
|
+
const width = XEUtils.toInteger(column.width)
|
|
1037
1045
|
tableWidth += width
|
|
1038
1046
|
column.renderWidth = width
|
|
1039
1047
|
})
|
|
1040
1048
|
// 调整了列宽
|
|
1041
|
-
resizeList.forEach((column
|
|
1042
|
-
const width =
|
|
1049
|
+
resizeList.forEach((column) => {
|
|
1050
|
+
const width = XEUtils.toInteger(column.resizeWidth)
|
|
1043
1051
|
tableWidth += width
|
|
1044
1052
|
column.renderWidth = width
|
|
1045
1053
|
})
|
|
@@ -1047,7 +1055,7 @@ export default defineComponent({
|
|
|
1047
1055
|
meanWidth = remainWidth > 0 ? Math.floor(remainWidth / (scaleMinList.length + pxMinList.length + autoList.length)) : 0
|
|
1048
1056
|
if (fit) {
|
|
1049
1057
|
if (remainWidth > 0) {
|
|
1050
|
-
scaleMinList.concat(pxMinList).forEach((column
|
|
1058
|
+
scaleMinList.concat(pxMinList).forEach((column) => {
|
|
1051
1059
|
tableWidth += meanWidth
|
|
1052
1060
|
column.renderWidth += meanWidth
|
|
1053
1061
|
})
|
|
@@ -1056,7 +1064,7 @@ export default defineComponent({
|
|
|
1056
1064
|
meanWidth = minCellWidth
|
|
1057
1065
|
}
|
|
1058
1066
|
// 自适应
|
|
1059
|
-
autoList.forEach((column
|
|
1067
|
+
autoList.forEach((column) => {
|
|
1060
1068
|
const width = Math.max(meanWidth, minCellWidth)
|
|
1061
1069
|
column.renderWidth = width
|
|
1062
1070
|
tableWidth += width
|
|
@@ -1126,7 +1134,7 @@ export default defineComponent({
|
|
|
1126
1134
|
}
|
|
1127
1135
|
}
|
|
1128
1136
|
|
|
1129
|
-
const getOrderField = (column:
|
|
1137
|
+
const getOrderField = (column: VxeTableDefines.ColumnInfo) => {
|
|
1130
1138
|
const { sortBy, sortType } = column
|
|
1131
1139
|
return (row: any) => {
|
|
1132
1140
|
let cellValue
|
|
@@ -1195,7 +1203,7 @@ export default defineComponent({
|
|
|
1195
1203
|
const { treeExpandeds } = reactData
|
|
1196
1204
|
const treeOpts = computeTreeOpts.value
|
|
1197
1205
|
if (treeConfig && treeOpts.transform) {
|
|
1198
|
-
const fullData: any = []
|
|
1206
|
+
const fullData: any[] = []
|
|
1199
1207
|
const expandMaps: Map<any, number> = new Map()
|
|
1200
1208
|
XEUtils.eachTree(internalData.afterTreeFullData, (row, index, items, path, parent) => {
|
|
1201
1209
|
if (!parent || (expandMaps.has(parent) && $xetable.findRowIndexOf(treeExpandeds, parent) > -1)) {
|
|
@@ -1337,7 +1345,7 @@ export default defineComponent({
|
|
|
1337
1345
|
|
|
1338
1346
|
const updateStyle = () => {
|
|
1339
1347
|
const { border, showFooter, showOverflow: allColumnOverflow, showHeaderOverflow: allColumnHeaderOverflow, showFooterOverflow: allColumnFooterOverflow, mouseConfig, spanMethod, footerSpanMethod, keyboardConfig } = props
|
|
1340
|
-
|
|
1348
|
+
const { isGroup, currentRow, tableColumn, scrollXLoad, scrollYLoad, scrollbarWidth, scrollbarHeight, columnStore, editStore, mergeList, mergeFooterList, isAllOverflow } = reactData
|
|
1341
1349
|
let { visibleColumn, fullColumnIdData, tableHeight, tableWidth, headerHeight, footerHeight, elemStore, customHeight, customMaxHeight } = internalData
|
|
1342
1350
|
const containerList = ['main', 'left', 'right']
|
|
1343
1351
|
const emptyPlaceholderElem = refEmptyPlaceholder.value
|
|
@@ -1374,29 +1382,23 @@ export default defineComponent({
|
|
|
1374
1382
|
// 表头体样式处理
|
|
1375
1383
|
// 横向滚动渲染
|
|
1376
1384
|
let tWidth = tableWidth
|
|
1385
|
+
let renderColumnList = tableColumn
|
|
1377
1386
|
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1387
|
+
if (isGroup) {
|
|
1388
|
+
renderColumnList = visibleColumn
|
|
1389
|
+
} else {
|
|
1390
|
+
// 如果是使用优化模式
|
|
1381
1391
|
if (fixedType) {
|
|
1382
1392
|
if (scrollXLoad || allColumnHeaderOverflow) {
|
|
1383
|
-
|
|
1393
|
+
renderColumnList = fixedColumn
|
|
1384
1394
|
}
|
|
1385
1395
|
}
|
|
1386
1396
|
}
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
}
|
|
1390
|
-
tWidth = tableColumn.reduce((previous, column) => previous + column.renderWidth, 0)
|
|
1397
|
+
|
|
1398
|
+
tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0)
|
|
1391
1399
|
|
|
1392
1400
|
if (tableElem) {
|
|
1393
1401
|
tableElem.style.width = tWidth ? `${tWidth + scrollbarWidth}px` : ''
|
|
1394
|
-
// 修复 IE 中高度无法自适应问题
|
|
1395
|
-
if (browse.msie) {
|
|
1396
|
-
XEUtils.arrayEach(tableElem.querySelectorAll('.vxe-resizable'), (resizeElem: any) => {
|
|
1397
|
-
resizeElem.style.height = `${resizeElem.parentNode.offsetHeight}px`
|
|
1398
|
-
})
|
|
1399
|
-
}
|
|
1400
1402
|
}
|
|
1401
1403
|
|
|
1402
1404
|
const repairRef = elemStore[`${name}-${layout}-repair`]
|
|
@@ -1457,20 +1459,21 @@ export default defineComponent({
|
|
|
1457
1459
|
}
|
|
1458
1460
|
|
|
1459
1461
|
let tWidth = tableWidth
|
|
1462
|
+
let renderColumnList = tableColumn
|
|
1460
1463
|
|
|
1461
1464
|
// 如果是使用优化模式
|
|
1462
1465
|
if (fixedType) {
|
|
1463
1466
|
if (scrollYLoad || (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
1464
1467
|
if (!mergeList.length && !spanMethod && !(keyboardConfig && keyboardOpts.isMerge)) {
|
|
1465
|
-
|
|
1468
|
+
renderColumnList = fixedColumn
|
|
1466
1469
|
} else {
|
|
1467
|
-
|
|
1470
|
+
renderColumnList = visibleColumn
|
|
1468
1471
|
}
|
|
1469
1472
|
} else {
|
|
1470
|
-
|
|
1473
|
+
renderColumnList = visibleColumn
|
|
1471
1474
|
}
|
|
1472
1475
|
}
|
|
1473
|
-
tWidth =
|
|
1476
|
+
tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0)
|
|
1474
1477
|
|
|
1475
1478
|
if (tableElem) {
|
|
1476
1479
|
tableElem.style.width = tWidth ? `${tWidth}px` : ''
|
|
@@ -1483,19 +1486,20 @@ export default defineComponent({
|
|
|
1483
1486
|
} else if (layout === 'footer') {
|
|
1484
1487
|
let tWidth = tableWidth
|
|
1485
1488
|
|
|
1489
|
+
let renderColumnList = tableColumn
|
|
1486
1490
|
// 如果是使用优化模式
|
|
1487
1491
|
if (fixedType) {
|
|
1488
1492
|
if (scrollXLoad || allColumnFooterOverflow) {
|
|
1489
1493
|
if (!mergeFooterList.length || !footerSpanMethod) {
|
|
1490
|
-
|
|
1494
|
+
renderColumnList = fixedColumn
|
|
1491
1495
|
} else {
|
|
1492
|
-
|
|
1496
|
+
renderColumnList = visibleColumn
|
|
1493
1497
|
}
|
|
1494
1498
|
} else {
|
|
1495
|
-
|
|
1499
|
+
renderColumnList = visibleColumn
|
|
1496
1500
|
}
|
|
1497
1501
|
}
|
|
1498
|
-
tWidth =
|
|
1502
|
+
tWidth = renderColumnList.reduce((previous, column) => previous + column.renderWidth, 0)
|
|
1499
1503
|
|
|
1500
1504
|
if (isNodeElement(wrapperElem)) {
|
|
1501
1505
|
// 如果是固定列
|
|
@@ -1892,7 +1896,7 @@ export default defineComponent({
|
|
|
1892
1896
|
// 计算 X 逻辑
|
|
1893
1897
|
if (scrollXLoad) {
|
|
1894
1898
|
const { visibleSize: visibleXSize } = computeVirtualX()
|
|
1895
|
-
const offsetXSize = sXOpts.oSize ? XEUtils.toNumber(sXOpts.oSize) :
|
|
1899
|
+
const offsetXSize = sXOpts.oSize ? XEUtils.toNumber(sXOpts.oSize) : (browse.edge ? 5 : 0)
|
|
1896
1900
|
scrollXStore.offsetSize = offsetXSize
|
|
1897
1901
|
scrollXStore.visibleSize = visibleXSize
|
|
1898
1902
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex)
|
|
@@ -1904,7 +1908,7 @@ export default defineComponent({
|
|
|
1904
1908
|
const { rowHeight, visibleSize: visibleYSize } = computeVirtualY()
|
|
1905
1909
|
scrollYStore.rowHeight = rowHeight
|
|
1906
1910
|
if (scrollYLoad) {
|
|
1907
|
-
const offsetYSize = sYOpts.oSize ? XEUtils.toNumber(sYOpts.oSize) :
|
|
1911
|
+
const offsetYSize = sYOpts.oSize ? XEUtils.toNumber(sYOpts.oSize) : (browse.edge ? 10 : 0)
|
|
1908
1912
|
scrollYStore.offsetSize = offsetYSize
|
|
1909
1913
|
scrollYStore.visibleSize = visibleYSize
|
|
1910
1914
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex)
|
|
@@ -2100,26 +2104,26 @@ export default defineComponent({
|
|
|
2100
2104
|
}
|
|
2101
2105
|
|
|
2102
2106
|
// 获取所有的列,排除分组
|
|
2103
|
-
const getColumnList = (columns:
|
|
2104
|
-
const result:
|
|
2105
|
-
columns.forEach((column
|
|
2107
|
+
const getColumnList = (columns: VxeTableDefines.ColumnInfo[]) => {
|
|
2108
|
+
const result: VxeTableDefines.ColumnInfo[] = []
|
|
2109
|
+
columns.forEach((column) => {
|
|
2106
2110
|
result.push(...(column.children && column.children.length ? getColumnList(column.children) : [column]))
|
|
2107
2111
|
})
|
|
2108
2112
|
return result
|
|
2109
2113
|
}
|
|
2110
2114
|
|
|
2111
2115
|
const parseColumns = () => {
|
|
2112
|
-
const leftList:
|
|
2113
|
-
const centerList:
|
|
2114
|
-
const rightList:
|
|
2116
|
+
const leftList: VxeTableDefines.ColumnInfo[] = []
|
|
2117
|
+
const centerList: VxeTableDefines.ColumnInfo[] = []
|
|
2118
|
+
const rightList: VxeTableDefines.ColumnInfo[] = []
|
|
2115
2119
|
const { isGroup, columnStore } = reactData
|
|
2116
2120
|
const sXOpts = computeSXOpts.value
|
|
2117
2121
|
const { collectColumn, tableFullColumn, scrollXStore, fullColumnIdData } = internalData
|
|
2118
2122
|
// 如果是分组表头,如果子列全部被隐藏,则根列也隐藏
|
|
2119
2123
|
if (isGroup) {
|
|
2120
|
-
const leftGroupList:
|
|
2121
|
-
const centerGroupList:
|
|
2122
|
-
const rightGroupList:
|
|
2124
|
+
const leftGroupList: VxeTableDefines.ColumnInfo[] = []
|
|
2125
|
+
const centerGroupList: VxeTableDefines.ColumnInfo[] = []
|
|
2126
|
+
const rightGroupList: VxeTableDefines.ColumnInfo[] = []
|
|
2123
2127
|
XEUtils.eachTree(collectColumn, (column, index, items, path, parent) => {
|
|
2124
2128
|
const isColGroup = hasChildrenList(column)
|
|
2125
2129
|
// 如果是分组,必须按组设置固定列,不允许给子列设置固定
|
|
@@ -2168,15 +2172,9 @@ export default defineComponent({
|
|
|
2168
2172
|
})
|
|
2169
2173
|
}
|
|
2170
2174
|
const visibleColumn = leftList.concat(centerList).concat(rightList)
|
|
2171
|
-
|
|
2175
|
+
const scrollXLoad = !!sXOpts.enabled && sXOpts.gt > -1 && sXOpts.gt < tableFullColumn.length
|
|
2172
2176
|
reactData.hasFixedColumn = leftList.length > 0 || rightList.length > 0
|
|
2173
2177
|
Object.assign(columnStore, { leftList, centerList, rightList })
|
|
2174
|
-
if (scrollXLoad && isGroup) {
|
|
2175
|
-
scrollXLoad = false
|
|
2176
|
-
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
2177
|
-
warnLog('vxe.error.scrollXNotGroup')
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
2178
|
if (scrollXLoad) {
|
|
2181
2179
|
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
2182
2180
|
if (props.showHeader && !props.showHeaderOverflow) {
|
|
@@ -2221,7 +2219,7 @@ export default defineComponent({
|
|
|
2221
2219
|
})
|
|
2222
2220
|
}
|
|
2223
2221
|
|
|
2224
|
-
const handleColumn = (collectColumn:
|
|
2222
|
+
const handleColumn = (collectColumn: VxeTableDefines.ColumnInfo[]) => {
|
|
2225
2223
|
internalData.collectColumn = collectColumn
|
|
2226
2224
|
const tableFullColumn = getColumnList(collectColumn)
|
|
2227
2225
|
internalData.tableFullColumn = tableFullColumn
|
|
@@ -2694,7 +2692,7 @@ export default defineComponent({
|
|
|
2694
2692
|
* @param {Array/Row} rows 行数据
|
|
2695
2693
|
* @param {String} field 字段名
|
|
2696
2694
|
*/
|
|
2697
|
-
clearData (rows: any, field:
|
|
2695
|
+
clearData (rows: any, field: string) {
|
|
2698
2696
|
const { tableFullData, visibleColumn } = internalData
|
|
2699
2697
|
if (!arguments.length) {
|
|
2700
2698
|
rows = tableFullData
|
|
@@ -3050,11 +3048,11 @@ export default defineComponent({
|
|
|
3050
3048
|
* @param {Array/Row} rows 行数据
|
|
3051
3049
|
* @param {Boolean} value 是否选中
|
|
3052
3050
|
*/
|
|
3053
|
-
setCheckboxRow (rows, value) {
|
|
3051
|
+
setCheckboxRow (rows: any, value) {
|
|
3054
3052
|
if (rows && !XEUtils.isArray(rows)) {
|
|
3055
3053
|
rows = [rows]
|
|
3056
3054
|
}
|
|
3057
|
-
|
|
3055
|
+
rows.forEach((row: any) => tablePrivateMethods.handleSelectRow({ row }, !!value))
|
|
3058
3056
|
return nextTick()
|
|
3059
3057
|
},
|
|
3060
3058
|
isCheckedByCheckboxRow (row) {
|
|
@@ -3400,7 +3398,7 @@ export default defineComponent({
|
|
|
3400
3398
|
reactData.currentColumn = null
|
|
3401
3399
|
return nextTick()
|
|
3402
3400
|
},
|
|
3403
|
-
sort (sortConfs: any, sortOrder?:
|
|
3401
|
+
sort (sortConfs: any, sortOrder?: VxeTablePropTypes.SortOrder) {
|
|
3404
3402
|
const sortOpts = computeSortOpts.value
|
|
3405
3403
|
const { multiple, remote, orders } = sortOpts
|
|
3406
3404
|
if (sortConfs) {
|
|
@@ -3829,7 +3827,13 @@ export default defineComponent({
|
|
|
3829
3827
|
setScrollTop(rightBodyElem || tableBodyElem, scrollTop)
|
|
3830
3828
|
}
|
|
3831
3829
|
if (reactData.scrollXLoad || reactData.scrollYLoad) {
|
|
3832
|
-
return new Promise(resolve =>
|
|
3830
|
+
return new Promise(resolve => {
|
|
3831
|
+
setTimeout(() => {
|
|
3832
|
+
nextTick(() => {
|
|
3833
|
+
resolve()
|
|
3834
|
+
})
|
|
3835
|
+
}, 50)
|
|
3836
|
+
})
|
|
3833
3837
|
}
|
|
3834
3838
|
return nextTick()
|
|
3835
3839
|
},
|
|
@@ -4495,7 +4499,7 @@ export default defineComponent({
|
|
|
4495
4499
|
* @param {ColumnInfo} column 列配置
|
|
4496
4500
|
* @param {Row} row 行对象
|
|
4497
4501
|
*/
|
|
4498
|
-
const handleTooltip = (evnt: MouseEvent, cell:
|
|
4502
|
+
const handleTooltip = (evnt: MouseEvent, cell: HTMLTableCellElement, overflowElem: HTMLElement, tipElem: HTMLElement | null, params: any) => {
|
|
4499
4503
|
params.cell = cell
|
|
4500
4504
|
const { tooltipStore } = reactData
|
|
4501
4505
|
const tooltipOpts = computeTooltipOpts.value
|
|
@@ -4503,7 +4507,7 @@ export default defineComponent({
|
|
|
4503
4507
|
const { showAll, contentMethod } = tooltipOpts
|
|
4504
4508
|
const customContent = contentMethod ? contentMethod(params) : null
|
|
4505
4509
|
const useCustom = contentMethod && !XEUtils.eqNull(customContent)
|
|
4506
|
-
const content = useCustom ? customContent : (column.type === 'html' ? overflowElem.innerText : overflowElem.textContent).trim()
|
|
4510
|
+
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? overflowElem.innerText : overflowElem.textContent).trim()
|
|
4507
4511
|
const isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth
|
|
4508
4512
|
if (content && (showAll || useCustom || isCellOverflow)) {
|
|
4509
4513
|
Object.assign(tooltipStore, {
|
|
@@ -4806,16 +4810,16 @@ export default defineComponent({
|
|
|
4806
4810
|
isAllResolve = afterFullData.every(
|
|
4807
4811
|
checkMethod
|
|
4808
4812
|
? (row) => {
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4813
|
+
if (!checkMethod({ row })) {
|
|
4814
|
+
disableRows.push(row)
|
|
4815
|
+
return true
|
|
4816
|
+
}
|
|
4817
|
+
if (XEUtils.get(row, checkField)) {
|
|
4818
|
+
checkRows.push(row)
|
|
4819
|
+
return true
|
|
4820
|
+
}
|
|
4821
|
+
return false
|
|
4816
4822
|
}
|
|
4817
|
-
return false
|
|
4818
|
-
}
|
|
4819
4823
|
: row => XEUtils.get(row, checkField)
|
|
4820
4824
|
)
|
|
4821
4825
|
isAllSelected = isAllResolve && afterFullData.length !== disableRows.length
|
|
@@ -4836,16 +4840,16 @@ export default defineComponent({
|
|
|
4836
4840
|
isAllResolve = afterFullData.every(
|
|
4837
4841
|
checkMethod
|
|
4838
4842
|
? (row) => {
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4843
|
+
if (!checkMethod({ row })) {
|
|
4844
|
+
disableRows.push(row)
|
|
4845
|
+
return true
|
|
4846
|
+
}
|
|
4847
|
+
if ($xetable.findRowIndexOf(selection, row) > -1) {
|
|
4848
|
+
checkRows.push(row)
|
|
4849
|
+
return true
|
|
4850
|
+
}
|
|
4851
|
+
return false
|
|
4846
4852
|
}
|
|
4847
|
-
return false
|
|
4848
|
-
}
|
|
4849
4853
|
: row => $xetable.findRowIndexOf(selection, row) > -1
|
|
4850
4854
|
)
|
|
4851
4855
|
isAllSelected = isAllResolve && afterFullData.length !== disableRows.length
|
|
@@ -4980,7 +4984,7 @@ export default defineComponent({
|
|
|
4980
4984
|
triggerHeaderTooltipEvent (evnt, params) {
|
|
4981
4985
|
const { tooltipStore } = reactData
|
|
4982
4986
|
const { column } = params
|
|
4983
|
-
const titleElem = evnt.currentTarget
|
|
4987
|
+
const titleElem = evnt.currentTarget as HTMLTableCellElement
|
|
4984
4988
|
handleTargetEnterEvent(true)
|
|
4985
4989
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
4986
4990
|
handleTooltip(evnt, titleElem, titleElem, null, params)
|
|
@@ -5012,9 +5016,9 @@ export default defineComponent({
|
|
|
5012
5016
|
tipElem = cell.querySelector('.vxe-cell--html')
|
|
5013
5017
|
}
|
|
5014
5018
|
} else {
|
|
5015
|
-
tipElem = cell.querySelector(column.type === 'html' ? '.vxe-cell--html' : '.vxe-cell--label')
|
|
5019
|
+
tipElem = cell.querySelector(column.type === 'html' ? '.vxe-cell--html' : '.vxe-cell--label') as HTMLElement
|
|
5016
5020
|
}
|
|
5017
|
-
handleTooltip(evnt, cell, overflowElem || cell.children[0], tipElem, params)
|
|
5021
|
+
handleTooltip(evnt, cell, (overflowElem || cell.children[0]) as HTMLElement, tipElem as HTMLElement, params)
|
|
5018
5022
|
}
|
|
5019
5023
|
},
|
|
5020
5024
|
/**
|
|
@@ -5026,7 +5030,7 @@ export default defineComponent({
|
|
|
5026
5030
|
const cell = evnt.currentTarget as HTMLTableCellElement
|
|
5027
5031
|
handleTargetEnterEvent(tooltipStore.column !== column || tooltipStore.row)
|
|
5028
5032
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
5029
|
-
handleTooltip(evnt, cell, cell.querySelector('.vxe-cell--item') || cell.children[0], null, params)
|
|
5033
|
+
handleTooltip(evnt, cell, cell.querySelector('.vxe-cell--item') as HTMLElement || cell.children[0], null, params)
|
|
5030
5034
|
}
|
|
5031
5035
|
},
|
|
5032
5036
|
handleTargetLeaveEvent () {
|
|
@@ -5154,16 +5158,16 @@ export default defineComponent({
|
|
|
5154
5158
|
if (!actived.args || evnt.currentTarget !== actived.args.cell) {
|
|
5155
5159
|
if (editOpts.mode === 'row') {
|
|
5156
5160
|
checkValidate('blur')
|
|
5157
|
-
.catch((e
|
|
5161
|
+
.catch((e) => e)
|
|
5158
5162
|
.then(() => {
|
|
5159
5163
|
$xetable.handleActived(params, evnt)
|
|
5160
5164
|
.then(() => checkValidate('change'))
|
|
5161
|
-
.catch((e
|
|
5165
|
+
.catch((e) => e)
|
|
5162
5166
|
})
|
|
5163
5167
|
} else if (editOpts.mode === 'cell') {
|
|
5164
5168
|
$xetable.handleActived(params, evnt)
|
|
5165
5169
|
.then(() => checkValidate('change'))
|
|
5166
|
-
.catch((e
|
|
5170
|
+
.catch((e) => e)
|
|
5167
5171
|
}
|
|
5168
5172
|
}
|
|
5169
5173
|
}
|
|
@@ -5339,7 +5343,7 @@ export default defineComponent({
|
|
|
5339
5343
|
},
|
|
5340
5344
|
// 更新横向 X 可视渲染上下剩余空间大小
|
|
5341
5345
|
updateScrollXSpace () {
|
|
5342
|
-
const { scrollXLoad, scrollbarWidth } = reactData
|
|
5346
|
+
const { isGroup, scrollXLoad, scrollbarWidth } = reactData
|
|
5343
5347
|
const { visibleColumn, scrollXStore, elemStore, tableWidth } = internalData
|
|
5344
5348
|
const tableHeader = refTableHeader.value
|
|
5345
5349
|
const tableBody = refTableBody.value
|
|
@@ -5357,7 +5361,7 @@ export default defineComponent({
|
|
|
5357
5361
|
marginLeft = `${leftSpaceWidth}px`
|
|
5358
5362
|
}
|
|
5359
5363
|
if (headerElem) {
|
|
5360
|
-
headerElem.style.marginLeft = marginLeft
|
|
5364
|
+
headerElem.style.marginLeft = isGroup ? '' : marginLeft
|
|
5361
5365
|
}
|
|
5362
5366
|
bodyElem.style.marginLeft = marginLeft
|
|
5363
5367
|
if (footerElem) {
|
|
@@ -174,7 +174,7 @@ export function isColumnInfo (column: any): column is ColumnInfo {
|
|
|
174
174
|
return column && (column.constructor === ColumnInfo || column instanceof ColumnInfo)
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
export function createColumn ($xetable: VxeTableConstructor & VxeTablePrivateMethods, options: VxeTableDefines.ColumnOptions | VxeTableDefines.ColumnInfo, renderOptions: any) {
|
|
177
|
+
export function createColumn ($xetable: VxeTableConstructor & VxeTablePrivateMethods, options: VxeTableDefines.ColumnOptions | VxeTableDefines.ColumnInfo, renderOptions: any): any {
|
|
178
178
|
return isColumnInfo(options) ? options : reactive(new ColumnInfo($xetable, options, renderOptions))
|
|
179
179
|
}
|
|
180
180
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|