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/edit/src/hook.js
CHANGED
|
@@ -4,39 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _vue = require("vue");
|
|
9
|
-
|
|
10
8
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
11
|
-
|
|
12
9
|
var _vXETable = require("../../v-x-e-table");
|
|
13
|
-
|
|
14
10
|
var _utils = require("../../tools/utils");
|
|
15
|
-
|
|
16
11
|
var _util = require("../../table/src/util");
|
|
17
|
-
|
|
18
12
|
var _dom = require("../../tools/dom");
|
|
19
|
-
|
|
20
13
|
var _log = require("../../tools/log");
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
25
16
|
__assign = Object.assign || function (t) {
|
|
26
17
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
27
18
|
s = arguments[i];
|
|
28
|
-
|
|
29
|
-
for (var p in s) {
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
31
|
-
}
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
32
20
|
}
|
|
33
|
-
|
|
34
21
|
return t;
|
|
35
22
|
};
|
|
36
|
-
|
|
37
23
|
return __assign.apply(this, arguments);
|
|
38
24
|
};
|
|
39
|
-
|
|
40
25
|
var __spreadArray = void 0 && (void 0).__spreadArray || function (to, from, pack) {
|
|
41
26
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42
27
|
if (ar || !(i in from)) {
|
|
@@ -46,65 +31,53 @@ var __spreadArray = void 0 && (void 0).__spreadArray || function (to, from, pack
|
|
|
46
31
|
}
|
|
47
32
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
48
33
|
};
|
|
49
|
-
|
|
50
34
|
var tableEditMethodKeys = ['insert', 'insertAt', 'remove', 'removeCheckboxRow', 'removeRadioRow', 'removeCurrentRow', 'getRecordset', 'getInsertRecords', 'getRemoveRecords', 'getUpdateRecords', 'getEditRecord', 'getActiveRecord', 'getSelectedCell', 'clearEdit', 'clearActived', 'clearSelected', 'isEditByRow', 'isActiveByRow', 'setEditRow', 'setActiveRow', 'setEditCell', 'setActiveCell', 'setSelectCell'];
|
|
51
35
|
var editHook = {
|
|
52
|
-
setupTable: function
|
|
36
|
+
setupTable: function ($xetable) {
|
|
53
37
|
var props = $xetable.props,
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
reactData = $xetable.reactData,
|
|
39
|
+
internalData = $xetable.internalData;
|
|
56
40
|
var refElem = $xetable.getRefMaps().refElem;
|
|
57
|
-
|
|
58
41
|
var _a = $xetable.getComputeMaps(),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
computeMouseOpts = _a.computeMouseOpts,
|
|
43
|
+
computeEditOpts = _a.computeEditOpts,
|
|
44
|
+
computeCheckboxOpts = _a.computeCheckboxOpts,
|
|
45
|
+
computeTreeOpts = _a.computeTreeOpts;
|
|
64
46
|
var editMethods = {};
|
|
65
47
|
var editPrivateMethods = {};
|
|
66
|
-
|
|
67
|
-
var getEditColumnModel = function getEditColumnModel(row, column) {
|
|
48
|
+
var getEditColumnModel = function (row, column) {
|
|
68
49
|
var model = column.model,
|
|
69
|
-
|
|
70
|
-
|
|
50
|
+
editRender = column.editRender;
|
|
71
51
|
if (editRender) {
|
|
72
52
|
model.value = (0, _util.getCellValue)(row, column);
|
|
73
53
|
model.update = false;
|
|
74
54
|
}
|
|
75
55
|
};
|
|
76
|
-
|
|
77
|
-
var setEditColumnModel = function setEditColumnModel(row, column) {
|
|
56
|
+
var setEditColumnModel = function (row, column) {
|
|
78
57
|
var model = column.model,
|
|
79
|
-
|
|
80
|
-
|
|
58
|
+
editRender = column.editRender;
|
|
81
59
|
if (editRender && model.update) {
|
|
82
60
|
(0, _util.setCellValue)(row, column, model.value);
|
|
83
61
|
model.update = false;
|
|
84
62
|
model.value = null;
|
|
85
63
|
}
|
|
86
64
|
};
|
|
87
|
-
|
|
88
|
-
var removeCellSelectedClass = function removeCellSelectedClass() {
|
|
65
|
+
var removeCellSelectedClass = function () {
|
|
89
66
|
var el = refElem.value;
|
|
90
|
-
|
|
91
67
|
if (el) {
|
|
92
68
|
var cell = el.querySelector('.col--selected');
|
|
93
|
-
|
|
94
69
|
if (cell) {
|
|
95
70
|
(0, _dom.removeClass)(cell, 'col--selected');
|
|
96
71
|
}
|
|
97
72
|
}
|
|
98
73
|
};
|
|
99
|
-
|
|
100
74
|
function syncActivedCell() {
|
|
101
75
|
var editStore = reactData.editStore,
|
|
102
|
-
|
|
76
|
+
tableColumn = reactData.tableColumn;
|
|
103
77
|
var editOpts = computeEditOpts.value;
|
|
104
78
|
var actived = editStore.actived;
|
|
105
79
|
var row = actived.row,
|
|
106
|
-
|
|
107
|
-
|
|
80
|
+
column = actived.column;
|
|
108
81
|
if (row || column) {
|
|
109
82
|
if (editOpts.mode === 'row') {
|
|
110
83
|
tableColumn.forEach(function (column) {
|
|
@@ -115,17 +88,16 @@ var editHook = {
|
|
|
115
88
|
}
|
|
116
89
|
}
|
|
117
90
|
}
|
|
118
|
-
|
|
119
91
|
function insertTreeRow(newRecords, isAppend) {
|
|
120
92
|
var tableFullTreeData = internalData.tableFullTreeData,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
93
|
+
afterFullData = internalData.afterFullData,
|
|
94
|
+
fullDataRowIdData = internalData.fullDataRowIdData,
|
|
95
|
+
fullAllDataRowIdData = internalData.fullAllDataRowIdData;
|
|
124
96
|
var treeOpts = computeTreeOpts.value;
|
|
125
97
|
var rowField = treeOpts.rowField,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
98
|
+
parentField = treeOpts.parentField,
|
|
99
|
+
children = treeOpts.children,
|
|
100
|
+
mapChildren = treeOpts.mapChildren;
|
|
129
101
|
var funcName = isAppend ? 'push' : 'unshift';
|
|
130
102
|
newRecords.forEach(function (item) {
|
|
131
103
|
var parentRowId = item[parentField];
|
|
@@ -135,17 +107,14 @@ var editHook = {
|
|
|
135
107
|
}, {
|
|
136
108
|
children: mapChildren
|
|
137
109
|
}) : null;
|
|
138
|
-
|
|
139
110
|
if (matchObj) {
|
|
140
111
|
var parentRow = matchObj.item;
|
|
141
112
|
var parentRest = fullAllDataRowIdData[(0, _util.getRowid)($xetable, parentRow)];
|
|
142
113
|
var parentLevel = parentRest ? parentRest.level : 0;
|
|
143
114
|
var parentChilds = parentRow[children];
|
|
144
|
-
|
|
145
115
|
if (!_xeUtils.default.isArray(parentChilds)) {
|
|
146
116
|
parentChilds = parentRow[children] = [];
|
|
147
117
|
}
|
|
148
|
-
|
|
149
118
|
parentChilds[funcName](item);
|
|
150
119
|
var rest = {
|
|
151
120
|
row: item,
|
|
@@ -166,7 +135,6 @@ var editHook = {
|
|
|
166
135
|
(0, _log.warnLog)('vxe.error.unableInsert');
|
|
167
136
|
}
|
|
168
137
|
}
|
|
169
|
-
|
|
170
138
|
afterFullData[funcName](item);
|
|
171
139
|
tableFullTreeData[funcName](item);
|
|
172
140
|
var rest = {
|
|
@@ -185,17 +153,15 @@ var editHook = {
|
|
|
185
153
|
}
|
|
186
154
|
});
|
|
187
155
|
}
|
|
188
|
-
|
|
189
156
|
editMethods = {
|
|
190
157
|
/**
|
|
191
158
|
* 往表格中插入临时数据
|
|
192
159
|
*
|
|
193
160
|
* @param {*} records
|
|
194
161
|
*/
|
|
195
|
-
insert: function
|
|
162
|
+
insert: function (records) {
|
|
196
163
|
return editMethods.insertAt(records, null);
|
|
197
164
|
},
|
|
198
|
-
|
|
199
165
|
/**
|
|
200
166
|
* 往表格指定行中插入临时数据
|
|
201
167
|
* 如果 row 为空则从插入到顶部,如果为树结构,则插入到目标节点顶部
|
|
@@ -204,41 +170,36 @@ var editHook = {
|
|
|
204
170
|
* @param {Object/Array} records 新的数据
|
|
205
171
|
* @param {Row} row 指定行
|
|
206
172
|
*/
|
|
207
|
-
insertAt: function
|
|
173
|
+
insertAt: function (records, row) {
|
|
208
174
|
var _a;
|
|
209
|
-
|
|
210
175
|
var treeConfig = props.treeConfig;
|
|
211
176
|
var mergeList = reactData.mergeList,
|
|
212
|
-
|
|
177
|
+
editStore = reactData.editStore;
|
|
213
178
|
var tableFullTreeData = internalData.tableFullTreeData,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
179
|
+
afterFullData = internalData.afterFullData,
|
|
180
|
+
tableFullData = internalData.tableFullData,
|
|
181
|
+
fullDataRowIdData = internalData.fullDataRowIdData,
|
|
182
|
+
fullAllDataRowIdData = internalData.fullAllDataRowIdData;
|
|
218
183
|
var treeOpts = computeTreeOpts.value;
|
|
219
184
|
var transform = treeOpts.transform,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
185
|
+
rowField = treeOpts.rowField,
|
|
186
|
+
mapChildren = treeOpts.mapChildren;
|
|
223
187
|
if (!_xeUtils.default.isArray(records)) {
|
|
224
188
|
records = [records];
|
|
225
189
|
}
|
|
226
|
-
|
|
227
190
|
var newRecords = records.map(function (record) {
|
|
228
191
|
return $xetable.defineField(Object.assign({}, record));
|
|
229
192
|
});
|
|
230
|
-
|
|
231
193
|
if (!row) {
|
|
232
194
|
// 如果为虚拟树
|
|
233
195
|
if (treeConfig && transform) {
|
|
234
196
|
insertTreeRow(newRecords, false);
|
|
235
197
|
} else {
|
|
236
198
|
afterFullData.unshift.apply(afterFullData, newRecords);
|
|
237
|
-
tableFullData.unshift.apply(tableFullData, newRecords);
|
|
238
|
-
|
|
199
|
+
tableFullData.unshift.apply(tableFullData, newRecords);
|
|
200
|
+
// 刷新单元格合并
|
|
239
201
|
mergeList.forEach(function (mergeItem) {
|
|
240
202
|
var mergeRowIndex = mergeItem.row;
|
|
241
|
-
|
|
242
203
|
if (mergeRowIndex > 0) {
|
|
243
204
|
mergeItem.row = mergeRowIndex + newRecords.length;
|
|
244
205
|
}
|
|
@@ -251,12 +212,11 @@ var editHook = {
|
|
|
251
212
|
insertTreeRow(newRecords, true);
|
|
252
213
|
} else {
|
|
253
214
|
afterFullData.push.apply(afterFullData, newRecords);
|
|
254
|
-
tableFullData.push.apply(tableFullData, newRecords);
|
|
255
|
-
|
|
215
|
+
tableFullData.push.apply(tableFullData, newRecords);
|
|
216
|
+
// 刷新单元格合并
|
|
256
217
|
mergeList.forEach(function (mergeItem) {
|
|
257
218
|
var mergeRowIndex = mergeItem.row,
|
|
258
|
-
|
|
259
|
-
|
|
219
|
+
mergeRowspan = mergeItem.rowspan;
|
|
260
220
|
if (mergeRowIndex + mergeRowspan > afterFullData.length) {
|
|
261
221
|
mergeItem.rowspan = mergeRowspan + newRecords.length;
|
|
262
222
|
}
|
|
@@ -270,7 +230,6 @@ var editHook = {
|
|
|
270
230
|
}, {
|
|
271
231
|
children: mapChildren
|
|
272
232
|
});
|
|
273
|
-
|
|
274
233
|
if (matchObj_1) {
|
|
275
234
|
var parentRow_1 = matchObj_1.parent;
|
|
276
235
|
var parentChilds_1 = matchObj_1.items;
|
|
@@ -278,7 +237,6 @@ var editHook = {
|
|
|
278
237
|
var parentLevel_1 = parentRest ? parentRest.level : 0;
|
|
279
238
|
newRecords.forEach(function (item, i) {
|
|
280
239
|
var rowid = (0, _util.getRowid)($xetable, item);
|
|
281
|
-
|
|
282
240
|
if (process.env.NODE_ENV === 'development') {
|
|
283
241
|
if (item[treeOpts.parentField]) {
|
|
284
242
|
if (parentRow_1 && item[treeOpts.parentField] !== parentRow_1[rowField]) {
|
|
@@ -286,11 +244,9 @@ var editHook = {
|
|
|
286
244
|
}
|
|
287
245
|
}
|
|
288
246
|
}
|
|
289
|
-
|
|
290
247
|
if (parentRow_1) {
|
|
291
248
|
item[treeOpts.parentField] = parentRow_1[rowField];
|
|
292
249
|
}
|
|
293
|
-
|
|
294
250
|
parentChilds_1.splice(matchObj_1.index + i, 0, item);
|
|
295
251
|
var rest = {
|
|
296
252
|
row: item,
|
|
@@ -310,16 +266,14 @@ var editHook = {
|
|
|
310
266
|
if (process.env.NODE_ENV === 'development') {
|
|
311
267
|
(0, _log.warnLog)('vxe.error.unableInsert');
|
|
312
268
|
}
|
|
313
|
-
|
|
314
269
|
insertTreeRow(newRecords, true);
|
|
315
270
|
}
|
|
316
271
|
} else {
|
|
317
272
|
if (treeConfig) {
|
|
318
273
|
throw new Error((0, _log.getLog)('vxe.error.noTree', ['insert']));
|
|
319
274
|
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
275
|
+
var afIndex_1 = -1;
|
|
276
|
+
// 如果是可视索引
|
|
323
277
|
if (_xeUtils.default.isNumber(row)) {
|
|
324
278
|
if (row < afterFullData.length) {
|
|
325
279
|
afIndex_1 = row;
|
|
@@ -327,18 +281,15 @@ var editHook = {
|
|
|
327
281
|
} else {
|
|
328
282
|
afIndex_1 = $xetable.findRowIndexOf(afterFullData, row);
|
|
329
283
|
}
|
|
330
|
-
|
|
331
284
|
if (afIndex_1 === -1) {
|
|
332
285
|
throw new Error((0, _log.errLog)('vxe.error.unableInsert'));
|
|
333
286
|
}
|
|
334
|
-
|
|
335
287
|
afterFullData.splice.apply(afterFullData, __spreadArray([afIndex_1, 0], newRecords, false));
|
|
336
|
-
tableFullData.splice.apply(tableFullData, __spreadArray([$xetable.findRowIndexOf(tableFullData, row), 0], newRecords, false));
|
|
337
|
-
|
|
288
|
+
tableFullData.splice.apply(tableFullData, __spreadArray([$xetable.findRowIndexOf(tableFullData, row), 0], newRecords, false));
|
|
289
|
+
// 刷新单元格合并
|
|
338
290
|
mergeList.forEach(function (mergeItem) {
|
|
339
291
|
var mergeRowIndex = mergeItem.row,
|
|
340
|
-
|
|
341
|
-
|
|
292
|
+
mergeRowspan = mergeItem.rowspan;
|
|
342
293
|
if (mergeRowIndex > afIndex_1) {
|
|
343
294
|
mergeItem.row = mergeRowIndex + newRecords.length;
|
|
344
295
|
} else if (mergeRowIndex + mergeRowspan > afIndex_1) {
|
|
@@ -348,23 +299,17 @@ var editHook = {
|
|
|
348
299
|
}
|
|
349
300
|
}
|
|
350
301
|
}
|
|
351
|
-
|
|
352
302
|
(_a = editStore.insertList).unshift.apply(_a, newRecords);
|
|
353
|
-
|
|
354
303
|
$xetable.updateFooter();
|
|
355
304
|
$xetable.cacheRowMap();
|
|
356
305
|
$xetable.handleTableData(treeConfig && transform);
|
|
357
|
-
|
|
358
306
|
if (!(treeConfig && transform)) {
|
|
359
307
|
$xetable.updateAfterDataIndex();
|
|
360
308
|
}
|
|
361
|
-
|
|
362
309
|
$xetable.checkSelectionStatus();
|
|
363
|
-
|
|
364
310
|
if (reactData.scrollYLoad) {
|
|
365
311
|
$xetable.updateScrollYSpace();
|
|
366
312
|
}
|
|
367
|
-
|
|
368
313
|
return (0, _vue.nextTick)().then(function () {
|
|
369
314
|
$xetable.updateCellAreas();
|
|
370
315
|
return $xetable.recalculate();
|
|
@@ -375,54 +320,49 @@ var editHook = {
|
|
|
375
320
|
};
|
|
376
321
|
});
|
|
377
322
|
},
|
|
378
|
-
|
|
379
323
|
/**
|
|
380
324
|
* 删除指定行数据
|
|
381
325
|
* 如果传 row 则删除一行
|
|
382
326
|
* 如果传 rows 则删除多行
|
|
383
327
|
* 如果为空则删除所有
|
|
384
328
|
*/
|
|
385
|
-
remove: function
|
|
329
|
+
remove: function (rows) {
|
|
386
330
|
var treeConfig = props.treeConfig;
|
|
387
331
|
var mergeList = reactData.mergeList,
|
|
388
|
-
|
|
389
|
-
|
|
332
|
+
editStore = reactData.editStore,
|
|
333
|
+
selection = reactData.selection;
|
|
390
334
|
var tableFullTreeData = internalData.tableFullTreeData,
|
|
391
|
-
|
|
392
|
-
|
|
335
|
+
afterFullData = internalData.afterFullData,
|
|
336
|
+
tableFullData = internalData.tableFullData;
|
|
393
337
|
var checkboxOpts = computeCheckboxOpts.value;
|
|
394
338
|
var treeOpts = computeTreeOpts.value;
|
|
395
339
|
var transform = treeOpts.transform;
|
|
396
340
|
var actived = editStore.actived,
|
|
397
|
-
|
|
398
|
-
|
|
341
|
+
removeList = editStore.removeList,
|
|
342
|
+
insertList = editStore.insertList;
|
|
399
343
|
var checkField = checkboxOpts.checkField;
|
|
400
344
|
var rest = [];
|
|
401
|
-
|
|
402
345
|
if (!rows) {
|
|
403
346
|
rows = tableFullData;
|
|
404
347
|
} else if (!_xeUtils.default.isArray(rows)) {
|
|
405
348
|
rows = [rows];
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
|
|
349
|
+
}
|
|
350
|
+
// 如果是新增,则保存记录
|
|
409
351
|
rows.forEach(function (row) {
|
|
410
352
|
if (!$xetable.isInsertByRow(row)) {
|
|
411
353
|
removeList.push(row);
|
|
412
354
|
}
|
|
413
|
-
});
|
|
414
|
-
|
|
355
|
+
});
|
|
356
|
+
// 如果绑定了多选属性,则更新状态
|
|
415
357
|
if (!checkField) {
|
|
416
358
|
rows.forEach(function (row) {
|
|
417
359
|
var sIndex = $xetable.findRowIndexOf(selection, row);
|
|
418
|
-
|
|
419
360
|
if (sIndex > -1) {
|
|
420
361
|
selection.splice(sIndex, 1);
|
|
421
362
|
}
|
|
422
363
|
});
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
|
|
364
|
+
}
|
|
365
|
+
// 从数据源中移除
|
|
426
366
|
if (tableFullData === rows) {
|
|
427
367
|
rows = rest = tableFullData.slice(0);
|
|
428
368
|
internalData.tableFullData = [];
|
|
@@ -433,18 +373,14 @@ var editHook = {
|
|
|
433
373
|
if (treeConfig && transform) {
|
|
434
374
|
rows.forEach(function (row) {
|
|
435
375
|
var rowid = (0, _util.getRowid)($xetable, row);
|
|
436
|
-
|
|
437
376
|
var matchObj = _xeUtils.default.findTree(tableFullTreeData, function (item) {
|
|
438
377
|
return rowid === (0, _util.getRowid)($xetable, item);
|
|
439
378
|
}, treeOpts);
|
|
440
|
-
|
|
441
379
|
if (matchObj) {
|
|
442
380
|
var rItems = matchObj.items.splice(matchObj.index, 1);
|
|
443
381
|
rest.push(rItems[0]);
|
|
444
382
|
}
|
|
445
|
-
|
|
446
383
|
var afIndex = $xetable.findRowIndexOf(afterFullData, row);
|
|
447
|
-
|
|
448
384
|
if (afIndex > -1) {
|
|
449
385
|
afterFullData.splice(afIndex, 1);
|
|
450
386
|
}
|
|
@@ -452,20 +388,16 @@ var editHook = {
|
|
|
452
388
|
} else {
|
|
453
389
|
rows.forEach(function (row) {
|
|
454
390
|
var tfIndex = $xetable.findRowIndexOf(tableFullData, row);
|
|
455
|
-
|
|
456
391
|
if (tfIndex > -1) {
|
|
457
392
|
var rItems = tableFullData.splice(tfIndex, 1);
|
|
458
393
|
rest.push(rItems[0]);
|
|
459
394
|
}
|
|
460
|
-
|
|
461
395
|
var afIndex = $xetable.findRowIndexOf(afterFullData, row);
|
|
462
|
-
|
|
463
396
|
if (afIndex > -1) {
|
|
464
397
|
// 刷新单元格合并
|
|
465
398
|
mergeList.forEach(function (mergeItem) {
|
|
466
399
|
var mergeRowIndex = mergeItem.row,
|
|
467
|
-
|
|
468
|
-
|
|
400
|
+
mergeRowspan = mergeItem.rowspan;
|
|
469
401
|
if (mergeRowIndex > afIndex) {
|
|
470
402
|
mergeItem.row = mergeRowIndex - 1;
|
|
471
403
|
} else if (mergeRowIndex + mergeRowspan > afIndex) {
|
|
@@ -476,17 +408,14 @@ var editHook = {
|
|
|
476
408
|
}
|
|
477
409
|
});
|
|
478
410
|
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
|
|
411
|
+
}
|
|
412
|
+
// 如果当前行被激活编辑,则清除激活状态
|
|
482
413
|
if (actived.row && $xetable.findRowIndexOf(rows, actived.row) > -1) {
|
|
483
414
|
editMethods.clearEdit();
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
|
|
415
|
+
}
|
|
416
|
+
// 从新增中移除已删除的数据
|
|
487
417
|
rows.forEach(function (row) {
|
|
488
418
|
var iIndex = $xetable.findRowIndexOf(insertList, row);
|
|
489
|
-
|
|
490
419
|
if (iIndex > -1) {
|
|
491
420
|
insertList.splice(iIndex, 1);
|
|
492
421
|
}
|
|
@@ -494,17 +423,13 @@ var editHook = {
|
|
|
494
423
|
$xetable.updateFooter();
|
|
495
424
|
$xetable.cacheRowMap();
|
|
496
425
|
$xetable.handleTableData(treeConfig && transform);
|
|
497
|
-
|
|
498
426
|
if (!(treeConfig && transform)) {
|
|
499
427
|
$xetable.updateAfterDataIndex();
|
|
500
428
|
}
|
|
501
|
-
|
|
502
429
|
$xetable.checkSelectionStatus();
|
|
503
|
-
|
|
504
430
|
if (reactData.scrollYLoad) {
|
|
505
431
|
$xetable.updateScrollYSpace();
|
|
506
432
|
}
|
|
507
|
-
|
|
508
433
|
return (0, _vue.nextTick)().then(function () {
|
|
509
434
|
$xetable.updateCellAreas();
|
|
510
435
|
return $xetable.recalculate();
|
|
@@ -515,72 +440,64 @@ var editHook = {
|
|
|
515
440
|
};
|
|
516
441
|
});
|
|
517
442
|
},
|
|
518
|
-
|
|
519
443
|
/**
|
|
520
444
|
* 删除复选框选中的数据
|
|
521
445
|
*/
|
|
522
|
-
removeCheckboxRow: function
|
|
446
|
+
removeCheckboxRow: function () {
|
|
523
447
|
return editMethods.remove($xetable.getCheckboxRecords()).then(function (params) {
|
|
524
448
|
$xetable.clearCheckboxRow();
|
|
525
449
|
return params;
|
|
526
450
|
});
|
|
527
451
|
},
|
|
528
|
-
|
|
529
452
|
/**
|
|
530
453
|
* 删除单选框选中的数据
|
|
531
454
|
*/
|
|
532
|
-
removeRadioRow: function
|
|
455
|
+
removeRadioRow: function () {
|
|
533
456
|
var radioRecord = $xetable.getRadioRecord();
|
|
534
457
|
return editMethods.remove(radioRecord || []).then(function (params) {
|
|
535
458
|
$xetable.clearRadioRow();
|
|
536
459
|
return params;
|
|
537
460
|
});
|
|
538
461
|
},
|
|
539
|
-
|
|
540
462
|
/**
|
|
541
463
|
* 删除当前行选中的数据
|
|
542
464
|
*/
|
|
543
|
-
removeCurrentRow: function
|
|
465
|
+
removeCurrentRow: function () {
|
|
544
466
|
var currentRecord = $xetable.getCurrentRecord();
|
|
545
467
|
return editMethods.remove(currentRecord || []).then(function (params) {
|
|
546
468
|
$xetable.clearCurrentRow();
|
|
547
469
|
return params;
|
|
548
470
|
});
|
|
549
471
|
},
|
|
550
|
-
|
|
551
472
|
/**
|
|
552
473
|
* 获取表格数据集,包含新增、删除、修改
|
|
553
474
|
*/
|
|
554
|
-
getRecordset: function
|
|
475
|
+
getRecordset: function () {
|
|
555
476
|
return {
|
|
556
477
|
insertRecords: editMethods.getInsertRecords(),
|
|
557
478
|
removeRecords: editMethods.getRemoveRecords(),
|
|
558
479
|
updateRecords: editMethods.getUpdateRecords()
|
|
559
480
|
};
|
|
560
481
|
},
|
|
561
|
-
|
|
562
482
|
/**
|
|
563
483
|
* 获取新增的临时数据
|
|
564
484
|
*/
|
|
565
|
-
getInsertRecords: function
|
|
485
|
+
getInsertRecords: function () {
|
|
566
486
|
var treeConfig = props.treeConfig;
|
|
567
487
|
var editStore = reactData.editStore;
|
|
568
488
|
var tableFullTreeData = internalData.tableFullTreeData,
|
|
569
|
-
|
|
489
|
+
tableFullData = internalData.tableFullData;
|
|
570
490
|
var treeOpts = computeTreeOpts.value;
|
|
571
491
|
var insertList = editStore.insertList;
|
|
572
492
|
var insertRecords = [];
|
|
573
|
-
|
|
574
493
|
if (insertList.length) {
|
|
575
494
|
// 如果为虚拟树
|
|
576
495
|
if (treeConfig && treeOpts.transform) {
|
|
577
496
|
insertList.forEach(function (row) {
|
|
578
497
|
var rowid = (0, _util.getRowid)($xetable, row);
|
|
579
|
-
|
|
580
498
|
var matchObj = _xeUtils.default.findTree(tableFullTreeData, function (item) {
|
|
581
499
|
return rowid === (0, _util.getRowid)($xetable, item);
|
|
582
500
|
}, treeOpts);
|
|
583
|
-
|
|
584
501
|
if (matchObj) {
|
|
585
502
|
insertRecords.push(row);
|
|
586
503
|
}
|
|
@@ -593,95 +510,81 @@ var editHook = {
|
|
|
593
510
|
});
|
|
594
511
|
}
|
|
595
512
|
}
|
|
596
|
-
|
|
597
513
|
return insertRecords;
|
|
598
514
|
},
|
|
599
|
-
|
|
600
515
|
/**
|
|
601
516
|
* 获取已删除的数据
|
|
602
517
|
*/
|
|
603
|
-
getRemoveRecords: function
|
|
518
|
+
getRemoveRecords: function () {
|
|
604
519
|
var editStore = reactData.editStore;
|
|
605
520
|
return editStore.removeList;
|
|
606
521
|
},
|
|
607
|
-
|
|
608
522
|
/**
|
|
609
523
|
* 获取更新数据
|
|
610
524
|
* 只精准匹配 row 的更改
|
|
611
525
|
* 如果是树表格,子节点更改状态不会影响父节点的更新状态
|
|
612
526
|
*/
|
|
613
|
-
getUpdateRecords: function
|
|
527
|
+
getUpdateRecords: function () {
|
|
614
528
|
var keepSource = props.keepSource,
|
|
615
|
-
|
|
529
|
+
treeConfig = props.treeConfig;
|
|
616
530
|
var tableFullData = internalData.tableFullData;
|
|
617
531
|
var treeOpts = computeTreeOpts.value;
|
|
618
|
-
|
|
619
532
|
if (keepSource) {
|
|
620
533
|
syncActivedCell();
|
|
621
|
-
|
|
622
534
|
if (treeConfig) {
|
|
623
535
|
return _xeUtils.default.filterTree(tableFullData, function (row) {
|
|
624
536
|
return $xetable.isUpdateByRow(row);
|
|
625
537
|
}, treeOpts);
|
|
626
538
|
}
|
|
627
|
-
|
|
628
539
|
return tableFullData.filter(function (row) {
|
|
629
540
|
return $xetable.isUpdateByRow(row);
|
|
630
541
|
});
|
|
631
542
|
}
|
|
632
|
-
|
|
633
543
|
return [];
|
|
634
544
|
},
|
|
635
|
-
getActiveRecord: function
|
|
545
|
+
getActiveRecord: function () {
|
|
636
546
|
return this.getEditRecord();
|
|
637
547
|
},
|
|
638
|
-
getEditRecord: function
|
|
548
|
+
getEditRecord: function () {
|
|
639
549
|
var editStore = reactData.editStore;
|
|
640
550
|
var afterFullData = internalData.afterFullData;
|
|
641
551
|
var el = refElem.value;
|
|
642
552
|
var _a = editStore.actived,
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
553
|
+
args = _a.args,
|
|
554
|
+
row = _a.row;
|
|
646
555
|
if (args && $xetable.findRowIndexOf(afterFullData, row) > -1 && el.querySelectorAll('.vxe-body--column.col--actived').length) {
|
|
647
556
|
return Object.assign({}, args);
|
|
648
557
|
}
|
|
649
|
-
|
|
650
558
|
return null;
|
|
651
559
|
},
|
|
652
|
-
|
|
653
560
|
/**
|
|
654
561
|
* 获取选中的单元格
|
|
655
562
|
*/
|
|
656
|
-
getSelectedCell: function
|
|
563
|
+
getSelectedCell: function () {
|
|
657
564
|
var editStore = reactData.editStore;
|
|
658
565
|
var _a = editStore.selected,
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
566
|
+
args = _a.args,
|
|
567
|
+
column = _a.column;
|
|
662
568
|
if (args && column) {
|
|
663
569
|
return Object.assign({}, args);
|
|
664
570
|
}
|
|
665
|
-
|
|
666
571
|
return null;
|
|
667
572
|
},
|
|
668
|
-
clearActived: function
|
|
573
|
+
clearActived: function (evnt) {
|
|
669
574
|
// if (process.env.NODE_ENV === 'development') {
|
|
670
575
|
// warnLog('vxe.error.delFunc', ['clearActived', 'clearEdit'])
|
|
671
576
|
// }
|
|
672
577
|
// 即将废弃
|
|
673
578
|
return this.clearEdit(evnt);
|
|
674
579
|
},
|
|
675
|
-
|
|
676
580
|
/**
|
|
677
581
|
* 清除激活的编辑
|
|
678
582
|
*/
|
|
679
|
-
clearEdit: function
|
|
583
|
+
clearEdit: function (evnt) {
|
|
680
584
|
var editStore = reactData.editStore;
|
|
681
585
|
var actived = editStore.actived;
|
|
682
586
|
var row = actived.row,
|
|
683
|
-
|
|
684
|
-
|
|
587
|
+
column = actived.column;
|
|
685
588
|
if (row || column) {
|
|
686
589
|
syncActivedCell();
|
|
687
590
|
actived.args = null;
|
|
@@ -697,14 +600,12 @@ var editHook = {
|
|
|
697
600
|
$columnIndex: $xetable.getVMColumnIndex(column)
|
|
698
601
|
}, evnt || null);
|
|
699
602
|
}
|
|
700
|
-
|
|
701
603
|
return $xetable.clearValidate ? $xetable.clearValidate() : (0, _vue.nextTick)();
|
|
702
604
|
},
|
|
703
|
-
|
|
704
605
|
/**
|
|
705
606
|
* 清除所选中源状态
|
|
706
607
|
*/
|
|
707
|
-
clearSelected: function
|
|
608
|
+
clearSelected: function () {
|
|
708
609
|
var editStore = reactData.editStore;
|
|
709
610
|
var selected = editStore.selected;
|
|
710
611
|
selected.row = null;
|
|
@@ -712,58 +613,53 @@ var editHook = {
|
|
|
712
613
|
removeCellSelectedClass();
|
|
713
614
|
return (0, _vue.nextTick)();
|
|
714
615
|
},
|
|
715
|
-
isActiveByRow: function
|
|
616
|
+
isActiveByRow: function (row) {
|
|
716
617
|
// if (process.env.NODE_ENV === 'development') {
|
|
717
618
|
// warnLog('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow'])
|
|
718
619
|
// }
|
|
719
620
|
// 即将废弃
|
|
720
621
|
return this.isEditByRow(row);
|
|
721
622
|
},
|
|
722
|
-
|
|
723
623
|
/**
|
|
724
624
|
* 判断行是否为激活编辑状态
|
|
725
625
|
* @param {Row} row 行对象
|
|
726
626
|
*/
|
|
727
|
-
isEditByRow: function
|
|
627
|
+
isEditByRow: function (row) {
|
|
728
628
|
var editStore = reactData.editStore;
|
|
729
629
|
return editStore.actived.row === row;
|
|
730
630
|
},
|
|
731
|
-
setActiveRow: function
|
|
631
|
+
setActiveRow: function (row) {
|
|
732
632
|
// if (process.env.NODE_ENV === 'development') {
|
|
733
633
|
// warnLog('vxe.error.delFunc', ['setActiveRow', 'setEditRow'])
|
|
734
634
|
// }
|
|
735
635
|
// 即将废弃
|
|
736
636
|
return editMethods.setEditRow(row);
|
|
737
637
|
},
|
|
738
|
-
|
|
739
638
|
/**
|
|
740
639
|
* 激活行编辑
|
|
741
640
|
*/
|
|
742
|
-
setEditRow: function
|
|
641
|
+
setEditRow: function (row) {
|
|
743
642
|
var visibleColumn = internalData.visibleColumn;
|
|
744
643
|
return $xetable.setEditCell(row, _xeUtils.default.find(visibleColumn, function (column) {
|
|
745
644
|
return (0, _utils.isEnableConf)(column.editRender);
|
|
746
645
|
}));
|
|
747
646
|
},
|
|
748
|
-
setActiveCell: function
|
|
647
|
+
setActiveCell: function (row, fieldOrColumn) {
|
|
749
648
|
// if (process.env.NODE_ENV === 'development') {
|
|
750
649
|
// warnLog('vxe.error.delFunc', ['setActiveCell', 'setEditCell'])
|
|
751
650
|
// }
|
|
752
651
|
// 即将废弃
|
|
753
652
|
return editMethods.setEditCell(row, fieldOrColumn);
|
|
754
653
|
},
|
|
755
|
-
|
|
756
654
|
/**
|
|
757
655
|
* 激活单元格编辑
|
|
758
656
|
*/
|
|
759
|
-
setEditCell: function
|
|
657
|
+
setEditCell: function (row, fieldOrColumn) {
|
|
760
658
|
var editConfig = props.editConfig;
|
|
761
659
|
var column = _xeUtils.default.isString(fieldOrColumn) ? $xetable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
762
|
-
|
|
763
660
|
if (row && column && (0, _utils.isEnableConf)(editConfig) && (0, _utils.isEnableConf)(column.editRender)) {
|
|
764
661
|
return $xetable.scrollToRow(row, column).then(function () {
|
|
765
662
|
var cell = $xetable.getCell(row, column);
|
|
766
|
-
|
|
767
663
|
if (cell) {
|
|
768
664
|
editPrivateMethods.handleActived({
|
|
769
665
|
row: row,
|
|
@@ -775,25 +671,20 @@ var editHook = {
|
|
|
775
671
|
});
|
|
776
672
|
internalData._lastCallTime = Date.now();
|
|
777
673
|
}
|
|
778
|
-
|
|
779
674
|
return (0, _vue.nextTick)();
|
|
780
675
|
});
|
|
781
676
|
}
|
|
782
|
-
|
|
783
677
|
return (0, _vue.nextTick)();
|
|
784
678
|
},
|
|
785
|
-
|
|
786
679
|
/**
|
|
787
680
|
* 只对 trigger=dblclick 有效,选中单元格
|
|
788
681
|
*/
|
|
789
|
-
setSelectCell: function
|
|
682
|
+
setSelectCell: function (row, fieldOrColumn) {
|
|
790
683
|
var tableData = reactData.tableData;
|
|
791
684
|
var editOpts = computeEditOpts.value;
|
|
792
685
|
var column = _xeUtils.default.isString(fieldOrColumn) ? $xetable.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
793
|
-
|
|
794
686
|
if (row && column && editOpts.trigger !== 'manual') {
|
|
795
687
|
var rowIndex = $xetable.findRowIndexOf(tableData, row);
|
|
796
|
-
|
|
797
688
|
if (rowIndex > -1 && column) {
|
|
798
689
|
var cell = $xetable.getCell(row, column);
|
|
799
690
|
var params = {
|
|
@@ -806,7 +697,6 @@ var editHook = {
|
|
|
806
697
|
$xetable.handleSelected(params, {});
|
|
807
698
|
}
|
|
808
699
|
}
|
|
809
|
-
|
|
810
700
|
return (0, _vue.nextTick)();
|
|
811
701
|
}
|
|
812
702
|
};
|
|
@@ -814,50 +704,43 @@ var editHook = {
|
|
|
814
704
|
/**
|
|
815
705
|
* 处理激活编辑
|
|
816
706
|
*/
|
|
817
|
-
handleActived: function
|
|
707
|
+
handleActived: function (params, evnt) {
|
|
818
708
|
var editConfig = props.editConfig,
|
|
819
|
-
|
|
709
|
+
mouseConfig = props.mouseConfig;
|
|
820
710
|
var editStore = reactData.editStore,
|
|
821
|
-
|
|
711
|
+
tableColumn = reactData.tableColumn;
|
|
822
712
|
var editOpts = computeEditOpts.value;
|
|
823
713
|
var mode = editOpts.mode;
|
|
824
714
|
var actived = editStore.actived;
|
|
825
715
|
var row = params.row,
|
|
826
|
-
|
|
716
|
+
column = params.column;
|
|
827
717
|
var editRender = column.editRender;
|
|
828
718
|
var cell = params.cell || $xetable.getCell(row, column);
|
|
829
719
|
var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
830
720
|
params.cell = cell;
|
|
831
|
-
|
|
832
721
|
if ((0, _utils.isEnableConf)(editConfig) && (0, _utils.isEnableConf)(editRender) && cell) {
|
|
833
722
|
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
834
723
|
// 判断是否禁用编辑
|
|
835
724
|
var type = 'edit-disabled';
|
|
836
|
-
|
|
837
725
|
if (!beforeEditMethod || beforeEditMethod(__assign(__assign({}, params), {
|
|
838
726
|
$table: $xetable
|
|
839
727
|
}))) {
|
|
840
728
|
if (mouseConfig) {
|
|
841
729
|
editMethods.clearSelected();
|
|
842
|
-
|
|
843
730
|
if ($xetable.clearCellAreas) {
|
|
844
731
|
$xetable.clearCellAreas();
|
|
845
732
|
$xetable.clearCopyCellArea();
|
|
846
733
|
}
|
|
847
734
|
}
|
|
848
|
-
|
|
849
735
|
$xetable.closeTooltip();
|
|
850
|
-
|
|
851
736
|
if (actived.column) {
|
|
852
737
|
editMethods.clearEdit(evnt);
|
|
853
738
|
}
|
|
854
|
-
|
|
855
739
|
type = 'edit-actived';
|
|
856
740
|
column.renderHeight = cell.offsetHeight;
|
|
857
741
|
actived.args = params;
|
|
858
742
|
actived.row = row;
|
|
859
743
|
actived.column = column;
|
|
860
|
-
|
|
861
744
|
if (mode === 'row') {
|
|
862
745
|
tableColumn.forEach(function (column) {
|
|
863
746
|
return getEditColumnModel(row, column);
|
|
@@ -865,12 +748,10 @@ var editHook = {
|
|
|
865
748
|
} else {
|
|
866
749
|
getEditColumnModel(row, column);
|
|
867
750
|
}
|
|
868
|
-
|
|
869
751
|
(0, _vue.nextTick)(function () {
|
|
870
752
|
editPrivateMethods.handleFocus(params, evnt);
|
|
871
753
|
});
|
|
872
754
|
}
|
|
873
|
-
|
|
874
755
|
$xetable.dispatchEvent(type, {
|
|
875
756
|
row: row,
|
|
876
757
|
rowIndex: $xetable.getRowIndex(row),
|
|
@@ -881,28 +762,22 @@ var editHook = {
|
|
|
881
762
|
}, evnt);
|
|
882
763
|
} else {
|
|
883
764
|
var oldColumn = actived.column;
|
|
884
|
-
|
|
885
765
|
if (mouseConfig) {
|
|
886
766
|
editMethods.clearSelected();
|
|
887
|
-
|
|
888
767
|
if ($xetable.clearCellAreas) {
|
|
889
768
|
$xetable.clearCellAreas();
|
|
890
769
|
$xetable.clearCopyCellArea();
|
|
891
770
|
}
|
|
892
771
|
}
|
|
893
|
-
|
|
894
772
|
if (oldColumn !== column) {
|
|
895
773
|
var oldModel = oldColumn.model;
|
|
896
|
-
|
|
897
774
|
if (oldModel.update) {
|
|
898
775
|
(0, _util.setCellValue)(row, oldColumn, oldModel.value);
|
|
899
776
|
}
|
|
900
|
-
|
|
901
777
|
if ($xetable.clearValidate) {
|
|
902
778
|
$xetable.clearValidate();
|
|
903
779
|
}
|
|
904
780
|
}
|
|
905
|
-
|
|
906
781
|
column.renderHeight = cell.offsetHeight;
|
|
907
782
|
actived.args = params;
|
|
908
783
|
actived.column = column;
|
|
@@ -910,48 +785,38 @@ var editHook = {
|
|
|
910
785
|
editPrivateMethods.handleFocus(params, evnt);
|
|
911
786
|
});
|
|
912
787
|
}
|
|
913
|
-
|
|
914
788
|
$xetable.focus();
|
|
915
789
|
}
|
|
916
|
-
|
|
917
790
|
return (0, _vue.nextTick)();
|
|
918
791
|
},
|
|
919
|
-
|
|
920
792
|
/**
|
|
921
793
|
* 处理聚焦
|
|
922
794
|
*/
|
|
923
|
-
handleFocus: function
|
|
795
|
+
handleFocus: function (params) {
|
|
924
796
|
var row = params.row,
|
|
925
|
-
|
|
926
|
-
|
|
797
|
+
column = params.column,
|
|
798
|
+
cell = params.cell;
|
|
927
799
|
var editRender = column.editRender;
|
|
928
|
-
|
|
929
800
|
if ((0, _utils.isEnableConf)(editRender)) {
|
|
930
801
|
var compRender = _vXETable.renderer.get(editRender.name);
|
|
931
|
-
|
|
932
802
|
var autofocus = editRender.autofocus,
|
|
933
|
-
|
|
803
|
+
autoselect = editRender.autoselect;
|
|
934
804
|
var inputElem = void 0;
|
|
935
|
-
|
|
936
805
|
if (!autofocus && compRender) {
|
|
937
806
|
autofocus = compRender.autofocus;
|
|
938
807
|
}
|
|
939
|
-
|
|
940
808
|
if (!autoselect && compRender) {
|
|
941
809
|
autoselect = compRender.autoselect;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
|
|
810
|
+
}
|
|
811
|
+
// 如果指定了聚焦 class
|
|
945
812
|
if (_xeUtils.default.isFunction(autofocus)) {
|
|
946
813
|
inputElem = autofocus.call(this, params);
|
|
947
814
|
} else if (autofocus) {
|
|
948
815
|
inputElem = cell.querySelector(autofocus);
|
|
949
|
-
|
|
950
816
|
if (inputElem) {
|
|
951
817
|
inputElem.focus();
|
|
952
818
|
}
|
|
953
819
|
}
|
|
954
|
-
|
|
955
820
|
if (inputElem) {
|
|
956
821
|
if (autoselect) {
|
|
957
822
|
inputElem.select();
|
|
@@ -969,63 +834,52 @@ var editHook = {
|
|
|
969
834
|
}
|
|
970
835
|
}
|
|
971
836
|
},
|
|
972
|
-
|
|
973
837
|
/**
|
|
974
838
|
* 处理选中源
|
|
975
839
|
*/
|
|
976
|
-
handleSelected: function
|
|
840
|
+
handleSelected: function (params, evnt) {
|
|
977
841
|
var mouseConfig = props.mouseConfig;
|
|
978
842
|
var editStore = reactData.editStore;
|
|
979
843
|
var mouseOpts = computeMouseOpts.value;
|
|
980
844
|
var editOpts = computeEditOpts.value;
|
|
981
845
|
var actived = editStore.actived,
|
|
982
|
-
|
|
846
|
+
selected = editStore.selected;
|
|
983
847
|
var row = params.row,
|
|
984
|
-
|
|
848
|
+
column = params.column;
|
|
985
849
|
var isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
986
|
-
|
|
987
|
-
var selectMethod = function selectMethod() {
|
|
850
|
+
var selectMethod = function () {
|
|
988
851
|
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
989
852
|
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
990
853
|
editMethods.clearEdit(evnt);
|
|
991
854
|
editMethods.clearSelected();
|
|
992
|
-
|
|
993
855
|
if ($xetable.clearCellAreas) {
|
|
994
856
|
$xetable.clearCellAreas();
|
|
995
857
|
$xetable.clearCopyCellArea();
|
|
996
858
|
}
|
|
997
|
-
|
|
998
859
|
selected.args = params;
|
|
999
860
|
selected.row = row;
|
|
1000
861
|
selected.column = column;
|
|
1001
|
-
|
|
1002
862
|
if (isMouseSelected) {
|
|
1003
863
|
editPrivateMethods.addCellSelectedClass();
|
|
1004
864
|
}
|
|
1005
|
-
|
|
1006
865
|
$xetable.focus();
|
|
1007
|
-
|
|
1008
866
|
if (evnt) {
|
|
1009
867
|
$xetable.dispatchEvent('cell-selected', params, evnt);
|
|
1010
868
|
}
|
|
1011
869
|
}
|
|
1012
870
|
}
|
|
1013
|
-
|
|
1014
871
|
return (0, _vue.nextTick)();
|
|
1015
872
|
};
|
|
1016
|
-
|
|
1017
873
|
return selectMethod();
|
|
1018
874
|
},
|
|
1019
|
-
addCellSelectedClass: function
|
|
875
|
+
addCellSelectedClass: function () {
|
|
1020
876
|
var editStore = reactData.editStore;
|
|
1021
877
|
var selected = editStore.selected;
|
|
1022
878
|
var row = selected.row,
|
|
1023
|
-
|
|
879
|
+
column = selected.column;
|
|
1024
880
|
removeCellSelectedClass();
|
|
1025
|
-
|
|
1026
881
|
if (row && column) {
|
|
1027
882
|
var cell = $xetable.getCell(row, column);
|
|
1028
|
-
|
|
1029
883
|
if (cell) {
|
|
1030
884
|
(0, _dom.addClass)(cell, 'col--selected');
|
|
1031
885
|
}
|
|
@@ -1034,7 +888,7 @@ var editHook = {
|
|
|
1034
888
|
};
|
|
1035
889
|
return __assign(__assign({}, editMethods), editPrivateMethods);
|
|
1036
890
|
},
|
|
1037
|
-
setupGrid: function
|
|
891
|
+
setupGrid: function ($xegrid) {
|
|
1038
892
|
return $xegrid.extendTableMethods(tableEditMethodKeys);
|
|
1039
893
|
}
|
|
1040
894
|
};
|