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
package/lib/table/src/util.js
CHANGED
|
@@ -25,36 +25,28 @@ exports.setCellValue = setCellValue;
|
|
|
25
25
|
exports.toFilters = toFilters;
|
|
26
26
|
exports.toTreePathSeq = toTreePathSeq;
|
|
27
27
|
exports.watchColumn = watchColumn;
|
|
28
|
-
|
|
29
28
|
var _vue = require("vue");
|
|
30
|
-
|
|
31
29
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
32
|
-
|
|
33
30
|
var _columnInfo = require("./columnInfo");
|
|
34
|
-
|
|
35
31
|
var _dom = require("../../tools/dom");
|
|
36
|
-
|
|
37
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
|
-
|
|
39
33
|
function restoreScrollLocation($xetable, scrollLeft, scrollTop) {
|
|
40
34
|
var internalData = $xetable.internalData;
|
|
41
35
|
return $xetable.clearScroll().then(function () {
|
|
42
36
|
if (scrollLeft || scrollTop) {
|
|
43
37
|
// 重置最后滚动状态
|
|
44
38
|
internalData.lastScrollLeft = 0;
|
|
45
|
-
internalData.lastScrollTop = 0;
|
|
46
|
-
|
|
39
|
+
internalData.lastScrollTop = 0;
|
|
40
|
+
// 还原滚动状态
|
|
47
41
|
return $xetable.scrollTo(scrollLeft, scrollTop);
|
|
48
42
|
}
|
|
49
43
|
});
|
|
50
44
|
}
|
|
51
|
-
|
|
52
45
|
function removeScrollListener(scrollElem) {
|
|
53
46
|
if (scrollElem && scrollElem._onscroll) {
|
|
54
47
|
scrollElem.onscroll = null;
|
|
55
48
|
}
|
|
56
49
|
}
|
|
57
|
-
|
|
58
50
|
function restoreScrollListener(scrollElem) {
|
|
59
51
|
if (scrollElem && scrollElem._onscroll) {
|
|
60
52
|
scrollElem.onscroll = scrollElem._onscroll;
|
|
@@ -63,78 +55,58 @@ function restoreScrollListener(scrollElem) {
|
|
|
63
55
|
/**
|
|
64
56
|
* 生成行的唯一主键
|
|
65
57
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
58
|
function getRowUniqueId() {
|
|
69
59
|
return _xeUtils.default.uniqueId('row_');
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
}
|
|
61
|
+
// 行主键 key
|
|
73
62
|
function getRowkey($xetable) {
|
|
74
63
|
var props = $xetable.props;
|
|
75
64
|
var computeRowOpts = $xetable.getComputeMaps().computeRowOpts;
|
|
76
65
|
var rowId = props.rowId;
|
|
77
66
|
var rowOpts = computeRowOpts.value;
|
|
78
67
|
return rowId || rowOpts.keyField || '_X_ROW_KEY';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
}
|
|
69
|
+
// 行主键 value
|
|
82
70
|
function getRowid($xetable, row) {
|
|
83
71
|
var rowid = _xeUtils.default.get(row, getRowkey($xetable));
|
|
84
|
-
|
|
85
72
|
return _xeUtils.default.eqNull(rowid) ? '' : encodeURIComponent(rowid);
|
|
86
73
|
}
|
|
87
|
-
|
|
88
|
-
var handleFieldOrColumn = function handleFieldOrColumn($xetable, fieldOrColumn) {
|
|
74
|
+
var handleFieldOrColumn = function ($xetable, fieldOrColumn) {
|
|
89
75
|
if (fieldOrColumn) {
|
|
90
76
|
return _xeUtils.default.isString(fieldOrColumn) ? $xetable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
91
77
|
}
|
|
92
|
-
|
|
93
78
|
return null;
|
|
94
79
|
};
|
|
95
|
-
|
|
96
80
|
exports.handleFieldOrColumn = handleFieldOrColumn;
|
|
97
|
-
|
|
98
81
|
function getPaddingLeftRightSize(elem) {
|
|
99
82
|
if (elem) {
|
|
100
83
|
var computedStyle = getComputedStyle(elem);
|
|
101
|
-
|
|
102
84
|
var paddingLeft = _xeUtils.default.toNumber(computedStyle.paddingLeft);
|
|
103
|
-
|
|
104
85
|
var paddingRight = _xeUtils.default.toNumber(computedStyle.paddingRight);
|
|
105
|
-
|
|
106
86
|
return paddingLeft + paddingRight;
|
|
107
87
|
}
|
|
108
|
-
|
|
109
88
|
return 0;
|
|
110
89
|
}
|
|
111
|
-
|
|
112
90
|
function getElemenMarginWidth(elem) {
|
|
113
91
|
if (elem) {
|
|
114
92
|
var computedStyle = getComputedStyle(elem);
|
|
115
|
-
|
|
116
93
|
var marginLeft = _xeUtils.default.toNumber(computedStyle.marginLeft);
|
|
117
|
-
|
|
118
94
|
var marginRight = _xeUtils.default.toNumber(computedStyle.marginRight);
|
|
119
|
-
|
|
120
95
|
return elem.offsetWidth + marginLeft + marginRight;
|
|
121
96
|
}
|
|
122
|
-
|
|
123
97
|
return 0;
|
|
124
98
|
}
|
|
125
|
-
|
|
126
99
|
function queryCellElement(cell, selector) {
|
|
127
100
|
return cell.querySelector('.vxe-cell' + selector);
|
|
128
101
|
}
|
|
129
|
-
|
|
130
102
|
function toFilters(filters) {
|
|
131
103
|
if (filters && _xeUtils.default.isArray(filters)) {
|
|
132
104
|
return filters.map(function (_a) {
|
|
133
105
|
var label = _a.label,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
106
|
+
value = _a.value,
|
|
107
|
+
data = _a.data,
|
|
108
|
+
resetValue = _a.resetValue,
|
|
109
|
+
checked = _a.checked;
|
|
138
110
|
return {
|
|
139
111
|
label: label,
|
|
140
112
|
value: value,
|
|
@@ -145,55 +117,46 @@ function toFilters(filters) {
|
|
|
145
117
|
};
|
|
146
118
|
});
|
|
147
119
|
}
|
|
148
|
-
|
|
149
120
|
return filters;
|
|
150
121
|
}
|
|
151
|
-
|
|
152
122
|
function toTreePathSeq(path) {
|
|
153
123
|
return path.map(function (num, i) {
|
|
154
124
|
return i % 2 === 0 ? Number(num) + 1 : '.';
|
|
155
125
|
}).join('');
|
|
156
126
|
}
|
|
157
|
-
|
|
158
127
|
function getCellValue(row, column) {
|
|
159
128
|
return _xeUtils.default.get(row, column.field);
|
|
160
129
|
}
|
|
161
|
-
|
|
162
130
|
function setCellValue(row, column, value) {
|
|
163
131
|
return _xeUtils.default.set(row, column.field, value);
|
|
164
132
|
}
|
|
165
|
-
|
|
166
133
|
function getColMinWidth(params) {
|
|
167
134
|
var $table = params.$table,
|
|
168
|
-
|
|
169
|
-
|
|
135
|
+
column = params.column,
|
|
136
|
+
cell = params.cell;
|
|
170
137
|
var tableProps = $table.props;
|
|
171
138
|
var computeResizableOpts = $table.getComputeMaps().computeResizableOpts;
|
|
172
139
|
var resizableOpts = computeResizableOpts.value;
|
|
173
|
-
var reMinWidth = resizableOpts.minWidth;
|
|
174
|
-
|
|
140
|
+
var reMinWidth = resizableOpts.minWidth;
|
|
141
|
+
// 如果自定义调整宽度逻辑
|
|
175
142
|
if (reMinWidth) {
|
|
176
143
|
var customMinWidth = _xeUtils.default.isFunction(reMinWidth) ? reMinWidth(params) : reMinWidth;
|
|
177
|
-
|
|
178
144
|
if (customMinWidth !== 'auto') {
|
|
179
145
|
return Math.max(1, _xeUtils.default.toNumber(customMinWidth));
|
|
180
146
|
}
|
|
181
147
|
}
|
|
182
|
-
|
|
183
148
|
var allColumnHeaderOverflow = tableProps.showHeaderOverflow;
|
|
184
149
|
var showHeaderOverflow = column.showHeaderOverflow,
|
|
185
|
-
|
|
150
|
+
colMinWidth = column.minWidth;
|
|
186
151
|
var headOverflow = _xeUtils.default.isUndefined(showHeaderOverflow) || _xeUtils.default.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
187
152
|
var showEllipsis = headOverflow === 'ellipsis';
|
|
188
153
|
var showTitle = headOverflow === 'title';
|
|
189
154
|
var showTooltip = headOverflow === true || headOverflow === 'tooltip';
|
|
190
155
|
var hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
191
|
-
|
|
192
156
|
var minTitleWidth = _xeUtils.default.floor((_xeUtils.default.toNumber(getComputedStyle(cell).fontSize) || 14) * 1.6);
|
|
193
|
-
|
|
194
157
|
var paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryCellElement(cell, ''));
|
|
195
|
-
var mWidth = minTitleWidth + paddingLeftRight;
|
|
196
|
-
|
|
158
|
+
var mWidth = minTitleWidth + paddingLeftRight;
|
|
159
|
+
// 默认最小宽处理
|
|
197
160
|
if (hasEllipsis) {
|
|
198
161
|
var checkboxIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '--title>.vxe-cell--checkbox'));
|
|
199
162
|
var requiredIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--required-icon'));
|
|
@@ -202,14 +165,12 @@ function getColMinWidth(params) {
|
|
|
202
165
|
var sortIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--sort'));
|
|
203
166
|
var filterIconWidth = getElemenMarginWidth(queryCellElement(cell, '>.vxe-cell--filter'));
|
|
204
167
|
mWidth += checkboxIconWidth + requiredIconWidth + editIconWidth + helpIconWidth + filterIconWidth + sortIconWidth;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
168
|
+
}
|
|
169
|
+
// 如果设置最小宽
|
|
208
170
|
if (colMinWidth) {
|
|
209
171
|
var refTableBody = $table.getRefMaps().refTableBody;
|
|
210
172
|
var tableBody = refTableBody.value;
|
|
211
173
|
var bodyElem = tableBody ? tableBody.$el : null;
|
|
212
|
-
|
|
213
174
|
if (bodyElem) {
|
|
214
175
|
if ((0, _dom.isScale)(colMinWidth)) {
|
|
215
176
|
var bodyWidth = bodyElem.clientWidth - 1;
|
|
@@ -220,18 +181,14 @@ function getColMinWidth(params) {
|
|
|
220
181
|
}
|
|
221
182
|
}
|
|
222
183
|
}
|
|
223
|
-
|
|
224
184
|
return mWidth;
|
|
225
185
|
}
|
|
226
|
-
|
|
227
186
|
function isColumnInfo(column) {
|
|
228
187
|
return column && (column.constructor === _columnInfo.ColumnInfo || column instanceof _columnInfo.ColumnInfo);
|
|
229
188
|
}
|
|
230
|
-
|
|
231
189
|
function createColumn($xetable, options, renderOptions) {
|
|
232
190
|
return isColumnInfo(options) ? options : (0, _vue.reactive)(new _columnInfo.ColumnInfo($xetable, options, renderOptions));
|
|
233
191
|
}
|
|
234
|
-
|
|
235
192
|
function watchColumn(props, column) {
|
|
236
193
|
Object.keys(props).forEach(function (name) {
|
|
237
194
|
(0, _vue.watch)(function () {
|
|
@@ -241,45 +198,37 @@ function watchColumn(props, column) {
|
|
|
241
198
|
});
|
|
242
199
|
});
|
|
243
200
|
}
|
|
244
|
-
|
|
245
201
|
function assemColumn($xetable, elem, column, colgroup) {
|
|
246
202
|
var reactData = $xetable.reactData;
|
|
247
203
|
var staticColumns = reactData.staticColumns;
|
|
248
204
|
var parentElem = elem.parentNode;
|
|
249
205
|
var parentColumn = colgroup ? colgroup.column : null;
|
|
250
206
|
var parentCols = parentColumn ? parentColumn.children : staticColumns;
|
|
251
|
-
|
|
252
207
|
if (parentElem && parentCols) {
|
|
253
208
|
parentCols.splice(_xeUtils.default.arrayIndexOf(parentElem.children, elem), 0, column);
|
|
254
209
|
reactData.staticColumns = staticColumns.slice(0);
|
|
255
210
|
}
|
|
256
211
|
}
|
|
257
|
-
|
|
258
212
|
function destroyColumn($xetable, column) {
|
|
259
213
|
var reactData = $xetable.reactData;
|
|
260
214
|
var staticColumns = reactData.staticColumns;
|
|
261
|
-
|
|
262
215
|
var matchObj = _xeUtils.default.findTree(staticColumns, function (item) {
|
|
263
216
|
return item.id === column.id;
|
|
264
217
|
}, {
|
|
265
218
|
children: 'children'
|
|
266
219
|
});
|
|
267
|
-
|
|
268
220
|
if (matchObj) {
|
|
269
221
|
matchObj.items.splice(matchObj.index, 1);
|
|
270
222
|
}
|
|
271
|
-
|
|
272
223
|
reactData.staticColumns = staticColumns.slice(0);
|
|
273
224
|
}
|
|
274
|
-
|
|
275
225
|
function mergeBodyMethod(mergeList, _rowIndex, _columnIndex) {
|
|
276
226
|
for (var mIndex = 0; mIndex < mergeList.length; mIndex++) {
|
|
277
227
|
var _a = mergeList[mIndex],
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
228
|
+
mergeRowIndex = _a.row,
|
|
229
|
+
mergeColIndex = _a.col,
|
|
230
|
+
mergeRowspan = _a.rowspan,
|
|
231
|
+
mergeColspan = _a.colspan;
|
|
283
232
|
if (mergeColIndex > -1 && mergeRowIndex > -1 && mergeRowspan && mergeColspan) {
|
|
284
233
|
if (mergeRowIndex === _rowIndex && mergeColIndex === _columnIndex) {
|
|
285
234
|
return {
|
|
@@ -287,7 +236,6 @@ function mergeBodyMethod(mergeList, _rowIndex, _columnIndex) {
|
|
|
287
236
|
colspan: mergeColspan
|
|
288
237
|
};
|
|
289
238
|
}
|
|
290
|
-
|
|
291
239
|
if (_rowIndex >= mergeRowIndex && _rowIndex < mergeRowIndex + mergeRowspan && _columnIndex >= mergeColIndex && _columnIndex < mergeColIndex + mergeColspan) {
|
|
292
240
|
return {
|
|
293
241
|
rowspan: 0,
|
|
@@ -297,10 +245,9 @@ function mergeBodyMethod(mergeList, _rowIndex, _columnIndex) {
|
|
|
297
245
|
}
|
|
298
246
|
}
|
|
299
247
|
}
|
|
300
|
-
|
|
301
248
|
function clearTableDefaultStatus($xetable) {
|
|
302
249
|
var props = $xetable.props,
|
|
303
|
-
|
|
250
|
+
internalData = $xetable.internalData;
|
|
304
251
|
internalData.initStatus = false;
|
|
305
252
|
$xetable.clearSort();
|
|
306
253
|
$xetable.clearCurrentRow();
|
|
@@ -312,51 +259,42 @@ function clearTableDefaultStatus($xetable) {
|
|
|
312
259
|
$xetable.clearRowExpand();
|
|
313
260
|
$xetable.clearTreeExpand();
|
|
314
261
|
$xetable.clearTreeExpandReserve();
|
|
315
|
-
|
|
316
262
|
if ($xetable.clearFilter) {
|
|
317
263
|
$xetable.clearFilter();
|
|
318
264
|
}
|
|
319
|
-
|
|
320
265
|
if ($xetable.clearSelected && (props.keyboardConfig || props.mouseConfig)) {
|
|
321
266
|
$xetable.clearSelected();
|
|
322
267
|
}
|
|
323
|
-
|
|
324
268
|
if ($xetable.clearCellAreas && props.mouseConfig) {
|
|
325
269
|
$xetable.clearCellAreas();
|
|
326
270
|
$xetable.clearCopyCellArea();
|
|
327
271
|
}
|
|
328
|
-
|
|
329
272
|
return $xetable.clearScroll();
|
|
330
273
|
}
|
|
331
|
-
|
|
332
274
|
function clearTableAllStatus($xetable) {
|
|
333
275
|
if ($xetable.clearFilter) {
|
|
334
276
|
$xetable.clearFilter();
|
|
335
277
|
}
|
|
336
|
-
|
|
337
278
|
return clearTableDefaultStatus($xetable);
|
|
338
279
|
}
|
|
339
|
-
|
|
340
280
|
function rowToVisible($xetable, row) {
|
|
341
281
|
var reactData = $xetable.reactData,
|
|
342
|
-
|
|
282
|
+
internalData = $xetable.internalData;
|
|
343
283
|
var refTableBody = $xetable.getRefMaps().refTableBody;
|
|
344
284
|
var scrollYLoad = reactData.scrollYLoad;
|
|
345
285
|
var afterFullData = internalData.afterFullData,
|
|
346
|
-
|
|
286
|
+
scrollYStore = internalData.scrollYStore;
|
|
347
287
|
var tableBody = refTableBody.value;
|
|
348
288
|
var bodyElem = tableBody ? tableBody.$el : null;
|
|
349
|
-
|
|
350
289
|
if (bodyElem) {
|
|
351
290
|
var trElem = bodyElem.querySelector("[rowid=\"".concat(getRowid($xetable, row), "\"]"));
|
|
352
|
-
|
|
353
291
|
if (trElem) {
|
|
354
292
|
var bodyHeight = bodyElem.clientHeight;
|
|
355
293
|
var bodySrcollTop = bodyElem.scrollTop;
|
|
356
294
|
var trOffsetParent = trElem.offsetParent;
|
|
357
295
|
var trOffsetTop = trElem.offsetTop + (trOffsetParent ? trOffsetParent.offsetTop : 0);
|
|
358
|
-
var trHeight = trElem.clientHeight;
|
|
359
|
-
|
|
296
|
+
var trHeight = trElem.clientHeight;
|
|
297
|
+
// 检测行是否在可视区中
|
|
360
298
|
if (trOffsetTop < bodySrcollTop || trOffsetTop > bodySrcollTop + bodyHeight) {
|
|
361
299
|
// 向上定位
|
|
362
300
|
return $xetable.scrollTo(null, trOffsetTop);
|
|
@@ -371,29 +309,25 @@ function rowToVisible($xetable, row) {
|
|
|
371
309
|
}
|
|
372
310
|
}
|
|
373
311
|
}
|
|
374
|
-
|
|
375
312
|
return Promise.resolve();
|
|
376
313
|
}
|
|
377
|
-
|
|
378
314
|
function colToVisible($xetable, column) {
|
|
379
315
|
var reactData = $xetable.reactData,
|
|
380
|
-
|
|
316
|
+
internalData = $xetable.internalData;
|
|
381
317
|
var refTableBody = $xetable.getRefMaps().refTableBody;
|
|
382
318
|
var scrollXLoad = reactData.scrollXLoad;
|
|
383
319
|
var visibleColumn = internalData.visibleColumn;
|
|
384
320
|
var tableBody = refTableBody.value;
|
|
385
321
|
var bodyElem = tableBody ? tableBody.$el : null;
|
|
386
|
-
|
|
387
322
|
if (bodyElem) {
|
|
388
323
|
var tdElem = bodyElem.querySelector(".".concat(column.id));
|
|
389
|
-
|
|
390
324
|
if (tdElem) {
|
|
391
325
|
var bodyWidth = bodyElem.clientWidth;
|
|
392
326
|
var bodySrcollLeft = bodyElem.scrollLeft;
|
|
393
327
|
var tdOffsetParent = tdElem.offsetParent;
|
|
394
328
|
var tdOffsetLeft = tdElem.offsetLeft + (tdOffsetParent ? tdOffsetParent.offsetLeft : 0);
|
|
395
|
-
var tdWidth = tdElem.clientWidth;
|
|
396
|
-
|
|
329
|
+
var tdWidth = tdElem.clientWidth;
|
|
330
|
+
// 检测行是否在可视区中
|
|
397
331
|
if (tdOffsetLeft < bodySrcollLeft || tdOffsetLeft > bodySrcollLeft + bodyWidth) {
|
|
398
332
|
// 向左定位
|
|
399
333
|
return $xetable.scrollTo(tdOffsetLeft);
|
|
@@ -405,19 +339,15 @@ function colToVisible($xetable, column) {
|
|
|
405
339
|
// 如果是虚拟渲染跨行滚动
|
|
406
340
|
if (scrollXLoad) {
|
|
407
341
|
var scrollLeft = 0;
|
|
408
|
-
|
|
409
342
|
for (var index = 0; index < visibleColumn.length; index++) {
|
|
410
343
|
if (visibleColumn[index] === column) {
|
|
411
344
|
break;
|
|
412
345
|
}
|
|
413
|
-
|
|
414
346
|
scrollLeft += visibleColumn[index].renderWidth;
|
|
415
347
|
}
|
|
416
|
-
|
|
417
348
|
return $xetable.scrollTo(scrollLeft);
|
|
418
349
|
}
|
|
419
350
|
}
|
|
420
351
|
}
|
|
421
|
-
|
|
422
352
|
return Promise.resolve();
|
|
423
353
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assemColumn=assemColumn,exports.clearTableAllStatus=clearTableAllStatus,exports.clearTableDefaultStatus=clearTableDefaultStatus,exports.colToVisible=colToVisible,exports.createColumn=createColumn,exports.destroyColumn=destroyColumn,exports.getCellValue=getCellValue,exports.getColMinWidth=getColMinWidth,exports.getRowUniqueId=getRowUniqueId,exports.getRowid=getRowid,exports.getRowkey=getRowkey,exports.handleFieldOrColumn=void 0,exports.isColumnInfo=isColumnInfo,exports.mergeBodyMethod=mergeBodyMethod,exports.removeScrollListener=removeScrollListener,exports.restoreScrollListener=restoreScrollListener,exports.restoreScrollLocation=restoreScrollLocation,exports.rowToVisible=rowToVisible,exports.setCellValue=setCellValue,exports.toFilters=toFilters,exports.toTreePathSeq=toTreePathSeq,exports.watchColumn=watchColumn;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_columnInfo=require("./columnInfo"),_dom=require("../../tools/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function restoreScrollLocation(e,t,l){var r=e.internalData;return e.clearScroll().then(function(){if(t||l)return r.lastScrollLeft=0,r.lastScrollTop=0,e.scrollTo(t,l)})}function removeScrollListener(e){e&&e._onscroll&&(e.onscroll=null)}function restoreScrollListener(e){e&&e._onscroll&&(e.onscroll=e._onscroll)}function getRowUniqueId(){return _xeUtils.default.uniqueId("row_")}function getRowkey(e){var t=e.props,e=e.getComputeMaps().computeRowOpts,t=t.rowId,e=e.value;return t||e.keyField||"_X_ROW_KEY"}function getRowid(e,t){
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.assemColumn=assemColumn,exports.clearTableAllStatus=clearTableAllStatus,exports.clearTableDefaultStatus=clearTableDefaultStatus,exports.colToVisible=colToVisible,exports.createColumn=createColumn,exports.destroyColumn=destroyColumn,exports.getCellValue=getCellValue,exports.getColMinWidth=getColMinWidth,exports.getRowUniqueId=getRowUniqueId,exports.getRowid=getRowid,exports.getRowkey=getRowkey,exports.handleFieldOrColumn=void 0,exports.isColumnInfo=isColumnInfo,exports.mergeBodyMethod=mergeBodyMethod,exports.removeScrollListener=removeScrollListener,exports.restoreScrollListener=restoreScrollListener,exports.restoreScrollLocation=restoreScrollLocation,exports.rowToVisible=rowToVisible,exports.setCellValue=setCellValue,exports.toFilters=toFilters,exports.toTreePathSeq=toTreePathSeq,exports.watchColumn=watchColumn;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_columnInfo=require("./columnInfo"),_dom=require("../../tools/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function restoreScrollLocation(e,t,l){var r=e.internalData;return e.clearScroll().then(function(){if(t||l)return r.lastScrollLeft=0,r.lastScrollTop=0,e.scrollTo(t,l)})}function removeScrollListener(e){e&&e._onscroll&&(e.onscroll=null)}function restoreScrollListener(e){e&&e._onscroll&&(e.onscroll=e._onscroll)}function getRowUniqueId(){return _xeUtils.default.uniqueId("row_")}function getRowkey(e){var t=e.props,e=e.getComputeMaps().computeRowOpts,t=t.rowId,e=e.value;return t||e.keyField||"_X_ROW_KEY"}function getRowid(e,t){t=_xeUtils.default.get(t,getRowkey(e));return _xeUtils.default.eqNull(t)?"":encodeURIComponent(t)}var handleFieldOrColumn=function(e,t){return t?_xeUtils.default.isString(t)?e.getColumnByField(t):t:null};function getPaddingLeftRightSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingLeft)+_xeUtils.default.toNumber(e.paddingRight)):0}function getElemenMarginWidth(e){var t,l;return e?(l=getComputedStyle(e),t=_xeUtils.default.toNumber(l.marginLeft),l=_xeUtils.default.toNumber(l.marginRight),e.offsetWidth+t+l):0}function queryCellElement(e,t){return e.querySelector(".vxe-cell"+t)}function toFilters(e){return e&&_xeUtils.default.isArray(e)?e.map(function(e){var t=e.label,l=e.value,r=e.data,o=e.resetValue,e=e.checked;return{label:t,value:l,data:r,resetValue:o,checked:!!e,_checked:!!e}}):e}function toTreePathSeq(e){return e.map(function(e,t){return t%2==0?Number(e)+1:"."}).join("")}function getCellValue(e,t){return _xeUtils.default.get(e,t.field)}function setCellValue(e,t,l){return _xeUtils.default.set(e,t.field,l)}function getColMinWidth(e){var t=e.$table,l=e.column,r=e.cell,o=t.props,n=t.getComputeMaps().computeResizableOpts.value.minWidth;if(n){e=_xeUtils.default.isFunction(n)?n(e):n;if("auto"!==e)return Math.max(1,_xeUtils.default.toNumber(e))}var i,a,n=o.showHeaderOverflow,e=l.showHeaderOverflow,o=l.minWidth,l=_xeUtils.default.isUndefined(e)||_xeUtils.default.isNull(e)?n:e,n="title"===l||(!0===l||"tooltip"===l)||"ellipsis"===l,e=_xeUtils.default.floor(1.6*(_xeUtils.default.toNumber(getComputedStyle(r).fontSize)||14))+(getPaddingLeftRightSize(r)+getPaddingLeftRightSize(queryCellElement(r,"")));if(n&&(l=getPaddingLeftRightSize(queryCellElement(r,"--title>.vxe-cell--checkbox")),n=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--required-icon")),u=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--edit-icon")),i=getElemenMarginWidth(queryCellElement(r,">.vxe-cell-help-icon")),a=getElemenMarginWidth(queryCellElement(r,">.vxe-cell--sort")),e+=l+n+u+i+getElemenMarginWidth(queryCellElement(r,">.vxe-cell--filter"))+a),o){var u,l=t.getRefMaps().refTableBody.value,n=l?l.$el:null;if(n){if((0,_dom.isScale)(o))return u=(n.clientWidth-1)/100,Math.max(e,Math.floor(_xeUtils.default.toInteger(o)*u));if((0,_dom.isPx)(o))return Math.max(e,_xeUtils.default.toInteger(o))}}return e}function isColumnInfo(e){return e&&(e.constructor===_columnInfo.ColumnInfo||e instanceof _columnInfo.ColumnInfo)}function createColumn(e,t,l){return isColumnInfo(t)?t:(0,_vue.reactive)(new _columnInfo.ColumnInfo(e,t,l))}function watchColumn(e,l){Object.keys(e).forEach(function(t){(0,_vue.watch)(function(){return e[t]},function(e){l.update(t,e)})})}function assemColumn(e,t,l,r){var e=e.reactData,o=e.staticColumns,n=t.parentNode,r=r?r.column:null,r=r?r.children:o;n&&r&&(r.splice(_xeUtils.default.arrayIndexOf(n.children,t),0,l),e.staticColumns=o.slice(0))}function destroyColumn(e,t){var e=e.reactData,l=e.staticColumns,r=_xeUtils.default.findTree(l,function(e){return e.id===t.id},{children:"children"});r&&r.items.splice(r.index,1),e.staticColumns=l.slice(0)}function mergeBodyMethod(e,t,l){for(var r=0;r<e.length;r++){var o=e[r],n=o.row,i=o.col,a=o.rowspan,o=o.colspan;if(-1<i&&-1<n&&a&&o){if(n===t&&i===l)return{rowspan:a,colspan:o};if(n<=t&&t<n+a&&i<=l&&l<i+o)return{rowspan:0,colspan:0}}}}function clearTableDefaultStatus(e){var t=e.props;return e.internalData.initStatus=!1,e.clearSort(),e.clearCurrentRow(),e.clearCurrentColumn(),e.clearRadioRow(),e.clearRadioReserve(),e.clearCheckboxRow(),e.clearCheckboxReserve(),e.clearRowExpand(),e.clearTreeExpand(),e.clearTreeExpandReserve(),e.clearFilter&&e.clearFilter(),e.clearSelected&&(t.keyboardConfig||t.mouseConfig)&&e.clearSelected(),e.clearCellAreas&&t.mouseConfig&&(e.clearCellAreas(),e.clearCopyCellArea()),e.clearScroll()}function clearTableAllStatus(e){return e.clearFilter&&e.clearFilter(),clearTableDefaultStatus(e)}function rowToVisible(e,t){var l=e.reactData,r=e.internalData,o=e.getRefMaps().refTableBody,l=l.scrollYLoad,n=r.afterFullData,r=r.scrollYStore,o=o.value,o=o?o.$el:null;if(o){var i=o.querySelector('[rowid="'.concat(getRowid(e,t),'"]'));if(i){var a=o.clientHeight,o=o.scrollTop,u=i.offsetParent,u=i.offsetTop+(u?u.offsetTop:0),i=i.clientHeight;if(u<o||o+a<u)return e.scrollTo(null,u);if(a+o<=u+i)return e.scrollTo(null,o+i)}else if(l)return e.scrollTo(null,(n.indexOf(t)-1)*r.rowHeight)}return Promise.resolve()}function colToVisible(e,t){var l=e.reactData,r=e.internalData,o=e.getRefMaps().refTableBody,l=l.scrollXLoad,n=r.visibleColumn,r=o.value,o=r?r.$el:null;if(o){r=o.querySelector(".".concat(t.id));if(r){var i=o.clientWidth,o=o.scrollLeft,a=r.offsetParent,a=r.offsetLeft+(a?a.offsetLeft:0),r=r.clientWidth;if(a<o||o+i<a)return e.scrollTo(a);if(i+o<=a+r)return e.scrollTo(o+r)}else if(l){for(var u=0,s=0;s<n.length&&n[s]!==t;s++)u+=n[s].renderWidth;return e.scrollTo(u)}}return Promise.resolve()}exports.handleFieldOrColumn=handleFieldOrColumn;
|