@fecp/designer 5.4.104 → 5.4.107
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/_virtual/index2.mjs +1 -1
- package/es/_virtual/index3.mjs +2 -5
- package/es/designer/package.json.mjs +1 -1
- package/es/designer/src/packages/dialog/useDialogDialog.mjs +1 -1
- package/es/designer/src/packages/dialogGlobal/useDialogGlobalDialog.mjs +1 -1
- package/es/designer/src/packages/form/property/widgets.vue.mjs +2 -2
- package/es/designer.css +2 -2
- package/es/node_modules/@vxe-ui/core/es/index.esm.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/clipboard.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/commands.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/config.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/event.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/formats.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/i18n.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/icon.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/interceptor.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/menus.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/permission.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/renderer.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/resize.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/store.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/es/src/vm.mjs +2 -2
- package/es/node_modules/@vxe-ui/core/node_modules/xe-utils/es/ctor.mjs +1 -1
- package/es/node_modules/@vxe-ui/core/node_modules/xe-utils/es/toArrayTree.mjs +20 -12
- package/es/node_modules/crypto-js/index.mjs +1 -1
- package/es/node_modules/vxe-pc-ui/es/alert/src/alert.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/anchor/src/anchor-link.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/anchor/src/anchor.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/anchor/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/avatar/src/avatar.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/backtop/src/backtop.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/badge/src/badge.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/breadcrumb/src/breadcrumb-item.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/breadcrumb/src/breadcrumb.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/button/src/button-group.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/button/src/button.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/calendar/src/calendar.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/card/src/card.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/carousel/src/carousel-item.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/carousel/src/carousel.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/carousel/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/cascader/src/cascader.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/checkbox/src/button.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/checkbox/src/checkbox.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/checkbox/src/group.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/collapse/src/collapse-pane.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/collapse/src/collapse.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/collapse/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/color-picker/src/color-picker.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/color-picker/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/context-menu/src/context-menu.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/countdown/src/countdown.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/date-panel/src/date-panel.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/date-panel/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/date-picker/src/date-picker.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/date-range-picker/src/date-range-picker.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/drawer/index.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/drawer/src/drawer.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/empty/src/empty.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/form/render/index.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/form/src/form-config-item.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/form/src/form-group.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/form/src/form-item.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/form/src/form.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/form/src/itemInfo.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/form/src/render.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/form/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/icon/src/icon.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/icon-picker/src/icon-picker.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/image/src/group.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/image/src/image.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/image/src/preview.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/image/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/input/src/input.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/layout-aside/src/layout-aside.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/layout-body/src/layout-body.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/layout-container/src/layout-container.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/layout-footer/src/layout-footer.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/layout-header/src/layout-header.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/link/src/link.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/list/src/list.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/loading/src/loading.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/menu/src/menu.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/modal/index.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/modal/src/modal.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/notice-bar/src/notice-bar.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/number-input/src/number-input.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/number-input/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/pager/src/pager.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/password-input/src/password-input.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/print/src/page-break.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/print/src/print.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/print/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/pulldown/src/pulldown.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/radio/src/button.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/radio/src/group.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/radio/src/radio.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/rate/src/rate.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/result/src/result.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/row/src/col.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/row/src/row.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/segmented/src/segmented.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/select/src/option-info.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/select/src/select.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/select/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/slider/src/slider.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/splitter/src/splitter-panel.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/splitter/src/splitter.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/splitter/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/steps/src/steps.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/switch/src/switch.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/table-select/src/table-select.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tabs/src/tab-pane.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tabs/src/tabs.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tabs/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tag/src/tag.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/text/src/text.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/text-ellipsis/src/text-ellipsis.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/textarea/src/textarea.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/timeline/src/timeline-item.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/timeline/src/timeline.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tip/src/tip.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tooltip/src/tooltip.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tour/src/tour.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tree/src/tree.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tree/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/tree-select/src/tree-select.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/ui/src/anime.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/ui/src/dom.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/ui/src/utils.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/ui/src/vn.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/upload/src/upload.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/upload/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/watermark/src/util.mjs +1 -2
- package/es/node_modules/vxe-pc-ui/es/watermark/src/watermark.mjs +1 -2
- package/es/node_modules/vxe-table/es/components.mjs +2 -1
- package/es/node_modules/vxe-table/es/grid/index.mjs +5 -1
- package/es/node_modules/vxe-table/es/grid/src/grid.mjs +21 -26
- package/es/node_modules/vxe-table/es/locale/lang/zh-CN.mjs +0 -6
- package/es/node_modules/vxe-table/es/table/module/custom/hook.mjs +9 -27
- package/es/node_modules/vxe-table/es/table/module/custom/panel.mjs +10 -16
- package/es/node_modules/vxe-table/es/table/module/edit/hook.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/module/export/export-panel.mjs +6 -13
- package/es/node_modules/vxe-table/es/table/module/export/hook.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/module/export/import-panel.mjs +5 -13
- package/es/node_modules/vxe-table/es/table/module/filter/hook.mjs +20 -65
- package/es/node_modules/vxe-table/es/table/module/filter/panel.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/module/keyboard/hook.mjs +8 -20
- package/es/node_modules/vxe-table/es/table/module/menu/hook.mjs +3 -4
- package/es/node_modules/vxe-table/es/table/module/menu/panel.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/module/validator/hook.mjs +20 -21
- package/es/node_modules/vxe-table/es/table/render/index.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/body.mjs +18 -30
- package/es/node_modules/vxe-table/es/table/src/cell.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/column.mjs +1 -1
- package/es/node_modules/vxe-table/es/table/src/columnInfo.mjs +1 -4
- package/es/node_modules/vxe-table/es/table/src/emits.mjs +0 -1
- package/es/node_modules/vxe-table/es/table/src/footer.mjs +3 -4
- package/es/node_modules/vxe-table/es/table/src/group.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/header.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/props.mjs +0 -4
- package/es/node_modules/vxe-table/es/table/src/table.mjs +497 -621
- package/es/node_modules/vxe-table/es/table/src/use/cell-view.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/util.mjs +23 -288
- package/es/node_modules/vxe-table/es/toolbar/src/toolbar.mjs +8 -13
- package/es/node_modules/vxe-table/es/ui/index.mjs +4 -12
- package/es/node_modules/vxe-table/es/ui/src/anime.mjs +1 -2
- package/es/node_modules/vxe-table/es/ui/src/dom.mjs +2 -26
- package/es/node_modules/vxe-table/es/ui/src/log.mjs +1 -1
- package/es/node_modules/vxe-table/es/ui/src/utils.mjs +1 -2
- package/es/node_modules/vxe-table/es/ui/src/vn.mjs +1 -2
- package/es/packages/mobile/node_modules/vxe-table/es/grid/src/grid.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/custom/hook.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/custom/panel.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/edit/hook.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/export/export-panel.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/export/hook.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/export/import-panel.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/filter/hook.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/filter/panel.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/keyboard/hook.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/menu/hook.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/menu/panel.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/module/validator/hook.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/render/index.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/src/body.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/src/cell.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/src/columnInfo.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/src/footer.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/src/header.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/src/table.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/src/use/cell-view.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/table/src/util.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/toolbar/src/toolbar.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/ui/src/dom.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/ui/src/utils.mjs +1 -1
- package/es/packages/mobile/node_modules/vxe-table/es/ui/src/vn.mjs +1 -1
- package/es/packages/mobile/src/components/dataDisplay/table/Table.vue.mjs +3 -3
- package/es/packages/mobile/src/components/form/field/Field.vue.mjs +1 -1
- package/es/packages/mobile/src/utils/formatterUtil.mjs +1 -1
- package/es/packages/mobile/src/utils/optionUtil.mjs +1 -1
- package/lib/_virtual/index2.js +1 -1
- package/lib/_virtual/index3.js +3 -6
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/dialog/useDialogDialog.js +1 -1
- package/lib/designer/src/packages/dialogGlobal/useDialogGlobalDialog.js +1 -1
- package/lib/designer/src/packages/form/property/widgets.vue.js +2 -2
- package/lib/designer.css +2 -2
- package/lib/node_modules/@vxe-ui/core/es/index.esm.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/clipboard.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/commands.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/config.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/event.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/formats.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/i18n.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/icon.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/interceptor.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/menus.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/permission.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/renderer.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/resize.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/store.js +2 -2
- package/lib/node_modules/@vxe-ui/core/es/src/vm.js +2 -2
- package/lib/node_modules/@vxe-ui/core/node_modules/xe-utils/es/ctor.js +1 -1
- package/lib/node_modules/@vxe-ui/core/node_modules/xe-utils/es/toArrayTree.js +20 -12
- package/lib/node_modules/crypto-js/index.js +1 -1
- package/lib/node_modules/vxe-pc-ui/es/alert/src/alert.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/anchor/src/anchor-link.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/anchor/src/anchor.js +6 -7
- package/lib/node_modules/vxe-pc-ui/es/anchor/src/util.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/avatar/src/avatar.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/backtop/src/backtop.js +9 -10
- package/lib/node_modules/vxe-pc-ui/es/badge/src/badge.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/breadcrumb/src/breadcrumb-item.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/breadcrumb/src/breadcrumb.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/button/src/button-group.js +5 -6
- package/lib/node_modules/vxe-pc-ui/es/button/src/button.js +15 -16
- package/lib/node_modules/vxe-pc-ui/es/calendar/src/calendar.js +80 -81
- package/lib/node_modules/vxe-pc-ui/es/card/src/card.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/carousel/src/carousel-item.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/carousel/src/carousel.js +12 -13
- package/lib/node_modules/vxe-pc-ui/es/carousel/src/util.js +5 -6
- package/lib/node_modules/vxe-pc-ui/es/cascader/src/cascader.js +16 -17
- package/lib/node_modules/vxe-pc-ui/es/checkbox/src/button.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/checkbox/src/checkbox.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/checkbox/src/group.js +7 -8
- package/lib/node_modules/vxe-pc-ui/es/collapse/src/collapse-pane.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/collapse/src/collapse.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/collapse/src/util.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/color-picker/src/color-picker.js +15 -16
- package/lib/node_modules/vxe-pc-ui/es/color-picker/src/util.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/context-menu/src/context-menu.js +13 -14
- package/lib/node_modules/vxe-pc-ui/es/countdown/src/countdown.js +9 -10
- package/lib/node_modules/vxe-pc-ui/es/date-panel/src/date-panel.js +120 -121
- package/lib/node_modules/vxe-pc-ui/es/date-panel/src/util.js +29 -30
- package/lib/node_modules/vxe-pc-ui/es/date-picker/src/date-picker.js +15 -16
- package/lib/node_modules/vxe-pc-ui/es/date-range-picker/src/date-range-picker.js +17 -18
- package/lib/node_modules/vxe-pc-ui/es/drawer/index.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/drawer/src/drawer.js +8 -9
- package/lib/node_modules/vxe-pc-ui/es/empty/src/empty.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/form/render/index.js +31 -32
- package/lib/node_modules/vxe-pc-ui/es/form/src/form-config-item.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/form/src/form-group.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/form/src/form-item.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/form/src/form.js +43 -44
- package/lib/node_modules/vxe-pc-ui/es/form/src/itemInfo.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/form/src/render.js +25 -26
- package/lib/node_modules/vxe-pc-ui/es/form/src/util.js +6 -7
- package/lib/node_modules/vxe-pc-ui/es/icon/src/icon.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/icon-picker/src/icon-picker.js +8 -9
- package/lib/node_modules/vxe-pc-ui/es/image/src/group.js +7 -8
- package/lib/node_modules/vxe-pc-ui/es/image/src/image.js +7 -8
- package/lib/node_modules/vxe-pc-ui/es/image/src/preview.js +9 -10
- package/lib/node_modules/vxe-pc-ui/es/image/src/util.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/input/src/input.js +146 -147
- package/lib/node_modules/vxe-pc-ui/es/layout-aside/src/layout-aside.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/layout-body/src/layout-body.js +6 -7
- package/lib/node_modules/vxe-pc-ui/es/layout-container/src/layout-container.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/layout-footer/src/layout-footer.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/layout-header/src/layout-header.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/link/src/link.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/list/src/list.js +12 -13
- package/lib/node_modules/vxe-pc-ui/es/loading/src/loading.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/menu/src/menu.js +10 -11
- package/lib/node_modules/vxe-pc-ui/es/modal/index.js +5 -6
- package/lib/node_modules/vxe-pc-ui/es/modal/src/modal.js +36 -37
- package/lib/node_modules/vxe-pc-ui/es/notice-bar/src/notice-bar.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/number-input/src/number-input.js +30 -31
- package/lib/node_modules/vxe-pc-ui/es/number-input/src/util.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/pager/src/pager.js +13 -14
- package/lib/node_modules/vxe-pc-ui/es/password-input/src/password-input.js +5 -6
- package/lib/node_modules/vxe-pc-ui/es/print/src/page-break.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/print/src/print.js +13 -14
- package/lib/node_modules/vxe-pc-ui/es/print/src/util.js +11 -12
- package/lib/node_modules/vxe-pc-ui/es/pulldown/src/pulldown.js +7 -8
- package/lib/node_modules/vxe-pc-ui/es/radio/src/button.js +6 -7
- package/lib/node_modules/vxe-pc-ui/es/radio/src/group.js +7 -8
- package/lib/node_modules/vxe-pc-ui/es/radio/src/radio.js +6 -7
- package/lib/node_modules/vxe-pc-ui/es/rate/src/rate.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/result/src/result.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/row/src/col.js +5 -6
- package/lib/node_modules/vxe-pc-ui/es/row/src/row.js +5 -6
- package/lib/node_modules/vxe-pc-ui/es/segmented/src/segmented.js +6 -7
- package/lib/node_modules/vxe-pc-ui/es/select/src/option-info.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/select/src/select.js +27 -28
- package/lib/node_modules/vxe-pc-ui/es/select/src/util.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/slider/src/slider.js +14 -15
- package/lib/node_modules/vxe-pc-ui/es/splitter/src/splitter-panel.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/splitter/src/splitter.js +28 -29
- package/lib/node_modules/vxe-pc-ui/es/splitter/src/util.js +5 -6
- package/lib/node_modules/vxe-pc-ui/es/steps/src/steps.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/switch/src/switch.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/table-select/src/table-select.js +18 -19
- package/lib/node_modules/vxe-pc-ui/es/tabs/src/tab-pane.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/tabs/src/tabs.js +22 -23
- package/lib/node_modules/vxe-pc-ui/es/tabs/src/util.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/tag/src/tag.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/text/src/text.js +3 -4
- package/lib/node_modules/vxe-pc-ui/es/text-ellipsis/src/text-ellipsis.js +7 -8
- package/lib/node_modules/vxe-pc-ui/es/textarea/src/textarea.js +12 -13
- package/lib/node_modules/vxe-pc-ui/es/timeline/src/timeline-item.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/timeline/src/timeline.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/tip/src/tip.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/tooltip/src/tooltip.js +9 -10
- package/lib/node_modules/vxe-pc-ui/es/tour/src/tour.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/tree/src/tree.js +61 -62
- package/lib/node_modules/vxe-pc-ui/es/tree/src/util.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/tree-select/src/tree-select.js +27 -28
- package/lib/node_modules/vxe-pc-ui/es/ui/src/anime.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/ui/src/dom.js +9 -10
- package/lib/node_modules/vxe-pc-ui/es/ui/src/utils.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/ui/src/vn.js +2 -3
- package/lib/node_modules/vxe-pc-ui/es/upload/src/upload.js +63 -64
- package/lib/node_modules/vxe-pc-ui/es/upload/src/util.js +4 -5
- package/lib/node_modules/vxe-pc-ui/es/watermark/src/util.js +11 -12
- package/lib/node_modules/vxe-pc-ui/es/watermark/src/watermark.js +5 -6
- package/lib/node_modules/vxe-table/es/components.js +4 -3
- package/lib/node_modules/vxe-table/es/grid/index.js +4 -1
- package/lib/node_modules/vxe-table/es/grid/src/grid.js +60 -65
- package/lib/node_modules/vxe-table/es/locale/lang/zh-CN.js +0 -6
- package/lib/node_modules/vxe-table/es/table/module/custom/hook.js +17 -35
- package/lib/node_modules/vxe-table/es/table/module/custom/panel.js +31 -37
- package/lib/node_modules/vxe-table/es/table/module/edit/hook.js +28 -29
- package/lib/node_modules/vxe-table/es/table/module/export/export-panel.js +11 -18
- package/lib/node_modules/vxe-table/es/table/module/export/hook.js +50 -51
- package/lib/node_modules/vxe-table/es/table/module/export/import-panel.js +6 -14
- package/lib/node_modules/vxe-table/es/table/module/filter/hook.js +21 -66
- package/lib/node_modules/vxe-table/es/table/module/filter/panel.js +3 -4
- package/lib/node_modules/vxe-table/es/table/module/keyboard/hook.js +13 -25
- package/lib/node_modules/vxe-table/es/table/module/menu/hook.js +9 -10
- package/lib/node_modules/vxe-table/es/table/module/menu/panel.js +9 -10
- package/lib/node_modules/vxe-table/es/table/module/validator/hook.js +43 -44
- package/lib/node_modules/vxe-table/es/table/render/index.js +65 -66
- package/lib/node_modules/vxe-table/es/table/src/body.js +26 -38
- package/lib/node_modules/vxe-table/es/table/src/cell.js +15 -16
- package/lib/node_modules/vxe-table/es/table/src/column.js +1 -1
- package/lib/node_modules/vxe-table/es/table/src/columnInfo.js +12 -15
- package/lib/node_modules/vxe-table/es/table/src/emits.js +0 -1
- package/lib/node_modules/vxe-table/es/table/src/footer.js +9 -10
- package/lib/node_modules/vxe-table/es/table/src/group.js +1 -2
- package/lib/node_modules/vxe-table/es/table/src/header.js +12 -13
- package/lib/node_modules/vxe-table/es/table/src/props.js +0 -4
- package/lib/node_modules/vxe-table/es/table/src/table.js +832 -956
- package/lib/node_modules/vxe-table/es/table/src/use/cell-view.js +3 -4
- package/lib/node_modules/vxe-table/es/table/src/util.js +46 -311
- package/lib/node_modules/vxe-table/es/toolbar/src/toolbar.js +29 -34
- package/lib/node_modules/vxe-table/es/ui/index.js +4 -12
- package/lib/node_modules/vxe-table/es/ui/src/anime.js +7 -8
- package/lib/node_modules/vxe-table/es/ui/src/dom.js +5 -29
- package/lib/node_modules/vxe-table/es/ui/src/log.js +1 -1
- package/lib/node_modules/vxe-table/es/ui/src/utils.js +4 -5
- package/lib/node_modules/vxe-table/es/ui/src/vn.js +2 -3
- package/lib/packages/mobile/node_modules/vxe-table/es/grid/src/grid.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/custom/hook.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/custom/panel.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/edit/hook.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/export/export-panel.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/export/hook.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/export/import-panel.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/filter/hook.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/filter/panel.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/keyboard/hook.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/menu/hook.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/menu/panel.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/module/validator/hook.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/render/index.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/src/body.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/src/cell.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/src/columnInfo.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/src/footer.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/src/header.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/src/table.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/src/use/cell-view.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/table/src/util.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/toolbar/src/toolbar.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/ui/src/dom.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/ui/src/utils.js +1 -1
- package/lib/packages/mobile/node_modules/vxe-table/es/ui/src/vn.js +1 -1
- package/lib/packages/mobile/src/components/dataDisplay/table/Table.vue.js +3 -3
- package/lib/packages/mobile/src/components/form/field/Field.vue.js +1 -1
- package/lib/packages/mobile/src/utils/formatterUtil.js +1 -1
- package/lib/packages/mobile/src/utils/optionUtil.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const comp = require("../../ui/src/comp.js");
|
|
5
|
-
require("
|
|
5
|
+
const index = require("../../../../../_virtual/index2.js");
|
|
6
6
|
const dom = require("../../ui/src/dom.js");
|
|
7
7
|
const utils = require("../../ui/src/utils.js");
|
|
8
8
|
require("../../ui/index.js");
|
|
@@ -31,7 +31,6 @@ require("../module/validator/hook.js");
|
|
|
31
31
|
require("../module/custom/hook.js");
|
|
32
32
|
require("../render/index.js");
|
|
33
33
|
const index_esm = require("../../../../@vxe-ui/core/es/index.esm.js");
|
|
34
|
-
const ctor = require("../../../../xe-utils/es/ctor.js");
|
|
35
34
|
const { getConfig, getIcon, getI18n, renderer, formats, createEvent, globalResize, interceptor, hooks, globalEvents, GLOBAL_EVENT_KEYS, useFns, renderEmptyElement } = index_esm.VxeUI;
|
|
36
35
|
const supportMaxRow = 5e6;
|
|
37
36
|
const customStorageKey = "VXE_CUSTOM_STORE";
|
|
@@ -45,8 +44,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
45
44
|
emits: emits.tableEmits,
|
|
46
45
|
setup(props$1, context) {
|
|
47
46
|
const { slots, emit } = context;
|
|
48
|
-
const xID =
|
|
49
|
-
const browseObj =
|
|
47
|
+
const xID = index.default.uniqueId();
|
|
48
|
+
const browseObj = index.default.browse();
|
|
50
49
|
const VxeUILoadingComponent = index_esm.VxeUI.getComponent("VxeLoading");
|
|
51
50
|
const VxeUITooltipComponent = index_esm.VxeUI.getComponent("VxeTooltip");
|
|
52
51
|
const $xeTabs = vue.inject("$xeTabs", null);
|
|
@@ -56,7 +55,246 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
56
55
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
57
56
|
const { computeSize } = useFns.useSize(props$1);
|
|
58
57
|
const crossTableDragRowInfo = store.getCrossTableDragRowInfo();
|
|
59
|
-
const reactData = vue.reactive(
|
|
58
|
+
const reactData = vue.reactive({
|
|
59
|
+
// 低性能的静态列
|
|
60
|
+
staticColumns: [],
|
|
61
|
+
// 渲染的列分组
|
|
62
|
+
tableGroupColumn: [],
|
|
63
|
+
// 可视区渲染的列
|
|
64
|
+
tableColumn: [],
|
|
65
|
+
// 渲染中的数据
|
|
66
|
+
tableData: [],
|
|
67
|
+
// 是否启用了横向 X 可视渲染方式加载
|
|
68
|
+
scrollXLoad: false,
|
|
69
|
+
// 是否启用了纵向 Y 可视渲染方式加载
|
|
70
|
+
scrollYLoad: false,
|
|
71
|
+
// 是否存在纵向滚动条
|
|
72
|
+
overflowY: true,
|
|
73
|
+
// 是否存在横向滚动条
|
|
74
|
+
overflowX: false,
|
|
75
|
+
// 纵向滚动条的宽度
|
|
76
|
+
scrollbarWidth: 0,
|
|
77
|
+
// 横向滚动条的高度
|
|
78
|
+
scrollbarHeight: 0,
|
|
79
|
+
// 最后滚动时间戳
|
|
80
|
+
lastScrollTime: 0,
|
|
81
|
+
// 行高
|
|
82
|
+
rowHeight: 0,
|
|
83
|
+
// 表格父容器的高度
|
|
84
|
+
parentHeight: 0,
|
|
85
|
+
// 是否使用分组表头
|
|
86
|
+
isGroup: false,
|
|
87
|
+
isAllOverflow: false,
|
|
88
|
+
// 复选框属性,是否全选
|
|
89
|
+
isAllSelected: false,
|
|
90
|
+
// 复选框属性,有选中且非全选状态
|
|
91
|
+
isIndeterminate: false,
|
|
92
|
+
// 当前行
|
|
93
|
+
currentRow: null,
|
|
94
|
+
// 单选框属性,选中列
|
|
95
|
+
currentColumn: null,
|
|
96
|
+
// 单选框属性,选中行
|
|
97
|
+
selectRadioRow: null,
|
|
98
|
+
// 表尾合计数据
|
|
99
|
+
footerTableData: [],
|
|
100
|
+
// 行分组列信息
|
|
101
|
+
rowGroupColumn: null,
|
|
102
|
+
// 展开列信息
|
|
103
|
+
expandColumn: null,
|
|
104
|
+
checkboxColumn: null,
|
|
105
|
+
radioColumn: null,
|
|
106
|
+
// 树节点列信息
|
|
107
|
+
treeNodeColumn: null,
|
|
108
|
+
hasFixedColumn: false,
|
|
109
|
+
// 刷新列标识,当列筛选被改变时,触发表格刷新数据
|
|
110
|
+
upDataFlag: 0,
|
|
111
|
+
// 刷新列标识,当列的特定属性被改变时,触发表格刷新列
|
|
112
|
+
reColumnFlag: 0,
|
|
113
|
+
// 初始化标识
|
|
114
|
+
initStore: {
|
|
115
|
+
filter: false,
|
|
116
|
+
import: false,
|
|
117
|
+
export: false,
|
|
118
|
+
custom: false
|
|
119
|
+
},
|
|
120
|
+
// 自定义列相关的信息
|
|
121
|
+
customStore: {
|
|
122
|
+
btnEl: null,
|
|
123
|
+
isAll: false,
|
|
124
|
+
isIndeterminate: false,
|
|
125
|
+
activeBtn: false,
|
|
126
|
+
activeWrapper: false,
|
|
127
|
+
visible: false,
|
|
128
|
+
maxHeight: 0,
|
|
129
|
+
oldSortMaps: {},
|
|
130
|
+
oldFixedMaps: {},
|
|
131
|
+
oldVisibleMaps: {}
|
|
132
|
+
},
|
|
133
|
+
customColumnList: [],
|
|
134
|
+
// 当前选中的筛选列
|
|
135
|
+
filterStore: {
|
|
136
|
+
isAllSelected: false,
|
|
137
|
+
isIndeterminate: false,
|
|
138
|
+
style: null,
|
|
139
|
+
column: null,
|
|
140
|
+
visible: false,
|
|
141
|
+
maxHeight: null
|
|
142
|
+
},
|
|
143
|
+
// 存放列相关的信息
|
|
144
|
+
columnStore: {
|
|
145
|
+
leftList: [],
|
|
146
|
+
centerList: [],
|
|
147
|
+
rightList: [],
|
|
148
|
+
resizeList: [],
|
|
149
|
+
pxList: [],
|
|
150
|
+
pxMinList: [],
|
|
151
|
+
autoMinList: [],
|
|
152
|
+
scaleList: [],
|
|
153
|
+
scaleMinList: [],
|
|
154
|
+
autoList: [],
|
|
155
|
+
remainList: []
|
|
156
|
+
},
|
|
157
|
+
// 存放快捷菜单的信息
|
|
158
|
+
ctxMenuStore: {
|
|
159
|
+
selected: null,
|
|
160
|
+
visible: false,
|
|
161
|
+
showChild: false,
|
|
162
|
+
selectChild: null,
|
|
163
|
+
list: [],
|
|
164
|
+
style: null
|
|
165
|
+
},
|
|
166
|
+
// 存放可编辑相关信息
|
|
167
|
+
editStore: {
|
|
168
|
+
indexs: {
|
|
169
|
+
columns: []
|
|
170
|
+
},
|
|
171
|
+
titles: {
|
|
172
|
+
columns: []
|
|
173
|
+
},
|
|
174
|
+
// 选中源
|
|
175
|
+
selected: {
|
|
176
|
+
row: null,
|
|
177
|
+
column: null
|
|
178
|
+
},
|
|
179
|
+
// 已复制源
|
|
180
|
+
copyed: {
|
|
181
|
+
cut: false,
|
|
182
|
+
rows: [],
|
|
183
|
+
columns: []
|
|
184
|
+
},
|
|
185
|
+
// 激活
|
|
186
|
+
actived: {
|
|
187
|
+
row: null,
|
|
188
|
+
column: null
|
|
189
|
+
},
|
|
190
|
+
// 当前被强制聚焦单元格,只会在鼠标点击后算聚焦
|
|
191
|
+
focused: {
|
|
192
|
+
row: null,
|
|
193
|
+
column: null
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
// 存放 tooltip 相关信息
|
|
197
|
+
tooltipStore: {
|
|
198
|
+
row: null,
|
|
199
|
+
column: null,
|
|
200
|
+
content: null,
|
|
201
|
+
visible: false,
|
|
202
|
+
type: null,
|
|
203
|
+
currOpts: {}
|
|
204
|
+
},
|
|
205
|
+
// 存放数据校验相关信息
|
|
206
|
+
validStore: {
|
|
207
|
+
visible: false
|
|
208
|
+
},
|
|
209
|
+
validErrorMaps: {},
|
|
210
|
+
// 导入相关信息
|
|
211
|
+
importStore: {
|
|
212
|
+
inited: false,
|
|
213
|
+
file: null,
|
|
214
|
+
type: "",
|
|
215
|
+
modeList: [],
|
|
216
|
+
typeList: [],
|
|
217
|
+
filename: "",
|
|
218
|
+
visible: false
|
|
219
|
+
},
|
|
220
|
+
importParams: {
|
|
221
|
+
mode: "",
|
|
222
|
+
types: null,
|
|
223
|
+
message: true
|
|
224
|
+
},
|
|
225
|
+
// 导出相关信息
|
|
226
|
+
exportStore: {
|
|
227
|
+
inited: false,
|
|
228
|
+
name: "",
|
|
229
|
+
modeList: [],
|
|
230
|
+
typeList: [],
|
|
231
|
+
columns: [],
|
|
232
|
+
isPrint: false,
|
|
233
|
+
hasFooter: false,
|
|
234
|
+
hasMerge: false,
|
|
235
|
+
hasTree: false,
|
|
236
|
+
hasColgroup: false,
|
|
237
|
+
visible: false
|
|
238
|
+
},
|
|
239
|
+
exportParams: {
|
|
240
|
+
filename: "",
|
|
241
|
+
sheetName: "",
|
|
242
|
+
mode: "",
|
|
243
|
+
type: "",
|
|
244
|
+
isColgroup: false,
|
|
245
|
+
isMerge: false,
|
|
246
|
+
isAllExpand: false,
|
|
247
|
+
useStyle: false,
|
|
248
|
+
original: false,
|
|
249
|
+
message: true,
|
|
250
|
+
isHeader: false,
|
|
251
|
+
isTitle: false,
|
|
252
|
+
isFooter: false
|
|
253
|
+
},
|
|
254
|
+
visiblwRowsFlag: 1,
|
|
255
|
+
isRowGroupStatus: false,
|
|
256
|
+
rowGroupList: [],
|
|
257
|
+
aggHandleFields: [],
|
|
258
|
+
aggHandleAggColumns: [],
|
|
259
|
+
rowGroupExpandedFlag: 1,
|
|
260
|
+
rowExpandedFlag: 1,
|
|
261
|
+
treeExpandedFlag: 1,
|
|
262
|
+
updateCheckboxFlag: 1,
|
|
263
|
+
pendingRowFlag: 1,
|
|
264
|
+
insertRowFlag: 1,
|
|
265
|
+
removeRowFlag: 1,
|
|
266
|
+
mergeHeadFlag: 1,
|
|
267
|
+
mergeBodyFlag: 1,
|
|
268
|
+
mergeFootFlag: 1,
|
|
269
|
+
rowHeightStore: {
|
|
270
|
+
large: 52,
|
|
271
|
+
default: 48,
|
|
272
|
+
medium: 44,
|
|
273
|
+
small: 40,
|
|
274
|
+
mini: 36
|
|
275
|
+
},
|
|
276
|
+
scrollVMLoading: false,
|
|
277
|
+
scrollYHeight: 0,
|
|
278
|
+
scrollYTop: 0,
|
|
279
|
+
isScrollYBig: false,
|
|
280
|
+
scrollXLeft: 0,
|
|
281
|
+
scrollXWidth: 0,
|
|
282
|
+
isScrollXBig: false,
|
|
283
|
+
lazScrollLoading: false,
|
|
284
|
+
rowExpandHeightFlag: 1,
|
|
285
|
+
calcCellHeightFlag: 1,
|
|
286
|
+
resizeHeightFlag: 1,
|
|
287
|
+
resizeWidthFlag: 1,
|
|
288
|
+
isCustomStatus: false,
|
|
289
|
+
isCrossDragRow: false,
|
|
290
|
+
dragRow: null,
|
|
291
|
+
isCrossDragCol: false,
|
|
292
|
+
dragCol: null,
|
|
293
|
+
dragTipText: "",
|
|
294
|
+
isDragResize: false,
|
|
295
|
+
isRowLoading: false,
|
|
296
|
+
isColLoading: false
|
|
297
|
+
});
|
|
60
298
|
const internalData = util.createInternalData();
|
|
61
299
|
let tableMethods = {};
|
|
62
300
|
let tablePrivateMethods = {};
|
|
@@ -106,7 +344,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
106
344
|
const computeTableId = vue.computed(() => {
|
|
107
345
|
const { id } = props$1;
|
|
108
346
|
if (id) {
|
|
109
|
-
if (
|
|
347
|
+
if (index.default.isFunction(id)) {
|
|
110
348
|
return `${id({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) || ""}`;
|
|
111
349
|
}
|
|
112
350
|
return `${id}`;
|
|
@@ -118,11 +356,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
118
356
|
return `${props$1.rowId || rowOpts.keyField || "_X_ROW_KEY"}`;
|
|
119
357
|
});
|
|
120
358
|
const computeValidOpts = vue.computed(() => {
|
|
121
|
-
|
|
122
|
-
if (ctor.default.isBoolean(opts.showMessage)) {
|
|
123
|
-
opts.showErrorMessage = opts.showMessage;
|
|
124
|
-
}
|
|
125
|
-
return opts;
|
|
359
|
+
return Object.assign({}, getConfig().table.validConfig, props$1.validConfig);
|
|
126
360
|
});
|
|
127
361
|
const computeSXOpts = vue.computed(() => {
|
|
128
362
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
@@ -132,7 +366,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
132
366
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
133
367
|
const { threshold } = virtualXOpts;
|
|
134
368
|
if (threshold) {
|
|
135
|
-
return
|
|
369
|
+
return index.default.toNumber(threshold);
|
|
136
370
|
}
|
|
137
371
|
return 0;
|
|
138
372
|
});
|
|
@@ -195,7 +429,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
195
429
|
const virtualYOpts = computeVirtualYOpts.value;
|
|
196
430
|
const { threshold } = virtualYOpts;
|
|
197
431
|
if (threshold) {
|
|
198
|
-
return
|
|
432
|
+
return index.default.toNumber(threshold);
|
|
199
433
|
}
|
|
200
434
|
return 0;
|
|
201
435
|
});
|
|
@@ -216,7 +450,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
216
450
|
const computeCellOpts = vue.computed(() => {
|
|
217
451
|
const cellOpts = Object.assign({}, getConfig().table.cellConfig, props$1.cellConfig);
|
|
218
452
|
if (cellOpts.height) {
|
|
219
|
-
cellOpts.height =
|
|
453
|
+
cellOpts.height = index.default.toNumber(cellOpts.height);
|
|
220
454
|
}
|
|
221
455
|
return cellOpts;
|
|
222
456
|
});
|
|
@@ -224,7 +458,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
224
458
|
const headerCellOpts = Object.assign({}, getConfig().table.headerCellConfig, props$1.headerCellConfig);
|
|
225
459
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
226
460
|
const cellOpts = computeCellOpts.value;
|
|
227
|
-
let headCellHeight =
|
|
461
|
+
let headCellHeight = index.default.toNumber(util.getCalcHeight(headerCellOpts.height || cellOpts.height));
|
|
228
462
|
if ($xeGantt) {
|
|
229
463
|
const { computeTaskViewScales } = $xeGantt.getComputeMaps();
|
|
230
464
|
const taskViewScales = computeTaskViewScales.value;
|
|
@@ -239,7 +473,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
239
473
|
const computeFooterCellOpts = vue.computed(() => {
|
|
240
474
|
const footerCellOpts = Object.assign({}, getConfig().table.footerCellConfig, props$1.footerCellConfig);
|
|
241
475
|
const cellOpts = computeCellOpts.value;
|
|
242
|
-
footerCellOpts.height =
|
|
476
|
+
footerCellOpts.height = index.default.toNumber(util.getCalcHeight(footerCellOpts.height || cellOpts.height));
|
|
243
477
|
return footerCellOpts;
|
|
244
478
|
});
|
|
245
479
|
const computeRowOpts = vue.computed(() => {
|
|
@@ -251,9 +485,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
251
485
|
const computeRowGroupOpts = vue.computed(() => {
|
|
252
486
|
return computeAggregateOpts.value;
|
|
253
487
|
});
|
|
254
|
-
const computeAggregateAccuracyOpts = vue.computed(() => {
|
|
255
|
-
return Object.assign({}, getConfig().table.aggregateAccuracyConfig, props$1.aggregateAccuracyConfig);
|
|
256
|
-
});
|
|
257
488
|
const computeCurrentRowOpts = vue.computed(() => {
|
|
258
489
|
return Object.assign({}, getConfig().table.currentRowConfig, props$1.currentRowConfig);
|
|
259
490
|
});
|
|
@@ -299,9 +530,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
299
530
|
const computeEditOpts = vue.computed(() => {
|
|
300
531
|
return Object.assign({}, getConfig().table.editConfig, props$1.editConfig);
|
|
301
532
|
});
|
|
302
|
-
const computeEditDirtyOpts = vue.computed(() => {
|
|
303
|
-
return Object.assign({}, getConfig().table.editDirtyConfig, props$1.editDirtyConfig);
|
|
304
|
-
});
|
|
305
533
|
const computeSortOpts = vue.computed(() => {
|
|
306
534
|
return Object.assign({ orders: ["asc", "desc", null] }, getConfig().table.sortConfig, props$1.sortConfig);
|
|
307
535
|
});
|
|
@@ -365,9 +593,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
365
593
|
const lecIndex = leftList.length;
|
|
366
594
|
for (let i = 0; i < mergeBodyList.length; i++) {
|
|
367
595
|
const { col, colspan } = mergeBodyList[i];
|
|
368
|
-
if (col < lecIndex
|
|
369
|
-
return true;
|
|
370
|
-
} else if (col < rscIndex && col + colspan > rscIndex) {
|
|
596
|
+
if (col < lecIndex || col + colspan > rscIndex) {
|
|
371
597
|
return true;
|
|
372
598
|
}
|
|
373
599
|
}
|
|
@@ -478,44 +704,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
478
704
|
const computeCustomOpts = vue.computed(() => {
|
|
479
705
|
return Object.assign({}, getConfig().table.customConfig, props$1.customConfig);
|
|
480
706
|
});
|
|
481
|
-
const computeCustomSimpleMode = vue.computed(() => {
|
|
482
|
-
const { minHeight, height } = props$1;
|
|
483
|
-
const customOpts = computeCustomOpts.value;
|
|
484
|
-
const { mode, popupOptions, placement } = customOpts;
|
|
485
|
-
if (!placement || placement === "top-left" || placement === "top-right") {
|
|
486
|
-
if (!(mode === "modal" || mode === "drawer")) {
|
|
487
|
-
const { mode: mode2 } = popupOptions || {};
|
|
488
|
-
if (!mode2 || mode2 === "auto") {
|
|
489
|
-
if (height || minHeight) {
|
|
490
|
-
return "inside";
|
|
491
|
-
}
|
|
492
|
-
return "outside";
|
|
493
|
-
}
|
|
494
|
-
if (mode2) {
|
|
495
|
-
return mode2;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
return "";
|
|
500
|
-
});
|
|
501
|
-
const computeTableStyle = vue.computed(() => {
|
|
502
|
-
const scrollbarOpts = computeScrollbarOpts.value;
|
|
503
|
-
const { width, height } = scrollbarOpts;
|
|
504
|
-
const tStys = {};
|
|
505
|
-
if (width) {
|
|
506
|
-
tStys["--vxe-ui-table-view-scrollbar-width"] = dom.toCssUnit(width);
|
|
507
|
-
}
|
|
508
|
-
if (height) {
|
|
509
|
-
tStys["--vxe-ui-table-view-scrollbar-height"] = dom.toCssUnit(height);
|
|
510
|
-
}
|
|
511
|
-
return tStys;
|
|
512
|
-
});
|
|
513
707
|
const computeTableRowExpandedList = vue.computed(() => {
|
|
514
708
|
const { tableData, rowExpandedFlag, expandColumn, rowGroupExpandedFlag, treeExpandedFlag } = reactData;
|
|
515
709
|
const { visibleDataRowIdData, rowExpandedMaps } = internalData;
|
|
516
710
|
const expandList = [];
|
|
517
711
|
if (tableData.length && expandColumn && rowExpandedFlag && rowGroupExpandedFlag && treeExpandedFlag) {
|
|
518
|
-
|
|
712
|
+
index.default.each(rowExpandedMaps, (row, rowid) => {
|
|
519
713
|
if (visibleDataRowIdData[rowid]) {
|
|
520
714
|
expandList.push(row);
|
|
521
715
|
}
|
|
@@ -550,32 +744,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
550
744
|
}
|
|
551
745
|
return false;
|
|
552
746
|
});
|
|
553
|
-
const computeKeepFields = vue.computed(() => {
|
|
554
|
-
const { tableFullColumn } = internalData;
|
|
555
|
-
const { updateColFlag } = reactData;
|
|
556
|
-
const editDirtyOpts = computeEditDirtyOpts.value;
|
|
557
|
-
const { includeFields, excludeFields } = editDirtyOpts;
|
|
558
|
-
const kpFields = [];
|
|
559
|
-
if (updateColFlag) {
|
|
560
|
-
if (includeFields && includeFields.length) {
|
|
561
|
-
return includeFields;
|
|
562
|
-
}
|
|
563
|
-
const exfMaps = {};
|
|
564
|
-
if (excludeFields && excludeFields.length) {
|
|
565
|
-
excludeFields.forEach((field) => {
|
|
566
|
-
exfMaps[field] = 1;
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
for (let i = 0; i < tableFullColumn.length; i++) {
|
|
570
|
-
const column = tableFullColumn[i];
|
|
571
|
-
const { field, type, editRender, cellRender } = column;
|
|
572
|
-
if (field && !type && (editRender || cellRender) && !exfMaps[field]) {
|
|
573
|
-
kpFields.push(field);
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
return kpFields;
|
|
578
|
-
});
|
|
579
747
|
const computeTableBorder = vue.computed(() => {
|
|
580
748
|
const { border } = props$1;
|
|
581
749
|
if (border === true) {
|
|
@@ -683,7 +851,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
683
851
|
computeFooterCellOpts,
|
|
684
852
|
computeRowOpts,
|
|
685
853
|
computeAggregateOpts,
|
|
686
|
-
computeAggregateAccuracyOpts,
|
|
687
854
|
computeRowGroupOpts,
|
|
688
855
|
computeCurrentRowOpts,
|
|
689
856
|
computeRowDragOpts,
|
|
@@ -697,7 +864,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
697
864
|
computeHeaderTooltipOpts,
|
|
698
865
|
computeFooterTooltipOpts,
|
|
699
866
|
computeEditOpts,
|
|
700
|
-
computeEditDirtyOpts,
|
|
701
867
|
computeSortOpts,
|
|
702
868
|
computeFilterOpts,
|
|
703
869
|
computeFloatingFilterOpts,
|
|
@@ -722,13 +888,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
722
888
|
computeLoadingOpts,
|
|
723
889
|
computeCellOffsetWidth,
|
|
724
890
|
computeCustomOpts,
|
|
725
|
-
computeCustomSimpleMode,
|
|
726
891
|
computeLeftFixedWidth,
|
|
727
892
|
computeRightFixedWidth,
|
|
728
893
|
computeBodyMergeCoverFixed,
|
|
729
894
|
computeFixedColumnSize,
|
|
730
895
|
computeIsMaxFixedColumn,
|
|
731
|
-
computeKeepFields,
|
|
732
896
|
computeIsAllCheckboxDisabled,
|
|
733
897
|
computeIsHeaderRenderOptimize,
|
|
734
898
|
computeIsBodyRenderOptimize,
|
|
@@ -756,15 +920,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
756
920
|
xegrid: $xeGrid
|
|
757
921
|
};
|
|
758
922
|
const eqCellValue = (row1, row2, field) => {
|
|
759
|
-
const val1 =
|
|
760
|
-
const val2 =
|
|
923
|
+
const val1 = index.default.get(row1, field);
|
|
924
|
+
const val2 = index.default.get(row2, field);
|
|
761
925
|
if (utils.eqEmptyValue(val1) && utils.eqEmptyValue(val2)) {
|
|
762
926
|
return true;
|
|
763
927
|
}
|
|
764
|
-
if (
|
|
928
|
+
if (index.default.isString(val1) || index.default.isNumber(val1)) {
|
|
765
929
|
return "" + val1 === "" + val2;
|
|
766
930
|
}
|
|
767
|
-
return
|
|
931
|
+
return index.default.isEqual(val1, val2);
|
|
768
932
|
};
|
|
769
933
|
const handleKeyField = () => {
|
|
770
934
|
const keyField = computeRowField.value;
|
|
@@ -772,7 +936,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
772
936
|
internalData.isCurrDeepKey = util.hasDeepKey(keyField);
|
|
773
937
|
};
|
|
774
938
|
const hangleStorageDefaultValue = (value, isAll) => {
|
|
775
|
-
return
|
|
939
|
+
return index.default.isBoolean(value) ? value : isAll;
|
|
776
940
|
};
|
|
777
941
|
const getNextSortOrder = (column) => {
|
|
778
942
|
const sortOpts = computeSortOpts.value;
|
|
@@ -783,7 +947,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
783
947
|
};
|
|
784
948
|
const getCustomStorageMap = (id) => {
|
|
785
949
|
const version = getConfig().version;
|
|
786
|
-
const rest =
|
|
950
|
+
const rest = index.default.toStringJSON(localStorage.getItem(customStorageKey) || "");
|
|
787
951
|
const maps = rest && rest._v === version ? rest : { _v: version };
|
|
788
952
|
return (id ? maps[id] : maps) || {};
|
|
789
953
|
};
|
|
@@ -792,12 +956,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
792
956
|
const maps = getCustomStorageMap();
|
|
793
957
|
maps[id] = data || void 0;
|
|
794
958
|
maps._v = version;
|
|
795
|
-
localStorage.setItem(customStorageKey,
|
|
959
|
+
localStorage.setItem(customStorageKey, index.default.toJSONString(maps));
|
|
796
960
|
};
|
|
797
961
|
const getRecoverRowMaps = (keyMaps) => {
|
|
798
962
|
const { fullAllDataRowIdData } = internalData;
|
|
799
963
|
const restKeys = {};
|
|
800
|
-
|
|
964
|
+
index.default.each(keyMaps, (row, rowid) => {
|
|
801
965
|
if (fullAllDataRowIdData[rowid]) {
|
|
802
966
|
restKeys[rowid] = row;
|
|
803
967
|
}
|
|
@@ -807,7 +971,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
807
971
|
const handleReserveRow = (reserveRowMap) => {
|
|
808
972
|
const { fullDataRowIdData } = internalData;
|
|
809
973
|
const reserveList = [];
|
|
810
|
-
|
|
974
|
+
index.default.each(reserveRowMap, (item, rowid) => {
|
|
811
975
|
if (fullDataRowIdData[rowid] && $xeTable.findRowIndexOf(reserveList, fullDataRowIdData[rowid].row) === -1) {
|
|
812
976
|
reserveList.push(fullDataRowIdData[rowid].row);
|
|
813
977
|
}
|
|
@@ -940,44 +1104,32 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
940
1104
|
}
|
|
941
1105
|
return { toVisibleIndex: 0, visibleSize: 6 };
|
|
942
1106
|
};
|
|
943
|
-
const calculateMergerOffsetIndex = (list,
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
}
|
|
959
|
-
if (mergeStartIndex < endIndex && endIndex < mergeEndIndex) {
|
|
960
|
-
offsetItem.endIndex = mergeEndIndex;
|
|
961
|
-
}
|
|
962
|
-
if (offsetItem.startIndex !== startIndex || offsetItem.endIndex !== endIndex) {
|
|
963
|
-
mcIndex = -1;
|
|
964
|
-
}
|
|
1107
|
+
const calculateMergerOffsetIndex = (list, offsetItem, type) => {
|
|
1108
|
+
for (let mcIndex = 0, len = list.length; mcIndex < len; mcIndex++) {
|
|
1109
|
+
const mergeItem = list[mcIndex];
|
|
1110
|
+
const { startIndex, endIndex } = offsetItem;
|
|
1111
|
+
const mergeStartIndex = mergeItem[type];
|
|
1112
|
+
const mergeSpanNumber = mergeItem[type + "span"];
|
|
1113
|
+
const mergeEndIndex = mergeStartIndex + mergeSpanNumber;
|
|
1114
|
+
if (mergeStartIndex < startIndex && startIndex < mergeEndIndex) {
|
|
1115
|
+
offsetItem.startIndex = mergeStartIndex;
|
|
1116
|
+
}
|
|
1117
|
+
if (mergeStartIndex < endIndex && endIndex < mergeEndIndex) {
|
|
1118
|
+
offsetItem.endIndex = mergeEndIndex;
|
|
1119
|
+
}
|
|
1120
|
+
if (offsetItem.startIndex !== startIndex || offsetItem.endIndex !== endIndex) {
|
|
1121
|
+
mcIndex = -1;
|
|
965
1122
|
}
|
|
966
|
-
mergeMaps[mKey] = offsetItem;
|
|
967
1123
|
}
|
|
968
1124
|
};
|
|
969
1125
|
function buildMergeData(mergeConfigs) {
|
|
970
1126
|
const mergeMaps = {};
|
|
971
|
-
const mergeRowMaps = {};
|
|
972
|
-
const mergeColMaps = {};
|
|
973
1127
|
if (mergeConfigs && mergeConfigs.length) {
|
|
974
1128
|
for (let mIndex = 0; mIndex < mergeConfigs.length; mIndex++) {
|
|
975
1129
|
const { row: _rowIndex, col: _columnIndex, rowspan: mergeRowspan, colspan: mergeColspan } = mergeConfigs[mIndex];
|
|
976
1130
|
for (let i = 0; i < mergeRowspan; i++) {
|
|
977
|
-
const currRIndex = _rowIndex + i;
|
|
978
1131
|
for (let j = 0; j < mergeColspan; j++) {
|
|
979
|
-
|
|
980
|
-
mergeMaps[`${currRIndex}:${currCIndex}`] = !i && !j ? {
|
|
1132
|
+
mergeMaps[`${_rowIndex + i}:${_columnIndex + j}`] = !i && !j ? {
|
|
981
1133
|
rowspan: mergeRowspan,
|
|
982
1134
|
colspan: mergeColspan
|
|
983
1135
|
} : {
|
|
@@ -988,28 +1140,26 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
988
1140
|
}
|
|
989
1141
|
}
|
|
990
1142
|
}
|
|
991
|
-
return
|
|
1143
|
+
return mergeMaps;
|
|
992
1144
|
}
|
|
993
1145
|
const handleUpdateMergeBodyCells = (merges) => {
|
|
994
1146
|
internalData.mergeBodyList = [];
|
|
995
1147
|
internalData.mergeBodyMaps = {};
|
|
996
1148
|
internalData.mergeBodyCellMaps = {};
|
|
997
|
-
internalData.mergeBodyRowMaps = {};
|
|
998
|
-
internalData.mergeBodyColMaps = {};
|
|
999
1149
|
$xeTable.setMergeCells(merges);
|
|
1000
1150
|
};
|
|
1001
1151
|
const handleBodyMerge = (merges) => {
|
|
1002
1152
|
const { fullAllDataRowIdData, fullColumnIdData, visibleColumn, afterFullData, mergeBodyList, mergeBodyMaps } = internalData;
|
|
1003
1153
|
if (merges) {
|
|
1004
1154
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
1005
|
-
if (!
|
|
1155
|
+
if (!index.default.isArray(merges)) {
|
|
1006
1156
|
merges = [merges];
|
|
1007
1157
|
}
|
|
1008
1158
|
merges.forEach((item) => {
|
|
1009
1159
|
let { row: margeRow, col: margeCol, rowspan, colspan } = item;
|
|
1010
1160
|
let mergeRowIndex = -1;
|
|
1011
1161
|
let mergeColumnIndex = -1;
|
|
1012
|
-
if (
|
|
1162
|
+
if (index.default.isNumber(margeRow)) {
|
|
1013
1163
|
mergeRowIndex = margeRow;
|
|
1014
1164
|
} else {
|
|
1015
1165
|
const rowid = margeRow ? handleGetRowId(margeRow) : null;
|
|
@@ -1018,7 +1168,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1018
1168
|
mergeRowIndex = rowRest._index;
|
|
1019
1169
|
}
|
|
1020
1170
|
}
|
|
1021
|
-
if (
|
|
1171
|
+
if (index.default.isNumber(margeCol)) {
|
|
1022
1172
|
mergeColumnIndex = margeCol;
|
|
1023
1173
|
} else {
|
|
1024
1174
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1028,8 +1178,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1028
1178
|
}
|
|
1029
1179
|
}
|
|
1030
1180
|
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
1031
|
-
rowspan =
|
|
1032
|
-
colspan =
|
|
1181
|
+
rowspan = index.default.toNumber(rowspan) || 1;
|
|
1182
|
+
colspan = index.default.toNumber(colspan) || 1;
|
|
1033
1183
|
if (rowspan > 1 || colspan > 1) {
|
|
1034
1184
|
const row = afterFullData[mergeRowIndex];
|
|
1035
1185
|
const column = visibleColumn[mergeColumnIndex];
|
|
@@ -1063,14 +1213,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1063
1213
|
const rest = [];
|
|
1064
1214
|
if (merges) {
|
|
1065
1215
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
1066
|
-
if (!
|
|
1216
|
+
if (!index.default.isArray(merges)) {
|
|
1067
1217
|
merges = [merges];
|
|
1068
1218
|
}
|
|
1069
1219
|
merges.forEach((item) => {
|
|
1070
1220
|
const { row: margeRow, col: margeCol } = item;
|
|
1071
1221
|
let mergeRowIndex = -1;
|
|
1072
1222
|
let mergeColumnIndex = -1;
|
|
1073
|
-
if (
|
|
1223
|
+
if (index.default.isNumber(margeRow)) {
|
|
1074
1224
|
mergeRowIndex = margeRow;
|
|
1075
1225
|
} else {
|
|
1076
1226
|
const rowid = margeRow ? handleGetRowId(margeRow) : null;
|
|
@@ -1079,7 +1229,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1079
1229
|
mergeRowIndex = rowRest._index;
|
|
1080
1230
|
}
|
|
1081
1231
|
}
|
|
1082
|
-
if (
|
|
1232
|
+
if (index.default.isNumber(margeCol)) {
|
|
1083
1233
|
mergeColumnIndex = margeCol;
|
|
1084
1234
|
} else {
|
|
1085
1235
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1088,7 +1238,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1088
1238
|
mergeColumnIndex = colRest._index;
|
|
1089
1239
|
}
|
|
1090
1240
|
}
|
|
1091
|
-
const mcIndex =
|
|
1241
|
+
const mcIndex = index.default.findIndexOf(mergeBodyList, (item2) => item2.row === mergeRowIndex && item2.col === mergeColumnIndex);
|
|
1092
1242
|
if (mcIndex > -1) {
|
|
1093
1243
|
const rItems = mergeBodyList.splice(mcIndex, 1);
|
|
1094
1244
|
const item2 = rItems[0];
|
|
@@ -1107,8 +1257,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1107
1257
|
internalData.mergeHeaderList = [];
|
|
1108
1258
|
internalData.mergeHeaderMaps = {};
|
|
1109
1259
|
internalData.mergeHeaderCellMaps = {};
|
|
1110
|
-
internalData.mergeHeaderRowMaps = {};
|
|
1111
|
-
internalData.mergeBodyColMaps = {};
|
|
1112
1260
|
$xeTable.setMergeHeaderCells(merges);
|
|
1113
1261
|
};
|
|
1114
1262
|
const handleHeaderMerge = (merges) => {
|
|
@@ -1117,14 +1265,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1117
1265
|
const { mergeHeaderList, mergeHeaderMaps, fullColumnIdData } = internalData;
|
|
1118
1266
|
if (merges) {
|
|
1119
1267
|
const { visibleColumn } = internalData;
|
|
1120
|
-
if (!
|
|
1268
|
+
if (!index.default.isArray(merges)) {
|
|
1121
1269
|
merges = [merges];
|
|
1122
1270
|
}
|
|
1123
1271
|
merges.forEach((item) => {
|
|
1124
1272
|
let { row: margeRow, col: margeCol, rowspan, colspan } = item;
|
|
1125
|
-
const mergeRowIndex =
|
|
1273
|
+
const mergeRowIndex = index.default.isNumber(margeRow) ? margeRow : -1;
|
|
1126
1274
|
let mergeColumnIndex = -1;
|
|
1127
|
-
if (
|
|
1275
|
+
if (index.default.isNumber(margeCol)) {
|
|
1128
1276
|
mergeColumnIndex = margeCol;
|
|
1129
1277
|
} else {
|
|
1130
1278
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1134,8 +1282,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1134
1282
|
}
|
|
1135
1283
|
}
|
|
1136
1284
|
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
1137
|
-
rowspan =
|
|
1138
|
-
colspan =
|
|
1285
|
+
rowspan = index.default.toNumber(rowspan) || 1;
|
|
1286
|
+
colspan = index.default.toNumber(colspan) || 1;
|
|
1139
1287
|
if (!showCustomHeader && rowspan > 1) {
|
|
1140
1288
|
log.errLog("vxe.error.notSupportProp", ["[table] show-custom-header=false", `rowspan=${rowspan}`, "rowspan=1"]);
|
|
1141
1289
|
return;
|
|
@@ -1172,14 +1320,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1172
1320
|
const { mergeHeaderList, fullColumnIdData, mergeHeaderMaps } = internalData;
|
|
1173
1321
|
const rest = [];
|
|
1174
1322
|
if (merges) {
|
|
1175
|
-
if (!
|
|
1323
|
+
if (!index.default.isArray(merges)) {
|
|
1176
1324
|
merges = [merges];
|
|
1177
1325
|
}
|
|
1178
1326
|
merges.forEach((item) => {
|
|
1179
1327
|
const { row: margeRow, col: margeCol } = item;
|
|
1180
|
-
const mergeRowIndex =
|
|
1328
|
+
const mergeRowIndex = index.default.isNumber(margeRow) ? margeRow : -1;
|
|
1181
1329
|
let mergeColumnIndex = -1;
|
|
1182
|
-
if (
|
|
1330
|
+
if (index.default.isNumber(margeCol)) {
|
|
1183
1331
|
mergeColumnIndex = margeCol;
|
|
1184
1332
|
} else {
|
|
1185
1333
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1188,7 +1336,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1188
1336
|
mergeColumnIndex = colRest._index;
|
|
1189
1337
|
}
|
|
1190
1338
|
}
|
|
1191
|
-
const mcIndex =
|
|
1339
|
+
const mcIndex = index.default.findIndexOf(mergeHeaderList, (item2) => item2.row === mergeRowIndex && item2.col === mergeColumnIndex);
|
|
1192
1340
|
if (mcIndex > -1) {
|
|
1193
1341
|
const rItems = mergeHeaderList.splice(mcIndex, 1);
|
|
1194
1342
|
const item2 = rItems[0];
|
|
@@ -1207,8 +1355,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1207
1355
|
internalData.mergeFooterList = [];
|
|
1208
1356
|
internalData.mergeFooterMaps = {};
|
|
1209
1357
|
internalData.mergeFooterCellMaps = {};
|
|
1210
|
-
internalData.mergeFooterRowMaps = {};
|
|
1211
|
-
internalData.mergeFooterColMaps = {};
|
|
1212
1358
|
$xeTable.setMergeFooterCells(merges);
|
|
1213
1359
|
};
|
|
1214
1360
|
const handleFooterMerge = (merges) => {
|
|
@@ -1216,14 +1362,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1216
1362
|
const { mergeFooterList, mergeFooterMaps, fullColumnIdData } = internalData;
|
|
1217
1363
|
if (merges) {
|
|
1218
1364
|
const { visibleColumn } = internalData;
|
|
1219
|
-
if (!
|
|
1365
|
+
if (!index.default.isArray(merges)) {
|
|
1220
1366
|
merges = [merges];
|
|
1221
1367
|
}
|
|
1222
1368
|
merges.forEach((item) => {
|
|
1223
1369
|
let { row: margeRow, col: margeCol, rowspan, colspan } = item;
|
|
1224
|
-
const mergeRowIndex =
|
|
1370
|
+
const mergeRowIndex = index.default.isNumber(margeRow) ? margeRow : -1;
|
|
1225
1371
|
let mergeColumnIndex = -1;
|
|
1226
|
-
if (
|
|
1372
|
+
if (index.default.isNumber(margeCol)) {
|
|
1227
1373
|
mergeColumnIndex = margeCol;
|
|
1228
1374
|
} else {
|
|
1229
1375
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1233,8 +1379,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1233
1379
|
}
|
|
1234
1380
|
}
|
|
1235
1381
|
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
1236
|
-
rowspan =
|
|
1237
|
-
colspan =
|
|
1382
|
+
rowspan = index.default.toNumber(rowspan) || 1;
|
|
1383
|
+
colspan = index.default.toNumber(colspan) || 1;
|
|
1238
1384
|
if (rowspan > 1 || colspan > 1) {
|
|
1239
1385
|
const row = footerTableData[mergeRowIndex];
|
|
1240
1386
|
const column = visibleColumn[mergeColumnIndex];
|
|
@@ -1267,14 +1413,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1267
1413
|
const { mergeFooterList, fullColumnIdData, mergeFooterMaps } = internalData;
|
|
1268
1414
|
const rest = [];
|
|
1269
1415
|
if (merges) {
|
|
1270
|
-
if (!
|
|
1416
|
+
if (!index.default.isArray(merges)) {
|
|
1271
1417
|
merges = [merges];
|
|
1272
1418
|
}
|
|
1273
1419
|
merges.forEach((item) => {
|
|
1274
1420
|
const { row: margeRow, col: margeCol } = item;
|
|
1275
|
-
const mergeRowIndex =
|
|
1421
|
+
const mergeRowIndex = index.default.isNumber(margeRow) ? margeRow : -1;
|
|
1276
1422
|
let mergeColumnIndex = -1;
|
|
1277
|
-
if (
|
|
1423
|
+
if (index.default.isNumber(margeCol)) {
|
|
1278
1424
|
mergeColumnIndex = margeCol;
|
|
1279
1425
|
} else {
|
|
1280
1426
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1283,7 +1429,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1283
1429
|
mergeColumnIndex = colRest._index;
|
|
1284
1430
|
}
|
|
1285
1431
|
}
|
|
1286
|
-
const mcIndex =
|
|
1432
|
+
const mcIndex = index.default.findIndexOf(mergeFooterList, (item2) => item2.row === mergeRowIndex && item2.col === mergeColumnIndex);
|
|
1287
1433
|
if (mcIndex > -1) {
|
|
1288
1434
|
const rItems = mergeFooterList.splice(mcIndex, 1);
|
|
1289
1435
|
const item2 = rItems[0];
|
|
@@ -1302,7 +1448,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1302
1448
|
const { tableFullColumn } = internalData;
|
|
1303
1449
|
const sortOpts = computeSortOpts.value;
|
|
1304
1450
|
const { multiple, remote, orders } = sortOpts;
|
|
1305
|
-
if (!
|
|
1451
|
+
if (!index.default.isArray(sortConfs)) {
|
|
1306
1452
|
sortConfs = [sortConfs];
|
|
1307
1453
|
}
|
|
1308
1454
|
if (sortConfs && sortConfs.length) {
|
|
@@ -1317,10 +1463,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1317
1463
|
}
|
|
1318
1464
|
const sortColMpps = {};
|
|
1319
1465
|
let firstColumn = null;
|
|
1320
|
-
sortConfs.forEach((confs, index) => {
|
|
1466
|
+
sortConfs.forEach((confs, index$1) => {
|
|
1321
1467
|
let { field, order } = confs;
|
|
1322
1468
|
let column = field;
|
|
1323
|
-
if (
|
|
1469
|
+
if (index.default.isString(field)) {
|
|
1324
1470
|
column = $xeTable.getColumnByField(field);
|
|
1325
1471
|
}
|
|
1326
1472
|
if (!firstColumn) {
|
|
@@ -1333,12 +1479,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1333
1479
|
if (column.order !== order) {
|
|
1334
1480
|
column.order = order;
|
|
1335
1481
|
}
|
|
1336
|
-
column.sortTime = Date.now() + index;
|
|
1482
|
+
column.sortTime = Date.now() + index$1;
|
|
1337
1483
|
sortColMpps[column.id] = column;
|
|
1338
1484
|
}
|
|
1339
1485
|
});
|
|
1340
1486
|
if (!multiple) {
|
|
1341
|
-
|
|
1487
|
+
index.default.each(orderActiveMaps, (oaCol, oaId) => {
|
|
1342
1488
|
if (!sortColMpps[oaId]) {
|
|
1343
1489
|
oaCol.order = null;
|
|
1344
1490
|
}
|
|
@@ -1372,7 +1518,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1372
1518
|
let val = props$1[key];
|
|
1373
1519
|
if (key === "minHeight") {
|
|
1374
1520
|
const defMinHeight = getConfig().table.minHeight;
|
|
1375
|
-
if (
|
|
1521
|
+
if (index.default.eqNull(val)) {
|
|
1376
1522
|
if (utils.eqEmptyValue(defMinHeight)) {
|
|
1377
1523
|
if (!tableColumn.length) {
|
|
1378
1524
|
val = 40;
|
|
@@ -1391,9 +1537,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1391
1537
|
} else {
|
|
1392
1538
|
const excludeHeight = $xeTable.getExcludeHeight();
|
|
1393
1539
|
if (dom.isScale(val)) {
|
|
1394
|
-
num = Math.floor((
|
|
1540
|
+
num = Math.floor((index.default.toInteger(val) || 1) / 100 * parentHeight);
|
|
1395
1541
|
} else {
|
|
1396
|
-
num =
|
|
1542
|
+
num = index.default.toNumber(val);
|
|
1397
1543
|
}
|
|
1398
1544
|
num = Math.max(40, num - excludeHeight);
|
|
1399
1545
|
}
|
|
@@ -1417,15 +1563,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1417
1563
|
if (isCustomResizable && resizableData || isCustomSort && sortData || isCustomVisible && visibleData || isCustomFixed && fixedData || isCustomAggGroup && aggGroupData || isCustomAggFunc && aggFuncData) {
|
|
1418
1564
|
const sortColMaps = {};
|
|
1419
1565
|
if (isCustomSort && sortData) {
|
|
1420
|
-
if (!
|
|
1566
|
+
if (!index.default.isArray(sortData)) {
|
|
1421
1567
|
const sortRests = [];
|
|
1422
|
-
|
|
1423
|
-
sortRests.push({ key: colKey, index });
|
|
1568
|
+
index.default.each(sortData, (index2, colKey) => {
|
|
1569
|
+
sortRests.push({ key: colKey, index: index2 });
|
|
1424
1570
|
});
|
|
1425
|
-
sortData =
|
|
1571
|
+
sortData = index.default.orderBy(sortRests, { field: "index", order: "asc" }).map((item) => ({ k: item.key }));
|
|
1426
1572
|
}
|
|
1427
1573
|
let colNum = 1;
|
|
1428
|
-
|
|
1574
|
+
index.default.eachTree(sortData, (sObj, index2, sOjs, path, pSObj) => {
|
|
1429
1575
|
sortColMaps[sObj.k] = {
|
|
1430
1576
|
key: sObj.k,
|
|
1431
1577
|
sNum: colNum++,
|
|
@@ -1436,17 +1582,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1436
1582
|
const colKeyMaps = {};
|
|
1437
1583
|
const allCols = [];
|
|
1438
1584
|
const aggGroupConfs = [];
|
|
1439
|
-
|
|
1585
|
+
index.default.eachTree(collectColumn, (column, index$1, items, path, parentColumn) => {
|
|
1440
1586
|
const colKey = column.getKey();
|
|
1441
1587
|
if (!parentColumn) {
|
|
1442
1588
|
if (isCustomFixed && fixedData && fixedData[colKey] !== void 0) {
|
|
1443
1589
|
column.fixed = fixedData[colKey];
|
|
1444
1590
|
}
|
|
1445
1591
|
}
|
|
1446
|
-
if (isCustomResizable && resizableData &&
|
|
1592
|
+
if (isCustomResizable && resizableData && index.default.isNumber(resizableData[colKey])) {
|
|
1447
1593
|
column.resizeWidth = resizableData[colKey];
|
|
1448
1594
|
}
|
|
1449
|
-
if (isCustomVisible && visibleData &&
|
|
1595
|
+
if (isCustomVisible && visibleData && index.default.isBoolean(visibleData[colKey])) {
|
|
1450
1596
|
column.visible = visibleData[colKey];
|
|
1451
1597
|
}
|
|
1452
1598
|
if (isCustomAggFunc && aggFuncData && (aggregateConfig || rowGroupConfig) && aggFuncData[colKey]) {
|
|
@@ -1476,10 +1622,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1476
1622
|
column.renderSortNumber = scItem.sNum;
|
|
1477
1623
|
}
|
|
1478
1624
|
});
|
|
1479
|
-
const newCollectCols =
|
|
1625
|
+
const newCollectCols = index.default.toArrayTree(index.default.orderBy(allCols, "renderSortNumber"), { key: "id", parentKey: "parentId", children: "children" });
|
|
1480
1626
|
internalData.collectColumn = newCollectCols;
|
|
1481
1627
|
internalData.tableFullColumn = util.getColumnList(newCollectCols);
|
|
1482
|
-
reactData.updateColFlag++;
|
|
1483
1628
|
}
|
|
1484
1629
|
reactData.isCustomStatus = true;
|
|
1485
1630
|
} else {
|
|
@@ -1517,26 +1662,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1517
1662
|
}
|
|
1518
1663
|
}
|
|
1519
1664
|
};
|
|
1520
|
-
const updateColumnAllOverflow = () => {
|
|
1521
|
-
const { showOverflow } = props$1;
|
|
1522
|
-
const { isGroup } = reactData;
|
|
1523
|
-
const { fullAllDataRowIdData, tableFullColumn, collectColumn } = internalData;
|
|
1524
|
-
let isAllOverflow = !!showOverflow;
|
|
1525
|
-
const handleFunc = (column) => {
|
|
1526
|
-
if (isAllOverflow && column.showOverflow === false) {
|
|
1527
|
-
isAllOverflow = false;
|
|
1528
|
-
}
|
|
1529
|
-
};
|
|
1530
|
-
if (isGroup) {
|
|
1531
|
-
ctor.default.eachTree(collectColumn, handleFunc);
|
|
1532
|
-
} else {
|
|
1533
|
-
tableFullColumn.forEach(handleFunc);
|
|
1534
|
-
}
|
|
1535
|
-
ctor.default.each(fullAllDataRowIdData, (rowRest) => {
|
|
1536
|
-
rowRest.height = 0;
|
|
1537
|
-
});
|
|
1538
|
-
reactData.isAllOverflow = isAllOverflow;
|
|
1539
|
-
};
|
|
1540
1665
|
const cacheColumnMap = () => {
|
|
1541
1666
|
const { treeConfig, showOverflow } = props$1;
|
|
1542
1667
|
const { tableFullColumn, collectColumn } = internalData;
|
|
@@ -1560,9 +1685,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1560
1685
|
let checkboxColumn;
|
|
1561
1686
|
let radioColumn;
|
|
1562
1687
|
let htmlColumn;
|
|
1563
|
-
const handleFunc = (column,
|
|
1688
|
+
const handleFunc = (column, index2, items, path, parentColumn) => {
|
|
1564
1689
|
const { id: colid, field, fixed, type, treeNode, rowGroupNode } = column;
|
|
1565
|
-
const rest = { $index: -1, _index: -1, column, colid, index, items, parent: parentColumn || null, width: 0, oLeft: 0 };
|
|
1690
|
+
const rest = { $index: -1, _index: -1, column, colid, index: index2, items, parent: parentColumn || null, width: 0, oLeft: 0 };
|
|
1566
1691
|
if (field) {
|
|
1567
1692
|
if (fullColFieldData[field]) {
|
|
1568
1693
|
log.errLog("vxe.error.colRepet", ["field", field]);
|
|
@@ -1627,9 +1752,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1627
1752
|
fullColIdData[colid] = rest;
|
|
1628
1753
|
};
|
|
1629
1754
|
if (isGroup) {
|
|
1630
|
-
|
|
1755
|
+
index.default.eachTree(collectColumn, (column, index2, items, path, parentColumn, nodes) => {
|
|
1631
1756
|
column.level = nodes.length;
|
|
1632
|
-
handleFunc(column,
|
|
1757
|
+
handleFunc(column, index2, items, path, parentColumn);
|
|
1633
1758
|
});
|
|
1634
1759
|
} else {
|
|
1635
1760
|
tableFullColumn.forEach(handleFunc);
|
|
@@ -1691,7 +1816,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1691
1816
|
const firstCellEl = cellElemList[0];
|
|
1692
1817
|
if (firstCellEl && firstCellEl.parentElement) {
|
|
1693
1818
|
const cellStyle = getComputedStyle(firstCellEl.parentElement);
|
|
1694
|
-
leftRightPadding = Math.ceil(
|
|
1819
|
+
leftRightPadding = Math.ceil(index.default.toNumber(cellStyle.paddingLeft) + index.default.toNumber(cellStyle.paddingRight));
|
|
1695
1820
|
}
|
|
1696
1821
|
let colWidth = column.renderAutoWidth - leftRightPadding;
|
|
1697
1822
|
for (let i = 0; i < cellElemList.length; i++) {
|
|
@@ -1742,37 +1867,37 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1742
1867
|
const { columnStore } = reactData;
|
|
1743
1868
|
const { resizeList, pxMinList, autoMinList, pxList, scaleList, scaleMinList, autoList, remainList } = columnStore;
|
|
1744
1869
|
pxMinList.forEach((column) => {
|
|
1745
|
-
const minWidth =
|
|
1870
|
+
const minWidth = index.default.toInteger(column.minWidth);
|
|
1746
1871
|
tWidth += minWidth;
|
|
1747
1872
|
column.renderWidth = minWidth;
|
|
1748
1873
|
});
|
|
1749
1874
|
autoMinList.forEach((column) => {
|
|
1750
|
-
const caWidth = Math.max(60,
|
|
1875
|
+
const caWidth = Math.max(60, index.default.toInteger(column.renderAutoWidth));
|
|
1751
1876
|
tWidth += caWidth;
|
|
1752
1877
|
column.renderWidth = caWidth;
|
|
1753
1878
|
});
|
|
1754
1879
|
scaleMinList.forEach((column) => {
|
|
1755
|
-
const smWidth = Math.floor(
|
|
1880
|
+
const smWidth = Math.floor(index.default.toInteger(column.minWidth) * meanWidth);
|
|
1756
1881
|
tWidth += smWidth;
|
|
1757
1882
|
column.renderWidth = smWidth;
|
|
1758
1883
|
});
|
|
1759
1884
|
scaleList.forEach((column) => {
|
|
1760
|
-
const sfWidth = Math.floor(
|
|
1885
|
+
const sfWidth = Math.floor(index.default.toInteger(column.width) * meanWidth);
|
|
1761
1886
|
tWidth += sfWidth;
|
|
1762
1887
|
column.renderWidth = sfWidth;
|
|
1763
1888
|
});
|
|
1764
1889
|
pxList.forEach((column) => {
|
|
1765
|
-
const pWidth =
|
|
1890
|
+
const pWidth = index.default.toInteger(column.width);
|
|
1766
1891
|
tWidth += pWidth;
|
|
1767
1892
|
column.renderWidth = pWidth;
|
|
1768
1893
|
});
|
|
1769
1894
|
autoList.forEach((column) => {
|
|
1770
|
-
const aWidth = Math.max(60,
|
|
1895
|
+
const aWidth = Math.max(60, index.default.toInteger(column.renderAutoWidth));
|
|
1771
1896
|
tWidth += aWidth;
|
|
1772
1897
|
column.renderWidth = aWidth;
|
|
1773
1898
|
});
|
|
1774
1899
|
resizeList.forEach((column) => {
|
|
1775
|
-
const reWidth =
|
|
1900
|
+
const reWidth = index.default.toInteger(column.resizeWidth);
|
|
1776
1901
|
tWidth += reWidth;
|
|
1777
1902
|
column.renderWidth = reWidth;
|
|
1778
1903
|
});
|
|
@@ -1828,7 +1953,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1828
1953
|
}
|
|
1829
1954
|
if (!firstCellStyle) {
|
|
1830
1955
|
firstCellStyle = getComputedStyle(cellElem);
|
|
1831
|
-
topBottomPadding = firstCellStyle ? Math.ceil(
|
|
1956
|
+
topBottomPadding = firstCellStyle ? Math.ceil(index.default.toNumber(firstCellStyle.paddingTop) + index.default.toNumber(firstCellStyle.paddingBottom)) : 0;
|
|
1832
1957
|
}
|
|
1833
1958
|
if (!scrollXLoad) {
|
|
1834
1959
|
cellStyle.height = orHeight;
|
|
@@ -1874,31 +1999,31 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1874
1999
|
}
|
|
1875
2000
|
let cellValue;
|
|
1876
2001
|
if (sortBy) {
|
|
1877
|
-
cellValue =
|
|
2002
|
+
cellValue = index.default.isFunction(sortBy) ? sortBy({ row, column }) : index.default.get(row, sortBy);
|
|
1878
2003
|
} else {
|
|
1879
|
-
cellValue =
|
|
2004
|
+
cellValue = tableMethods.getCellLabel(row, column);
|
|
1880
2005
|
}
|
|
1881
2006
|
if (!sortType || sortType === "auto") {
|
|
1882
|
-
return isNaN(cellValue) ? cellValue :
|
|
2007
|
+
return isNaN(cellValue) ? cellValue : index.default.toNumber(cellValue);
|
|
1883
2008
|
} else if (sortType === "number") {
|
|
1884
|
-
return
|
|
2009
|
+
return index.default.toNumber(cellValue);
|
|
1885
2010
|
} else if (sortType === "string") {
|
|
1886
|
-
return
|
|
2011
|
+
return index.default.toValueString(cellValue);
|
|
1887
2012
|
}
|
|
1888
2013
|
return cellValue;
|
|
1889
2014
|
} : (row) => {
|
|
1890
2015
|
let cellValue;
|
|
1891
2016
|
if (sortBy) {
|
|
1892
|
-
cellValue =
|
|
2017
|
+
cellValue = index.default.isFunction(sortBy) ? sortBy({ row, column }) : index.default.get(row, sortBy);
|
|
1893
2018
|
} else {
|
|
1894
|
-
cellValue =
|
|
2019
|
+
cellValue = tableMethods.getCellLabel(row, column);
|
|
1895
2020
|
}
|
|
1896
2021
|
if (!sortType || sortType === "auto") {
|
|
1897
|
-
return isNaN(cellValue) ? cellValue :
|
|
2022
|
+
return isNaN(cellValue) ? cellValue : index.default.toNumber(cellValue);
|
|
1898
2023
|
} else if (sortType === "number") {
|
|
1899
|
-
return
|
|
2024
|
+
return index.default.toNumber(cellValue);
|
|
1900
2025
|
} else if (sortType === "string") {
|
|
1901
|
-
return
|
|
2026
|
+
return index.default.toValueString(cellValue);
|
|
1902
2027
|
}
|
|
1903
2028
|
return cellValue;
|
|
1904
2029
|
};
|
|
@@ -1908,17 +2033,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1908
2033
|
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
1909
2034
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
1910
2035
|
const fullMaps = {};
|
|
1911
|
-
afterFullData.forEach((row,
|
|
2036
|
+
afterFullData.forEach((row, index2) => {
|
|
1912
2037
|
const rowid = handleGetRowId(row);
|
|
1913
2038
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1914
|
-
const seq =
|
|
2039
|
+
const seq = index2 + 1;
|
|
1915
2040
|
if (rowRest) {
|
|
1916
2041
|
if (!treeConfig) {
|
|
1917
2042
|
rowRest.seq = seq;
|
|
1918
2043
|
}
|
|
1919
|
-
rowRest._index =
|
|
2044
|
+
rowRest._index = index2;
|
|
1920
2045
|
} else {
|
|
1921
|
-
const rest = { row, rowid, seq, index: -1, $index: -1, _index:
|
|
2046
|
+
const rest = { row, rowid, seq, index: -1, $index: -1, _index: index2, treeIndex: -1, _tIndex: -1, items: [], parent: null, level: 0, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
|
|
1922
2047
|
fullAllDataRowIdData[rowid] = rest;
|
|
1923
2048
|
fullDataRowIdData[rowid] = rest;
|
|
1924
2049
|
}
|
|
@@ -1936,13 +2061,13 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1936
2061
|
if (treeConfig) {
|
|
1937
2062
|
let _treeIndex = 0;
|
|
1938
2063
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
1939
|
-
|
|
2064
|
+
index.default.eachTree(afterTreeFullData, (row, index2, items, path) => {
|
|
1940
2065
|
const rowid = handleGetRowId(row);
|
|
1941
2066
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1942
2067
|
const seq = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
|
|
1943
2068
|
if (rowRest) {
|
|
1944
2069
|
rowRest.seq = seq;
|
|
1945
|
-
rowRest.treeIndex =
|
|
2070
|
+
rowRest.treeIndex = index2;
|
|
1946
2071
|
rowRest._tIndex = _treeIndex;
|
|
1947
2072
|
} else {
|
|
1948
2073
|
const rest = { row, rowid, seq, index: -1, $index: -1, _index: -1, treeIndex: -1, _tIndex: _treeIndex, items: [], parent: null, level: 0, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
|
|
@@ -1953,15 +2078,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1953
2078
|
fullMaps[rowid] = row;
|
|
1954
2079
|
}, { children: transform ? treeOpts.mapChildrenField : childrenField });
|
|
1955
2080
|
if (transform) {
|
|
1956
|
-
afterFullData.forEach((row,
|
|
2081
|
+
afterFullData.forEach((row, index2) => {
|
|
1957
2082
|
const rowid = handleGetRowId(row);
|
|
1958
2083
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1959
|
-
const seq =
|
|
2084
|
+
const seq = index2 + 1;
|
|
1960
2085
|
if (rowRest) {
|
|
1961
2086
|
if (!treeConfig) {
|
|
1962
2087
|
rowRest.seq = seq;
|
|
1963
2088
|
}
|
|
1964
|
-
rowRest._index =
|
|
2089
|
+
rowRest._index = index2;
|
|
1965
2090
|
}
|
|
1966
2091
|
});
|
|
1967
2092
|
}
|
|
@@ -1981,7 +2106,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1981
2106
|
const expandMaps = {};
|
|
1982
2107
|
if (treeConfig && treeOpts.transform) {
|
|
1983
2108
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
1984
|
-
|
|
2109
|
+
index.default.eachTree(internalData.afterTreeFullData, (row, index2, items, path, parentRow) => {
|
|
1985
2110
|
const rowid = handleGetRowId(row);
|
|
1986
2111
|
const parentRowid = handleGetRowId(parentRow);
|
|
1987
2112
|
if (!parentRow || expandMaps[parentRowid] && treeExpandedMaps[parentRowid]) {
|
|
@@ -1998,7 +2123,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1998
2123
|
return fullData;
|
|
1999
2124
|
} else if (isRowGroupStatus) {
|
|
2000
2125
|
const { childrenField } = aggregateOpts;
|
|
2001
|
-
|
|
2126
|
+
index.default.eachTree(internalData.afterGroupFullData, (row, index2, items, path, parentRow) => {
|
|
2002
2127
|
const rowid = handleGetRowId(row);
|
|
2003
2128
|
const parentRowid = handleGetRowId(parentRow);
|
|
2004
2129
|
if (!parentRow || expandMaps[parentRowid] && rowGroupExpandedMaps[parentRowid]) {
|
|
@@ -2026,8 +2151,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2026
2151
|
const treeOpts = computeTreeOpts.value;
|
|
2027
2152
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
2028
2153
|
const { transform, rowField, parentField, mapChildrenField } = treeOpts;
|
|
2029
|
-
const { isEvery, remote: allRemoteFilter, filterMethod: allFilterMethod
|
|
2030
|
-
const { remote: allRemoteSort, sortMethod: allSortMethod, multiple: sortMultiple, chronological
|
|
2154
|
+
const { isEvery, remote: allRemoteFilter, filterMethod: allFilterMethod } = filterOpts;
|
|
2155
|
+
const { remote: allRemoteSort, sortMethod: allSortMethod, multiple: sortMultiple, chronological } = sortOpts;
|
|
2031
2156
|
let tableData = [];
|
|
2032
2157
|
let tableTree = [];
|
|
2033
2158
|
if (!allRemoteFilter || !allRemoteSort) {
|
|
@@ -2053,7 +2178,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2053
2178
|
}
|
|
2054
2179
|
});
|
|
2055
2180
|
if (sortMultiple && chronological && orderColumns.length > 1) {
|
|
2056
|
-
orderColumns =
|
|
2181
|
+
orderColumns = index.default.orderBy(orderColumns, "sortTime");
|
|
2057
2182
|
}
|
|
2058
2183
|
if (!allRemoteFilter && filterColumns.length) {
|
|
2059
2184
|
const handleFilter = (row) => {
|
|
@@ -2072,19 +2197,19 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2072
2197
|
} else if (tdFilterMethod) {
|
|
2073
2198
|
return itemList.some((item) => tdFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: $xeTable }));
|
|
2074
2199
|
}
|
|
2075
|
-
return valueList.indexOf(
|
|
2200
|
+
return valueList.indexOf(index.default.get(row, column.field)) > -1;
|
|
2076
2201
|
});
|
|
2077
2202
|
};
|
|
2078
2203
|
if (isRowGroupStatus) {
|
|
2079
|
-
tableTree =
|
|
2204
|
+
tableTree = index.default.searchTree(tableFullGroupData, handleFilter, {
|
|
2080
2205
|
original: true,
|
|
2081
2206
|
isEvery: true,
|
|
2082
2207
|
children: aggregateOpts.mapChildrenField,
|
|
2083
2208
|
mapChildren: aggregateOpts.childrenField
|
|
2084
2209
|
});
|
|
2085
2210
|
tableData = tableTree;
|
|
2086
|
-
} else if (treeConfig && transform
|
|
2087
|
-
tableTree =
|
|
2211
|
+
} else if (treeConfig && transform) {
|
|
2212
|
+
tableTree = index.default.searchTree(tableFullTreeData, handleFilter, {
|
|
2088
2213
|
original: true,
|
|
2089
2214
|
isEvery,
|
|
2090
2215
|
children: mapChildrenField,
|
|
@@ -2097,15 +2222,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2097
2222
|
}
|
|
2098
2223
|
} else {
|
|
2099
2224
|
if (isRowGroupStatus) {
|
|
2100
|
-
tableTree =
|
|
2225
|
+
tableTree = index.default.searchTree(tableFullGroupData, () => true, {
|
|
2101
2226
|
original: true,
|
|
2102
2227
|
isEvery: true,
|
|
2103
2228
|
children: aggregateOpts.mapChildrenField,
|
|
2104
2229
|
mapChildren: aggregateOpts.childrenField
|
|
2105
2230
|
});
|
|
2106
2231
|
tableData = tableTree;
|
|
2107
|
-
} else if (treeConfig && transform
|
|
2108
|
-
tableTree =
|
|
2232
|
+
} else if (treeConfig && transform) {
|
|
2233
|
+
tableTree = index.default.searchTree(tableFullTreeData, () => true, {
|
|
2109
2234
|
original: true,
|
|
2110
2235
|
isEvery,
|
|
2111
2236
|
children: mapChildrenField,
|
|
@@ -2121,14 +2246,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2121
2246
|
if (isRowGroupStatus) {
|
|
2122
2247
|
if (allSortMethod) {
|
|
2123
2248
|
const sortRests = allSortMethod({ data: tableTree, sortList: orderColumns, $table: $xeTable });
|
|
2124
|
-
tableTree =
|
|
2249
|
+
tableTree = index.default.isArray(sortRests) ? sortRests : tableTree;
|
|
2125
2250
|
} else {
|
|
2126
|
-
const treeList =
|
|
2251
|
+
const treeList = index.default.toTreeArray(tableTree, {
|
|
2127
2252
|
key: aggregateOpts.rowField,
|
|
2128
2253
|
parentKey: aggregateOpts.parentField,
|
|
2129
2254
|
children: aggregateOpts.mapChildrenField
|
|
2130
2255
|
});
|
|
2131
|
-
tableTree =
|
|
2256
|
+
tableTree = index.default.toArrayTree(index.default.orderBy(treeList, orderColumns.map(({ column, order }) => [getOrderField(column), order])), {
|
|
2132
2257
|
key: aggregateOpts.rowField,
|
|
2133
2258
|
parentKey: aggregateOpts.parentField,
|
|
2134
2259
|
children: aggregateOpts.childrenField,
|
|
@@ -2136,15 +2261,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2136
2261
|
});
|
|
2137
2262
|
}
|
|
2138
2263
|
tableData = tableTree;
|
|
2139
|
-
} else if (treeConfig && transform
|
|
2264
|
+
} else if (treeConfig && transform) {
|
|
2140
2265
|
if (allSortMethod) {
|
|
2141
2266
|
const sortRests = allSortMethod({ data: tableTree, sortList: orderColumns, $table: $xeTable });
|
|
2142
|
-
tableTree =
|
|
2267
|
+
tableTree = index.default.isArray(sortRests) ? sortRests : tableTree;
|
|
2143
2268
|
} else {
|
|
2144
|
-
const treeList =
|
|
2269
|
+
const treeList = index.default.toTreeArray(tableTree, {
|
|
2145
2270
|
children: mapChildrenField
|
|
2146
2271
|
});
|
|
2147
|
-
tableTree =
|
|
2272
|
+
tableTree = index.default.toArrayTree(index.default.orderBy(treeList, orderColumns.map(({ column, order }) => [getOrderField(column), order])), {
|
|
2148
2273
|
key: rowField,
|
|
2149
2274
|
parentKey: parentField,
|
|
2150
2275
|
children: childrenField,
|
|
@@ -2155,24 +2280,24 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2155
2280
|
} else {
|
|
2156
2281
|
if (allSortMethod) {
|
|
2157
2282
|
const sortRests = allSortMethod({ data: tableData, sortList: orderColumns, $table: $xeTable });
|
|
2158
|
-
tableData =
|
|
2283
|
+
tableData = index.default.isArray(sortRests) ? sortRests : tableData;
|
|
2159
2284
|
} else {
|
|
2160
|
-
tableData =
|
|
2285
|
+
tableData = index.default.orderBy(tableData, orderColumns.map(({ column, order }) => [getOrderField(column), order]));
|
|
2161
2286
|
}
|
|
2162
2287
|
tableTree = tableData;
|
|
2163
2288
|
}
|
|
2164
2289
|
}
|
|
2165
2290
|
} else {
|
|
2166
2291
|
if (isRowGroupStatus) {
|
|
2167
|
-
tableTree =
|
|
2292
|
+
tableTree = index.default.searchTree(tableFullGroupData, () => true, {
|
|
2168
2293
|
original: true,
|
|
2169
2294
|
isEvery: true,
|
|
2170
2295
|
children: aggregateOpts.mapChildrenField,
|
|
2171
2296
|
mapChildren: aggregateOpts.childrenField
|
|
2172
2297
|
});
|
|
2173
2298
|
tableData = tableTree;
|
|
2174
|
-
} else if (treeConfig && transform
|
|
2175
|
-
tableTree =
|
|
2299
|
+
} else if (treeConfig && transform) {
|
|
2300
|
+
tableTree = index.default.searchTree(tableFullTreeData, () => true, {
|
|
2176
2301
|
original: true,
|
|
2177
2302
|
isEvery,
|
|
2178
2303
|
children: mapChildrenField,
|
|
@@ -2313,8 +2438,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2313
2438
|
rowExpandEl.style.top = `${tHeaderHeight}px`;
|
|
2314
2439
|
}
|
|
2315
2440
|
internalData.tBodyHeight = tbHeight;
|
|
2316
|
-
containerList.forEach((name,
|
|
2317
|
-
const fixedType =
|
|
2441
|
+
containerList.forEach((name, index2) => {
|
|
2442
|
+
const fixedType = index2 > 0 ? name : "";
|
|
2318
2443
|
const layoutList = ["header", "body", "footer"];
|
|
2319
2444
|
const isFixedLeft = fixedType === "left";
|
|
2320
2445
|
let fixedColumn = [];
|
|
@@ -2472,17 +2597,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2472
2597
|
const sortOpts = computeSortOpts.value;
|
|
2473
2598
|
let { defaultSort } = sortOpts;
|
|
2474
2599
|
if (defaultSort) {
|
|
2475
|
-
if (!
|
|
2600
|
+
if (!index.default.isArray(defaultSort)) {
|
|
2476
2601
|
defaultSort = [defaultSort];
|
|
2477
2602
|
}
|
|
2478
2603
|
if (defaultSort.length) {
|
|
2479
|
-
(sortConfig.multiple ? defaultSort : defaultSort.slice(0, 1)).forEach((item,
|
|
2604
|
+
(sortConfig.multiple ? defaultSort : defaultSort.slice(0, 1)).forEach((item, index2) => {
|
|
2480
2605
|
const { field, order } = item;
|
|
2481
2606
|
if (field && order) {
|
|
2482
2607
|
const column = $xeTable.getColumnByField(field);
|
|
2483
2608
|
if (column && column.sortable) {
|
|
2484
2609
|
column.order = order;
|
|
2485
|
-
column.sortTime = Date.now() +
|
|
2610
|
+
column.sortTime = Date.now() + index2;
|
|
2486
2611
|
}
|
|
2487
2612
|
}
|
|
2488
2613
|
});
|
|
@@ -2576,7 +2701,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2576
2701
|
return vue.nextTick();
|
|
2577
2702
|
};
|
|
2578
2703
|
const handleCheckedCheckboxRow = (rows, value, isForce) => {
|
|
2579
|
-
if (rows && !
|
|
2704
|
+
if (rows && !index.default.isArray(rows)) {
|
|
2580
2705
|
rows = [rows];
|
|
2581
2706
|
}
|
|
2582
2707
|
$xeTable.handleBatchSelectRows(rows, !!value, isForce);
|
|
@@ -2601,21 +2726,21 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2601
2726
|
if (checked) {
|
|
2602
2727
|
selectRowMaps[handleGetRowId(row)] = row;
|
|
2603
2728
|
}
|
|
2604
|
-
|
|
2729
|
+
index.default.set(row, checkField, checked);
|
|
2605
2730
|
}
|
|
2606
2731
|
if ((treeConfig || isRowGroupStatus) && indeterminateField) {
|
|
2607
|
-
|
|
2732
|
+
index.default.set(row, indeterminateField, false);
|
|
2608
2733
|
}
|
|
2609
2734
|
};
|
|
2610
2735
|
if (treeConfig || isRowGroupStatus) {
|
|
2611
|
-
|
|
2736
|
+
index.default.eachTree(afterFullData, checkValFn, { children: childrenField });
|
|
2612
2737
|
} else {
|
|
2613
2738
|
afterFullData.forEach(checkValFn);
|
|
2614
2739
|
}
|
|
2615
2740
|
} else {
|
|
2616
2741
|
if (isRowGroupStatus) {
|
|
2617
2742
|
if (checked) {
|
|
2618
|
-
|
|
2743
|
+
index.default.eachTree(afterGroupFullData, (row) => {
|
|
2619
2744
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
2620
2745
|
const rowid = handleGetRowId(row);
|
|
2621
2746
|
selectRowMaps[rowid] = row;
|
|
@@ -2623,7 +2748,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2623
2748
|
}, { children: aggregateOpts.mapChildrenField });
|
|
2624
2749
|
} else {
|
|
2625
2750
|
if (!isForce && checkMethod) {
|
|
2626
|
-
|
|
2751
|
+
index.default.eachTree(afterGroupFullData, (row) => {
|
|
2627
2752
|
const rowid = handleGetRowId(row);
|
|
2628
2753
|
if (checkMethod({ $table: $xeTable, row }) ? false : selectCheckboxMaps[rowid]) {
|
|
2629
2754
|
selectRowMaps[rowid] = row;
|
|
@@ -2633,7 +2758,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2633
2758
|
}
|
|
2634
2759
|
} else if (treeConfig) {
|
|
2635
2760
|
if (checked) {
|
|
2636
|
-
|
|
2761
|
+
index.default.eachTree(afterTreeFullData, (row) => {
|
|
2637
2762
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
2638
2763
|
const rowid = handleGetRowId(row);
|
|
2639
2764
|
selectRowMaps[rowid] = row;
|
|
@@ -2641,7 +2766,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2641
2766
|
}, { children: childrenField });
|
|
2642
2767
|
} else {
|
|
2643
2768
|
if (!isForce && checkMethod) {
|
|
2644
|
-
|
|
2769
|
+
index.default.eachTree(afterTreeFullData, (row) => {
|
|
2645
2770
|
const rowid = handleGetRowId(row);
|
|
2646
2771
|
if (checkMethod({ $table: $xeTable, row }) ? false : selectCheckboxMaps[rowid]) {
|
|
2647
2772
|
selectRowMaps[rowid] = row;
|
|
@@ -2678,7 +2803,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2678
2803
|
}
|
|
2679
2804
|
if (reserve) {
|
|
2680
2805
|
if (checked) {
|
|
2681
|
-
|
|
2806
|
+
index.default.each(selectRowMaps, (row, rowid) => {
|
|
2682
2807
|
checkboxReserveRowMap[rowid] = row;
|
|
2683
2808
|
});
|
|
2684
2809
|
} else {
|
|
@@ -2767,7 +2892,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2767
2892
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
2768
2893
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
2769
2894
|
}
|
|
2770
|
-
if (!
|
|
2895
|
+
if (!index.default.isArray(childRecords)) {
|
|
2771
2896
|
childRecords = [];
|
|
2772
2897
|
}
|
|
2773
2898
|
if (childRecords) {
|
|
@@ -2890,8 +3015,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2890
3015
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
2891
3016
|
if (scrollXLoad) {
|
|
2892
3017
|
const { toVisibleIndex: toXVisibleIndex, visibleSize: visibleXSize } = handleVirtualXVisible();
|
|
2893
|
-
const offsetXSize = Math.max(0, virtualXOpts.oSize ?
|
|
2894
|
-
scrollXStore.preloadSize =
|
|
3018
|
+
const offsetXSize = Math.max(0, virtualXOpts.oSize ? index.default.toNumber(virtualXOpts.oSize) : 0);
|
|
3019
|
+
scrollXStore.preloadSize = index.default.toNumber(virtualXOpts.preSize);
|
|
2895
3020
|
scrollXStore.offsetSize = offsetXSize;
|
|
2896
3021
|
scrollXStore.visibleSize = visibleXSize;
|
|
2897
3022
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
|
|
@@ -2908,8 +3033,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2908
3033
|
reactData.rowHeight = rowHeight;
|
|
2909
3034
|
const { toVisibleIndex: toYVisibleIndex, visibleSize: visibleYSize } = handleVirtualYVisible();
|
|
2910
3035
|
if (scrollYLoad) {
|
|
2911
|
-
const offsetYSize = Math.max(0, virtualYOpts.oSize ?
|
|
2912
|
-
scrollYStore.preloadSize =
|
|
3036
|
+
const offsetYSize = Math.max(0, virtualYOpts.oSize ? index.default.toNumber(virtualYOpts.oSize) : 0);
|
|
3037
|
+
scrollYStore.preloadSize = index.default.toNumber(virtualYOpts.preSize);
|
|
2913
3038
|
scrollYStore.offsetSize = offsetYSize;
|
|
2914
3039
|
scrollYStore.visibleSize = visibleYSize;
|
|
2915
3040
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
@@ -3055,7 +3180,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3055
3180
|
const aggGroupFields = [];
|
|
3056
3181
|
const aggGroupConfs = [];
|
|
3057
3182
|
if (groupFields) {
|
|
3058
|
-
(
|
|
3183
|
+
(index.default.isArray(groupFields) ? groupFields : [groupFields]).forEach((field) => {
|
|
3059
3184
|
aggGroupFields.push(field);
|
|
3060
3185
|
aggGroupConfs.push({
|
|
3061
3186
|
field
|
|
@@ -3073,9 +3198,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3073
3198
|
const { mapChildrenField } = aggregateOpts;
|
|
3074
3199
|
const aggCalcMethod = aggregateOpts.calcValuesMethod || aggregateOpts.countMethod || aggregateOpts.aggregateMethod;
|
|
3075
3200
|
if (mapChildrenField) {
|
|
3076
|
-
|
|
3201
|
+
index.default.lastEach(aggList, (aggRow) => {
|
|
3077
3202
|
let count = 0;
|
|
3078
|
-
|
|
3203
|
+
index.default.each(aggRow[mapChildrenField], (row) => {
|
|
3079
3204
|
if (row.isAggregate) {
|
|
3080
3205
|
count += row.childCount || 0;
|
|
3081
3206
|
} else {
|
|
@@ -3088,7 +3213,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3088
3213
|
$xeTable.handlePivotTableAggregateData(aggList);
|
|
3089
3214
|
} else {
|
|
3090
3215
|
if (aggFuncColumns.length) {
|
|
3091
|
-
|
|
3216
|
+
index.default.lastEach(aggList, (aggRow) => {
|
|
3092
3217
|
const aggDtObj = {};
|
|
3093
3218
|
const aggData = aggRow.aggData;
|
|
3094
3219
|
const groupField = aggRow.groupField;
|
|
@@ -3121,7 +3246,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3121
3246
|
};
|
|
3122
3247
|
let aggVal = 0;
|
|
3123
3248
|
if (childList.length && childList[0].isAggregate) {
|
|
3124
|
-
|
|
3249
|
+
index.default.each(childList, (row) => {
|
|
3125
3250
|
if (row.isAggregate) {
|
|
3126
3251
|
const currAggData2 = row.aggData[field];
|
|
3127
3252
|
if (currAggData2) {
|
|
@@ -3152,7 +3277,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3152
3277
|
const { mapChildrenField } = aggregateOpts;
|
|
3153
3278
|
if ((aggregateConfig || rowGroupConfig) && isRowGroupStatus) {
|
|
3154
3279
|
const aggList = [];
|
|
3155
|
-
|
|
3280
|
+
index.default.eachTree(tableFullGroupData, (row) => {
|
|
3156
3281
|
if (row.isAggregate) {
|
|
3157
3282
|
aggList.push(row);
|
|
3158
3283
|
}
|
|
@@ -3166,7 +3291,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3166
3291
|
if (rowGroups) {
|
|
3167
3292
|
const aggregateOpts = computeAggregateOpts.value;
|
|
3168
3293
|
const { rowField, parentField, childrenField, mapChildrenField } = aggregateOpts;
|
|
3169
|
-
const rowOpts = computeRowOpts.value;
|
|
3170
3294
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
3171
3295
|
const { checkField } = checkboxOpts;
|
|
3172
3296
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
|
|
@@ -3180,8 +3304,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3180
3304
|
const aggList = [];
|
|
3181
3305
|
const rowkey = util.getRowkey($xeTable);
|
|
3182
3306
|
list.forEach((row) => {
|
|
3183
|
-
const cellValue = groupColumn ? $xeTable.getCellLabel(row, groupColumn) :
|
|
3184
|
-
const groupValue =
|
|
3307
|
+
const cellValue = groupColumn ? $xeTable.getCellLabel(row, groupColumn) : index.default.get(row, groupField);
|
|
3308
|
+
const groupValue = index.default.eqNull(cellValue) ? "" : cellValue;
|
|
3185
3309
|
let childList = groupMaps[groupValue];
|
|
3186
3310
|
if (!childList) {
|
|
3187
3311
|
childList = [];
|
|
@@ -3192,7 +3316,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3192
3316
|
}
|
|
3193
3317
|
childList.push(row);
|
|
3194
3318
|
});
|
|
3195
|
-
|
|
3319
|
+
index.default.objectEach(groupMaps, (childList, groupValue) => {
|
|
3196
3320
|
const { fullData: childFullData, treeData: childTreeData } = handleGroupData(childList, rowGroups.slice(1));
|
|
3197
3321
|
const aggRow = {
|
|
3198
3322
|
isAggregate: true,
|
|
@@ -3202,10 +3326,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3202
3326
|
childCount: 0,
|
|
3203
3327
|
[rowField]: util.getRowUniqueId(),
|
|
3204
3328
|
[parentField]: null,
|
|
3329
|
+
[rowkey]: util.getRowUniqueId(),
|
|
3205
3330
|
[childrenField]: childTreeData,
|
|
3206
3331
|
[mapChildrenField]: childTreeData
|
|
3207
3332
|
};
|
|
3208
|
-
aggRow[rowkey] = util.createRowId(rowOpts, aggRow, rowkey);
|
|
3209
3333
|
if (checkField) {
|
|
3210
3334
|
aggRow[checkField] = false;
|
|
3211
3335
|
}
|
|
@@ -3286,7 +3410,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3286
3410
|
if (childrenField === treeOpts.mapChildrenField) {
|
|
3287
3411
|
log.errLog("vxe.error.errConflicts", ["tree-config.childrenField", "tree-config.mapChildrenField"]);
|
|
3288
3412
|
}
|
|
3289
|
-
treeData =
|
|
3413
|
+
treeData = index.default.toArrayTree(fullData, {
|
|
3290
3414
|
key: treeOpts.rowField,
|
|
3291
3415
|
parentKey: treeOpts.parentField,
|
|
3292
3416
|
children: childrenField,
|
|
@@ -3351,7 +3475,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3351
3475
|
if (reactData.expandColumn && expandOpts.mode !== "fixed") {
|
|
3352
3476
|
log.errLog("vxe.error.notConflictProp", ['column.type="expand', 'expand-config.mode="fixed"']);
|
|
3353
3477
|
}
|
|
3354
|
-
if (virtualYOpts.mode === "scroll" &&
|
|
3478
|
+
if (virtualYOpts.mode === "scroll" && expandOpts.mode === "fixed") {
|
|
3355
3479
|
log.warnLog("vxe.error.notConflictProp", ["virtual-y-config.mode=scroll", "expand-config.mode=inside"]);
|
|
3356
3480
|
}
|
|
3357
3481
|
if (!(props$1.height || props$1.maxHeight)) {
|
|
@@ -3452,16 +3576,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3452
3576
|
reactData.tableColumn = tableColumn;
|
|
3453
3577
|
};
|
|
3454
3578
|
const handleUpdateColumn = () => {
|
|
3455
|
-
const columnList =
|
|
3579
|
+
const columnList = index.default.orderBy(internalData.collectColumn, "renderSortNumber");
|
|
3456
3580
|
internalData.collectColumn = columnList;
|
|
3457
|
-
const
|
|
3458
|
-
internalData.tableFullColumn =
|
|
3459
|
-
reactData.updateColFlag++;
|
|
3581
|
+
const tableFullColumn = util.getColumnList(columnList);
|
|
3582
|
+
internalData.tableFullColumn = tableFullColumn;
|
|
3460
3583
|
cacheColumnMap();
|
|
3461
3584
|
};
|
|
3462
3585
|
const loadScrollXData = () => {
|
|
3463
3586
|
const { isScrollXBig } = reactData;
|
|
3464
|
-
const { mergeBodyList, mergeFooterList,
|
|
3587
|
+
const { mergeBodyList, mergeFooterList, scrollXStore } = internalData;
|
|
3465
3588
|
const { preloadSize, startIndex, endIndex, offsetSize } = scrollXStore;
|
|
3466
3589
|
const { toVisibleIndex, visibleSize } = handleVirtualXVisible();
|
|
3467
3590
|
const offsetItem = {
|
|
@@ -3470,7 +3593,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3470
3593
|
};
|
|
3471
3594
|
scrollXStore.visibleStartIndex = toVisibleIndex - 1;
|
|
3472
3595
|
scrollXStore.visibleEndIndex = toVisibleIndex + visibleSize + 1;
|
|
3473
|
-
calculateMergerOffsetIndex(mergeBodyList.concat(mergeFooterList),
|
|
3596
|
+
calculateMergerOffsetIndex(mergeBodyList.concat(mergeFooterList), offsetItem, "col");
|
|
3474
3597
|
const { startIndex: offsetStartIndex, endIndex: offsetEndIndex } = offsetItem;
|
|
3475
3598
|
if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
|
|
3476
3599
|
if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
|
|
@@ -3491,7 +3614,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3491
3614
|
const leftGroupList = [];
|
|
3492
3615
|
const centerGroupList = [];
|
|
3493
3616
|
const rightGroupList = [];
|
|
3494
|
-
|
|
3617
|
+
index.default.eachTree(collectColumn, (column, index$1, items, path, parentColumn) => {
|
|
3495
3618
|
const isColGroup = utils.hasChildrenList(column);
|
|
3496
3619
|
if (parentColumn && parentColumn.fixed) {
|
|
3497
3620
|
column.fixed = parentColumn.fixed;
|
|
@@ -3500,7 +3623,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3500
3623
|
log.errLog("vxe.error.groupFixed");
|
|
3501
3624
|
}
|
|
3502
3625
|
if (isColGroup) {
|
|
3503
|
-
column.visible = !!
|
|
3626
|
+
column.visible = !!index.default.findTree(column.children, (subColumn) => utils.hasChildrenList(subColumn) ? false : subColumn.visible);
|
|
3504
3627
|
} else if (column.visible) {
|
|
3505
3628
|
if (column.fixed === "left") {
|
|
3506
3629
|
leftList.push(column);
|
|
@@ -3558,15 +3681,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3558
3681
|
scrollXStore.visibleEndIndex = visibleSize;
|
|
3559
3682
|
}
|
|
3560
3683
|
}
|
|
3561
|
-
if (visibleColumn.length !== internalData.visibleColumn.length || !internalData.visibleColumn.every((column,
|
|
3684
|
+
if (visibleColumn.length !== internalData.visibleColumn.length || !internalData.visibleColumn.every((column, index2) => column === visibleColumn[index2])) {
|
|
3562
3685
|
$xeTable.clearMergeCells();
|
|
3563
3686
|
$xeTable.clearMergeFooterItems();
|
|
3564
3687
|
}
|
|
3565
|
-
visibleColumn.forEach((column,
|
|
3688
|
+
visibleColumn.forEach((column, index2) => {
|
|
3566
3689
|
const colid = column.id;
|
|
3567
3690
|
const colRest = fullColumnIdData[colid];
|
|
3568
3691
|
if (colRest) {
|
|
3569
|
-
colRest._index =
|
|
3692
|
+
colRest._index = index2;
|
|
3570
3693
|
}
|
|
3571
3694
|
});
|
|
3572
3695
|
handleTableColumn();
|
|
@@ -3587,10 +3710,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3587
3710
|
const fullColIdData = {};
|
|
3588
3711
|
const fullColFieldData = {};
|
|
3589
3712
|
let sortIndex = 1;
|
|
3590
|
-
|
|
3713
|
+
index.default.eachTree(collectColumn, (column, index2, items, path, parentColumn) => {
|
|
3591
3714
|
const { id: colid, field } = column;
|
|
3592
3715
|
const parentId = parentColumn ? parentColumn.id : null;
|
|
3593
|
-
const rest = { $index: -1, _index: -1, column, colid, index, items, parent: parentColumn || null, width: 0, oLeft: 0 };
|
|
3716
|
+
const rest = { $index: -1, _index: -1, column, colid, index: index2, items, parent: parentColumn || null, width: 0, oLeft: 0 };
|
|
3594
3717
|
column.parentId = parentId;
|
|
3595
3718
|
column.defaultParentId = parentId;
|
|
3596
3719
|
column.sortNumber = sortIndex;
|
|
@@ -3610,9 +3733,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3610
3733
|
const handleInitColumn = (collectColumn) => {
|
|
3611
3734
|
const expandOpts = computeExpandOpts.value;
|
|
3612
3735
|
internalData.collectColumn = collectColumn;
|
|
3613
|
-
const
|
|
3614
|
-
internalData.tableFullColumn =
|
|
3615
|
-
reactData.updateColFlag++;
|
|
3736
|
+
const tableFullColumn = util.getColumnList(collectColumn);
|
|
3737
|
+
internalData.tableFullColumn = tableFullColumn;
|
|
3616
3738
|
reactData.isColLoading = true;
|
|
3617
3739
|
initColumnHierarchy();
|
|
3618
3740
|
return Promise.resolve(restoreCustomStorage()).then(() => {
|
|
@@ -3684,7 +3806,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3684
3806
|
let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, row })) : rows;
|
|
3685
3807
|
if (accordion) {
|
|
3686
3808
|
validRows = validRows.length ? [validRows[validRows.length - 1]] : [];
|
|
3687
|
-
const matchObj =
|
|
3809
|
+
const matchObj = index.default.findTree(tableFullTreeData, (item) => item === validRows[0], { children: childrenField });
|
|
3688
3810
|
if (matchObj) {
|
|
3689
3811
|
matchObj.items.forEach((item) => {
|
|
3690
3812
|
const rowid = handleGetRowId(item);
|
|
@@ -3755,7 +3877,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3755
3877
|
if (mapChildrenField) {
|
|
3756
3878
|
if (accordion) {
|
|
3757
3879
|
validRows = validRows.length ? [validRows[validRows.length - 1]] : [];
|
|
3758
|
-
const matchObj =
|
|
3880
|
+
const matchObj = index.default.findTree(tableFullGroupData, (item) => util.getRowid($xeTable, item) === util.getRowid($xeTable, validRows[0]), { children: mapChildrenField });
|
|
3759
3881
|
if (matchObj) {
|
|
3760
3882
|
matchObj.items.forEach((item) => {
|
|
3761
3883
|
const rowid = handleGetRowId(item);
|
|
@@ -3829,7 +3951,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3829
3951
|
};
|
|
3830
3952
|
const loadScrollYData = () => {
|
|
3831
3953
|
const { isAllOverflow, isScrollYBig } = reactData;
|
|
3832
|
-
const { mergeBodyList,
|
|
3954
|
+
const { mergeBodyList, scrollYStore } = internalData;
|
|
3833
3955
|
const { preloadSize, startIndex, endIndex, offsetSize } = scrollYStore;
|
|
3834
3956
|
const autoOffsetYSize = isAllOverflow ? offsetSize : offsetSize + 1;
|
|
3835
3957
|
const { toVisibleIndex, visibleSize } = handleVirtualYVisible();
|
|
@@ -3839,7 +3961,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3839
3961
|
};
|
|
3840
3962
|
scrollYStore.visibleStartIndex = toVisibleIndex - 1;
|
|
3841
3963
|
scrollYStore.visibleEndIndex = toVisibleIndex + visibleSize + 1;
|
|
3842
|
-
calculateMergerOffsetIndex(mergeBodyList,
|
|
3964
|
+
calculateMergerOffsetIndex(mergeBodyList, offsetItem, "row");
|
|
3843
3965
|
const { startIndex: offsetStartIndex, endIndex: offsetEndIndex } = offsetItem;
|
|
3844
3966
|
if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
|
|
3845
3967
|
if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
|
|
@@ -3942,7 +4064,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3942
4064
|
return Promise.all([
|
|
3943
4065
|
xRest,
|
|
3944
4066
|
yRest,
|
|
3945
|
-
|
|
4067
|
+
$xeTable.updateCellAreas()
|
|
3946
4068
|
]);
|
|
3947
4069
|
};
|
|
3948
4070
|
const checkLastSyncScroll = (isRollX, isRollY) => {
|
|
@@ -3982,6 +4104,32 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3982
4104
|
}
|
|
3983
4105
|
return multiple;
|
|
3984
4106
|
};
|
|
4107
|
+
const wheelScrollLeftTo = (scrollLeft, cb) => {
|
|
4108
|
+
requestAnimationFrame(() => {
|
|
4109
|
+
cb(scrollLeft);
|
|
4110
|
+
});
|
|
4111
|
+
};
|
|
4112
|
+
const wheelScrollTopTo = (diffNum, cb) => {
|
|
4113
|
+
const duration = Math.abs(diffNum);
|
|
4114
|
+
const startTime = performance.now();
|
|
4115
|
+
let countTop = 0;
|
|
4116
|
+
const step = (timestamp) => {
|
|
4117
|
+
let progress = (timestamp - startTime) / duration;
|
|
4118
|
+
if (progress < 0) {
|
|
4119
|
+
progress = 0;
|
|
4120
|
+
} else if (progress > 1) {
|
|
4121
|
+
progress = 1;
|
|
4122
|
+
}
|
|
4123
|
+
const easedProgress = Math.pow(progress, 2);
|
|
4124
|
+
const offsetTop = Math.floor(diffNum * easedProgress) - countTop;
|
|
4125
|
+
countTop += offsetTop;
|
|
4126
|
+
cb(offsetTop);
|
|
4127
|
+
if (progress < 1) {
|
|
4128
|
+
requestAnimationFrame(step);
|
|
4129
|
+
}
|
|
4130
|
+
};
|
|
4131
|
+
requestAnimationFrame(step);
|
|
4132
|
+
};
|
|
3985
4133
|
const syncGanttScrollTop = (scrollTop) => {
|
|
3986
4134
|
const $xeGanttView = internalData.xeGanttView;
|
|
3987
4135
|
if ($xeGanttView) {
|
|
@@ -3996,11 +4144,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3996
4144
|
const dispatchEvent = (type, params, evnt) => {
|
|
3997
4145
|
emit(type, createEvent(evnt, { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }, params));
|
|
3998
4146
|
};
|
|
3999
|
-
const handleScrollToRowColumn = (fieldOrColumn, row
|
|
4147
|
+
const handleScrollToRowColumn = (fieldOrColumn, row) => {
|
|
4000
4148
|
const { fullColumnIdData } = internalData;
|
|
4001
4149
|
const column = util.handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
4002
4150
|
if (column && fullColumnIdData[column.id]) {
|
|
4003
|
-
return util.colToVisible($xeTable,
|
|
4151
|
+
return util.colToVisible($xeTable, column, row);
|
|
4004
4152
|
}
|
|
4005
4153
|
return vue.nextTick();
|
|
4006
4154
|
};
|
|
@@ -4082,12 +4230,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4082
4230
|
const bodyScrollElem = util.getRefElem(elemStore["main-body-scroll"]);
|
|
4083
4231
|
if (rowExpandEl && bodyScrollElem) {
|
|
4084
4232
|
let isUpdateHeight = false;
|
|
4085
|
-
|
|
4233
|
+
index.default.arrayEach(rowExpandEl.children, (reEl) => {
|
|
4086
4234
|
const expandEl = reEl;
|
|
4087
4235
|
const rowid = expandEl.getAttribute("rowid") || "";
|
|
4088
4236
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
4089
4237
|
if (rowRest) {
|
|
4090
|
-
const expandHeight = expandEl.offsetHeight;
|
|
4238
|
+
const expandHeight = expandEl.offsetHeight + 1;
|
|
4091
4239
|
const trEl = bodyScrollElem.querySelector(`.vxe-body--row[rowid="${rowid}"]`);
|
|
4092
4240
|
let offsetTop = 0;
|
|
4093
4241
|
if (scrollYLoad) {
|
|
@@ -4168,7 +4316,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4168
4316
|
tableData.forEach((row, rIndex) => {
|
|
4169
4317
|
handleNodeRow(row, rIndex, tableData);
|
|
4170
4318
|
});
|
|
4171
|
-
|
|
4319
|
+
index.default.lastArrayEach(expParentList, ({ row, nextRow }) => {
|
|
4172
4320
|
const rowid = handleGetRowId(row);
|
|
4173
4321
|
const childList = row[transform ? mapChildrenField : childrenField];
|
|
4174
4322
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
@@ -4215,12 +4363,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4215
4363
|
const handleColumnVisible = (visible) => {
|
|
4216
4364
|
return function(fieldOrColumn) {
|
|
4217
4365
|
let status = false;
|
|
4218
|
-
const cols =
|
|
4366
|
+
const cols = index.default.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn];
|
|
4219
4367
|
cols.forEach((item) => {
|
|
4220
4368
|
const column = util.handleFieldOrColumn($xeTable, item);
|
|
4221
4369
|
if (column) {
|
|
4222
4370
|
if (column.children && column.children.length) {
|
|
4223
|
-
|
|
4371
|
+
index.default.eachTree([column], (item2) => {
|
|
4224
4372
|
item2.visible = visible;
|
|
4225
4373
|
item2.renderVisible = visible;
|
|
4226
4374
|
});
|
|
@@ -4322,14 +4470,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4322
4470
|
setRow(rows, record) {
|
|
4323
4471
|
if (rows && record) {
|
|
4324
4472
|
let rest = rows;
|
|
4325
|
-
if (!
|
|
4473
|
+
if (!index.default.isArray(rows)) {
|
|
4326
4474
|
rest = [rows];
|
|
4327
4475
|
}
|
|
4328
4476
|
const rowkey = util.getRowkey($xeTable);
|
|
4329
4477
|
rest.forEach((row) => {
|
|
4330
4478
|
const rowid = util.getRowid($xeTable, row);
|
|
4331
|
-
const newRecord =
|
|
4332
|
-
|
|
4479
|
+
const newRecord = index.default.clone(Object.assign({}, record), true);
|
|
4480
|
+
index.default.set(newRecord, rowkey, rowid);
|
|
4333
4481
|
Object.assign(row, newRecord);
|
|
4334
4482
|
});
|
|
4335
4483
|
}
|
|
@@ -4351,17 +4499,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4351
4499
|
return vue.nextTick();
|
|
4352
4500
|
}
|
|
4353
4501
|
const rowkey = util.getRowkey($xeTable);
|
|
4354
|
-
const rowid =
|
|
4502
|
+
const rowid = index.default.get(row, rowkey);
|
|
4355
4503
|
const oRow = sourceDataRowIdData[rowid];
|
|
4356
4504
|
if (oRow && row) {
|
|
4357
4505
|
if (field) {
|
|
4358
|
-
const newValue =
|
|
4359
|
-
|
|
4360
|
-
|
|
4506
|
+
const newValue = index.default.clone(index.default.get(record || row, field), true);
|
|
4507
|
+
index.default.set(row, field, newValue);
|
|
4508
|
+
index.default.set(oRow, field, newValue);
|
|
4361
4509
|
} else {
|
|
4362
|
-
const newRecord =
|
|
4363
|
-
|
|
4364
|
-
|
|
4510
|
+
const newRecord = index.default.clone(Object.assign({}, record), true);
|
|
4511
|
+
index.default.set(newRecord, rowkey, rowid);
|
|
4512
|
+
index.default.destructuring(oRow, Object.assign(row, newRecord));
|
|
4365
4513
|
}
|
|
4366
4514
|
}
|
|
4367
4515
|
reactData.tableData = tableData.slice(0);
|
|
@@ -4384,28 +4532,28 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4384
4532
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
4385
4533
|
const parentRest = fullAllDataRowIdData[util.getRowid($xeTable, row)];
|
|
4386
4534
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
4387
|
-
return
|
|
4535
|
+
return tableMethods.createData(childRecords).then((rows) => {
|
|
4388
4536
|
if (keepSource) {
|
|
4389
4537
|
const rowid = util.getRowid($xeTable, row);
|
|
4390
|
-
const matchObj =
|
|
4538
|
+
const matchObj = index.default.findTree(tableSourceData, (item) => rowid === util.getRowid($xeTable, item), { children: childrenField });
|
|
4391
4539
|
if (matchObj) {
|
|
4392
|
-
matchObj.item[childrenField] =
|
|
4540
|
+
matchObj.item[childrenField] = index.default.clone(rows, true);
|
|
4393
4541
|
}
|
|
4394
4542
|
rows.forEach((childRow) => {
|
|
4395
4543
|
const rowid2 = util.getRowid($xeTable, childRow);
|
|
4396
|
-
sourceDataRowIdData[rowid2] =
|
|
4544
|
+
sourceDataRowIdData[rowid2] = index.default.clone(childRow, true);
|
|
4397
4545
|
});
|
|
4398
4546
|
}
|
|
4399
|
-
|
|
4547
|
+
index.default.eachTree(rows, (childRow, index2, items, path, parentItem, nodes) => {
|
|
4400
4548
|
const rowid = util.getRowid($xeTable, childRow);
|
|
4401
4549
|
const parentRow = parentItem || parentRest.row;
|
|
4402
|
-
const rest = { row: childRow, rowid, seq: -1, index, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items, parent: parentRow, level: parentLevel + nodes.length, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
|
|
4550
|
+
const rest = { row: childRow, rowid, seq: -1, index: index2, _index: -1, $index: -1, treeIndex: -1, _tIndex: -1, items, parent: parentRow, level: parentLevel + nodes.length, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
|
|
4403
4551
|
fullDataRowIdData[rowid] = rest;
|
|
4404
4552
|
fullAllDataRowIdData[rowid] = rest;
|
|
4405
4553
|
}, { children: childrenField });
|
|
4406
4554
|
row[childrenField] = rows;
|
|
4407
4555
|
if (transform) {
|
|
4408
|
-
row[mapChildrenField] =
|
|
4556
|
+
row[mapChildrenField] = index.default.clone(rows, false);
|
|
4409
4557
|
}
|
|
4410
4558
|
updateAfterDataIndex();
|
|
4411
4559
|
return rows;
|
|
@@ -4418,7 +4566,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4418
4566
|
*/
|
|
4419
4567
|
loadColumn(columns) {
|
|
4420
4568
|
const { lastScrollLeft, lastScrollTop } = internalData;
|
|
4421
|
-
const collectColumn =
|
|
4569
|
+
const collectColumn = index.default.mapTree(columns, (column) => vue.reactive(cell.Cell.createColumn($xeTable, column)));
|
|
4422
4570
|
return handleInitColumn(collectColumn).then(() => {
|
|
4423
4571
|
let targetScrollLeft = lastScrollLeft;
|
|
4424
4572
|
let targetScrollTop = lastScrollTop;
|
|
@@ -4439,8 +4587,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4439
4587
|
* @param {ColumnInfo} columns 列配置
|
|
4440
4588
|
*/
|
|
4441
4589
|
reloadColumn(columns) {
|
|
4442
|
-
return
|
|
4443
|
-
return
|
|
4590
|
+
return tableMethods.clearAll().then(() => {
|
|
4591
|
+
return tableMethods.loadColumn(columns);
|
|
4444
4592
|
});
|
|
4445
4593
|
},
|
|
4446
4594
|
/**
|
|
@@ -4531,7 +4679,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4531
4679
|
*/
|
|
4532
4680
|
createData(records) {
|
|
4533
4681
|
return vue.nextTick().then(() => {
|
|
4534
|
-
return vue.reactive(
|
|
4682
|
+
return vue.reactive(tablePrivateMethods.defineField(records));
|
|
4535
4683
|
});
|
|
4536
4684
|
},
|
|
4537
4685
|
/**
|
|
@@ -4540,11 +4688,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4540
4688
|
* @param {Array/Object} records 新数据
|
|
4541
4689
|
*/
|
|
4542
4690
|
createRow(records) {
|
|
4543
|
-
const isArr =
|
|
4691
|
+
const isArr = index.default.isArray(records);
|
|
4544
4692
|
if (!isArr) {
|
|
4545
4693
|
records = [records || {}];
|
|
4546
4694
|
}
|
|
4547
|
-
return
|
|
4695
|
+
return tableMethods.createData(records).then((rows) => isArr ? rows : rows[0]);
|
|
4548
4696
|
},
|
|
4549
4697
|
/**
|
|
4550
4698
|
* 还原数据
|
|
@@ -4565,11 +4713,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4565
4713
|
}
|
|
4566
4714
|
let targetRows = rows;
|
|
4567
4715
|
if (rows) {
|
|
4568
|
-
if (!
|
|
4716
|
+
if (!index.default.isArray(rows)) {
|
|
4569
4717
|
targetRows = [rows];
|
|
4570
4718
|
}
|
|
4571
4719
|
} else {
|
|
4572
|
-
targetRows =
|
|
4720
|
+
targetRows = index.default.toArray($xeTable.getUpdateRecords());
|
|
4573
4721
|
}
|
|
4574
4722
|
let reDelFlag = false;
|
|
4575
4723
|
if (targetRows.length) {
|
|
@@ -4582,9 +4730,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4582
4730
|
const oRow = sourceDataRowIdData[rowid];
|
|
4583
4731
|
if (oRow && row) {
|
|
4584
4732
|
if (field) {
|
|
4585
|
-
|
|
4733
|
+
index.default.set(row, field, index.default.clone(index.default.get(oRow, field), true));
|
|
4586
4734
|
} else {
|
|
4587
|
-
|
|
4735
|
+
index.default.destructuring(row, index.default.clone(oRow, true));
|
|
4588
4736
|
}
|
|
4589
4737
|
if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
|
|
4590
4738
|
if (removeRowMaps[rowid]) {
|
|
@@ -4633,11 +4781,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4633
4781
|
const { tableFullData, visibleColumn } = internalData;
|
|
4634
4782
|
if (!arguments.length) {
|
|
4635
4783
|
rows = tableFullData;
|
|
4636
|
-
} else if (rows && !
|
|
4784
|
+
} else if (rows && !index.default.isArray(rows)) {
|
|
4637
4785
|
rows = [rows];
|
|
4638
4786
|
}
|
|
4639
4787
|
if (field) {
|
|
4640
|
-
rows.forEach((row) =>
|
|
4788
|
+
rows.forEach((row) => index.default.set(row, field, null));
|
|
4641
4789
|
} else {
|
|
4642
4790
|
rows.forEach((row) => {
|
|
4643
4791
|
visibleColumn.forEach((column) => {
|
|
@@ -4719,16 +4867,16 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4719
4867
|
columnIndex: $xeTable.getColumnIndex(column)
|
|
4720
4868
|
};
|
|
4721
4869
|
if (formatter) {
|
|
4722
|
-
if (
|
|
4870
|
+
if (index.default.isString(formatter)) {
|
|
4723
4871
|
const gFormatOpts = formats.get(formatter);
|
|
4724
4872
|
const tcFormatMethod = gFormatOpts ? gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod : null;
|
|
4725
4873
|
cellLabel = tcFormatMethod ? tcFormatMethod(formatParams) : "";
|
|
4726
|
-
} else if (
|
|
4874
|
+
} else if (index.default.isArray(formatter)) {
|
|
4727
4875
|
const gFormatOpts = formats.get(formatter[0]);
|
|
4728
4876
|
const tcFormatMethod = gFormatOpts ? gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod : null;
|
|
4729
4877
|
cellLabel = tcFormatMethod ? tcFormatMethod(formatParams, ...formatter.slice(1)) : "";
|
|
4730
4878
|
} else {
|
|
4731
|
-
cellLabel = formatter(formatParams)
|
|
4879
|
+
cellLabel = `${formatter(formatParams)}`;
|
|
4732
4880
|
}
|
|
4733
4881
|
} else if (renderOpts && tcFormatter) {
|
|
4734
4882
|
cellLabel = tcFormatter(renderOpts, formatParams);
|
|
@@ -4739,43 +4887,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4739
4887
|
}
|
|
4740
4888
|
return cellLabel;
|
|
4741
4889
|
},
|
|
4742
|
-
updateCellLabel(row, fieldOrColumn) {
|
|
4743
|
-
const column = util.handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
4744
|
-
if (!column) {
|
|
4745
|
-
return null;
|
|
4746
|
-
}
|
|
4747
|
-
const { fullAllDataRowIdData } = internalData;
|
|
4748
|
-
const rowid = util.getRowid($xeTable, row);
|
|
4749
|
-
if (rowid) {
|
|
4750
|
-
const colid = column.id;
|
|
4751
|
-
const rowid2 = util.getRowid($xeTable, row);
|
|
4752
|
-
const rowRest = fullAllDataRowIdData[rowid2];
|
|
4753
|
-
if (rowRest) {
|
|
4754
|
-
const formatData = rowRest.formatData;
|
|
4755
|
-
if (formatData) {
|
|
4756
|
-
delete formatData[colid];
|
|
4757
|
-
}
|
|
4758
|
-
}
|
|
4759
|
-
}
|
|
4760
|
-
return $xeTable.getFooterCellLabel(row, column);
|
|
4761
|
-
},
|
|
4762
|
-
clearFormatterCache(isUpdate) {
|
|
4763
|
-
const { tableData, tableColumn } = reactData;
|
|
4764
|
-
const { fullAllDataRowIdData } = internalData;
|
|
4765
|
-
ctor.default.each(fullAllDataRowIdData, (rowRest) => {
|
|
4766
|
-
if (rowRest.formatData) {
|
|
4767
|
-
rowRest.formatData = void 0;
|
|
4768
|
-
}
|
|
4769
|
-
});
|
|
4770
|
-
if (isUpdate) {
|
|
4771
|
-
tableData.forEach((row) => {
|
|
4772
|
-
tableColumn.forEach((column) => {
|
|
4773
|
-
$xeTable.getCellLabel(row, column);
|
|
4774
|
-
});
|
|
4775
|
-
});
|
|
4776
|
-
}
|
|
4777
|
-
return vue.nextTick();
|
|
4778
|
-
},
|
|
4779
4890
|
getFooterCellLabel(row, fieldOrColumn) {
|
|
4780
4891
|
const column = util.handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
4781
4892
|
if (!column) {
|
|
@@ -4784,10 +4895,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4784
4895
|
const { footerFormatter } = column;
|
|
4785
4896
|
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
4786
4897
|
let itemValue = "";
|
|
4787
|
-
if (
|
|
4898
|
+
if (index.default.isArray(row)) {
|
|
4788
4899
|
itemValue = row[_columnIndex];
|
|
4789
4900
|
} else {
|
|
4790
|
-
itemValue =
|
|
4901
|
+
itemValue = index.default.get(row, column.field);
|
|
4791
4902
|
}
|
|
4792
4903
|
let cellLabel = itemValue;
|
|
4793
4904
|
if (footerFormatter) {
|
|
@@ -4823,11 +4934,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4823
4934
|
_columnIndex,
|
|
4824
4935
|
columnIndex: $xeTable.getColumnIndex(column)
|
|
4825
4936
|
};
|
|
4826
|
-
if (
|
|
4937
|
+
if (index.default.isString(footerFormatter)) {
|
|
4827
4938
|
const gFormatOpts = formats.get(footerFormatter);
|
|
4828
4939
|
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4829
4940
|
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams) : "";
|
|
4830
|
-
} else if (
|
|
4941
|
+
} else if (index.default.isArray(footerFormatter)) {
|
|
4831
4942
|
const gFormatOpts = formats.get(footerFormatter[0]);
|
|
4832
4943
|
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4833
4944
|
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams, ...footerFormatter.slice(1)) : "";
|
|
@@ -4840,41 +4951,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4840
4951
|
}
|
|
4841
4952
|
return cellLabel;
|
|
4842
4953
|
},
|
|
4843
|
-
updateFooterCellLabel(row, fieldOrColumn) {
|
|
4844
|
-
const column = util.handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
4845
|
-
if (!column) {
|
|
4846
|
-
return null;
|
|
4847
|
-
}
|
|
4848
|
-
const { footerTableData } = reactData;
|
|
4849
|
-
const { footerFullDataRowData } = internalData;
|
|
4850
|
-
const colid = column.id;
|
|
4851
|
-
const $rowIndex = footerTableData.indexOf(row);
|
|
4852
|
-
const rowRest = footerFullDataRowData[$rowIndex];
|
|
4853
|
-
if (rowRest) {
|
|
4854
|
-
const formatData = rowRest.formatData;
|
|
4855
|
-
if (formatData) {
|
|
4856
|
-
delete formatData[colid];
|
|
4857
|
-
}
|
|
4858
|
-
}
|
|
4859
|
-
return $xeTable.getFooterCellLabel(row, column);
|
|
4860
|
-
},
|
|
4861
|
-
clearFooterFormatterCache(isUpdate) {
|
|
4862
|
-
const { tableData, tableColumn } = reactData;
|
|
4863
|
-
const { footerFullDataRowData } = internalData;
|
|
4864
|
-
ctor.default.each(footerFullDataRowData, (rowRest) => {
|
|
4865
|
-
if (rowRest.formatData) {
|
|
4866
|
-
rowRest.formatData = void 0;
|
|
4867
|
-
}
|
|
4868
|
-
});
|
|
4869
|
-
if (isUpdate) {
|
|
4870
|
-
tableData.forEach((row) => {
|
|
4871
|
-
tableColumn.forEach((column) => {
|
|
4872
|
-
$xeTable.getFooterCellLabel(row, column);
|
|
4873
|
-
});
|
|
4874
|
-
});
|
|
4875
|
-
}
|
|
4876
|
-
return vue.nextTick();
|
|
4877
|
-
},
|
|
4878
4954
|
/**
|
|
4879
4955
|
* 检查是否为临时行数据
|
|
4880
4956
|
*/
|
|
@@ -4891,17 +4967,16 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4891
4967
|
*/
|
|
4892
4968
|
removeInsertRow() {
|
|
4893
4969
|
const { insertRowMaps } = internalData;
|
|
4894
|
-
return $xeTable.remove(
|
|
4970
|
+
return $xeTable.remove(index.default.values(insertRowMaps));
|
|
4895
4971
|
},
|
|
4896
4972
|
/**
|
|
4897
4973
|
* 检查行或列数据是否发生改变
|
|
4898
4974
|
*/
|
|
4899
4975
|
isUpdateByRow(rowidOrRow, field) {
|
|
4900
4976
|
const { keepSource } = props$1;
|
|
4901
|
-
const { fullDataRowIdData, sourceDataRowIdData } = internalData;
|
|
4902
|
-
const keepFields = computeKeepFields.value;
|
|
4977
|
+
const { tableFullColumn, fullDataRowIdData, sourceDataRowIdData } = internalData;
|
|
4903
4978
|
if (keepSource) {
|
|
4904
|
-
const rowid =
|
|
4979
|
+
const rowid = index.default.isString(rowidOrRow) || index.default.isNumber(rowidOrRow) ? rowidOrRow : util.getRowid($xeTable, rowidOrRow);
|
|
4905
4980
|
const rowRest = fullDataRowIdData[rowid];
|
|
4906
4981
|
if (!rowRest) {
|
|
4907
4982
|
return false;
|
|
@@ -4912,8 +4987,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4912
4987
|
if (arguments.length > 1) {
|
|
4913
4988
|
return !eqCellValue(oRow, row, field);
|
|
4914
4989
|
}
|
|
4915
|
-
for (let
|
|
4916
|
-
|
|
4990
|
+
for (let index2 = 0, len = tableFullColumn.length; index2 < len; index2++) {
|
|
4991
|
+
const property = tableFullColumn[index2].field;
|
|
4992
|
+
if (property && !eqCellValue(oRow, row, property)) {
|
|
4917
4993
|
return true;
|
|
4918
4994
|
}
|
|
4919
4995
|
}
|
|
@@ -4927,7 +5003,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4927
5003
|
*/
|
|
4928
5004
|
getColumns(columnIndex) {
|
|
4929
5005
|
const { visibleColumn } = internalData;
|
|
4930
|
-
return
|
|
5006
|
+
return index.default.isUndefined(columnIndex) ? visibleColumn.slice(0) : visibleColumn[columnIndex];
|
|
4931
5007
|
},
|
|
4932
5008
|
/**
|
|
4933
5009
|
* 根据列获取列的唯一主键
|
|
@@ -4982,7 +5058,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4982
5058
|
let prevDragCol = null;
|
|
4983
5059
|
const colRest = dragCol ? fullColumnIdData[dragCol.id] : null;
|
|
4984
5060
|
let defPos = "left";
|
|
4985
|
-
if (
|
|
5061
|
+
if (index.default.isNumber(targetFieldOrColumn)) {
|
|
4986
5062
|
if (colRest && targetFieldOrColumn) {
|
|
4987
5063
|
let currList = colRest.items;
|
|
4988
5064
|
let offsetIndex = colRest._index + targetFieldOrColumn;
|
|
@@ -5023,7 +5099,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5023
5099
|
let prevDragRow = null;
|
|
5024
5100
|
let defPos = "top";
|
|
5025
5101
|
const rowRest = dragRow ? fullAllDataRowIdData[util.getRowid($xeTable, dragRow)] : null;
|
|
5026
|
-
if (
|
|
5102
|
+
if (index.default.isNumber(targetRowidOrRow)) {
|
|
5027
5103
|
if (rowRest && targetRowidOrRow) {
|
|
5028
5104
|
let currList = afterFullData;
|
|
5029
5105
|
let offsetIndex = rowRest._index + targetRowidOrRow;
|
|
@@ -5068,7 +5144,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5068
5144
|
*/
|
|
5069
5145
|
getData(rowIndex) {
|
|
5070
5146
|
const tableSynchData = props$1.data || internalData.tableSynchData;
|
|
5071
|
-
return
|
|
5147
|
+
return index.default.isUndefined(rowIndex) ? tableSynchData.slice(0) : tableSynchData[rowIndex];
|
|
5072
5148
|
},
|
|
5073
5149
|
/**
|
|
5074
5150
|
* 用于多选行,获取已选中的数据
|
|
@@ -5087,14 +5163,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5087
5163
|
if (checkField) {
|
|
5088
5164
|
if (treeConfig) {
|
|
5089
5165
|
const currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? tableFullTreeData : afterFullData;
|
|
5090
|
-
rowList =
|
|
5166
|
+
rowList = index.default.filterTree(currTableData, (row) => index.default.get(row, checkField), { children: transform ? mapChildrenField : childrenField });
|
|
5091
5167
|
} else {
|
|
5092
5168
|
const currTableData = isFull ? tableFullData : afterFullData;
|
|
5093
|
-
rowList = currTableData.filter((row) =>
|
|
5169
|
+
rowList = currTableData.filter((row) => index.default.get(row, checkField));
|
|
5094
5170
|
}
|
|
5095
5171
|
} else {
|
|
5096
5172
|
const currMaps = isFull || treeConfig && !transform ? fullDataRowIdData : afterFullRowMaps;
|
|
5097
|
-
|
|
5173
|
+
index.default.each(selectCheckboxMaps, (row, rowid) => {
|
|
5098
5174
|
if (currMaps[rowid]) {
|
|
5099
5175
|
rowList.push(fullDataRowIdData[rowid].row);
|
|
5100
5176
|
}
|
|
@@ -5114,7 +5190,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5114
5190
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
5115
5191
|
if (rowOrRowid && treeConfig) {
|
|
5116
5192
|
let rowid;
|
|
5117
|
-
if (
|
|
5193
|
+
if (index.default.isString(rowOrRowid)) {
|
|
5118
5194
|
rowid = rowOrRowid;
|
|
5119
5195
|
} else {
|
|
5120
5196
|
rowid = util.getRowid($xeTable, rowOrRowid);
|
|
@@ -5137,7 +5213,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5137
5213
|
const { fullAllDataRowIdData } = internalData;
|
|
5138
5214
|
if (rowOrRowid && treeConfig) {
|
|
5139
5215
|
let rowid;
|
|
5140
|
-
if (
|
|
5216
|
+
if (index.default.isString(rowOrRowid)) {
|
|
5141
5217
|
rowid = rowOrRowid;
|
|
5142
5218
|
} else {
|
|
5143
5219
|
rowid = util.getRowid($xeTable, rowOrRowid);
|
|
@@ -5159,7 +5235,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5159
5235
|
const { fullAllDataRowIdData } = internalData;
|
|
5160
5236
|
if (rowOrRowid && treeConfig) {
|
|
5161
5237
|
let rowid;
|
|
5162
|
-
if (
|
|
5238
|
+
if (index.default.isString(rowOrRowid)) {
|
|
5163
5239
|
rowid = rowOrRowid;
|
|
5164
5240
|
} else {
|
|
5165
5241
|
rowid = util.getRowid($xeTable, rowOrRowid);
|
|
@@ -5183,7 +5259,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5183
5259
|
*/
|
|
5184
5260
|
getRowById(cellValue) {
|
|
5185
5261
|
const { fullAllDataRowIdData } = internalData;
|
|
5186
|
-
const rowid =
|
|
5262
|
+
const rowid = index.default.eqNull(cellValue) ? "" : encodeURIComponent(cellValue || "");
|
|
5187
5263
|
return fullAllDataRowIdData[rowid] ? fullAllDataRowIdData[rowid].row : null;
|
|
5188
5264
|
},
|
|
5189
5265
|
/**
|
|
@@ -5224,7 +5300,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5224
5300
|
*/
|
|
5225
5301
|
setColumnFixed(fieldOrColumn, fixed) {
|
|
5226
5302
|
let status = false;
|
|
5227
|
-
const cols =
|
|
5303
|
+
const cols = index.default.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn];
|
|
5228
5304
|
const columnOpts = computeColumnOpts.value;
|
|
5229
5305
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
5230
5306
|
for (let i = 0; i < cols.length; i++) {
|
|
@@ -5241,18 +5317,18 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5241
5317
|
}
|
|
5242
5318
|
return vue.nextTick();
|
|
5243
5319
|
}
|
|
5244
|
-
|
|
5320
|
+
index.default.eachTree([targetColumn], (column2) => {
|
|
5245
5321
|
column2.fixed = fixed;
|
|
5246
5322
|
column2.renderFixed = fixed;
|
|
5247
5323
|
});
|
|
5248
|
-
|
|
5324
|
+
tablePrivateMethods.saveCustomStore("update:fixed");
|
|
5249
5325
|
if (!status) {
|
|
5250
5326
|
status = true;
|
|
5251
5327
|
}
|
|
5252
5328
|
}
|
|
5253
5329
|
}
|
|
5254
5330
|
if (status) {
|
|
5255
|
-
return
|
|
5331
|
+
return tableMethods.refreshColumn();
|
|
5256
5332
|
}
|
|
5257
5333
|
return vue.nextTick();
|
|
5258
5334
|
},
|
|
@@ -5261,23 +5337,23 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5261
5337
|
*/
|
|
5262
5338
|
clearColumnFixed(fieldOrColumn) {
|
|
5263
5339
|
let status = false;
|
|
5264
|
-
const cols =
|
|
5340
|
+
const cols = index.default.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn];
|
|
5265
5341
|
cols.forEach((item) => {
|
|
5266
5342
|
const column = util.handleFieldOrColumn($xeTable, item);
|
|
5267
5343
|
const targetColumn = util.getRootColumn($xeTable, column);
|
|
5268
5344
|
if (targetColumn && targetColumn.fixed) {
|
|
5269
|
-
|
|
5345
|
+
index.default.eachTree([targetColumn], (column2) => {
|
|
5270
5346
|
column2.fixed = null;
|
|
5271
5347
|
column2.renderFixed = null;
|
|
5272
5348
|
});
|
|
5273
|
-
|
|
5349
|
+
tablePrivateMethods.saveCustomStore("update:fixed");
|
|
5274
5350
|
if (!status) {
|
|
5275
5351
|
status = true;
|
|
5276
5352
|
}
|
|
5277
5353
|
}
|
|
5278
5354
|
});
|
|
5279
5355
|
if (status) {
|
|
5280
|
-
return
|
|
5356
|
+
return tableMethods.refreshColumn();
|
|
5281
5357
|
}
|
|
5282
5358
|
return vue.nextTick();
|
|
5283
5359
|
},
|
|
@@ -5292,8 +5368,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5292
5368
|
setColumnWidth(fieldOrColumn, width) {
|
|
5293
5369
|
const { elemStore } = internalData;
|
|
5294
5370
|
let status = false;
|
|
5295
|
-
const cols =
|
|
5296
|
-
let cWidth =
|
|
5371
|
+
const cols = index.default.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn];
|
|
5372
|
+
let cWidth = index.default.toInteger(width);
|
|
5297
5373
|
if (dom.isScale(width)) {
|
|
5298
5374
|
const bodyScrollElem = util.getRefElem(elemStore["main-body-scroll"]);
|
|
5299
5375
|
const bodyWidth = bodyScrollElem ? bodyScrollElem.clientWidth - 1 : 0;
|
|
@@ -5354,10 +5430,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5354
5430
|
const { fullAllDataRowIdData } = internalData;
|
|
5355
5431
|
let status = false;
|
|
5356
5432
|
if (heightConf) {
|
|
5357
|
-
|
|
5433
|
+
index.default.each(heightConf, (height, rowid) => {
|
|
5358
5434
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5359
5435
|
if (rowRest) {
|
|
5360
|
-
const rHeight =
|
|
5436
|
+
const rHeight = index.default.toInteger(height);
|
|
5361
5437
|
if (rHeight) {
|
|
5362
5438
|
rowRest.resizeHeight = rHeight;
|
|
5363
5439
|
if (!status) {
|
|
@@ -5398,13 +5474,13 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5398
5474
|
},
|
|
5399
5475
|
recalcRowHeight(rowOrId) {
|
|
5400
5476
|
const { fullAllDataRowIdData } = internalData;
|
|
5401
|
-
const rows =
|
|
5477
|
+
const rows = index.default.isArray(rowOrId) ? rowOrId : [rowOrId];
|
|
5402
5478
|
const el = refElem.value;
|
|
5403
5479
|
if (el) {
|
|
5404
5480
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5405
5481
|
el.setAttribute("data-calc-row", "Y");
|
|
5406
5482
|
rows.forEach((row) => {
|
|
5407
|
-
const rowid =
|
|
5483
|
+
const rowid = index.default.isString(row) || index.default.isNumber(row) ? row : handleGetRowId(row);
|
|
5408
5484
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5409
5485
|
if (rowRest) {
|
|
5410
5486
|
rowRest.resizeHeight = calcCellAutoHeight(rowRest, el);
|
|
@@ -5418,8 +5494,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5418
5494
|
setRowHeight(rowOrId, height) {
|
|
5419
5495
|
const { fullAllDataRowIdData } = internalData;
|
|
5420
5496
|
let status = false;
|
|
5421
|
-
const rows =
|
|
5422
|
-
let rHeight =
|
|
5497
|
+
const rows = index.default.isArray(rowOrId) ? rowOrId : [rowOrId];
|
|
5498
|
+
let rHeight = index.default.toInteger(height);
|
|
5423
5499
|
if (dom.isScale(height)) {
|
|
5424
5500
|
const tableBody = refTableBody.value;
|
|
5425
5501
|
const bodyElem = tableBody ? tableBody.$el : null;
|
|
@@ -5429,7 +5505,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5429
5505
|
if (rHeight) {
|
|
5430
5506
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5431
5507
|
rows.forEach((row) => {
|
|
5432
|
-
const rowid =
|
|
5508
|
+
const rowid = index.default.isString(row) || index.default.isNumber(row) ? row : handleGetRowId(row);
|
|
5433
5509
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5434
5510
|
if (rowRest) {
|
|
5435
5511
|
rowRest.resizeHeight = rHeight;
|
|
@@ -5452,7 +5528,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5452
5528
|
const rowOpts = computeRowOpts.value;
|
|
5453
5529
|
const cellOpts = computeCellOpts.value;
|
|
5454
5530
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5455
|
-
const rowid =
|
|
5531
|
+
const rowid = index.default.isString(rowOrId) || index.default.isNumber(rowOrId) ? rowOrId : util.getRowid($xeTable, rowOrId);
|
|
5456
5532
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5457
5533
|
if (rowRest) {
|
|
5458
5534
|
return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
@@ -5553,7 +5629,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5553
5629
|
if (treeConfig) {
|
|
5554
5630
|
const fullRest = [];
|
|
5555
5631
|
const defRest = [];
|
|
5556
|
-
|
|
5632
|
+
index.default.each(treeIndeterminateRowMaps, (item, rowid) => {
|
|
5557
5633
|
if (item) {
|
|
5558
5634
|
fullRest.push(item);
|
|
5559
5635
|
if (fullDataRowIdData[rowid]) {
|
|
@@ -5574,14 +5650,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5574
5650
|
* @param {Boolean} value 是否选中
|
|
5575
5651
|
*/
|
|
5576
5652
|
setCheckboxRow(rows, checked) {
|
|
5577
|
-
if (rows && !
|
|
5653
|
+
if (rows && !index.default.isArray(rows)) {
|
|
5578
5654
|
rows = [rows];
|
|
5579
5655
|
}
|
|
5580
5656
|
return handleCheckedCheckboxRow(rows, checked, true);
|
|
5581
5657
|
},
|
|
5582
5658
|
setCheckboxRowKey(keys, checked) {
|
|
5583
5659
|
const { fullAllDataRowIdData } = internalData;
|
|
5584
|
-
if (!
|
|
5660
|
+
if (!index.default.isArray(keys)) {
|
|
5585
5661
|
keys = [keys];
|
|
5586
5662
|
}
|
|
5587
5663
|
const rows = [];
|
|
@@ -5599,7 +5675,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5599
5675
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
5600
5676
|
const { checkField } = checkboxOpts;
|
|
5601
5677
|
if (checkField) {
|
|
5602
|
-
return
|
|
5678
|
+
return index.default.get(row, checkField);
|
|
5603
5679
|
}
|
|
5604
5680
|
return !!updateCheckboxFlag && !!selectCheckboxMaps[util.getRowid($xeTable, row)];
|
|
5605
5681
|
},
|
|
@@ -5611,7 +5687,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5611
5687
|
if (checkField) {
|
|
5612
5688
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5613
5689
|
if (rowRest) {
|
|
5614
|
-
return
|
|
5690
|
+
return index.default.get(rowRest.row, checkField);
|
|
5615
5691
|
}
|
|
5616
5692
|
return false;
|
|
5617
5693
|
}
|
|
@@ -5632,9 +5708,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5632
5708
|
const { selectCheckboxMaps } = internalData;
|
|
5633
5709
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
5634
5710
|
const { checkField } = checkboxOpts;
|
|
5635
|
-
const checked = checkField ? !
|
|
5636
|
-
|
|
5637
|
-
|
|
5711
|
+
const checked = checkField ? !index.default.get(row, checkField) : !selectCheckboxMaps[util.getRowid($xeTable, row)];
|
|
5712
|
+
tablePrivateMethods.handleBatchSelectRows([row], checked, true);
|
|
5713
|
+
tablePrivateMethods.checkSelectionStatus();
|
|
5638
5714
|
return vue.nextTick();
|
|
5639
5715
|
},
|
|
5640
5716
|
/**
|
|
@@ -5662,12 +5738,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5662
5738
|
} else {
|
|
5663
5739
|
const rowkey = util.getRowkey($xeTable);
|
|
5664
5740
|
if (treeConfig) {
|
|
5665
|
-
const matchObj =
|
|
5741
|
+
const matchObj = index.default.findTree(afterFullData, (row) => rowid === index.default.get(row, rowkey), { children: childrenField });
|
|
5666
5742
|
if (matchObj) {
|
|
5667
5743
|
return radioReserveRow;
|
|
5668
5744
|
}
|
|
5669
5745
|
} else {
|
|
5670
|
-
if (!afterFullData.some((row) => rowid ===
|
|
5746
|
+
if (!afterFullData.some((row) => rowid === index.default.get(row, rowkey))) {
|
|
5671
5747
|
return radioReserveRow;
|
|
5672
5748
|
}
|
|
5673
5749
|
}
|
|
@@ -5693,7 +5769,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5693
5769
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5694
5770
|
const afterFullIdMaps = {};
|
|
5695
5771
|
if (treeConfig) {
|
|
5696
|
-
|
|
5772
|
+
index.default.eachTree(afterFullData, (row) => {
|
|
5697
5773
|
afterFullIdMaps[handleGetRowId(row)] = 1;
|
|
5698
5774
|
}, { children: childrenField });
|
|
5699
5775
|
} else {
|
|
@@ -5701,7 +5777,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5701
5777
|
afterFullIdMaps[handleGetRowId(row)] = 1;
|
|
5702
5778
|
});
|
|
5703
5779
|
}
|
|
5704
|
-
|
|
5780
|
+
index.default.each(checkboxReserveRowMap, (oldRow, oldRowid) => {
|
|
5705
5781
|
if (oldRow) {
|
|
5706
5782
|
if (isFull) {
|
|
5707
5783
|
if (!fullDataRowIdData[oldRowid]) {
|
|
@@ -5743,12 +5819,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5743
5819
|
if (checkField) {
|
|
5744
5820
|
const handleClearChecked = (item) => {
|
|
5745
5821
|
if (treeConfig && indeterminateField) {
|
|
5746
|
-
|
|
5822
|
+
index.default.set(item, indeterminateField, false);
|
|
5747
5823
|
}
|
|
5748
|
-
|
|
5824
|
+
index.default.set(item, checkField, false);
|
|
5749
5825
|
};
|
|
5750
5826
|
if (treeConfig) {
|
|
5751
|
-
|
|
5827
|
+
index.default.eachTree(tableFullData, handleClearChecked, { children: childrenField });
|
|
5752
5828
|
} else {
|
|
5753
5829
|
tableFullData.forEach(handleClearChecked);
|
|
5754
5830
|
}
|
|
@@ -5771,11 +5847,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5771
5847
|
const $xeGanttView = internalData.xeGanttView;
|
|
5772
5848
|
const rowOpts = computeRowOpts.value;
|
|
5773
5849
|
const el = refElem.value;
|
|
5774
|
-
|
|
5850
|
+
tableMethods.clearCurrentRow();
|
|
5775
5851
|
reactData.currentRow = row;
|
|
5776
5852
|
if (rowOpts.isCurrent || props$1.highlightCurrentRow) {
|
|
5777
5853
|
if (el) {
|
|
5778
|
-
|
|
5854
|
+
index.default.arrayEach(el.querySelectorAll(`[rowid="${util.getRowid($xeTable, row)}"]`), (elem) => dom.addClass(elem, "row--current"));
|
|
5779
5855
|
}
|
|
5780
5856
|
}
|
|
5781
5857
|
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
@@ -5825,7 +5901,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5825
5901
|
reactData.currentRow = null;
|
|
5826
5902
|
internalData.hoverRow = null;
|
|
5827
5903
|
if (el) {
|
|
5828
|
-
|
|
5904
|
+
index.default.arrayEach(el.querySelectorAll(".row--current"), (elem) => dom.removeClass(elem, "row--current"));
|
|
5829
5905
|
}
|
|
5830
5906
|
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
5831
5907
|
$xeGanttView.handleUpdateCurrentRow();
|
|
@@ -5912,7 +5988,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5912
5988
|
setPendingRow(rows, status) {
|
|
5913
5989
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5914
5990
|
const { pendingRowMaps } = internalData;
|
|
5915
|
-
if (rows && !
|
|
5991
|
+
if (rows && !index.default.isArray(rows)) {
|
|
5916
5992
|
rows = [rows];
|
|
5917
5993
|
}
|
|
5918
5994
|
if (status) {
|
|
@@ -5936,7 +6012,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5936
6012
|
togglePendingRow(rows) {
|
|
5937
6013
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5938
6014
|
const { pendingRowMaps } = internalData;
|
|
5939
|
-
if (rows && !
|
|
6015
|
+
if (rows && !index.default.isArray(rows)) {
|
|
5940
6016
|
rows = [rows];
|
|
5941
6017
|
}
|
|
5942
6018
|
rows.forEach((row) => {
|
|
@@ -5953,7 +6029,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5953
6029
|
return vue.nextTick();
|
|
5954
6030
|
},
|
|
5955
6031
|
hasPendingByRow(row) {
|
|
5956
|
-
return
|
|
6032
|
+
return tableMethods.isPendingByRow(row);
|
|
5957
6033
|
},
|
|
5958
6034
|
isPendingByRow(row) {
|
|
5959
6035
|
const { pendingRowMaps } = internalData;
|
|
@@ -5963,7 +6039,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5963
6039
|
getPendingRecords() {
|
|
5964
6040
|
const { fullAllDataRowIdData, pendingRowMaps } = internalData;
|
|
5965
6041
|
const insertRecords = [];
|
|
5966
|
-
|
|
6042
|
+
index.default.each(pendingRowMaps, (row, rowid) => {
|
|
5967
6043
|
if (fullAllDataRowIdData[rowid]) {
|
|
5968
6044
|
insertRecords.push(row);
|
|
5969
6045
|
}
|
|
@@ -5979,24 +6055,24 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5979
6055
|
const sortOpts = computeSortOpts.value;
|
|
5980
6056
|
const { multiple, remote, orders } = sortOpts;
|
|
5981
6057
|
if (sortConfs) {
|
|
5982
|
-
if (
|
|
6058
|
+
if (index.default.isString(sortConfs)) {
|
|
5983
6059
|
sortConfs = [
|
|
5984
6060
|
{ field: sortConfs, order: sortOrder }
|
|
5985
6061
|
];
|
|
5986
6062
|
}
|
|
5987
6063
|
}
|
|
5988
|
-
if (!
|
|
6064
|
+
if (!index.default.isArray(sortConfs)) {
|
|
5989
6065
|
sortConfs = [sortConfs];
|
|
5990
6066
|
}
|
|
5991
6067
|
if (sortConfs.length) {
|
|
5992
6068
|
if (!multiple) {
|
|
5993
6069
|
clearAllSort();
|
|
5994
6070
|
}
|
|
5995
|
-
(multiple ? sortConfs : [sortConfs[0]]).forEach((confs, index) => {
|
|
6071
|
+
(multiple ? sortConfs : [sortConfs[0]]).forEach((confs, index$1) => {
|
|
5996
6072
|
let { field, order } = confs;
|
|
5997
6073
|
let column = field;
|
|
5998
|
-
if (
|
|
5999
|
-
column =
|
|
6074
|
+
if (index.default.isString(field)) {
|
|
6075
|
+
column = tableMethods.getColumnByField(field);
|
|
6000
6076
|
}
|
|
6001
6077
|
if (column && column.sortable) {
|
|
6002
6078
|
if (orders && orders.indexOf(order) === -1) {
|
|
@@ -6005,15 +6081,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6005
6081
|
if (column.order !== order) {
|
|
6006
6082
|
column.order = order;
|
|
6007
6083
|
}
|
|
6008
|
-
column.sortTime = Date.now() + index;
|
|
6084
|
+
column.sortTime = Date.now() + index$1;
|
|
6009
6085
|
}
|
|
6010
6086
|
});
|
|
6011
6087
|
if (!remote) {
|
|
6012
|
-
|
|
6088
|
+
tablePrivateMethods.handleTableData(true);
|
|
6013
6089
|
}
|
|
6014
6090
|
return vue.nextTick().then(() => {
|
|
6015
6091
|
updateRowOffsetTop();
|
|
6016
|
-
|
|
6092
|
+
tableMethods.updateCellAreas();
|
|
6017
6093
|
return updateStyle();
|
|
6018
6094
|
});
|
|
6019
6095
|
}
|
|
@@ -6092,7 +6168,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6092
6168
|
const column = util.handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
6093
6169
|
return column ? column.sortable && !!column.order : false;
|
|
6094
6170
|
}
|
|
6095
|
-
return
|
|
6171
|
+
return tableMethods.getSortColumns().length > 0;
|
|
6096
6172
|
},
|
|
6097
6173
|
getSortColumns() {
|
|
6098
6174
|
const sortOpts = computeSortOpts.value;
|
|
@@ -6106,7 +6182,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6106
6182
|
}
|
|
6107
6183
|
});
|
|
6108
6184
|
if (multiple && chronological && sortList.length > 1) {
|
|
6109
|
-
return
|
|
6185
|
+
return index.default.orderBy(sortList, "sortTime");
|
|
6110
6186
|
}
|
|
6111
6187
|
return sortList;
|
|
6112
6188
|
},
|
|
@@ -6152,7 +6228,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6152
6228
|
return $xeTable.getCheckedFilters().length > 0;
|
|
6153
6229
|
},
|
|
6154
6230
|
isFilter(fieldOrColumn) {
|
|
6155
|
-
return
|
|
6231
|
+
return tableMethods.isActiveFilterByColumn(fieldOrColumn);
|
|
6156
6232
|
},
|
|
6157
6233
|
clearFilterByEvent(evnt, fieldOrColumn) {
|
|
6158
6234
|
const { filterStore } = reactData;
|
|
@@ -6277,13 +6353,13 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6277
6353
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
6278
6354
|
let expandedRows = [];
|
|
6279
6355
|
if (props$1.treeConfig) {
|
|
6280
|
-
|
|
6356
|
+
index.default.eachTree(tableFullTreeData, (row) => {
|
|
6281
6357
|
expandedRows.push(row);
|
|
6282
6358
|
}, { children: childrenField });
|
|
6283
6359
|
} else {
|
|
6284
6360
|
expandedRows = tableFullData;
|
|
6285
6361
|
}
|
|
6286
|
-
return
|
|
6362
|
+
return tableMethods.setRowExpand(expandedRows, expanded);
|
|
6287
6363
|
},
|
|
6288
6364
|
/**
|
|
6289
6365
|
* 设置展开行,二个参数设置这一行展开与否
|
|
@@ -6302,7 +6378,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6302
6378
|
const columnIndex = expandColumn ? $xeTable.getColumnIndex(expandColumn) : -1;
|
|
6303
6379
|
const $columnIndex = expandColumn ? $xeTable.getVMColumnIndex(expandColumn) : -1;
|
|
6304
6380
|
if (rows) {
|
|
6305
|
-
if (!
|
|
6381
|
+
if (!index.default.isArray(rows)) {
|
|
6306
6382
|
rows = [rows];
|
|
6307
6383
|
}
|
|
6308
6384
|
if (accordion) {
|
|
@@ -6356,7 +6432,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6356
6432
|
},
|
|
6357
6433
|
isExpandByRow(row) {
|
|
6358
6434
|
log.warnLog("vxe.error.delFunc", ["isExpandByRow", "isRowExpandByRow"]);
|
|
6359
|
-
return
|
|
6435
|
+
return tableMethods.isRowExpandByRow(row);
|
|
6360
6436
|
},
|
|
6361
6437
|
/**
|
|
6362
6438
|
* 手动清空展开行状态,数据会恢复成未展开的状态
|
|
@@ -6390,7 +6466,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6390
6466
|
},
|
|
6391
6467
|
getRowExpandRecords() {
|
|
6392
6468
|
const rest = [];
|
|
6393
|
-
|
|
6469
|
+
index.default.each(internalData.rowExpandedMaps, (item) => {
|
|
6394
6470
|
if (item) {
|
|
6395
6471
|
rest.push(item);
|
|
6396
6472
|
}
|
|
@@ -6405,7 +6481,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6405
6481
|
log.errLog("vxe.error.reqProp", ["aggregate-config"]);
|
|
6406
6482
|
return vue.nextTick();
|
|
6407
6483
|
}
|
|
6408
|
-
const confList = fieldOrColumns ?
|
|
6484
|
+
const confList = fieldOrColumns ? index.default.isArray(fieldOrColumns) ? fieldOrColumns : [fieldOrColumns] : [];
|
|
6409
6485
|
if (maxGroupSize && confList.length > maxGroupSize) {
|
|
6410
6486
|
if (index_esm.VxeUI.modal) {
|
|
6411
6487
|
index_esm.VxeUI.modal.message({
|
|
@@ -6417,7 +6493,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6417
6493
|
}
|
|
6418
6494
|
if (confList.length) {
|
|
6419
6495
|
handleUpdateRowGroup(confList.map((fieldOrColumn) => {
|
|
6420
|
-
return
|
|
6496
|
+
return index.default.isString(fieldOrColumn) ? fieldOrColumn : fieldOrColumn.field;
|
|
6421
6497
|
}));
|
|
6422
6498
|
return loadTableData(internalData.tableSynchData, false, true);
|
|
6423
6499
|
}
|
|
@@ -6483,7 +6559,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6483
6559
|
},
|
|
6484
6560
|
setRowGroupExpand(rows, expanded) {
|
|
6485
6561
|
if (rows) {
|
|
6486
|
-
if (!
|
|
6562
|
+
if (!index.default.isArray(rows)) {
|
|
6487
6563
|
rows = [rows];
|
|
6488
6564
|
}
|
|
6489
6565
|
return handleRowGroupVirtualExpand(rows, expanded);
|
|
@@ -6495,7 +6571,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6495
6571
|
const aggregateOpts = computeAggregateOpts.value;
|
|
6496
6572
|
const { childrenField } = aggregateOpts;
|
|
6497
6573
|
if (groupFields) {
|
|
6498
|
-
if (!
|
|
6574
|
+
if (!index.default.isArray(groupFields)) {
|
|
6499
6575
|
groupFields = [groupFields];
|
|
6500
6576
|
}
|
|
6501
6577
|
if (isRowGroupStatus) {
|
|
@@ -6504,7 +6580,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6504
6580
|
groupFields.forEach((groupField) => {
|
|
6505
6581
|
gfKeys[groupField] = true;
|
|
6506
6582
|
});
|
|
6507
|
-
|
|
6583
|
+
index.default.eachTree(internalData.afterGroupFullData, (row) => {
|
|
6508
6584
|
if (row.isAggregate && gfKeys[row.groupField]) {
|
|
6509
6585
|
rows.push(row);
|
|
6510
6586
|
}
|
|
@@ -6522,7 +6598,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6522
6598
|
const { mapChildrenField } = aggregateOpts;
|
|
6523
6599
|
const rgExpandedMaps = {};
|
|
6524
6600
|
if (expanded && mapChildrenField) {
|
|
6525
|
-
|
|
6601
|
+
index.default.eachTree(tableFullGroupData, (row) => {
|
|
6526
6602
|
if (row[mapChildrenField] && row[mapChildrenField].length) {
|
|
6527
6603
|
rgExpandedMaps[util.getRowid($xeTable, row)] = row;
|
|
6528
6604
|
}
|
|
@@ -6545,7 +6621,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6545
6621
|
},
|
|
6546
6622
|
getTreeExpandRecords() {
|
|
6547
6623
|
const rest = [];
|
|
6548
|
-
|
|
6624
|
+
index.default.each(internalData.treeExpandedMaps, (item) => {
|
|
6549
6625
|
if (item) {
|
|
6550
6626
|
rest.push(item);
|
|
6551
6627
|
}
|
|
@@ -6566,7 +6642,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6566
6642
|
const treeOpts = computeTreeOpts.value;
|
|
6567
6643
|
const { transform } = treeOpts;
|
|
6568
6644
|
if (rows) {
|
|
6569
|
-
if (!
|
|
6645
|
+
if (!index.default.isArray(rows)) {
|
|
6570
6646
|
rows = [rows];
|
|
6571
6647
|
}
|
|
6572
6648
|
rows.forEach((row) => {
|
|
@@ -6580,7 +6656,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6580
6656
|
}
|
|
6581
6657
|
});
|
|
6582
6658
|
} else {
|
|
6583
|
-
|
|
6659
|
+
index.default.each(fullAllDataRowIdData, (rowRest) => {
|
|
6584
6660
|
rowRest.treeLoaded = false;
|
|
6585
6661
|
});
|
|
6586
6662
|
internalData.treeExpandedMaps = {};
|
|
@@ -6637,7 +6713,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6637
6713
|
const { transform, lazy } = treeOpts;
|
|
6638
6714
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
6639
6715
|
const expandeds = [];
|
|
6640
|
-
|
|
6716
|
+
index.default.eachTree(tableFullData, (row) => {
|
|
6641
6717
|
const rowChildren = row[childrenField];
|
|
6642
6718
|
if (lazy || rowChildren && rowChildren.length) {
|
|
6643
6719
|
expandeds.push(row);
|
|
@@ -6662,7 +6738,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6662
6738
|
const treeOpts = computeTreeOpts.value;
|
|
6663
6739
|
const { transform } = treeOpts;
|
|
6664
6740
|
if (rows) {
|
|
6665
|
-
if (!
|
|
6741
|
+
if (!index.default.isArray(rows)) {
|
|
6666
6742
|
rows = [rows];
|
|
6667
6743
|
}
|
|
6668
6744
|
if (rows.length) {
|
|
@@ -6695,7 +6771,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6695
6771
|
const expList = $xeTable.getTreeExpandRecords();
|
|
6696
6772
|
internalData.treeExpandedMaps = {};
|
|
6697
6773
|
if (reserve) {
|
|
6698
|
-
|
|
6774
|
+
index.default.eachTree(tableFullTreeData, (row) => handleTreeExpandReserve(row, false), { children: childrenField });
|
|
6699
6775
|
}
|
|
6700
6776
|
return $xeTable.handleTableData().then(() => {
|
|
6701
6777
|
if (transform) {
|
|
@@ -6768,55 +6844,47 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6768
6844
|
const yHandleEl = refScrollYHandleElem.value;
|
|
6769
6845
|
internalData.intoRunScroll = true;
|
|
6770
6846
|
if (scrollLeft) {
|
|
6771
|
-
if (!
|
|
6847
|
+
if (!index.default.isNumber(scrollLeft)) {
|
|
6772
6848
|
scrollTop = scrollLeft.top;
|
|
6773
6849
|
scrollLeft = scrollLeft.left;
|
|
6774
6850
|
}
|
|
6775
6851
|
}
|
|
6776
|
-
if (
|
|
6852
|
+
if (index.default.isNumber(scrollLeft)) {
|
|
6777
6853
|
dom.setScrollLeft(xHandleEl, scrollLeft);
|
|
6778
6854
|
dom.setScrollLeft(bodyScrollElem, scrollLeft);
|
|
6779
6855
|
dom.setScrollLeft(headerScrollElem, scrollLeft);
|
|
6780
6856
|
dom.setScrollLeft(footerScrollElem, scrollLeft);
|
|
6781
|
-
|
|
6782
|
-
loadScrollXData();
|
|
6783
|
-
}
|
|
6857
|
+
loadScrollXData();
|
|
6784
6858
|
}
|
|
6785
|
-
if (
|
|
6859
|
+
if (index.default.isNumber(scrollTop)) {
|
|
6786
6860
|
dom.setScrollTop(yHandleEl, scrollTop);
|
|
6787
6861
|
dom.setScrollTop(bodyScrollElem, scrollTop);
|
|
6788
6862
|
dom.setScrollTop(leftScrollElem, scrollTop);
|
|
6789
6863
|
dom.setScrollTop(rightScrollElem, scrollTop);
|
|
6790
|
-
|
|
6791
|
-
loadScrollYData();
|
|
6792
|
-
}
|
|
6864
|
+
loadScrollYData();
|
|
6793
6865
|
}
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6866
|
+
if (reactData.scrollXLoad || reactData.scrollYLoad) {
|
|
6867
|
+
return new Promise((resolve) => {
|
|
6868
|
+
setTimeout(() => {
|
|
6869
|
+
vue.nextTick(() => {
|
|
6870
|
+
internalData.intoRunScroll = false;
|
|
6871
|
+
resolve();
|
|
6872
|
+
});
|
|
6873
|
+
}, 30);
|
|
6874
|
+
});
|
|
6875
|
+
}
|
|
6876
|
+
return vue.nextTick().then(() => {
|
|
6877
|
+
internalData.intoRunScroll = false;
|
|
6801
6878
|
});
|
|
6802
6879
|
},
|
|
6803
6880
|
/**
|
|
6804
6881
|
* 如果有滚动条,则滚动到对应的行
|
|
6882
|
+
* @param {Row} row 行对象
|
|
6883
|
+
* @param {ColumnInfo} fieldOrColumn 列配置
|
|
6805
6884
|
*/
|
|
6806
|
-
scrollToRow(
|
|
6885
|
+
scrollToRow(row, fieldOrColumn) {
|
|
6807
6886
|
const { isAllOverflow, scrollYLoad, scrollXLoad } = reactData;
|
|
6808
|
-
const { fullAllDataRowIdData, _sToTime } = internalData;
|
|
6809
6887
|
const rest = [];
|
|
6810
|
-
let row;
|
|
6811
|
-
if (ctor.default.isString(rowOrRowid) || ctor.default.isNumber(rowOrRowid)) {
|
|
6812
|
-
const rowid = rowOrRowid;
|
|
6813
|
-
const rowRest = rowid ? fullAllDataRowIdData[rowid] : null;
|
|
6814
|
-
if (rowRest) {
|
|
6815
|
-
row = rowRest.row;
|
|
6816
|
-
}
|
|
6817
|
-
} else {
|
|
6818
|
-
row = rowOrRowid;
|
|
6819
|
-
}
|
|
6820
6888
|
if (row) {
|
|
6821
6889
|
if (props$1.treeConfig) {
|
|
6822
6890
|
rest.push($xeTable.scrollToTreeRow(row));
|
|
@@ -6825,29 +6893,13 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6825
6893
|
}
|
|
6826
6894
|
}
|
|
6827
6895
|
if (fieldOrColumn) {
|
|
6828
|
-
rest.push(handleScrollToRowColumn(fieldOrColumn, row
|
|
6829
|
-
}
|
|
6830
|
-
if (_sToTime) {
|
|
6831
|
-
clearTimeout(_sToTime);
|
|
6896
|
+
rest.push(handleScrollToRowColumn(fieldOrColumn, row));
|
|
6832
6897
|
}
|
|
6833
6898
|
return Promise.all(rest).then(() => {
|
|
6834
6899
|
if (row) {
|
|
6835
6900
|
if (!isAllOverflow && (scrollYLoad || scrollXLoad)) {
|
|
6836
6901
|
calcCellHeight();
|
|
6837
6902
|
calcCellWidth();
|
|
6838
|
-
internalData._sToTime = setTimeout(() => {
|
|
6839
|
-
internalData._sToTime = void 0;
|
|
6840
|
-
if (scrollYLoad) {
|
|
6841
|
-
if (props$1.treeConfig) {
|
|
6842
|
-
$xeTable.scrollToTreeRow(row);
|
|
6843
|
-
} else {
|
|
6844
|
-
util.rowToVisible($xeTable, row);
|
|
6845
|
-
}
|
|
6846
|
-
}
|
|
6847
|
-
if (scrollXLoad && fieldOrColumn) {
|
|
6848
|
-
handleScrollToRowColumn(fieldOrColumn, row, options);
|
|
6849
|
-
}
|
|
6850
|
-
}, 350);
|
|
6851
6903
|
}
|
|
6852
6904
|
return vue.nextTick();
|
|
6853
6905
|
}
|
|
@@ -6856,36 +6908,41 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6856
6908
|
/**
|
|
6857
6909
|
* 如果有滚动条,则滚动到第一行
|
|
6858
6910
|
*/
|
|
6859
|
-
scrollToStartRow(fieldOrColumn
|
|
6911
|
+
scrollToStartRow(fieldOrColumn) {
|
|
6860
6912
|
const { afterFullData } = internalData;
|
|
6861
|
-
return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn
|
|
6913
|
+
return $xeTable.scrollToRow(afterFullData[0], fieldOrColumn);
|
|
6862
6914
|
},
|
|
6863
6915
|
/**
|
|
6864
6916
|
* 如果有滚动条,则滚动到最后一行
|
|
6865
6917
|
*/
|
|
6866
|
-
scrollToEndRow(fieldOrColumn
|
|
6918
|
+
scrollToEndRow(fieldOrColumn) {
|
|
6867
6919
|
const { afterFullData } = internalData;
|
|
6868
|
-
return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn
|
|
6920
|
+
return $xeTable.scrollToRow(afterFullData[afterFullData.length - 1], fieldOrColumn);
|
|
6869
6921
|
},
|
|
6870
6922
|
/**
|
|
6871
6923
|
* 如果有滚动条,则滚动到对应的列
|
|
6872
6924
|
*/
|
|
6873
|
-
scrollToColumn(fieldOrColumn
|
|
6874
|
-
|
|
6925
|
+
scrollToColumn(fieldOrColumn) {
|
|
6926
|
+
const { fullColumnIdData } = internalData;
|
|
6927
|
+
const column = util.handleFieldOrColumn($xeTable, fieldOrColumn);
|
|
6928
|
+
if (column && fullColumnIdData[column.id]) {
|
|
6929
|
+
return util.colToVisible($xeTable, column);
|
|
6930
|
+
}
|
|
6931
|
+
return vue.nextTick();
|
|
6875
6932
|
},
|
|
6876
6933
|
/**
|
|
6877
6934
|
* 如果有滚动条,则滚动到第一列
|
|
6878
6935
|
*/
|
|
6879
|
-
scrollToStartColumn(
|
|
6936
|
+
scrollToStartColumn() {
|
|
6880
6937
|
const { visibleColumn } = internalData;
|
|
6881
|
-
return $xeTable.scrollToColumn(visibleColumn[0]
|
|
6938
|
+
return $xeTable.scrollToColumn(visibleColumn[0]);
|
|
6882
6939
|
},
|
|
6883
6940
|
/**
|
|
6884
6941
|
* 如果有滚动条,则滚动到最后一列
|
|
6885
6942
|
*/
|
|
6886
|
-
scrollToEndColumn(
|
|
6943
|
+
scrollToEndColumn() {
|
|
6887
6944
|
const { visibleColumn } = internalData;
|
|
6888
|
-
return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1]
|
|
6945
|
+
return $xeTable.scrollToColumn(visibleColumn[visibleColumn.length - 1]);
|
|
6889
6946
|
},
|
|
6890
6947
|
/**
|
|
6891
6948
|
* 手动清除滚动相关信息,还原到初始状态
|
|
@@ -6950,8 +7007,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6950
7007
|
updateStatus(slotParams, cellValue) {
|
|
6951
7008
|
return vue.nextTick().then(() => {
|
|
6952
7009
|
const { editRules } = props$1;
|
|
6953
|
-
|
|
6954
|
-
if (isActivated && slotParams && editRules) {
|
|
7010
|
+
if (slotParams && editRules) {
|
|
6955
7011
|
return $xeTable.handleCellRuleUpdateStatus("change", slotParams, cellValue);
|
|
6956
7012
|
}
|
|
6957
7013
|
});
|
|
@@ -7003,8 +7059,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7003
7059
|
internalData.mergeBodyList = [];
|
|
7004
7060
|
internalData.mergeBodyMaps = {};
|
|
7005
7061
|
internalData.mergeBodyCellMaps = {};
|
|
7006
|
-
internalData.mergeBodyRowMaps = {};
|
|
7007
|
-
internalData.mergeBodyColMaps = {};
|
|
7008
7062
|
reactData.mergeBodyFlag++;
|
|
7009
7063
|
return vue.nextTick().then(() => {
|
|
7010
7064
|
return updateStyle();
|
|
@@ -7041,8 +7095,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7041
7095
|
internalData.mergeHeaderList = [];
|
|
7042
7096
|
internalData.mergeHeaderMaps = {};
|
|
7043
7097
|
internalData.mergeHeaderCellMaps = {};
|
|
7044
|
-
internalData.mergeHeaderRowMaps = {};
|
|
7045
|
-
internalData.mergeBodyColMaps = {};
|
|
7046
7098
|
reactData.mergeHeadFlag++;
|
|
7047
7099
|
return vue.nextTick().then(() => {
|
|
7048
7100
|
return updateStyle();
|
|
@@ -7091,8 +7143,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7091
7143
|
internalData.mergeFooterList = [];
|
|
7092
7144
|
internalData.mergeFooterMaps = {};
|
|
7093
7145
|
internalData.mergeFooterCellMaps = {};
|
|
7094
|
-
internalData.mergeFooterRowMaps = {};
|
|
7095
|
-
internalData.mergeFooterColMaps = {};
|
|
7096
7146
|
reactData.mergeFootFlag++;
|
|
7097
7147
|
return vue.nextTick().then(() => {
|
|
7098
7148
|
return updateStyle();
|
|
@@ -7149,7 +7199,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7149
7199
|
let hasVisible = 0;
|
|
7150
7200
|
let hasAggFunc = 0;
|
|
7151
7201
|
const sortMaps = {};
|
|
7152
|
-
|
|
7202
|
+
index.default.eachTree(collectColumn, (column, index2, items, path, parentColumn) => {
|
|
7153
7203
|
const colKey = column.getKey();
|
|
7154
7204
|
if (!colKey) {
|
|
7155
7205
|
log.errLog("vxe.error.reqProp", [`${column.getTitle() || column.type || ""} -> column.field=?`]);
|
|
@@ -7271,7 +7321,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7271
7321
|
else if (dom.getEventTargetNode(evnt, tableFilter.getRefMaps().refElem.value).flag) ;
|
|
7272
7322
|
else {
|
|
7273
7323
|
if (!dom.getEventTargetNode(evnt, document.body, "vxe-table--ignore-clear").flag) {
|
|
7274
|
-
|
|
7324
|
+
tablePrivateMethods.preventEvent(evnt, "event.clearFilter", internalData._currFilterParams, tableMethods.closeFilter);
|
|
7275
7325
|
}
|
|
7276
7326
|
}
|
|
7277
7327
|
}
|
|
@@ -7281,7 +7331,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7281
7331
|
else {
|
|
7282
7332
|
if (!dom.getEventTargetNode(evnt, document.body, "vxe-table--ignore-clear").flag) {
|
|
7283
7333
|
if (customStore.visible && $xeTable.closeCustom) {
|
|
7284
|
-
|
|
7334
|
+
tablePrivateMethods.preventEvent(evnt, "event.clearCustom", {}, () => {
|
|
7285
7335
|
$xeTable.closeCustom();
|
|
7286
7336
|
$xeTable.dispatchEvent("custom", { type: "close" }, evnt);
|
|
7287
7337
|
});
|
|
@@ -7296,11 +7346,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7296
7346
|
if ($validTooltip && dom.getEventTargetNode(evnt, $validTooltip.$el).flag) ;
|
|
7297
7347
|
else if (!internalData._lastCallTime || internalData._lastCallTime + 50 < Date.now()) {
|
|
7298
7348
|
if (!dom.getEventTargetNode(evnt, document.body, "vxe-table--ignore-clear").flag) {
|
|
7299
|
-
|
|
7349
|
+
tablePrivateMethods.preventEvent(evnt, "event.clearEdit", actived.args, () => {
|
|
7300
7350
|
let isClear;
|
|
7301
7351
|
if (editOpts.mode === "row") {
|
|
7302
7352
|
const rowTargetNode = dom.getEventTargetNode(evnt, el, "vxe-body--row");
|
|
7303
|
-
const rowNodeRest = rowTargetNode.flag ?
|
|
7353
|
+
const rowNodeRest = rowTargetNode.flag ? tableMethods.getRowNode(rowTargetNode.targetElem) : null;
|
|
7304
7354
|
isClear = rowNodeRest ? !$xeTable.eqRow(rowNodeRest.item, actived.args.row) : false;
|
|
7305
7355
|
} else {
|
|
7306
7356
|
isClear = !dom.getEventTargetNode(evnt, el, "col--edit").flag;
|
|
@@ -7341,7 +7391,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7341
7391
|
if ($xeTable.getCellAreas) {
|
|
7342
7392
|
const cellAreas = $xeTable.getCellAreas();
|
|
7343
7393
|
if (cellAreas && cellAreas.length && !dom.getEventTargetNode(evnt, document.body, "vxe-table--ignore-areas-clear").flag) {
|
|
7344
|
-
|
|
7394
|
+
tablePrivateMethods.preventEvent(evnt, "event.clearAreas", {}, () => {
|
|
7345
7395
|
$xeTable.clearCellAreas();
|
|
7346
7396
|
$xeTable.clearCopyCellArea();
|
|
7347
7397
|
dispatchEvent("clear-cell-area-selection", { cellAreas }, evnt);
|
|
@@ -7356,22 +7406,20 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7356
7406
|
$xeTable.closeMenu();
|
|
7357
7407
|
}
|
|
7358
7408
|
}
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
reactData.validErrorMaps = {};
|
|
7363
|
-
}
|
|
7364
|
-
internalData.isActivated = isActivated;
|
|
7409
|
+
const isActivated = dom.getEventTargetNode(evnt, $xeGGWrapper ? $xeGGWrapper.getRefMaps().refElem.value : el).flag;
|
|
7410
|
+
if (!isActivated && editRules && validOpts.autoClear) {
|
|
7411
|
+
reactData.validErrorMaps = {};
|
|
7365
7412
|
}
|
|
7413
|
+
internalData.isActivated = isActivated;
|
|
7366
7414
|
};
|
|
7367
7415
|
const handleGlobalBlurEvent = () => {
|
|
7368
|
-
|
|
7416
|
+
tableMethods.closeFilter();
|
|
7369
7417
|
if ($xeTable.closeMenu) {
|
|
7370
7418
|
$xeTable.closeMenu();
|
|
7371
7419
|
}
|
|
7372
7420
|
};
|
|
7373
7421
|
const handleGlobalMousewheelEvent = () => {
|
|
7374
|
-
|
|
7422
|
+
tableMethods.closeTooltip();
|
|
7375
7423
|
if ($xeTable.closeMenu) {
|
|
7376
7424
|
$xeTable.closeMenu();
|
|
7377
7425
|
}
|
|
@@ -7384,7 +7432,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7384
7432
|
const { actived } = editStore;
|
|
7385
7433
|
const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
|
|
7386
7434
|
if (isEsc) {
|
|
7387
|
-
|
|
7435
|
+
tablePrivateMethods.preventEvent(evnt, "event.keydown", null, () => {
|
|
7388
7436
|
dispatchEvent("keydown-start", {}, evnt);
|
|
7389
7437
|
if (keyboardConfig && mouseConfig && mouseOpts.area && $xeTable.handleKeyboardCellAreaEvent) {
|
|
7390
7438
|
$xeTable.handleKeyboardCellAreaEvent(evnt);
|
|
@@ -7393,7 +7441,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7393
7441
|
if ($xeTable.closeMenu) {
|
|
7394
7442
|
$xeTable.closeMenu();
|
|
7395
7443
|
}
|
|
7396
|
-
|
|
7444
|
+
tableMethods.closeFilter();
|
|
7397
7445
|
if (keyboardConfig && keyboardOpts.isEsc) {
|
|
7398
7446
|
if (actived.row) {
|
|
7399
7447
|
const params = actived.args;
|
|
@@ -7417,7 +7465,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7417
7465
|
$xeTable.preventEvent(evnt, "event.keydown", null, () => {
|
|
7418
7466
|
const { mouseConfig, keyboardConfig, treeConfig, editConfig, highlightCurrentRow, highlightCurrentColumn } = props$1;
|
|
7419
7467
|
const { ctxMenuStore, editStore, currentRow } = reactData;
|
|
7420
|
-
const { afterFullData
|
|
7468
|
+
const { afterFullData } = internalData;
|
|
7421
7469
|
const isContentMenu = computeIsContentMenu.value;
|
|
7422
7470
|
const bodyMenu = computeBodyMenu.value;
|
|
7423
7471
|
const keyboardOpts = computeKeyboardOpts.value;
|
|
@@ -7427,7 +7475,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7427
7475
|
const menuList = computeMenuList.value;
|
|
7428
7476
|
const rowOpts = computeRowOpts.value;
|
|
7429
7477
|
const columnOpts = computeColumnOpts.value;
|
|
7430
|
-
const { isLastEnterAppendRow, beforeEnterMethod, enterMethod, isLastTabAppendRow, beforeTabMethod, tabMethod } = keyboardOpts;
|
|
7431
7478
|
const { selected, actived } = editStore;
|
|
7432
7479
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
7433
7480
|
const keyCode = evnt.keyCode;
|
|
@@ -7476,9 +7523,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7476
7523
|
} else if (isSpacebar && keyboardConfig && keyboardOpts.isChecked && selected.row && selected.column && (selected.column.type === "checkbox" || selected.column.type === "radio")) {
|
|
7477
7524
|
evnt.preventDefault();
|
|
7478
7525
|
if (selected.column.type === "checkbox") {
|
|
7479
|
-
|
|
7526
|
+
tablePrivateMethods.handleToggleCheckRowEvent(evnt, selected.args);
|
|
7480
7527
|
} else {
|
|
7481
|
-
|
|
7528
|
+
tablePrivateMethods.triggerRadioRowEvent(evnt, selected.args);
|
|
7482
7529
|
}
|
|
7483
7530
|
} else if (isF2 && utils.isEnableConf(editConfig)) {
|
|
7484
7531
|
if (!isEditStatus) {
|
|
@@ -7494,6 +7541,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7494
7541
|
internalData._keyCtx = false;
|
|
7495
7542
|
}, 1e3);
|
|
7496
7543
|
} else if (isEnter && !isAltKey && keyboardConfig && keyboardOpts.isEnter && (selected.row || actived.row || treeConfig && (rowOpts.isCurrent || highlightCurrentRow) && currentRow)) {
|
|
7544
|
+
const { isLastEnterAppendRow, beforeEnterMethod, enterMethod } = keyboardOpts;
|
|
7497
7545
|
if (isControlKey) {
|
|
7498
7546
|
if (actived.row) {
|
|
7499
7547
|
const params = actived.args;
|
|
@@ -7506,8 +7554,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7506
7554
|
}
|
|
7507
7555
|
} else {
|
|
7508
7556
|
if (selected.row || actived.row) {
|
|
7509
|
-
const activeRow = selected.row || actived.row;
|
|
7510
|
-
const activeColumn = selected.column || actived.column;
|
|
7511
7557
|
const activeParams = selected.row ? selected.args : actived.args;
|
|
7512
7558
|
if (hasShiftKey) {
|
|
7513
7559
|
if (keyboardOpts.enterToTab) {
|
|
@@ -7516,43 +7562,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7516
7562
|
$xeTable.moveEnterSelected(activeParams, isLeftArrow, true, isRightArrow, false, evnt);
|
|
7517
7563
|
}
|
|
7518
7564
|
} else {
|
|
7519
|
-
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
7520
|
-
const _columnIndex = $xeTable.getVTColumnIndex(activeColumn);
|
|
7521
7565
|
if (keyboardOpts.enterToTab) {
|
|
7522
|
-
|
|
7523
|
-
row: activeRow,
|
|
7524
|
-
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
7525
|
-
$rowIndex: $xeTable.getVMRowIndex(activeRow),
|
|
7526
|
-
_rowIndex,
|
|
7527
|
-
column: activeColumn,
|
|
7528
|
-
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7529
|
-
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7530
|
-
_columnIndex,
|
|
7531
|
-
$table: $xeTable
|
|
7532
|
-
};
|
|
7533
|
-
if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
|
|
7534
|
-
evnt.preventDefault();
|
|
7535
|
-
if (isLastTabAppendRow) {
|
|
7536
|
-
const newColumn = visibleColumn[0];
|
|
7537
|
-
if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
|
|
7538
|
-
if (actived.row) {
|
|
7539
|
-
$xeTable.handleClearEdit(evnt);
|
|
7540
|
-
}
|
|
7541
|
-
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
7542
|
-
$xeTable.scrollToRow(newRow, newColumn);
|
|
7543
|
-
$xeTable.handleSelected(Object.assign(Object.assign({}, activeParams), { row: newRow, column: newColumn }), evnt);
|
|
7544
|
-
});
|
|
7545
|
-
$xeTable.dispatchEvent("tab-append-row", ttrParams, evnt);
|
|
7546
|
-
return;
|
|
7547
|
-
}
|
|
7548
|
-
}
|
|
7549
|
-
if (tabMethod) {
|
|
7550
|
-
tabMethod(ttrParams);
|
|
7551
|
-
} else {
|
|
7552
|
-
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
7553
|
-
}
|
|
7554
|
-
}
|
|
7566
|
+
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
7555
7567
|
} else {
|
|
7568
|
+
const activeRow = selected.row || actived.row;
|
|
7569
|
+
const activeColumn = selected.column || actived.column;
|
|
7570
|
+
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
7556
7571
|
const etrParams = {
|
|
7557
7572
|
row: activeRow,
|
|
7558
7573
|
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
@@ -7561,11 +7576,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7561
7576
|
column: activeColumn,
|
|
7562
7577
|
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7563
7578
|
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7564
|
-
_columnIndex,
|
|
7579
|
+
_columnIndex: $xeTable.getVTColumnIndex(activeColumn),
|
|
7565
7580
|
$table: $xeTable
|
|
7566
7581
|
};
|
|
7567
7582
|
if (!beforeEnterMethod || beforeEnterMethod(etrParams) !== false) {
|
|
7568
|
-
evnt.preventDefault();
|
|
7569
7583
|
if (isLastEnterAppendRow) {
|
|
7570
7584
|
if (_rowIndex >= afterFullData.length - 1) {
|
|
7571
7585
|
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
@@ -7576,13 +7590,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7576
7590
|
return;
|
|
7577
7591
|
}
|
|
7578
7592
|
}
|
|
7593
|
+
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
|
|
7579
7594
|
if (enterMethod) {
|
|
7580
7595
|
enterMethod(etrParams);
|
|
7581
|
-
} else {
|
|
7582
|
-
if (actived.row) {
|
|
7583
|
-
$xeTable.handleClearEdit(evnt);
|
|
7584
|
-
}
|
|
7585
|
-
$xeTable.moveEnterSelected(activeParams, isLeftArrow, false, isRightArrow, true, evnt);
|
|
7586
7596
|
}
|
|
7587
7597
|
}
|
|
7588
7598
|
}
|
|
@@ -7616,57 +7626,19 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7616
7626
|
}
|
|
7617
7627
|
}
|
|
7618
7628
|
} else if (isTab && keyboardConfig && keyboardOpts.isTab) {
|
|
7619
|
-
if (selected.row ||
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
const _rowIndex = $xeTable.getVTRowIndex(activeRow);
|
|
7624
|
-
const _columnIndex = $xeTable.getVTColumnIndex(activeColumn);
|
|
7625
|
-
const ttrParams = {
|
|
7626
|
-
row: activeRow,
|
|
7627
|
-
rowIndex: $xeTable.getRowIndex(activeRow),
|
|
7628
|
-
$rowIndex: $xeTable.getVMRowIndex(activeRow),
|
|
7629
|
-
_rowIndex,
|
|
7630
|
-
column: activeColumn,
|
|
7631
|
-
columnIndex: $xeTable.getColumnIndex(activeColumn),
|
|
7632
|
-
$columnIndex: $xeTable.getVMColumnIndex(activeColumn),
|
|
7633
|
-
_columnIndex,
|
|
7634
|
-
$table: $xeTable
|
|
7635
|
-
};
|
|
7636
|
-
if (!beforeTabMethod || beforeTabMethod(ttrParams) !== false) {
|
|
7637
|
-
evnt.preventDefault();
|
|
7638
|
-
if (isLastTabAppendRow) {
|
|
7639
|
-
const newColumn = visibleColumn[0];
|
|
7640
|
-
if (_rowIndex >= afterFullData.length - 1 && _columnIndex >= visibleColumn.length - 1) {
|
|
7641
|
-
if (actived.row) {
|
|
7642
|
-
$xeTable.handleClearEdit(evnt);
|
|
7643
|
-
}
|
|
7644
|
-
$xeTable.insertAt({}, -1).then(({ row: newRow }) => {
|
|
7645
|
-
$xeTable.scrollToRow(newRow, newColumn);
|
|
7646
|
-
$xeTable.handleSelected(Object.assign(Object.assign({}, activeParams), { row: newRow, column: newColumn }), evnt);
|
|
7647
|
-
});
|
|
7648
|
-
$xeTable.dispatchEvent("tab-append-row", ttrParams, evnt);
|
|
7649
|
-
return;
|
|
7650
|
-
}
|
|
7651
|
-
}
|
|
7652
|
-
if (tabMethod) {
|
|
7653
|
-
tabMethod(ttrParams);
|
|
7654
|
-
} else {
|
|
7655
|
-
if (actived.row) {
|
|
7656
|
-
$xeTable.handleClearEdit(evnt);
|
|
7657
|
-
}
|
|
7658
|
-
$xeTable.moveTabSelected(activeParams, hasShiftKey, evnt);
|
|
7659
|
-
}
|
|
7660
|
-
}
|
|
7629
|
+
if (selected.row || selected.column) {
|
|
7630
|
+
$xeTable.moveTabSelected(selected.args, hasShiftKey, evnt);
|
|
7631
|
+
} else if (actived.row || actived.column) {
|
|
7632
|
+
$xeTable.moveTabSelected(actived.args, hasShiftKey, evnt);
|
|
7661
7633
|
}
|
|
7662
7634
|
} else if (keyboardConfig && keyboardOpts.isDel && hasDeleteKey && utils.isEnableConf(editConfig) && (selected.row || selected.column)) {
|
|
7663
7635
|
if (!isEditStatus) {
|
|
7664
7636
|
const { delMethod } = keyboardOpts;
|
|
7665
7637
|
const params = {
|
|
7666
7638
|
row: selected.row,
|
|
7667
|
-
rowIndex:
|
|
7639
|
+
rowIndex: tableMethods.getRowIndex(selected.row),
|
|
7668
7640
|
column: selected.column,
|
|
7669
|
-
columnIndex:
|
|
7641
|
+
columnIndex: tableMethods.getColumnIndex(selected.column),
|
|
7670
7642
|
$table: $xeTable,
|
|
7671
7643
|
$grid: $xeGrid,
|
|
7672
7644
|
$gantt: $xeGantt
|
|
@@ -7677,7 +7649,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7677
7649
|
} else {
|
|
7678
7650
|
util.setCellValue(selected.row, selected.column, null);
|
|
7679
7651
|
}
|
|
7680
|
-
|
|
7652
|
+
tableMethods.updateFooter();
|
|
7681
7653
|
dispatchEvent("cell-delete-value", params, evnt);
|
|
7682
7654
|
}
|
|
7683
7655
|
}
|
|
@@ -7706,7 +7678,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7706
7678
|
}
|
|
7707
7679
|
}
|
|
7708
7680
|
} else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
7709
|
-
const { parent: parentRow } =
|
|
7681
|
+
const { parent: parentRow } = index.default.findTree(internalData.afterTreeFullData, (item) => item === currentRow, { children: childrenField });
|
|
7710
7682
|
if (parentRow) {
|
|
7711
7683
|
evnt.preventDefault();
|
|
7712
7684
|
const params = {
|
|
@@ -7757,8 +7729,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7757
7729
|
const { actived } = editStore;
|
|
7758
7730
|
if (isActivated && !filterStore.visible) {
|
|
7759
7731
|
if (!(actived.row || actived.column)) {
|
|
7760
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.
|
|
7761
|
-
$xeTable.
|
|
7732
|
+
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handlePasteCellAreaEvent) {
|
|
7733
|
+
$xeTable.handlePasteCellAreaEvent(evnt);
|
|
7762
7734
|
}
|
|
7763
7735
|
}
|
|
7764
7736
|
dispatchEvent("paste", {}, evnt);
|
|
@@ -7773,8 +7745,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7773
7745
|
const { actived } = editStore;
|
|
7774
7746
|
if (isActivated && !filterStore.visible) {
|
|
7775
7747
|
if (!(actived.row || actived.column)) {
|
|
7776
|
-
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.
|
|
7777
|
-
$xeTable.
|
|
7748
|
+
if (keyboardConfig && keyboardOpts.isClip && mouseConfig && mouseOpts.area && $xeTable.handleCopyCellAreaEvent) {
|
|
7749
|
+
$xeTable.handleCopyCellAreaEvent(evnt);
|
|
7778
7750
|
}
|
|
7779
7751
|
}
|
|
7780
7752
|
dispatchEvent("copy", {}, evnt);
|
|
@@ -7811,7 +7783,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7811
7783
|
const $tooltip = refTooltip.value;
|
|
7812
7784
|
clearTimeout(internalData.tooltipTimeout);
|
|
7813
7785
|
if (isClear) {
|
|
7814
|
-
|
|
7786
|
+
tableMethods.closeTooltip();
|
|
7815
7787
|
} else {
|
|
7816
7788
|
if ($tooltip && $tooltip.setActived) {
|
|
7817
7789
|
$tooltip.setActived(true);
|
|
@@ -7847,7 +7819,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7847
7819
|
const el = refElem.value;
|
|
7848
7820
|
if (el) {
|
|
7849
7821
|
const clss = "row--drag-origin";
|
|
7850
|
-
|
|
7822
|
+
index.default.arrayEach(el.querySelectorAll(`.${clss}`), (elem) => {
|
|
7851
7823
|
elem.draggable = false;
|
|
7852
7824
|
dom.removeClass(elem, clss);
|
|
7853
7825
|
});
|
|
@@ -7858,7 +7830,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7858
7830
|
if (el) {
|
|
7859
7831
|
const clss = "row--drag-origin";
|
|
7860
7832
|
const rowid = util.getRowid($xeTable, row);
|
|
7861
|
-
|
|
7833
|
+
index.default.arrayEach(el.querySelectorAll(`[rowid="${rowid}"]`), (elem) => {
|
|
7862
7834
|
dom.addClass(elem, clss);
|
|
7863
7835
|
});
|
|
7864
7836
|
}
|
|
@@ -7885,11 +7857,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7885
7857
|
const el = refElem.value;
|
|
7886
7858
|
if (el) {
|
|
7887
7859
|
const colQuerys = [];
|
|
7888
|
-
|
|
7860
|
+
index.default.eachTree([column], (item) => {
|
|
7889
7861
|
colQuerys.push(`[colid="${item.id}"]`);
|
|
7890
7862
|
});
|
|
7891
7863
|
const clss = "col--drag-origin";
|
|
7892
|
-
|
|
7864
|
+
index.default.arrayEach(el.querySelectorAll(colQuerys.join(",")), (elem) => {
|
|
7893
7865
|
dom.addClass(elem, clss);
|
|
7894
7866
|
});
|
|
7895
7867
|
}
|
|
@@ -7898,7 +7870,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7898
7870
|
const el = refElem.value;
|
|
7899
7871
|
if (el) {
|
|
7900
7872
|
const clss = "col--drag-origin";
|
|
7901
|
-
|
|
7873
|
+
index.default.arrayEach(el.querySelectorAll(`.${clss}`), (elem) => {
|
|
7902
7874
|
elem.draggable = false;
|
|
7903
7875
|
dom.removeClass(elem, clss);
|
|
7904
7876
|
});
|
|
@@ -8058,8 +8030,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8058
8030
|
const { column, row } = params;
|
|
8059
8031
|
const { showAll, contentMethod } = tipOpts;
|
|
8060
8032
|
const customContent = contentMethod ? contentMethod(params) : null;
|
|
8061
|
-
const useCustom = contentMethod && !
|
|
8062
|
-
const content = useCustom ? customContent :
|
|
8033
|
+
const useCustom = contentMethod && !index.default.eqNull(customContent);
|
|
8034
|
+
const content = useCustom ? customContent : index.default.toString(column.type === "html" ? tipOverEl.innerText : tipOverEl.textContent).trim();
|
|
8063
8035
|
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
8064
8036
|
if (content && (showAll || useCustom || isOver)) {
|
|
8065
8037
|
const tipContent = utils.formatText(content);
|
|
@@ -8085,7 +8057,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8085
8057
|
if ($xeGGWrapper) {
|
|
8086
8058
|
return $xeGGWrapper.callSlot(slotFunc, params);
|
|
8087
8059
|
}
|
|
8088
|
-
if (
|
|
8060
|
+
if (index.default.isFunction(slotFunc)) {
|
|
8089
8061
|
return vn.getSlotVNs(slotFunc(params));
|
|
8090
8062
|
}
|
|
8091
8063
|
}
|
|
@@ -8149,40 +8121,39 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8149
8121
|
const expandOpts = computeExpandOpts.value;
|
|
8150
8122
|
const treeOpts = computeTreeOpts.value;
|
|
8151
8123
|
const radioOpts = computeRadioOpts.value;
|
|
8152
|
-
const rowOpts = computeRowOpts.value;
|
|
8153
8124
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
8154
8125
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
8155
8126
|
const rowkey = util.getRowkey($xeTable);
|
|
8156
|
-
if (!
|
|
8127
|
+
if (!index.default.isArray(records)) {
|
|
8157
8128
|
records = [records];
|
|
8158
8129
|
}
|
|
8159
8130
|
return records.map((record) => {
|
|
8160
8131
|
internalData.tableFullColumn.forEach((column) => {
|
|
8161
8132
|
const { field, editRender } = column;
|
|
8162
|
-
if (field && !
|
|
8133
|
+
if (field && !index.default.has(record, field) && !record[field]) {
|
|
8163
8134
|
let cellValue = null;
|
|
8164
8135
|
if (editRender) {
|
|
8165
8136
|
const { defaultValue } = editRender;
|
|
8166
|
-
if (
|
|
8137
|
+
if (index.default.isFunction(defaultValue)) {
|
|
8167
8138
|
cellValue = defaultValue({ column });
|
|
8168
|
-
} else if (!
|
|
8139
|
+
} else if (!index.default.isUndefined(defaultValue)) {
|
|
8169
8140
|
cellValue = defaultValue;
|
|
8170
8141
|
}
|
|
8171
8142
|
}
|
|
8172
|
-
|
|
8143
|
+
index.default.set(record, field, cellValue);
|
|
8173
8144
|
}
|
|
8174
8145
|
});
|
|
8175
8146
|
const otherFields = [radioOpts.labelField, checkboxOpts.checkField, checkboxOpts.labelField, expandOpts.labelField];
|
|
8176
8147
|
otherFields.forEach((key) => {
|
|
8177
|
-
if (key && utils.eqEmptyValue(
|
|
8178
|
-
|
|
8148
|
+
if (key && utils.eqEmptyValue(index.default.get(record, key))) {
|
|
8149
|
+
index.default.set(record, key, null);
|
|
8179
8150
|
}
|
|
8180
8151
|
});
|
|
8181
|
-
if (treeConfig && treeOpts.lazy &&
|
|
8152
|
+
if (treeConfig && treeOpts.lazy && index.default.isUndefined(record[childrenField])) {
|
|
8182
8153
|
record[childrenField] = null;
|
|
8183
8154
|
}
|
|
8184
|
-
if (utils.eqEmptyValue(
|
|
8185
|
-
|
|
8155
|
+
if (utils.eqEmptyValue(index.default.get(record, rowkey))) {
|
|
8156
|
+
index.default.set(record, rowkey, util.getRowUniqueId());
|
|
8186
8157
|
}
|
|
8187
8158
|
return record;
|
|
8188
8159
|
});
|
|
@@ -8195,12 +8166,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8195
8166
|
if (force) {
|
|
8196
8167
|
updateAfterFullData();
|
|
8197
8168
|
fullList = handleVirtualTreeToList();
|
|
8198
|
-
internalData.mergeHeaderRowMaps = {};
|
|
8199
|
-
internalData.mergeHeaderColMaps = {};
|
|
8200
|
-
internalData.mergeBodyRowMaps = {};
|
|
8201
|
-
internalData.mergeBodyColMaps = {};
|
|
8202
|
-
internalData.mergeFooterRowMaps = {};
|
|
8203
|
-
internalData.mergeFooterColMaps = {};
|
|
8204
8169
|
}
|
|
8205
8170
|
const tableData = scrollYLoad ? fullList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullList.slice(0);
|
|
8206
8171
|
const visibleDataRowIdMaps = {};
|
|
@@ -8230,13 +8195,13 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8230
8195
|
const fullDataRowIdMaps = {};
|
|
8231
8196
|
const idMaps = {};
|
|
8232
8197
|
const { handleUpdateRowId } = util.createHandleUpdateRowId($xeTable);
|
|
8233
|
-
const handleRowCache = (row,
|
|
8198
|
+
const handleRowCache = (row, index2, items, currIndex, parentRow, rowid, level, seq) => {
|
|
8234
8199
|
let rowRest = fullAllDataRowIdMaps[rowid];
|
|
8235
8200
|
if (idMaps[rowid]) {
|
|
8236
8201
|
log.errLog("vxe.error.repeatKey", [currKeyField, rowid]);
|
|
8237
8202
|
}
|
|
8238
8203
|
if (!rowRest) {
|
|
8239
|
-
rowRest = { row, rowid, seq, index: -1, _index: -1, $index: -1, treeIndex:
|
|
8204
|
+
rowRest = { row, rowid, seq, index: -1, _index: -1, $index: -1, treeIndex: index2, _tIndex: -1, items, parent: parentRow, level, height: 0, resizeHeight: 0, oTop: 0, expandHeight: 0 };
|
|
8240
8205
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
8241
8206
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
8242
8207
|
}
|
|
@@ -8247,7 +8212,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8247
8212
|
rowRest.parent = parentRow;
|
|
8248
8213
|
rowRest.level = level;
|
|
8249
8214
|
rowRest.index = currIndex;
|
|
8250
|
-
rowRest.treeIndex =
|
|
8215
|
+
rowRest.treeIndex = index2;
|
|
8251
8216
|
if (selectCheckboxMaps[rowid]) {
|
|
8252
8217
|
selectCheckboxMaps[rowid] = row;
|
|
8253
8218
|
}
|
|
@@ -8263,7 +8228,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8263
8228
|
const { lazy } = treeOpts;
|
|
8264
8229
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
8265
8230
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
8266
|
-
|
|
8231
|
+
index.default.eachTree(tableFullTreeData, (row, index2, items, path, parentRow, nodes) => {
|
|
8267
8232
|
const rowid = handleUpdateRowId(row);
|
|
8268
8233
|
if (treeConfig && lazy) {
|
|
8269
8234
|
if (row[hasChildField] && row[childrenField] === void 0) {
|
|
@@ -8275,18 +8240,18 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8275
8240
|
}
|
|
8276
8241
|
}
|
|
8277
8242
|
}
|
|
8278
|
-
handleRowCache(row,
|
|
8243
|
+
handleRowCache(row, index2, items, parentRow ? -1 : index2, parentRow, rowid, nodes.length - 1, util.toTreePathSeq(path));
|
|
8279
8244
|
}, { children: childrenField });
|
|
8280
8245
|
} else if (isRowGroupStatus) {
|
|
8281
8246
|
const aggregateOpts = computeAggregateOpts.value;
|
|
8282
8247
|
const { mapChildrenField } = aggregateOpts;
|
|
8283
|
-
|
|
8248
|
+
index.default.eachTree(tableFullGroupData, (row, index2, items, path, parentRow, nodes) => {
|
|
8284
8249
|
const rowid = handleUpdateRowId(row);
|
|
8285
|
-
handleRowCache(row,
|
|
8250
|
+
handleRowCache(row, index2, items, parentRow ? -1 : index2, parentRow, rowid, nodes.length - 1, util.toTreePathSeq(path));
|
|
8286
8251
|
}, { children: mapChildrenField });
|
|
8287
8252
|
} else {
|
|
8288
|
-
tableFullData.forEach((row,
|
|
8289
|
-
handleRowCache(row,
|
|
8253
|
+
tableFullData.forEach((row, index2, items) => {
|
|
8254
|
+
handleRowCache(row, index2, items, index2, null, handleUpdateRowId(row), 0, index2 + 1);
|
|
8290
8255
|
});
|
|
8291
8256
|
}
|
|
8292
8257
|
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
@@ -8296,7 +8261,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8296
8261
|
cacheSourceMap(fullData) {
|
|
8297
8262
|
const { treeConfig } = props$1;
|
|
8298
8263
|
const treeOpts = computeTreeOpts.value;
|
|
8299
|
-
const sourceData =
|
|
8264
|
+
const sourceData = index.default.clone(fullData, true);
|
|
8300
8265
|
const { handleUpdateRowId } = util.createHandleUpdateRowId($xeTable);
|
|
8301
8266
|
const sourceRowIdData = {};
|
|
8302
8267
|
const handleSourceRow = (row) => {
|
|
@@ -8305,7 +8270,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8305
8270
|
};
|
|
8306
8271
|
if (treeConfig) {
|
|
8307
8272
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
8308
|
-
|
|
8273
|
+
index.default.eachTree(sourceData, handleSourceRow, { children: treeOpts.transform ? treeOpts.mapChildrenField : childrenField });
|
|
8309
8274
|
} else {
|
|
8310
8275
|
sourceData.forEach(handleSourceRow);
|
|
8311
8276
|
}
|
|
@@ -8396,14 +8361,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8396
8361
|
if (!cell2) {
|
|
8397
8362
|
return;
|
|
8398
8363
|
}
|
|
8399
|
-
const cellParams =
|
|
8364
|
+
const cellParams = index.default.assign(params, { cell: cell2, $table: $xeTable });
|
|
8400
8365
|
let dragLeft = 0;
|
|
8401
8366
|
const tableRect = tableEl.getBoundingClientRect();
|
|
8402
8367
|
const rightContainerRect = rightContainerElem ? rightContainerElem.getBoundingClientRect() : null;
|
|
8403
8368
|
const cellRect = cell2.getBoundingClientRect();
|
|
8404
8369
|
const dragBtnRect = dragBtnElem.getBoundingClientRect();
|
|
8405
8370
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
8406
|
-
const dragBtnOffsetWidth =
|
|
8371
|
+
const dragBtnOffsetWidth = index.default.floor(dragBtnWidth / 2);
|
|
8407
8372
|
const dragPosLeft = dragBtnRect.x - tableRect.x + dragBtnOffsetWidth;
|
|
8408
8373
|
const minInterval = util.getColReMinWidth(cellParams) - dragBtnOffsetWidth;
|
|
8409
8374
|
const dragMinLeft = isRightFixed ? 0 : cellRect.x - tableRect.x + dragBtnWidth + minInterval;
|
|
@@ -8510,7 +8475,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8510
8475
|
const { column } = params;
|
|
8511
8476
|
let resizeColumn = column;
|
|
8512
8477
|
if (column.children && column.children.length) {
|
|
8513
|
-
|
|
8478
|
+
index.default.eachTree(column.children, (childColumn) => {
|
|
8514
8479
|
resizeColumn = childColumn;
|
|
8515
8480
|
});
|
|
8516
8481
|
}
|
|
@@ -8590,7 +8555,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8590
8555
|
let cellMinHeight = 0;
|
|
8591
8556
|
if (cellEl) {
|
|
8592
8557
|
const cellStyle = getComputedStyle(cellEl);
|
|
8593
|
-
cellMinHeight = Math.max(1, Math.ceil(
|
|
8558
|
+
cellMinHeight = Math.max(1, Math.ceil(index.default.toNumber(cellStyle.paddingTop) + index.default.toNumber(cellStyle.paddingBottom)));
|
|
8594
8559
|
}
|
|
8595
8560
|
const minTop = trRect.y - tableRect.y + cellMinHeight;
|
|
8596
8561
|
const updateEvent = (evnt2) => {
|
|
@@ -8716,7 +8681,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8716
8681
|
fixedData: {},
|
|
8717
8682
|
aggGroupData: {},
|
|
8718
8683
|
aggFuncData: {}
|
|
8719
|
-
} :
|
|
8684
|
+
} : tableMethods.getCustomStoreData();
|
|
8720
8685
|
if (updateStore) {
|
|
8721
8686
|
return updateStore({
|
|
8722
8687
|
$table: $xeTable,
|
|
@@ -8741,8 +8706,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8741
8706
|
$xeTable.clearCopyCellArea();
|
|
8742
8707
|
}
|
|
8743
8708
|
}
|
|
8744
|
-
|
|
8745
|
-
return
|
|
8709
|
+
tablePrivateMethods.analyColumnWidth();
|
|
8710
|
+
return tableMethods.refreshColumn(true);
|
|
8746
8711
|
},
|
|
8747
8712
|
handleUpdateDataQueue() {
|
|
8748
8713
|
reactData.upDataFlag++;
|
|
@@ -8821,7 +8786,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8821
8786
|
if (isRowGroupStatus) {
|
|
8822
8787
|
const mapChildrenField = aggregateOpts.mapChildrenField;
|
|
8823
8788
|
if (mapChildrenField) {
|
|
8824
|
-
|
|
8789
|
+
index.default.eachTree(afterGroupFullData, (row) => {
|
|
8825
8790
|
const rowid = handleGetRowId(row);
|
|
8826
8791
|
const childList = row[mapChildrenField];
|
|
8827
8792
|
if (childList && childList.length && !childRowMaps[rowid]) {
|
|
@@ -8832,7 +8797,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8832
8797
|
}
|
|
8833
8798
|
} else if (treeConfig) {
|
|
8834
8799
|
const { transform, mapChildrenField } = treeOpts;
|
|
8835
|
-
|
|
8800
|
+
index.default.eachTree(afterTreeFullData, (row) => {
|
|
8836
8801
|
const rowid = handleGetRowId(row);
|
|
8837
8802
|
const childList = row[transform ? mapChildrenField : childrenField];
|
|
8838
8803
|
if (childList && childList.length && !childRowMaps[rowid]) {
|
|
@@ -8840,7 +8805,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8840
8805
|
childRowList.unshift([row, rowid, childList]);
|
|
8841
8806
|
} else {
|
|
8842
8807
|
if (indeterminateField) {
|
|
8843
|
-
|
|
8808
|
+
index.default.set(row, indeterminateField, false);
|
|
8844
8809
|
}
|
|
8845
8810
|
}
|
|
8846
8811
|
}, { children: transform ? mapChildrenField : childrenField });
|
|
@@ -8855,7 +8820,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8855
8820
|
const cLen = childList.length;
|
|
8856
8821
|
childList.forEach(checkMethod ? (item) => {
|
|
8857
8822
|
const childRowid = handleGetRowId(item);
|
|
8858
|
-
const isSelect = checkField ?
|
|
8823
|
+
const isSelect = checkField ? index.default.get(item, checkField) : selectCheckboxMaps[childRowid];
|
|
8859
8824
|
if (checkMethod({ $table: $xeTable, row: item })) {
|
|
8860
8825
|
if (isSelect) {
|
|
8861
8826
|
sLen++;
|
|
@@ -8872,7 +8837,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8872
8837
|
}
|
|
8873
8838
|
} : (item) => {
|
|
8874
8839
|
const childRowid = handleGetRowId(item);
|
|
8875
|
-
const isSelect = checkField ?
|
|
8840
|
+
const isSelect = checkField ? index.default.get(item, checkField) : selectCheckboxMaps[childRowid];
|
|
8876
8841
|
if (isSelect) {
|
|
8877
8842
|
sLen++;
|
|
8878
8843
|
} else if (treeIndeterminateRowMaps[childRowid]) {
|
|
@@ -8898,10 +8863,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8898
8863
|
}
|
|
8899
8864
|
const halfSelect = !isSelected && (sLen > 0 || hLen > 0);
|
|
8900
8865
|
if (checkField) {
|
|
8901
|
-
|
|
8866
|
+
index.default.set(row, checkField, isSelected);
|
|
8902
8867
|
}
|
|
8903
8868
|
if (indeterminateField) {
|
|
8904
|
-
|
|
8869
|
+
index.default.set(row, indeterminateField, halfSelect);
|
|
8905
8870
|
}
|
|
8906
8871
|
if (isSelected) {
|
|
8907
8872
|
if (!checkField) {
|
|
@@ -8945,7 +8910,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8945
8910
|
const rootList = treeConfig ? afterTreeFullData : isRowGroupStatus ? afterGroupFullData : afterFullData;
|
|
8946
8911
|
rootList.forEach(checkMethod ? (row) => {
|
|
8947
8912
|
const childRowid = handleGetRowId(row);
|
|
8948
|
-
const selected = checkField ?
|
|
8913
|
+
const selected = checkField ? index.default.get(row, checkField) : selectCheckboxMaps[childRowid];
|
|
8949
8914
|
if (isRowGroupStatus && $xeTable.isAggregateRecord(row)) {
|
|
8950
8915
|
const childList = row[mapChildrenField || ""];
|
|
8951
8916
|
if (selected) {
|
|
@@ -8973,7 +8938,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8973
8938
|
}
|
|
8974
8939
|
} : (row) => {
|
|
8975
8940
|
const childRowid = handleGetRowId(row);
|
|
8976
|
-
const selected = checkField ?
|
|
8941
|
+
const selected = checkField ? index.default.get(row, checkField) : selectCheckboxMaps[childRowid];
|
|
8977
8942
|
if (selected) {
|
|
8978
8943
|
sLen++;
|
|
8979
8944
|
} else if (treeIndeterminateRowMaps[childRowid]) {
|
|
@@ -8984,7 +8949,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8984
8949
|
const isSelected = rootList.length > 0 ? vLen > 0 ? sLen >= vLen : sLen >= rootList.length : false;
|
|
8985
8950
|
let halfSelect = !isSelected && (sLen > 0 || hLen > 0 || dsLen > 0 || dhLen > 0);
|
|
8986
8951
|
if (!isSelected && !halfSelect && showReserveStatus) {
|
|
8987
|
-
halfSelect = !
|
|
8952
|
+
halfSelect = !index.default.isEmpty(checkboxReserveRowMap);
|
|
8988
8953
|
}
|
|
8989
8954
|
reactData.isAllSelected = isSelected;
|
|
8990
8955
|
reactData.isIndeterminate = halfSelect;
|
|
@@ -9011,11 +8976,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9011
8976
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
|
|
9012
8977
|
if (checkField) {
|
|
9013
8978
|
if ((treeConfig || isRowGroupStatus) && !checkStrictly) {
|
|
9014
|
-
|
|
8979
|
+
index.default.eachTree(rows, (row) => {
|
|
9015
8980
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
9016
|
-
|
|
8981
|
+
index.default.set(row, checkField, checked);
|
|
9017
8982
|
if (indeterminateField) {
|
|
9018
|
-
|
|
8983
|
+
index.default.set(row, indeterminateField, false);
|
|
9019
8984
|
}
|
|
9020
8985
|
handleCheckboxReserveRow(row, checked);
|
|
9021
8986
|
}
|
|
@@ -9025,7 +8990,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9025
8990
|
}
|
|
9026
8991
|
rows.forEach((row) => {
|
|
9027
8992
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
9028
|
-
|
|
8993
|
+
index.default.set(row, checkField, checked);
|
|
9029
8994
|
handleCheckboxReserveRow(row, checked);
|
|
9030
8995
|
}
|
|
9031
8996
|
});
|
|
@@ -9034,7 +8999,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9034
8999
|
}
|
|
9035
9000
|
if (!checkStrictly) {
|
|
9036
9001
|
if (isRowGroupStatus) {
|
|
9037
|
-
|
|
9002
|
+
index.default.eachTree(rows, (row) => {
|
|
9038
9003
|
const rowid = handleGetRowId(row);
|
|
9039
9004
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
9040
9005
|
if (checked) {
|
|
@@ -9050,7 +9015,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9050
9015
|
reactData.updateCheckboxFlag++;
|
|
9051
9016
|
return;
|
|
9052
9017
|
} else if (treeConfig) {
|
|
9053
|
-
|
|
9018
|
+
index.default.eachTree(rows, (row) => {
|
|
9054
9019
|
const rowid = handleGetRowId(row);
|
|
9055
9020
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
9056
9021
|
if (checked) {
|
|
@@ -9091,31 +9056,22 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9091
9056
|
handleSelectRow({ row }, checked, isForce) {
|
|
9092
9057
|
$xeTable.handleBatchSelectRows([row], checked, isForce);
|
|
9093
9058
|
},
|
|
9094
|
-
handleUpdateHeaderMerge() {
|
|
9095
|
-
const { mergeHeaderList } = internalData;
|
|
9096
|
-
const { mergeMaps, mergeRowMaps, mergeColMaps } = buildMergeData(mergeHeaderList);
|
|
9097
|
-
internalData.mergeHeaderCellMaps = mergeMaps;
|
|
9098
|
-
internalData.mergeHeaderRowMaps = mergeRowMaps;
|
|
9099
|
-
internalData.mergeHeaderColMaps = mergeColMaps;
|
|
9100
|
-
reactData.mergeHeadFlag++;
|
|
9101
|
-
},
|
|
9102
9059
|
/**
|
|
9103
9060
|
* 处理合并
|
|
9104
9061
|
*/
|
|
9105
9062
|
handleUpdateBodyMerge() {
|
|
9106
9063
|
const { mergeBodyList } = internalData;
|
|
9107
|
-
|
|
9108
|
-
internalData.mergeBodyCellMaps = mergeMaps;
|
|
9109
|
-
internalData.mergeBodyRowMaps = mergeRowMaps;
|
|
9110
|
-
internalData.mergeBodyColMaps = mergeColMaps;
|
|
9064
|
+
internalData.mergeBodyCellMaps = buildMergeData(mergeBodyList);
|
|
9111
9065
|
reactData.mergeBodyFlag++;
|
|
9112
9066
|
},
|
|
9067
|
+
handleUpdateHeaderMerge() {
|
|
9068
|
+
const { mergeHeaderList } = internalData;
|
|
9069
|
+
internalData.mergeHeaderCellMaps = buildMergeData(mergeHeaderList);
|
|
9070
|
+
reactData.mergeHeadFlag++;
|
|
9071
|
+
},
|
|
9113
9072
|
handleUpdateFooterMerge() {
|
|
9114
9073
|
const { mergeFooterList } = internalData;
|
|
9115
|
-
|
|
9116
|
-
internalData.mergeFooterCellMaps = mergeMaps;
|
|
9117
|
-
internalData.mergeFooterRowMaps = mergeRowMaps;
|
|
9118
|
-
internalData.mergeFooterColMaps = mergeColMaps;
|
|
9074
|
+
internalData.mergeFooterCellMaps = buildMergeData(mergeFooterList);
|
|
9119
9075
|
reactData.mergeFootFlag++;
|
|
9120
9076
|
},
|
|
9121
9077
|
handleAggregateSummaryData() {
|
|
@@ -9255,10 +9211,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9255
9211
|
if (sortOpts.trigger === "cell" && !(triggerResizable || triggerSort || triggerFilter)) {
|
|
9256
9212
|
$xeTable.triggerSortEvent(evnt, column, getNextSortOrder(column));
|
|
9257
9213
|
}
|
|
9258
|
-
if ($xeGantt) {
|
|
9259
|
-
const ganttReactData = $xeGantt.reactData;
|
|
9260
|
-
ganttReactData.activeBarRowid = null;
|
|
9261
|
-
}
|
|
9262
9214
|
dispatchEvent("header-cell-click", Object.assign({ triggerResizable, triggerSort, triggerFilter, cell: cell2 }, params), evnt);
|
|
9263
9215
|
if ((columnOpts.isCurrent || props$1.highlightCurrentColumn) && (!currentColumnOpts.trigger || ["header", "default"].includes(currentColumnOpts.trigger))) {
|
|
9264
9216
|
$xeTable.triggerCurrentColumnEvent(evnt, params);
|
|
@@ -9364,10 +9316,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9364
9316
|
}
|
|
9365
9317
|
}
|
|
9366
9318
|
}
|
|
9367
|
-
if ($xeGantt) {
|
|
9368
|
-
const ganttReactData = $xeGantt.reactData;
|
|
9369
|
-
ganttReactData.activeBarRowid = null;
|
|
9370
|
-
}
|
|
9371
9319
|
dispatchEvent("cell-click", params, evnt);
|
|
9372
9320
|
},
|
|
9373
9321
|
/**
|
|
@@ -9397,20 +9345,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9397
9345
|
}
|
|
9398
9346
|
dispatchEvent("cell-dblclick", params, evnt);
|
|
9399
9347
|
},
|
|
9400
|
-
triggerFooterCellClickEvent(evnt, params) {
|
|
9401
|
-
const cell2 = evnt.currentTarget;
|
|
9402
|
-
params = Object.assign({ cell: cell2 }, params);
|
|
9403
|
-
if ($xeGantt) {
|
|
9404
|
-
const ganttReactData = $xeGantt.reactData;
|
|
9405
|
-
ganttReactData.activeBarRowid = null;
|
|
9406
|
-
}
|
|
9407
|
-
$xeTable.dispatchEvent("footer-cell-click", params, evnt);
|
|
9408
|
-
},
|
|
9409
|
-
triggerFooterCellDblclickEvent(evnt, params) {
|
|
9410
|
-
const cell2 = evnt.currentTarget;
|
|
9411
|
-
params = Object.assign({ cell: cell2 }, params);
|
|
9412
|
-
$xeTable.dispatchEvent("footer-cell-dblclick", params, evnt);
|
|
9413
|
-
},
|
|
9414
9348
|
handleToggleCheckRowEvent(evnt, params) {
|
|
9415
9349
|
const { selectCheckboxMaps } = internalData;
|
|
9416
9350
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
@@ -9421,7 +9355,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9421
9355
|
}
|
|
9422
9356
|
let checked = false;
|
|
9423
9357
|
if (checkField) {
|
|
9424
|
-
checked = !
|
|
9358
|
+
checked = !index.default.get(row, checkField);
|
|
9425
9359
|
} else {
|
|
9426
9360
|
checked = !selectCheckboxMaps[util.getRowid($xeTable, row)];
|
|
9427
9361
|
}
|
|
@@ -9492,7 +9426,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9492
9426
|
const { selectRadioRow: oldValue } = reactData;
|
|
9493
9427
|
const { row } = params;
|
|
9494
9428
|
const radioOpts = computeRadioOpts.value;
|
|
9495
|
-
const { trigger,
|
|
9429
|
+
const { trigger, checkMethod } = radioOpts;
|
|
9496
9430
|
if (trigger === "manual") {
|
|
9497
9431
|
return;
|
|
9498
9432
|
}
|
|
@@ -9500,22 +9434,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9500
9434
|
if (!checkMethod || checkMethod({ $table: $xeTable, row })) {
|
|
9501
9435
|
let newValue = row;
|
|
9502
9436
|
let isChange = oldValue !== newValue;
|
|
9503
|
-
if (
|
|
9437
|
+
if (isChange) {
|
|
9504
9438
|
handleCheckedRadioRow(newValue);
|
|
9505
|
-
} else {
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
}
|
|
9509
|
-
isChange = oldValue !== newValue;
|
|
9510
|
-
if (isChange && newValue) {
|
|
9511
|
-
handleCheckedRadioRow(newValue);
|
|
9512
|
-
} else {
|
|
9439
|
+
} else if (!radioOpts.strict) {
|
|
9440
|
+
isChange = oldValue === newValue;
|
|
9441
|
+
if (isChange) {
|
|
9513
9442
|
newValue = null;
|
|
9514
9443
|
$xeTable.clearRadioRow();
|
|
9515
9444
|
}
|
|
9516
9445
|
}
|
|
9517
9446
|
if (isChange) {
|
|
9518
|
-
dispatchEvent("radio-change", Object.assign({ oldValue, newValue
|
|
9447
|
+
dispatchEvent("radio-change", Object.assign({ oldValue, newValue }, params), evnt);
|
|
9519
9448
|
}
|
|
9520
9449
|
}
|
|
9521
9450
|
},
|
|
@@ -9524,29 +9453,16 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9524
9453
|
const columnOpts = computeColumnOpts.value;
|
|
9525
9454
|
const currentColumnOpts = computeCurrentColumnOpts.value;
|
|
9526
9455
|
const beforeRowMethod = currentColumnOpts.beforeSelectMethod || columnOpts.currentMethod;
|
|
9527
|
-
|
|
9528
|
-
const { trigger
|
|
9456
|
+
const { column: newValue } = params;
|
|
9457
|
+
const { trigger } = currentColumnOpts;
|
|
9529
9458
|
if (trigger === "manual") {
|
|
9530
9459
|
return;
|
|
9531
9460
|
}
|
|
9532
|
-
|
|
9461
|
+
const isChange = oldValue !== newValue;
|
|
9533
9462
|
if (!beforeRowMethod || beforeRowMethod({ column: newValue, $table: $xeTable })) {
|
|
9534
|
-
|
|
9535
|
-
$xeTable.setCurrentColumn(newValue);
|
|
9536
|
-
} else {
|
|
9537
|
-
if (oldValue === newValue) {
|
|
9538
|
-
newValue = null;
|
|
9539
|
-
}
|
|
9540
|
-
isChange = oldValue !== newValue;
|
|
9541
|
-
if (isChange && newValue) {
|
|
9542
|
-
$xeTable.setCurrentColumn(newValue);
|
|
9543
|
-
} else {
|
|
9544
|
-
newValue = null;
|
|
9545
|
-
$xeTable.clearCurrentColumn();
|
|
9546
|
-
}
|
|
9547
|
-
}
|
|
9463
|
+
$xeTable.setCurrentColumn(newValue);
|
|
9548
9464
|
if (isChange) {
|
|
9549
|
-
dispatchEvent("current-column-change", Object.assign({ oldValue, newValue
|
|
9465
|
+
dispatchEvent("current-column-change", Object.assign({ oldValue, newValue }, params), evnt);
|
|
9550
9466
|
}
|
|
9551
9467
|
} else {
|
|
9552
9468
|
dispatchEvent("current-column-disabled", params, evnt);
|
|
@@ -9557,29 +9473,16 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9557
9473
|
const rowOpts = computeRowOpts.value;
|
|
9558
9474
|
const currentRowOpts = computeCurrentRowOpts.value;
|
|
9559
9475
|
const beforeRowMethod = currentRowOpts.beforeSelectMethod || rowOpts.currentMethod;
|
|
9560
|
-
|
|
9561
|
-
const { trigger
|
|
9476
|
+
const { row: newValue } = params;
|
|
9477
|
+
const { trigger } = currentRowOpts;
|
|
9562
9478
|
if (trigger === "manual") {
|
|
9563
9479
|
return;
|
|
9564
9480
|
}
|
|
9565
|
-
|
|
9481
|
+
const isChange = oldValue !== newValue;
|
|
9566
9482
|
if (!beforeRowMethod || beforeRowMethod({ row: newValue, $table: $xeTable })) {
|
|
9567
|
-
|
|
9568
|
-
$xeTable.setCurrentRow(newValue);
|
|
9569
|
-
} else {
|
|
9570
|
-
if (oldValue === newValue) {
|
|
9571
|
-
newValue = null;
|
|
9572
|
-
}
|
|
9573
|
-
isChange = oldValue !== newValue;
|
|
9574
|
-
if (isChange && newValue) {
|
|
9575
|
-
$xeTable.setCurrentRow(newValue);
|
|
9576
|
-
} else {
|
|
9577
|
-
newValue = null;
|
|
9578
|
-
$xeTable.clearCurrentRow();
|
|
9579
|
-
}
|
|
9580
|
-
}
|
|
9483
|
+
$xeTable.setCurrentRow(newValue);
|
|
9581
9484
|
if (isChange) {
|
|
9582
|
-
dispatchEvent("current-row-change", Object.assign({ oldValue, newValue
|
|
9485
|
+
dispatchEvent("current-row-change", Object.assign({ oldValue, newValue }, params), evnt);
|
|
9583
9486
|
dispatchEvent("current-change", Object.assign({ oldValue, newValue }, params), evnt);
|
|
9584
9487
|
}
|
|
9585
9488
|
} else {
|
|
@@ -9671,7 +9574,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9671
9574
|
const mouseOpts = computeMouseOpts.value;
|
|
9672
9575
|
const { field, sortable, order } = column;
|
|
9673
9576
|
if (sortable) {
|
|
9674
|
-
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList:
|
|
9577
|
+
const params = { $table: $xeTable, $event: evnt, column, field, property: field, order, sortList: tableMethods.getSortColumns(), sortTime: column.sortTime };
|
|
9675
9578
|
if (mouseConfig && mouseOpts.area && $xeTable.handleSortEvent) {
|
|
9676
9579
|
$xeTable.handleSortEvent(evnt, params);
|
|
9677
9580
|
}
|
|
@@ -9706,7 +9609,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9706
9609
|
if ($xeTable.hasCellRules(type, row, column)) {
|
|
9707
9610
|
const cell2 = $xeTable.getCellElement(row, column);
|
|
9708
9611
|
if (cell2) {
|
|
9709
|
-
const customVal = !
|
|
9612
|
+
const customVal = !index.default.isUndefined(cellValue);
|
|
9710
9613
|
return $xeTable.validCellRules(type, row, column, cellValue).then(() => {
|
|
9711
9614
|
if (customVal && validStore.visible) {
|
|
9712
9615
|
util.setCellValue(row, column, cellValue);
|
|
@@ -9858,7 +9761,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9858
9761
|
if (oldRest && newRest) {
|
|
9859
9762
|
const { level: oldLevel } = oldRest;
|
|
9860
9763
|
const { level: newLevel } = newRest;
|
|
9861
|
-
|
|
9764
|
+
index.default.eachTree([dragRow], (item) => {
|
|
9862
9765
|
oldAllMaps[util.getRowid($xeTable, item)] = item;
|
|
9863
9766
|
}, { children: mapChildrenField });
|
|
9864
9767
|
if (oldLevel && newLevel) {
|
|
@@ -9921,8 +9824,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9921
9824
|
if (treeConfig) {
|
|
9922
9825
|
if (transform) {
|
|
9923
9826
|
if (oldRest && newRest) {
|
|
9924
|
-
const fullList =
|
|
9925
|
-
updated: false,
|
|
9827
|
+
const fullList = index.default.toTreeArray(internalData.afterTreeFullData, {
|
|
9926
9828
|
key: rowField,
|
|
9927
9829
|
parentKey: parentField,
|
|
9928
9830
|
children: mapChildrenField
|
|
@@ -9933,12 +9835,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9933
9835
|
const ntfIndex = ptfIndex + dragOffsetIndex;
|
|
9934
9836
|
fullList.splice(ntfIndex, 0, dragRow);
|
|
9935
9837
|
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
9936
|
-
|
|
9838
|
+
index.default.each(dragRow[childrenField], (childRow) => {
|
|
9937
9839
|
childRow[parentField] = dragRow[parentField];
|
|
9938
9840
|
});
|
|
9939
9841
|
}
|
|
9940
9842
|
dragRow[parentField] = isDragToChildFlag ? prevDragRow[rowField] : prevDragRow[parentField];
|
|
9941
|
-
internalData.tableFullTreeData =
|
|
9843
|
+
internalData.tableFullTreeData = index.default.toArrayTree(fullList, {
|
|
9942
9844
|
key: rowField,
|
|
9943
9845
|
parentKey: parentField,
|
|
9944
9846
|
children: childrenField,
|
|
@@ -10096,7 +9998,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10096
9998
|
rsIndex = dragRowRest.$index;
|
|
10097
9999
|
}
|
|
10098
10000
|
const dragRangeList = rsIndex > -1 && rsIndex < tableData.length - 1 ? tableData.slice(rsIndex + 1) : [];
|
|
10099
|
-
const dragList =
|
|
10001
|
+
const dragList = index.default.toTreeArray([dragRow], {
|
|
10100
10002
|
updated: true,
|
|
10101
10003
|
children: mapChildrenField
|
|
10102
10004
|
});
|
|
@@ -10203,7 +10105,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10203
10105
|
}
|
|
10204
10106
|
let insertRest = Promise.resolve();
|
|
10205
10107
|
if (treeConfig) {
|
|
10206
|
-
const dragList =
|
|
10108
|
+
const dragList = index.default.toTreeArray([dragRow], {
|
|
10207
10109
|
updated: true,
|
|
10208
10110
|
children: mapChildrenField
|
|
10209
10111
|
});
|
|
@@ -10460,7 +10362,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10460
10362
|
const dragAllTargetCols = [];
|
|
10461
10363
|
let dragColWidth = 0;
|
|
10462
10364
|
if (animation) {
|
|
10463
|
-
|
|
10365
|
+
index.default.eachTree([dragColumn], (column) => {
|
|
10464
10366
|
if (!dragTargetColumn && (!column.children || !column.children.length)) {
|
|
10465
10367
|
dragTargetColumn = column;
|
|
10466
10368
|
dragColWidth += column.renderWidth;
|
|
@@ -10483,7 +10385,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10483
10385
|
let oafIndex = -1;
|
|
10484
10386
|
let nafIndex = -1;
|
|
10485
10387
|
const oldAllMaps = {};
|
|
10486
|
-
|
|
10388
|
+
index.default.eachTree([dragColumn], (column) => {
|
|
10487
10389
|
oldAllMaps[column.id] = column;
|
|
10488
10390
|
});
|
|
10489
10391
|
let isSelfToChildStatus = false;
|
|
@@ -10541,7 +10443,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10541
10443
|
if (!status) {
|
|
10542
10444
|
return errRest;
|
|
10543
10445
|
}
|
|
10544
|
-
const oldewMatchRest =
|
|
10446
|
+
const oldewMatchRest = index.default.findTree(collectColumn, (item) => item.id === dragColumn.id);
|
|
10545
10447
|
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
10546
10448
|
if (oldewMatchRest) {
|
|
10547
10449
|
const { items: oCols, index: oIndex } = oldewMatchRest;
|
|
@@ -10561,7 +10463,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10561
10463
|
}
|
|
10562
10464
|
}
|
|
10563
10465
|
}
|
|
10564
|
-
const newMatchRest =
|
|
10466
|
+
const newMatchRest = index.default.findTree(collectColumn, (item) => item.id === newColumn.id);
|
|
10565
10467
|
if (newMatchRest) {
|
|
10566
10468
|
const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
|
|
10567
10469
|
if (isCrossDrag && isToChildDrag && isDragToChildFlag) {
|
|
@@ -10575,9 +10477,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10575
10477
|
nafIndex = nIndex;
|
|
10576
10478
|
}
|
|
10577
10479
|
}
|
|
10578
|
-
|
|
10480
|
+
index.default.eachTree(collectColumn, (column, index2, items, path, parentColumn) => {
|
|
10579
10481
|
if (!parentColumn) {
|
|
10580
|
-
const sortIndex =
|
|
10482
|
+
const sortIndex = index2 + 1;
|
|
10581
10483
|
column.renderSortNumber = sortIndex;
|
|
10582
10484
|
}
|
|
10583
10485
|
});
|
|
@@ -10614,7 +10516,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10614
10516
|
const { visibleColumn, fullColumnIdData: fullColumnIdData2 } = internalData;
|
|
10615
10517
|
let dragNewColumn = null;
|
|
10616
10518
|
const dragNewColMaps = {};
|
|
10617
|
-
|
|
10519
|
+
index.default.eachTree([dragColumn], (column) => {
|
|
10618
10520
|
if (!dragNewColumn && (!column.children || !column.children.length)) {
|
|
10619
10521
|
dragNewColumn = column;
|
|
10620
10522
|
}
|
|
@@ -10624,7 +10526,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10624
10526
|
dragNewColumn = dragColumn;
|
|
10625
10527
|
}
|
|
10626
10528
|
if (dragColWidth && dragAllTargetCols.length) {
|
|
10627
|
-
const _newColIndex =
|
|
10529
|
+
const _newColIndex = index.default.findIndexOf(visibleColumn, (column) => !!dragNewColumn && column.id === dragNewColumn.id);
|
|
10628
10530
|
const firstCol = tableColumn[0];
|
|
10629
10531
|
const firstColRest = fullColumnIdData2[firstCol.id];
|
|
10630
10532
|
if (firstColRest) {
|
|
@@ -10660,7 +10562,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10660
10562
|
dragRangeList.push(column);
|
|
10661
10563
|
}
|
|
10662
10564
|
}
|
|
10663
|
-
|
|
10565
|
+
index.default.eachTree([newColumn], (column) => {
|
|
10664
10566
|
if (!dragRangeMaps[column.id]) {
|
|
10665
10567
|
dragRangeMaps[column.id] = column;
|
|
10666
10568
|
dragRangeList.push(column);
|
|
@@ -10855,7 +10757,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10855
10757
|
}
|
|
10856
10758
|
internalData.lastScrollTop = scrollTop;
|
|
10857
10759
|
}
|
|
10858
|
-
|
|
10760
|
+
reactData.lastScrollTime = Date.now();
|
|
10859
10761
|
const evntParams = Object.assign({
|
|
10860
10762
|
source: sourceType,
|
|
10861
10763
|
scrollTop,
|
|
@@ -11094,7 +10996,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11094
10996
|
if (!bodyScrollElem) {
|
|
11095
10997
|
return;
|
|
11096
10998
|
}
|
|
11097
|
-
const wheelSpeed = getWheelSpeed(
|
|
10999
|
+
const wheelSpeed = getWheelSpeed(reactData.lastScrollTime);
|
|
11098
11000
|
const deltaTop = shiftKey ? 0 : deltaY * wheelSpeed;
|
|
11099
11001
|
const deltaLeft = (shiftKey ? deltaX || deltaY : deltaX) * wheelSpeed;
|
|
11100
11002
|
const currScrollTop = bodyScrollElem.scrollTop;
|
|
@@ -11142,9 +11044,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11142
11044
|
if (isRollX) {
|
|
11143
11045
|
evnt.preventDefault();
|
|
11144
11046
|
internalData.inWheelScroll = true;
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
const currLeftNum = offsetLeft;
|
|
11047
|
+
if (browseObj.firefox || browseObj.safari) {
|
|
11048
|
+
const currLeftNum = scrollLeft;
|
|
11148
11049
|
dom.setScrollLeft(xHandleEl, currLeftNum);
|
|
11149
11050
|
dom.setScrollLeft(bodyScrollElem, currLeftNum);
|
|
11150
11051
|
dom.setScrollLeft(headerScrollElem, currLeftNum);
|
|
@@ -11156,14 +11057,29 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11156
11057
|
type: "table",
|
|
11157
11058
|
fixed: ""
|
|
11158
11059
|
});
|
|
11159
|
-
}
|
|
11060
|
+
} else {
|
|
11061
|
+
wheelScrollLeftTo(scrollLeft, (offsetLeft) => {
|
|
11062
|
+
internalData.inWheelScroll = true;
|
|
11063
|
+
const currLeftNum = offsetLeft;
|
|
11064
|
+
dom.setScrollLeft(xHandleEl, currLeftNum);
|
|
11065
|
+
dom.setScrollLeft(bodyScrollElem, currLeftNum);
|
|
11066
|
+
dom.setScrollLeft(headerScrollElem, currLeftNum);
|
|
11067
|
+
dom.setScrollLeft(footerScrollElem, currLeftNum);
|
|
11068
|
+
if (scrollXLoad) {
|
|
11069
|
+
$xeTable.triggerScrollXEvent(evnt);
|
|
11070
|
+
}
|
|
11071
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, bodyScrollElem.scrollTop, currLeftNum, {
|
|
11072
|
+
type: "table",
|
|
11073
|
+
fixed: ""
|
|
11074
|
+
});
|
|
11075
|
+
});
|
|
11076
|
+
}
|
|
11160
11077
|
}
|
|
11161
11078
|
if (isRollY) {
|
|
11162
11079
|
evnt.preventDefault();
|
|
11163
11080
|
internalData.inWheelScroll = true;
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
const currTopNum = offsetTop;
|
|
11081
|
+
if (browseObj.firefox || browseObj.safari) {
|
|
11082
|
+
const currTopNum = scrollTop;
|
|
11167
11083
|
dom.setScrollTop(yHandleEl, currTopNum);
|
|
11168
11084
|
dom.setScrollTop(bodyScrollElem, currTopNum);
|
|
11169
11085
|
dom.setScrollTop(leftScrollElem, currTopNum);
|
|
@@ -11173,11 +11089,29 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11173
11089
|
if (scrollYLoad) {
|
|
11174
11090
|
$xeTable.triggerScrollYEvent(evnt);
|
|
11175
11091
|
}
|
|
11176
|
-
$xeTable.handleScrollEvent(evnt, isRollY, isRollX,
|
|
11092
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, bodyScrollElem.scrollLeft, {
|
|
11177
11093
|
type: "table",
|
|
11178
11094
|
fixed: ""
|
|
11179
11095
|
});
|
|
11180
|
-
}
|
|
11096
|
+
} else {
|
|
11097
|
+
wheelScrollTopTo(scrollTop - currScrollTop, (offsetTop) => {
|
|
11098
|
+
internalData.inWheelScroll = true;
|
|
11099
|
+
const currTopNum = bodyScrollElem.scrollTop + offsetTop;
|
|
11100
|
+
dom.setScrollTop(yHandleEl, currTopNum);
|
|
11101
|
+
dom.setScrollTop(bodyScrollElem, currTopNum);
|
|
11102
|
+
dom.setScrollTop(leftScrollElem, currTopNum);
|
|
11103
|
+
dom.setScrollTop(rightScrollElem, currTopNum);
|
|
11104
|
+
dom.setScrollTop(rowExpandEl, currTopNum);
|
|
11105
|
+
syncGanttScrollTop(currTopNum);
|
|
11106
|
+
if (scrollYLoad) {
|
|
11107
|
+
$xeTable.triggerScrollYEvent(evnt);
|
|
11108
|
+
}
|
|
11109
|
+
$xeTable.handleScrollEvent(evnt, isRollY, isRollX, currTopNum, bodyScrollElem.scrollLeft, {
|
|
11110
|
+
type: "table",
|
|
11111
|
+
fixed: ""
|
|
11112
|
+
});
|
|
11113
|
+
});
|
|
11114
|
+
}
|
|
11181
11115
|
}
|
|
11182
11116
|
},
|
|
11183
11117
|
triggerVirtualScrollXEvent(evnt) {
|
|
@@ -11265,11 +11199,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11265
11199
|
const aggregateOpts = computeAggregateOpts.value;
|
|
11266
11200
|
const treeOpts = computeTreeOpts.value;
|
|
11267
11201
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
11268
|
-
const matchObj =
|
|
11202
|
+
const matchObj = index.default.findTree(tableFullData, (item) => $xeTable.eqRow(item, row), { children: isRowGroupStatus ? aggregateOpts.mapChildrenField : childrenField });
|
|
11269
11203
|
if (matchObj) {
|
|
11270
11204
|
const nodes = matchObj.nodes;
|
|
11271
|
-
nodes.forEach((row2,
|
|
11272
|
-
if (
|
|
11205
|
+
nodes.forEach((row2, index2) => {
|
|
11206
|
+
if (index2 < nodes.length - 1 && !$xeTable.isTreeExpandByRow(row2)) {
|
|
11273
11207
|
rests.push($xeTable.setTreeExpand(row2, true));
|
|
11274
11208
|
}
|
|
11275
11209
|
});
|
|
@@ -11553,15 +11487,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11553
11487
|
* 行 hover 事件
|
|
11554
11488
|
*/
|
|
11555
11489
|
triggerHoverEvent(evnt, { row }) {
|
|
11556
|
-
|
|
11490
|
+
tablePrivateMethods.setHoverRow(row);
|
|
11557
11491
|
},
|
|
11558
11492
|
setHoverRow(row) {
|
|
11559
11493
|
const $xeGanttView = internalData.xeGanttView;
|
|
11560
11494
|
const rowid = util.getRowid($xeTable, row);
|
|
11561
11495
|
const el = refElem.value;
|
|
11562
|
-
|
|
11496
|
+
tablePrivateMethods.clearHoverRow();
|
|
11563
11497
|
if (el) {
|
|
11564
|
-
|
|
11498
|
+
index.default.arrayEach(el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]`), (elem) => dom.addClass(elem, "row--hover"));
|
|
11565
11499
|
}
|
|
11566
11500
|
internalData.hoverRow = row;
|
|
11567
11501
|
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
@@ -11572,7 +11506,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11572
11506
|
const $xeGanttView = internalData.xeGanttView;
|
|
11573
11507
|
const el = refElem.value;
|
|
11574
11508
|
if (el) {
|
|
11575
|
-
|
|
11509
|
+
index.default.arrayEach(el.querySelectorAll(".vxe-body--row.row--hover"), (elem) => dom.removeClass(elem, "row--hover"));
|
|
11576
11510
|
}
|
|
11577
11511
|
internalData.hoverRow = null;
|
|
11578
11512
|
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
@@ -11584,10 +11518,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11584
11518
|
* @deprecated
|
|
11585
11519
|
*/
|
|
11586
11520
|
getCell(row, column) {
|
|
11587
|
-
return
|
|
11521
|
+
return tableMethods.getCellElement(row, column);
|
|
11588
11522
|
},
|
|
11589
11523
|
findRowIndexOf(list, row) {
|
|
11590
|
-
return row ?
|
|
11524
|
+
return row ? index.default.findIndexOf(list, (item) => $xeTable.eqRow(item, row)) : -1;
|
|
11591
11525
|
},
|
|
11592
11526
|
eqRow(row1, row2) {
|
|
11593
11527
|
if (row1 && row2) {
|
|
@@ -11617,8 +11551,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11617
11551
|
const { overscrollBehavior: overscrollYBehavior } = scrollbarYOpts;
|
|
11618
11552
|
const isFixedLeft = fixedType === "left";
|
|
11619
11553
|
const fixedColumn = isFixedLeft ? columnStore.leftList : columnStore.rightList;
|
|
11620
|
-
const osXBehavior =
|
|
11621
|
-
const osYBehavior =
|
|
11554
|
+
const osXBehavior = index.default.eqNull(overscrollXBehavior) ? scrollbarOpts.overscrollBehavior : overscrollXBehavior;
|
|
11555
|
+
const osYBehavior = index.default.eqNull(overscrollYBehavior) ? scrollbarOpts.overscrollBehavior : overscrollYBehavior;
|
|
11622
11556
|
return vue.h("div", {
|
|
11623
11557
|
ref: isFixedLeft ? refLeftContainer : refRightContainer,
|
|
11624
11558
|
class: [`vxe-table--fixed-${fixedType}-wrapper`, `sx--${scrollbarXOpts.visible}`, `sy--${scrollbarYOpts.visible}`, {
|
|
@@ -11784,7 +11718,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11784
11718
|
cellStyle.height = `${expandHeight}px`;
|
|
11785
11719
|
}
|
|
11786
11720
|
if (isRowGroupStatus || treeConfig) {
|
|
11787
|
-
cellStyle.paddingLeft = `${rowLevel * (
|
|
11721
|
+
cellStyle.paddingLeft = `${rowLevel * (index.default.isNumber(indent) ? indent : treeOpts.indent) + 30}px`;
|
|
11788
11722
|
}
|
|
11789
11723
|
let columnIndex = -1;
|
|
11790
11724
|
let $columnIndex = -1;
|
|
@@ -11826,11 +11760,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11826
11760
|
}],
|
|
11827
11761
|
rowid,
|
|
11828
11762
|
style: cellStyle
|
|
11829
|
-
},
|
|
11830
|
-
vue.h("div", {
|
|
11831
|
-
class: "vxe-body--row-expanded-content"
|
|
11832
|
-
}, expandColumn.renderData(expandParams))
|
|
11833
|
-
]));
|
|
11763
|
+
}, expandColumn.renderData(expandParams)));
|
|
11834
11764
|
});
|
|
11835
11765
|
}
|
|
11836
11766
|
return vue.h("div", {
|
|
@@ -11914,8 +11844,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11914
11844
|
const { overscrollBehavior: overscrollXBehavior } = scrollbarXOpts;
|
|
11915
11845
|
const { overscrollBehavior: overscrollYBehavior } = scrollbarYOpts;
|
|
11916
11846
|
const { leftList, rightList } = columnStore;
|
|
11917
|
-
const osXBehavior =
|
|
11918
|
-
const osYBehavior =
|
|
11847
|
+
const osXBehavior = index.default.eqNull(overscrollXBehavior) ? scrollbarOpts.overscrollBehavior : overscrollXBehavior;
|
|
11848
|
+
const osYBehavior = index.default.eqNull(overscrollYBehavior) ? scrollbarOpts.overscrollBehavior : overscrollYBehavior;
|
|
11919
11849
|
return vue.h("div", {
|
|
11920
11850
|
ref: refTableViewportElem,
|
|
11921
11851
|
class: ["vxe-table--viewport-wrapper", {
|
|
@@ -11985,7 +11915,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11985
11915
|
footer: slots.footerTooltip || slots["footer-tooltip"]
|
|
11986
11916
|
};
|
|
11987
11917
|
const currTooltipSlot = tooltipStore.visible && tooltipStore.type ? tipSlots[tooltipStore.type] : null;
|
|
11988
|
-
const tableStyle = computeTableStyle.value;
|
|
11989
11918
|
const rowDragOpts = computeRowDragOpts.value;
|
|
11990
11919
|
const tableTipConfig = computeTableTipConfig.value;
|
|
11991
11920
|
const validTipConfig = computeValidTipConfig.value;
|
|
@@ -12006,8 +11935,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12006
11935
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
12007
11936
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
12008
11937
|
const scrollbarYToLeft = computeScrollbarYToLeft.value;
|
|
12009
|
-
const customSimpleMode = computeCustomSimpleMode.value;
|
|
12010
|
-
const showCustomSimpleOutside = customSimpleMode === "outside";
|
|
12011
11938
|
const { isCrossTableDrag } = rowDragOpts;
|
|
12012
11939
|
const tbOns = {
|
|
12013
11940
|
onKeydown: keydownEvent,
|
|
@@ -12050,7 +11977,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12050
11977
|
"not--scroll-x": !overflowX,
|
|
12051
11978
|
"is--virtual-x": scrollXLoad,
|
|
12052
11979
|
"is--virtual-y": scrollYLoad
|
|
12053
|
-
}],
|
|
11980
|
+
}], spellcheck: false }, tbOns), [
|
|
12054
11981
|
/**
|
|
12055
11982
|
* 隐藏列
|
|
12056
11983
|
*/
|
|
@@ -12145,7 +12072,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12145
12072
|
/**
|
|
12146
12073
|
* 自定义列
|
|
12147
12074
|
*/
|
|
12148
|
-
|
|
12075
|
+
initStore.custom ? vue.h(panel.default, {
|
|
12149
12076
|
key: "cs",
|
|
12150
12077
|
ref: refTableCustom,
|
|
12151
12078
|
customStore
|
|
@@ -12183,14 +12110,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12183
12110
|
vue.h("div", {
|
|
12184
12111
|
ref: refPopupWrapperElem
|
|
12185
12112
|
}, [
|
|
12186
|
-
/**
|
|
12187
|
-
* 自定义列
|
|
12188
|
-
*/
|
|
12189
|
-
showCustomSimpleOutside && initStore.custom ? vue.h(panel.default, {
|
|
12190
|
-
key: "cs",
|
|
12191
|
-
ref: refTableCustom,
|
|
12192
|
-
customStore
|
|
12193
|
-
}) : renderEmptyElement($xeTable),
|
|
12194
12113
|
/**
|
|
12195
12114
|
* 筛选
|
|
12196
12115
|
*/
|
|
@@ -12254,10 +12173,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12254
12173
|
minWidth: tableTipConfig.minWidth,
|
|
12255
12174
|
minHeight: tableTipConfig.minHeight,
|
|
12256
12175
|
maxWidth: tableTipConfig.maxWidth,
|
|
12257
|
-
maxHeight: tableTipConfig.maxHeight
|
|
12258
|
-
placement: tableTipConfig.placement,
|
|
12259
|
-
defaultPlacement: tableTipConfig.defaultPlacement,
|
|
12260
|
-
popupClassName: tableTipConfig.popupClassName
|
|
12176
|
+
maxHeight: tableTipConfig.maxHeight
|
|
12261
12177
|
}, currTooltipSlot ? {
|
|
12262
12178
|
content: () => {
|
|
12263
12179
|
const { type, row, column, content: tooltipContent } = tooltipStore;
|
|
@@ -12284,7 +12200,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12284
12200
|
/**
|
|
12285
12201
|
* 校验提示
|
|
12286
12202
|
*/
|
|
12287
|
-
props$1.editRules && validOpts.
|
|
12203
|
+
props$1.editRules && validOpts.showMessage && (validOpts.message === "default" ? !height : validOpts.message === "tooltip") ? vue.h(VxeUITooltipComponent, {
|
|
12288
12204
|
key: "vtp",
|
|
12289
12205
|
ref: refValidTooltip,
|
|
12290
12206
|
class: [{
|
|
@@ -12322,7 +12238,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12322
12238
|
if ((scrollXLoad || scrollYLoad) && (expandColumn && expandOpts.mode !== "fixed")) {
|
|
12323
12239
|
log.warnLog("vxe.error.scrollErrProp", ["column.type=expand"]);
|
|
12324
12240
|
}
|
|
12325
|
-
return
|
|
12241
|
+
return tableMethods.recalculate();
|
|
12326
12242
|
});
|
|
12327
12243
|
});
|
|
12328
12244
|
const staticColumnFlag = vue.ref(0);
|
|
@@ -12333,7 +12249,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12333
12249
|
staticColumnFlag.value++;
|
|
12334
12250
|
});
|
|
12335
12251
|
vue.watch(staticColumnFlag, () => {
|
|
12336
|
-
vue.nextTick(() => handleInitColumn(
|
|
12252
|
+
vue.nextTick(() => handleInitColumn(index.default.clone(reactData.staticColumns)));
|
|
12337
12253
|
});
|
|
12338
12254
|
const tableColumnFlag = vue.ref(0);
|
|
12339
12255
|
vue.watch(() => reactData.tableColumn.length, () => {
|
|
@@ -12343,16 +12259,16 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12343
12259
|
tableColumnFlag.value++;
|
|
12344
12260
|
});
|
|
12345
12261
|
vue.watch(tableColumnFlag, () => {
|
|
12346
|
-
|
|
12262
|
+
tablePrivateMethods.analyColumnWidth();
|
|
12347
12263
|
});
|
|
12348
12264
|
vue.watch(() => reactData.upDataFlag, () => {
|
|
12349
12265
|
vue.nextTick(() => {
|
|
12350
|
-
|
|
12266
|
+
tableMethods.updateData();
|
|
12351
12267
|
});
|
|
12352
12268
|
});
|
|
12353
12269
|
vue.watch(() => reactData.reColumnFlag, () => {
|
|
12354
12270
|
vue.nextTick(() => {
|
|
12355
|
-
|
|
12271
|
+
tableMethods.refreshColumn();
|
|
12356
12272
|
});
|
|
12357
12273
|
});
|
|
12358
12274
|
const reLayoutFlag = vue.ref(0);
|
|
@@ -12365,16 +12281,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12365
12281
|
vue.watch(() => props$1.showFooter, () => {
|
|
12366
12282
|
reLayoutFlag.value++;
|
|
12367
12283
|
});
|
|
12368
|
-
vue.watch(() => props$1.showHeaderOverflow, () => {
|
|
12369
|
-
reLayoutFlag.value++;
|
|
12370
|
-
});
|
|
12371
|
-
vue.watch(() => props$1.showOverflow, () => {
|
|
12372
|
-
updateColumnAllOverflow();
|
|
12373
|
-
reLayoutFlag.value++;
|
|
12374
|
-
});
|
|
12375
|
-
vue.watch(() => props$1.showFooterOverflow, () => {
|
|
12376
|
-
reLayoutFlag.value++;
|
|
12377
|
-
});
|
|
12378
12284
|
vue.watch(() => reactData.overflowX, () => {
|
|
12379
12285
|
reLayoutFlag.value++;
|
|
12380
12286
|
});
|
|
@@ -12481,21 +12387,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12481
12387
|
});
|
|
12482
12388
|
}
|
|
12483
12389
|
});
|
|
12484
|
-
const kfFlag = vue.ref(0);
|
|
12485
|
-
vue.watch(() => reactData.updateColFlag, () => {
|
|
12486
|
-
kfFlag.value++;
|
|
12487
|
-
});
|
|
12488
|
-
vue.watch(computeKeepFields, () => {
|
|
12489
|
-
kfFlag.value++;
|
|
12490
|
-
});
|
|
12491
|
-
vue.watch(kfFlag, () => {
|
|
12492
|
-
const keepFields = computeKeepFields.value;
|
|
12493
|
-
const kpfMaps = {};
|
|
12494
|
-
keepFields.forEach((field) => {
|
|
12495
|
-
kpfMaps[field] = 1;
|
|
12496
|
-
});
|
|
12497
|
-
internalData.keepUpdateFieldMaps = kpfMaps;
|
|
12498
|
-
});
|
|
12499
12390
|
if ($xeTabs) {
|
|
12500
12391
|
vue.watch(() => $xeTabs ? $xeTabs.reactData.resizeFlag : null, () => {
|
|
12501
12392
|
handleGlobalResizeEvent();
|
|
@@ -12506,16 +12397,16 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12506
12397
|
const { setupTable } = options;
|
|
12507
12398
|
if (setupTable) {
|
|
12508
12399
|
const hookRest = setupTable($xeTable);
|
|
12509
|
-
if (hookRest &&
|
|
12400
|
+
if (hookRest && index.default.isObject(hookRest)) {
|
|
12510
12401
|
Object.assign($xeTable, hookRest);
|
|
12511
12402
|
}
|
|
12512
12403
|
}
|
|
12513
12404
|
});
|
|
12514
|
-
|
|
12405
|
+
tablePrivateMethods.preventEvent(null, "created", { $table: $xeTable });
|
|
12515
12406
|
let resizeObserver;
|
|
12516
12407
|
vue.onActivated(() => {
|
|
12517
|
-
|
|
12518
|
-
|
|
12408
|
+
tableMethods.recalculate().then(() => tableMethods.refreshScroll());
|
|
12409
|
+
tablePrivateMethods.preventEvent(null, "activated", { $table: $xeTable });
|
|
12519
12410
|
});
|
|
12520
12411
|
vue.onDeactivated(() => {
|
|
12521
12412
|
const { filterStore } = reactData;
|
|
@@ -12524,7 +12415,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12524
12415
|
}
|
|
12525
12416
|
$xeTable.closeTooltip();
|
|
12526
12417
|
internalData.isActivated = false;
|
|
12527
|
-
|
|
12418
|
+
tablePrivateMethods.preventEvent(null, "deactivated", { $table: $xeTable });
|
|
12528
12419
|
});
|
|
12529
12420
|
vue.onMounted(() => {
|
|
12530
12421
|
const { exportConfig, importConfig, treeConfig, minHeight } = props$1;
|
|
@@ -12545,8 +12436,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12545
12436
|
const importOpts = computeImportOpts.value;
|
|
12546
12437
|
const rowDragOpts = computeRowDragOpts.value;
|
|
12547
12438
|
const areaOpts = computeAreaOpts.value;
|
|
12548
|
-
const sortOpts = computeSortOpts.value;
|
|
12549
|
-
const filterOpts = computeFilterOpts.value;
|
|
12550
12439
|
const { groupFields } = aggregateOpts;
|
|
12551
12440
|
if ($xeGantt) {
|
|
12552
12441
|
const { refClassifyWrapperElem } = $xeGantt.getRefMaps();
|
|
@@ -12583,14 +12472,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12583
12472
|
if (treeConfig && !treeOpts.transform && props$1.stripe) {
|
|
12584
12473
|
log.warnLog("vxe.error.noTree", ["stripe"]);
|
|
12585
12474
|
}
|
|
12586
|
-
if (treeConfig && !treeOpts.transform) {
|
|
12587
|
-
if (sortOpts.isDeep) {
|
|
12588
|
-
log.warnLog("vxe.error.reqSupportProp", ["transform=false", "sort-config.isDeep=false"]);
|
|
12589
|
-
}
|
|
12590
|
-
if (filterOpts.isDeep) {
|
|
12591
|
-
log.warnLog("vxe.error.reqSupportProp", ["transform=false", "filter-config.isDeep=false"]);
|
|
12592
|
-
}
|
|
12593
|
-
}
|
|
12594
12475
|
if (props$1.showFooter && !(props$1.footerMethod || props$1.footerData)) {
|
|
12595
12476
|
log.warnLog("vxe.error.reqProp", ["footer-data | footer-method"]);
|
|
12596
12477
|
}
|
|
@@ -12615,11 +12496,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12615
12496
|
if (props$1.aggregateConfig && props$1.rowGroupConfig) {
|
|
12616
12497
|
log.warnLog("vxe.error.notSupportProp", ["aggregate-config", "row-group-config", "row-group-config=null"]);
|
|
12617
12498
|
}
|
|
12618
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !
|
|
12619
|
-
log.warnLog("vxe.error.errProp", [`export-config.types=${importOpts.types.join(",")}`, importOpts.types.filter((type) =>
|
|
12499
|
+
if (importConfig && importOpts.types && !importOpts.importMethod && !index.default.includeArrays(index.default.keys(importOpts._typeMaps), importOpts.types)) {
|
|
12500
|
+
log.warnLog("vxe.error.errProp", [`export-config.types=${importOpts.types.join(",")}`, importOpts.types.filter((type) => index.default.includes(index.default.keys(importOpts._typeMaps), type)).join(",") || index.default.keys(importOpts._typeMaps).join(",")]);
|
|
12620
12501
|
}
|
|
12621
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !
|
|
12622
|
-
log.warnLog("vxe.error.errProp", [`export-config.types=${exportOpts.types.join(",")}`, exportOpts.types.filter((type) =>
|
|
12502
|
+
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !index.default.includeArrays(index.default.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
12503
|
+
log.warnLog("vxe.error.errProp", [`export-config.types=${exportOpts.types.join(",")}`, exportOpts.types.filter((type) => index.default.includes(index.default.keys(exportOpts._typeMaps), type)).join(",") || index.default.keys(exportOpts._typeMaps).join(",")]);
|
|
12623
12504
|
}
|
|
12624
12505
|
if (!props$1.id) {
|
|
12625
12506
|
if ((props$1.customConfig ? utils.isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
|
|
@@ -12632,7 +12513,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12632
12513
|
if (rowOpts.height && !props$1.showOverflow) {
|
|
12633
12514
|
log.warnLog("vxe.error.notProp", ["table.show-overflow"]);
|
|
12634
12515
|
}
|
|
12635
|
-
if (!$xeTable.
|
|
12516
|
+
if (!$xeTable.triggerCellAreaModnEvent) {
|
|
12636
12517
|
if (props$1.areaConfig) {
|
|
12637
12518
|
log.warnLog("vxe.error.notProp", ["area-config"]);
|
|
12638
12519
|
}
|
|
@@ -12706,7 +12587,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12706
12587
|
log.warnLog("vxe.error.reqSupportProp", ["edit-config & edit-rules", "min-height"]);
|
|
12707
12588
|
}
|
|
12708
12589
|
if (treeConfig) {
|
|
12709
|
-
|
|
12590
|
+
index.default.arrayEach(["rowField", "parentField", "childrenField", "hasChildField", "mapChildrenField"], (key) => {
|
|
12710
12591
|
const val = treeOpts[key];
|
|
12711
12592
|
if (val && val.indexOf(".") > -1) {
|
|
12712
12593
|
log.errLog("vxe.error.errProp", [`${key}=${val}`, `${key}=${val.split(".")[0]}`]);
|
|
@@ -12734,7 +12615,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12734
12615
|
vue.nextTick(() => {
|
|
12735
12616
|
if (props$1.autoResize) {
|
|
12736
12617
|
const el = refElem.value;
|
|
12737
|
-
const parentEl =
|
|
12618
|
+
const parentEl = tablePrivateMethods.getParentElem();
|
|
12738
12619
|
resizeObserver = globalResize.create(() => {
|
|
12739
12620
|
if (props$1.autoResize) {
|
|
12740
12621
|
handleResizeEvent();
|
|
@@ -12766,10 +12647,6 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12766
12647
|
$xeTable.preventEvent(null, "mounted", { $table: $xeTable });
|
|
12767
12648
|
});
|
|
12768
12649
|
vue.onBeforeUnmount(() => {
|
|
12769
|
-
const { _sToTime } = internalData;
|
|
12770
|
-
if (_sToTime) {
|
|
12771
|
-
clearTimeout(_sToTime);
|
|
12772
|
-
}
|
|
12773
12650
|
const tableViewportEl = refTableViewportElem.value;
|
|
12774
12651
|
if (tableViewportEl) {
|
|
12775
12652
|
tableViewportEl.removeEventListener("wheel", $xeTable.triggerBodyWheelEvent);
|
|
@@ -12781,7 +12658,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12781
12658
|
resizeObserver.disconnect();
|
|
12782
12659
|
}
|
|
12783
12660
|
$xeTable.closeTooltip();
|
|
12784
|
-
|
|
12661
|
+
tableMethods.closeFilter();
|
|
12785
12662
|
if ($xeTable.closeMenu) {
|
|
12786
12663
|
$xeTable.closeMenu();
|
|
12787
12664
|
}
|
|
@@ -12794,12 +12671,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12794
12671
|
globalEvents.off($xeTable, "keydown");
|
|
12795
12672
|
globalEvents.off($xeTable, "resize");
|
|
12796
12673
|
globalEvents.off($xeTable, "contextmenu");
|
|
12797
|
-
|
|
12798
|
-
ctor.default.assign(reactData, util.createReactData());
|
|
12799
|
-
ctor.default.assign(internalData, util.createInternalData());
|
|
12674
|
+
tablePrivateMethods.preventEvent(null, "beforeUnmount", { $table: $xeTable });
|
|
12800
12675
|
});
|
|
12801
12676
|
vue.onUnmounted(() => {
|
|
12802
|
-
|
|
12677
|
+
tablePrivateMethods.preventEvent(null, "unmounted", { $table: $xeTable });
|
|
12678
|
+
index.default.assign(internalData, util.createInternalData());
|
|
12803
12679
|
});
|
|
12804
12680
|
vue.nextTick(() => {
|
|
12805
12681
|
if (props$1.loading) {
|