@fecp/designer 5.4.104 → 5.4.106
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/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/grid/src/grid.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/module/custom/hook.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/module/custom/panel.mjs +1 -2
- 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 +1 -2
- 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 +1 -2
- package/es/node_modules/vxe-table/es/table/module/filter/hook.mjs +1 -2
- 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 +1 -2
- package/es/node_modules/vxe-table/es/table/module/menu/hook.mjs +1 -2
- 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 +1 -2
- package/es/node_modules/vxe-table/es/table/render/index.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/body.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/cell.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/columnInfo.mjs +1 -2
- package/es/node_modules/vxe-table/es/table/src/footer.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/table.mjs +1 -2
- 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 +1 -2
- package/es/node_modules/vxe-table/es/toolbar/src/toolbar.mjs +1 -2
- package/es/node_modules/vxe-table/es/ui/src/anime.mjs +1 -2
- package/es/node_modules/vxe-table/es/ui/src/dom.mjs +1 -2
- 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/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/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/grid/src/grid.js +42 -43
- package/lib/node_modules/vxe-table/es/table/module/custom/hook.js +11 -12
- package/lib/node_modules/vxe-table/es/table/module/custom/panel.js +23 -24
- 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 +6 -7
- 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 +2 -3
- package/lib/node_modules/vxe-table/es/table/module/filter/hook.js +2 -3
- 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 +6 -7
- package/lib/node_modules/vxe-table/es/table/module/menu/hook.js +7 -8
- 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 +27 -28
- package/lib/node_modules/vxe-table/es/table/render/index.js +65 -66
- package/lib/node_modules/vxe-table/es/table/src/body.js +10 -11
- package/lib/node_modules/vxe-table/es/table/src/cell.js +15 -16
- package/lib/node_modules/vxe-table/es/table/src/columnInfo.js +12 -13
- package/lib/node_modules/vxe-table/es/table/src/footer.js +7 -8
- package/lib/node_modules/vxe-table/es/table/src/header.js +12 -13
- package/lib/node_modules/vxe-table/es/table/src/table.js +347 -348
- 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 +24 -25
- package/lib/node_modules/vxe-table/es/toolbar/src/toolbar.js +24 -25
- 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 -6
- 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/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);
|
|
@@ -106,7 +105,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
106
105
|
const computeTableId = vue.computed(() => {
|
|
107
106
|
const { id } = props$1;
|
|
108
107
|
if (id) {
|
|
109
|
-
if (
|
|
108
|
+
if (index.default.isFunction(id)) {
|
|
110
109
|
return `${id({ $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt }) || ""}`;
|
|
111
110
|
}
|
|
112
111
|
return `${id}`;
|
|
@@ -119,7 +118,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
119
118
|
});
|
|
120
119
|
const computeValidOpts = vue.computed(() => {
|
|
121
120
|
const opts = Object.assign({}, getConfig().table.validConfig, props$1.validConfig);
|
|
122
|
-
if (
|
|
121
|
+
if (index.default.isBoolean(opts.showMessage)) {
|
|
123
122
|
opts.showErrorMessage = opts.showMessage;
|
|
124
123
|
}
|
|
125
124
|
return opts;
|
|
@@ -132,7 +131,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
132
131
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
133
132
|
const { threshold } = virtualXOpts;
|
|
134
133
|
if (threshold) {
|
|
135
|
-
return
|
|
134
|
+
return index.default.toNumber(threshold);
|
|
136
135
|
}
|
|
137
136
|
return 0;
|
|
138
137
|
});
|
|
@@ -195,7 +194,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
195
194
|
const virtualYOpts = computeVirtualYOpts.value;
|
|
196
195
|
const { threshold } = virtualYOpts;
|
|
197
196
|
if (threshold) {
|
|
198
|
-
return
|
|
197
|
+
return index.default.toNumber(threshold);
|
|
199
198
|
}
|
|
200
199
|
return 0;
|
|
201
200
|
});
|
|
@@ -216,7 +215,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
216
215
|
const computeCellOpts = vue.computed(() => {
|
|
217
216
|
const cellOpts = Object.assign({}, getConfig().table.cellConfig, props$1.cellConfig);
|
|
218
217
|
if (cellOpts.height) {
|
|
219
|
-
cellOpts.height =
|
|
218
|
+
cellOpts.height = index.default.toNumber(cellOpts.height);
|
|
220
219
|
}
|
|
221
220
|
return cellOpts;
|
|
222
221
|
});
|
|
@@ -224,7 +223,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
224
223
|
const headerCellOpts = Object.assign({}, getConfig().table.headerCellConfig, props$1.headerCellConfig);
|
|
225
224
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
226
225
|
const cellOpts = computeCellOpts.value;
|
|
227
|
-
let headCellHeight =
|
|
226
|
+
let headCellHeight = index.default.toNumber(util.getCalcHeight(headerCellOpts.height || cellOpts.height));
|
|
228
227
|
if ($xeGantt) {
|
|
229
228
|
const { computeTaskViewScales } = $xeGantt.getComputeMaps();
|
|
230
229
|
const taskViewScales = computeTaskViewScales.value;
|
|
@@ -239,7 +238,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
239
238
|
const computeFooterCellOpts = vue.computed(() => {
|
|
240
239
|
const footerCellOpts = Object.assign({}, getConfig().table.footerCellConfig, props$1.footerCellConfig);
|
|
241
240
|
const cellOpts = computeCellOpts.value;
|
|
242
|
-
footerCellOpts.height =
|
|
241
|
+
footerCellOpts.height = index.default.toNumber(util.getCalcHeight(footerCellOpts.height || cellOpts.height));
|
|
243
242
|
return footerCellOpts;
|
|
244
243
|
});
|
|
245
244
|
const computeRowOpts = vue.computed(() => {
|
|
@@ -515,7 +514,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
515
514
|
const { visibleDataRowIdData, rowExpandedMaps } = internalData;
|
|
516
515
|
const expandList = [];
|
|
517
516
|
if (tableData.length && expandColumn && rowExpandedFlag && rowGroupExpandedFlag && treeExpandedFlag) {
|
|
518
|
-
|
|
517
|
+
index.default.each(rowExpandedMaps, (row, rowid) => {
|
|
519
518
|
if (visibleDataRowIdData[rowid]) {
|
|
520
519
|
expandList.push(row);
|
|
521
520
|
}
|
|
@@ -756,15 +755,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
756
755
|
xegrid: $xeGrid
|
|
757
756
|
};
|
|
758
757
|
const eqCellValue = (row1, row2, field) => {
|
|
759
|
-
const val1 =
|
|
760
|
-
const val2 =
|
|
758
|
+
const val1 = index.default.get(row1, field);
|
|
759
|
+
const val2 = index.default.get(row2, field);
|
|
761
760
|
if (utils.eqEmptyValue(val1) && utils.eqEmptyValue(val2)) {
|
|
762
761
|
return true;
|
|
763
762
|
}
|
|
764
|
-
if (
|
|
763
|
+
if (index.default.isString(val1) || index.default.isNumber(val1)) {
|
|
765
764
|
return "" + val1 === "" + val2;
|
|
766
765
|
}
|
|
767
|
-
return
|
|
766
|
+
return index.default.isEqual(val1, val2);
|
|
768
767
|
};
|
|
769
768
|
const handleKeyField = () => {
|
|
770
769
|
const keyField = computeRowField.value;
|
|
@@ -772,7 +771,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
772
771
|
internalData.isCurrDeepKey = util.hasDeepKey(keyField);
|
|
773
772
|
};
|
|
774
773
|
const hangleStorageDefaultValue = (value, isAll) => {
|
|
775
|
-
return
|
|
774
|
+
return index.default.isBoolean(value) ? value : isAll;
|
|
776
775
|
};
|
|
777
776
|
const getNextSortOrder = (column) => {
|
|
778
777
|
const sortOpts = computeSortOpts.value;
|
|
@@ -783,7 +782,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
783
782
|
};
|
|
784
783
|
const getCustomStorageMap = (id) => {
|
|
785
784
|
const version = getConfig().version;
|
|
786
|
-
const rest =
|
|
785
|
+
const rest = index.default.toStringJSON(localStorage.getItem(customStorageKey) || "");
|
|
787
786
|
const maps = rest && rest._v === version ? rest : { _v: version };
|
|
788
787
|
return (id ? maps[id] : maps) || {};
|
|
789
788
|
};
|
|
@@ -792,12 +791,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
792
791
|
const maps = getCustomStorageMap();
|
|
793
792
|
maps[id] = data || void 0;
|
|
794
793
|
maps._v = version;
|
|
795
|
-
localStorage.setItem(customStorageKey,
|
|
794
|
+
localStorage.setItem(customStorageKey, index.default.toJSONString(maps));
|
|
796
795
|
};
|
|
797
796
|
const getRecoverRowMaps = (keyMaps) => {
|
|
798
797
|
const { fullAllDataRowIdData } = internalData;
|
|
799
798
|
const restKeys = {};
|
|
800
|
-
|
|
799
|
+
index.default.each(keyMaps, (row, rowid) => {
|
|
801
800
|
if (fullAllDataRowIdData[rowid]) {
|
|
802
801
|
restKeys[rowid] = row;
|
|
803
802
|
}
|
|
@@ -807,7 +806,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
807
806
|
const handleReserveRow = (reserveRowMap) => {
|
|
808
807
|
const { fullDataRowIdData } = internalData;
|
|
809
808
|
const reserveList = [];
|
|
810
|
-
|
|
809
|
+
index.default.each(reserveRowMap, (item, rowid) => {
|
|
811
810
|
if (fullDataRowIdData[rowid] && $xeTable.findRowIndexOf(reserveList, fullDataRowIdData[rowid].row) === -1) {
|
|
812
811
|
reserveList.push(fullDataRowIdData[rowid].row);
|
|
813
812
|
}
|
|
@@ -1002,14 +1001,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1002
1001
|
const { fullAllDataRowIdData, fullColumnIdData, visibleColumn, afterFullData, mergeBodyList, mergeBodyMaps } = internalData;
|
|
1003
1002
|
if (merges) {
|
|
1004
1003
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
1005
|
-
if (!
|
|
1004
|
+
if (!index.default.isArray(merges)) {
|
|
1006
1005
|
merges = [merges];
|
|
1007
1006
|
}
|
|
1008
1007
|
merges.forEach((item) => {
|
|
1009
1008
|
let { row: margeRow, col: margeCol, rowspan, colspan } = item;
|
|
1010
1009
|
let mergeRowIndex = -1;
|
|
1011
1010
|
let mergeColumnIndex = -1;
|
|
1012
|
-
if (
|
|
1011
|
+
if (index.default.isNumber(margeRow)) {
|
|
1013
1012
|
mergeRowIndex = margeRow;
|
|
1014
1013
|
} else {
|
|
1015
1014
|
const rowid = margeRow ? handleGetRowId(margeRow) : null;
|
|
@@ -1018,7 +1017,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1018
1017
|
mergeRowIndex = rowRest._index;
|
|
1019
1018
|
}
|
|
1020
1019
|
}
|
|
1021
|
-
if (
|
|
1020
|
+
if (index.default.isNumber(margeCol)) {
|
|
1022
1021
|
mergeColumnIndex = margeCol;
|
|
1023
1022
|
} else {
|
|
1024
1023
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1028,8 +1027,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1028
1027
|
}
|
|
1029
1028
|
}
|
|
1030
1029
|
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
1031
|
-
rowspan =
|
|
1032
|
-
colspan =
|
|
1030
|
+
rowspan = index.default.toNumber(rowspan) || 1;
|
|
1031
|
+
colspan = index.default.toNumber(colspan) || 1;
|
|
1033
1032
|
if (rowspan > 1 || colspan > 1) {
|
|
1034
1033
|
const row = afterFullData[mergeRowIndex];
|
|
1035
1034
|
const column = visibleColumn[mergeColumnIndex];
|
|
@@ -1063,14 +1062,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1063
1062
|
const rest = [];
|
|
1064
1063
|
if (merges) {
|
|
1065
1064
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
1066
|
-
if (!
|
|
1065
|
+
if (!index.default.isArray(merges)) {
|
|
1067
1066
|
merges = [merges];
|
|
1068
1067
|
}
|
|
1069
1068
|
merges.forEach((item) => {
|
|
1070
1069
|
const { row: margeRow, col: margeCol } = item;
|
|
1071
1070
|
let mergeRowIndex = -1;
|
|
1072
1071
|
let mergeColumnIndex = -1;
|
|
1073
|
-
if (
|
|
1072
|
+
if (index.default.isNumber(margeRow)) {
|
|
1074
1073
|
mergeRowIndex = margeRow;
|
|
1075
1074
|
} else {
|
|
1076
1075
|
const rowid = margeRow ? handleGetRowId(margeRow) : null;
|
|
@@ -1079,7 +1078,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1079
1078
|
mergeRowIndex = rowRest._index;
|
|
1080
1079
|
}
|
|
1081
1080
|
}
|
|
1082
|
-
if (
|
|
1081
|
+
if (index.default.isNumber(margeCol)) {
|
|
1083
1082
|
mergeColumnIndex = margeCol;
|
|
1084
1083
|
} else {
|
|
1085
1084
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1088,7 +1087,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1088
1087
|
mergeColumnIndex = colRest._index;
|
|
1089
1088
|
}
|
|
1090
1089
|
}
|
|
1091
|
-
const mcIndex =
|
|
1090
|
+
const mcIndex = index.default.findIndexOf(mergeBodyList, (item2) => item2.row === mergeRowIndex && item2.col === mergeColumnIndex);
|
|
1092
1091
|
if (mcIndex > -1) {
|
|
1093
1092
|
const rItems = mergeBodyList.splice(mcIndex, 1);
|
|
1094
1093
|
const item2 = rItems[0];
|
|
@@ -1117,14 +1116,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1117
1116
|
const { mergeHeaderList, mergeHeaderMaps, fullColumnIdData } = internalData;
|
|
1118
1117
|
if (merges) {
|
|
1119
1118
|
const { visibleColumn } = internalData;
|
|
1120
|
-
if (!
|
|
1119
|
+
if (!index.default.isArray(merges)) {
|
|
1121
1120
|
merges = [merges];
|
|
1122
1121
|
}
|
|
1123
1122
|
merges.forEach((item) => {
|
|
1124
1123
|
let { row: margeRow, col: margeCol, rowspan, colspan } = item;
|
|
1125
|
-
const mergeRowIndex =
|
|
1124
|
+
const mergeRowIndex = index.default.isNumber(margeRow) ? margeRow : -1;
|
|
1126
1125
|
let mergeColumnIndex = -1;
|
|
1127
|
-
if (
|
|
1126
|
+
if (index.default.isNumber(margeCol)) {
|
|
1128
1127
|
mergeColumnIndex = margeCol;
|
|
1129
1128
|
} else {
|
|
1130
1129
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1134,8 +1133,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1134
1133
|
}
|
|
1135
1134
|
}
|
|
1136
1135
|
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
1137
|
-
rowspan =
|
|
1138
|
-
colspan =
|
|
1136
|
+
rowspan = index.default.toNumber(rowspan) || 1;
|
|
1137
|
+
colspan = index.default.toNumber(colspan) || 1;
|
|
1139
1138
|
if (!showCustomHeader && rowspan > 1) {
|
|
1140
1139
|
log.errLog("vxe.error.notSupportProp", ["[table] show-custom-header=false", `rowspan=${rowspan}`, "rowspan=1"]);
|
|
1141
1140
|
return;
|
|
@@ -1172,14 +1171,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1172
1171
|
const { mergeHeaderList, fullColumnIdData, mergeHeaderMaps } = internalData;
|
|
1173
1172
|
const rest = [];
|
|
1174
1173
|
if (merges) {
|
|
1175
|
-
if (!
|
|
1174
|
+
if (!index.default.isArray(merges)) {
|
|
1176
1175
|
merges = [merges];
|
|
1177
1176
|
}
|
|
1178
1177
|
merges.forEach((item) => {
|
|
1179
1178
|
const { row: margeRow, col: margeCol } = item;
|
|
1180
|
-
const mergeRowIndex =
|
|
1179
|
+
const mergeRowIndex = index.default.isNumber(margeRow) ? margeRow : -1;
|
|
1181
1180
|
let mergeColumnIndex = -1;
|
|
1182
|
-
if (
|
|
1181
|
+
if (index.default.isNumber(margeCol)) {
|
|
1183
1182
|
mergeColumnIndex = margeCol;
|
|
1184
1183
|
} else {
|
|
1185
1184
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1188,7 +1187,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1188
1187
|
mergeColumnIndex = colRest._index;
|
|
1189
1188
|
}
|
|
1190
1189
|
}
|
|
1191
|
-
const mcIndex =
|
|
1190
|
+
const mcIndex = index.default.findIndexOf(mergeHeaderList, (item2) => item2.row === mergeRowIndex && item2.col === mergeColumnIndex);
|
|
1192
1191
|
if (mcIndex > -1) {
|
|
1193
1192
|
const rItems = mergeHeaderList.splice(mcIndex, 1);
|
|
1194
1193
|
const item2 = rItems[0];
|
|
@@ -1216,14 +1215,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1216
1215
|
const { mergeFooterList, mergeFooterMaps, fullColumnIdData } = internalData;
|
|
1217
1216
|
if (merges) {
|
|
1218
1217
|
const { visibleColumn } = internalData;
|
|
1219
|
-
if (!
|
|
1218
|
+
if (!index.default.isArray(merges)) {
|
|
1220
1219
|
merges = [merges];
|
|
1221
1220
|
}
|
|
1222
1221
|
merges.forEach((item) => {
|
|
1223
1222
|
let { row: margeRow, col: margeCol, rowspan, colspan } = item;
|
|
1224
|
-
const mergeRowIndex =
|
|
1223
|
+
const mergeRowIndex = index.default.isNumber(margeRow) ? margeRow : -1;
|
|
1225
1224
|
let mergeColumnIndex = -1;
|
|
1226
|
-
if (
|
|
1225
|
+
if (index.default.isNumber(margeCol)) {
|
|
1227
1226
|
mergeColumnIndex = margeCol;
|
|
1228
1227
|
} else {
|
|
1229
1228
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1233,8 +1232,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1233
1232
|
}
|
|
1234
1233
|
}
|
|
1235
1234
|
if (mergeRowIndex > -1 && mergeColumnIndex > -1 && (rowspan || colspan)) {
|
|
1236
|
-
rowspan =
|
|
1237
|
-
colspan =
|
|
1235
|
+
rowspan = index.default.toNumber(rowspan) || 1;
|
|
1236
|
+
colspan = index.default.toNumber(colspan) || 1;
|
|
1238
1237
|
if (rowspan > 1 || colspan > 1) {
|
|
1239
1238
|
const row = footerTableData[mergeRowIndex];
|
|
1240
1239
|
const column = visibleColumn[mergeColumnIndex];
|
|
@@ -1267,14 +1266,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1267
1266
|
const { mergeFooterList, fullColumnIdData, mergeFooterMaps } = internalData;
|
|
1268
1267
|
const rest = [];
|
|
1269
1268
|
if (merges) {
|
|
1270
|
-
if (!
|
|
1269
|
+
if (!index.default.isArray(merges)) {
|
|
1271
1270
|
merges = [merges];
|
|
1272
1271
|
}
|
|
1273
1272
|
merges.forEach((item) => {
|
|
1274
1273
|
const { row: margeRow, col: margeCol } = item;
|
|
1275
|
-
const mergeRowIndex =
|
|
1274
|
+
const mergeRowIndex = index.default.isNumber(margeRow) ? margeRow : -1;
|
|
1276
1275
|
let mergeColumnIndex = -1;
|
|
1277
|
-
if (
|
|
1276
|
+
if (index.default.isNumber(margeCol)) {
|
|
1278
1277
|
mergeColumnIndex = margeCol;
|
|
1279
1278
|
} else {
|
|
1280
1279
|
const colid = margeCol ? margeCol.id : null;
|
|
@@ -1283,7 +1282,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1283
1282
|
mergeColumnIndex = colRest._index;
|
|
1284
1283
|
}
|
|
1285
1284
|
}
|
|
1286
|
-
const mcIndex =
|
|
1285
|
+
const mcIndex = index.default.findIndexOf(mergeFooterList, (item2) => item2.row === mergeRowIndex && item2.col === mergeColumnIndex);
|
|
1287
1286
|
if (mcIndex > -1) {
|
|
1288
1287
|
const rItems = mergeFooterList.splice(mcIndex, 1);
|
|
1289
1288
|
const item2 = rItems[0];
|
|
@@ -1302,7 +1301,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1302
1301
|
const { tableFullColumn } = internalData;
|
|
1303
1302
|
const sortOpts = computeSortOpts.value;
|
|
1304
1303
|
const { multiple, remote, orders } = sortOpts;
|
|
1305
|
-
if (!
|
|
1304
|
+
if (!index.default.isArray(sortConfs)) {
|
|
1306
1305
|
sortConfs = [sortConfs];
|
|
1307
1306
|
}
|
|
1308
1307
|
if (sortConfs && sortConfs.length) {
|
|
@@ -1317,10 +1316,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1317
1316
|
}
|
|
1318
1317
|
const sortColMpps = {};
|
|
1319
1318
|
let firstColumn = null;
|
|
1320
|
-
sortConfs.forEach((confs, index) => {
|
|
1319
|
+
sortConfs.forEach((confs, index$1) => {
|
|
1321
1320
|
let { field, order } = confs;
|
|
1322
1321
|
let column = field;
|
|
1323
|
-
if (
|
|
1322
|
+
if (index.default.isString(field)) {
|
|
1324
1323
|
column = $xeTable.getColumnByField(field);
|
|
1325
1324
|
}
|
|
1326
1325
|
if (!firstColumn) {
|
|
@@ -1333,12 +1332,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1333
1332
|
if (column.order !== order) {
|
|
1334
1333
|
column.order = order;
|
|
1335
1334
|
}
|
|
1336
|
-
column.sortTime = Date.now() + index;
|
|
1335
|
+
column.sortTime = Date.now() + index$1;
|
|
1337
1336
|
sortColMpps[column.id] = column;
|
|
1338
1337
|
}
|
|
1339
1338
|
});
|
|
1340
1339
|
if (!multiple) {
|
|
1341
|
-
|
|
1340
|
+
index.default.each(orderActiveMaps, (oaCol, oaId) => {
|
|
1342
1341
|
if (!sortColMpps[oaId]) {
|
|
1343
1342
|
oaCol.order = null;
|
|
1344
1343
|
}
|
|
@@ -1372,7 +1371,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1372
1371
|
let val = props$1[key];
|
|
1373
1372
|
if (key === "minHeight") {
|
|
1374
1373
|
const defMinHeight = getConfig().table.minHeight;
|
|
1375
|
-
if (
|
|
1374
|
+
if (index.default.eqNull(val)) {
|
|
1376
1375
|
if (utils.eqEmptyValue(defMinHeight)) {
|
|
1377
1376
|
if (!tableColumn.length) {
|
|
1378
1377
|
val = 40;
|
|
@@ -1391,9 +1390,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1391
1390
|
} else {
|
|
1392
1391
|
const excludeHeight = $xeTable.getExcludeHeight();
|
|
1393
1392
|
if (dom.isScale(val)) {
|
|
1394
|
-
num = Math.floor((
|
|
1393
|
+
num = Math.floor((index.default.toInteger(val) || 1) / 100 * parentHeight);
|
|
1395
1394
|
} else {
|
|
1396
|
-
num =
|
|
1395
|
+
num = index.default.toNumber(val);
|
|
1397
1396
|
}
|
|
1398
1397
|
num = Math.max(40, num - excludeHeight);
|
|
1399
1398
|
}
|
|
@@ -1417,15 +1416,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1417
1416
|
if (isCustomResizable && resizableData || isCustomSort && sortData || isCustomVisible && visibleData || isCustomFixed && fixedData || isCustomAggGroup && aggGroupData || isCustomAggFunc && aggFuncData) {
|
|
1418
1417
|
const sortColMaps = {};
|
|
1419
1418
|
if (isCustomSort && sortData) {
|
|
1420
|
-
if (!
|
|
1419
|
+
if (!index.default.isArray(sortData)) {
|
|
1421
1420
|
const sortRests = [];
|
|
1422
|
-
|
|
1423
|
-
sortRests.push({ key: colKey, index });
|
|
1421
|
+
index.default.each(sortData, (index2, colKey) => {
|
|
1422
|
+
sortRests.push({ key: colKey, index: index2 });
|
|
1424
1423
|
});
|
|
1425
|
-
sortData =
|
|
1424
|
+
sortData = index.default.orderBy(sortRests, { field: "index", order: "asc" }).map((item) => ({ k: item.key }));
|
|
1426
1425
|
}
|
|
1427
1426
|
let colNum = 1;
|
|
1428
|
-
|
|
1427
|
+
index.default.eachTree(sortData, (sObj, index2, sOjs, path, pSObj) => {
|
|
1429
1428
|
sortColMaps[sObj.k] = {
|
|
1430
1429
|
key: sObj.k,
|
|
1431
1430
|
sNum: colNum++,
|
|
@@ -1436,17 +1435,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1436
1435
|
const colKeyMaps = {};
|
|
1437
1436
|
const allCols = [];
|
|
1438
1437
|
const aggGroupConfs = [];
|
|
1439
|
-
|
|
1438
|
+
index.default.eachTree(collectColumn, (column, index$1, items, path, parentColumn) => {
|
|
1440
1439
|
const colKey = column.getKey();
|
|
1441
1440
|
if (!parentColumn) {
|
|
1442
1441
|
if (isCustomFixed && fixedData && fixedData[colKey] !== void 0) {
|
|
1443
1442
|
column.fixed = fixedData[colKey];
|
|
1444
1443
|
}
|
|
1445
1444
|
}
|
|
1446
|
-
if (isCustomResizable && resizableData &&
|
|
1445
|
+
if (isCustomResizable && resizableData && index.default.isNumber(resizableData[colKey])) {
|
|
1447
1446
|
column.resizeWidth = resizableData[colKey];
|
|
1448
1447
|
}
|
|
1449
|
-
if (isCustomVisible && visibleData &&
|
|
1448
|
+
if (isCustomVisible && visibleData && index.default.isBoolean(visibleData[colKey])) {
|
|
1450
1449
|
column.visible = visibleData[colKey];
|
|
1451
1450
|
}
|
|
1452
1451
|
if (isCustomAggFunc && aggFuncData && (aggregateConfig || rowGroupConfig) && aggFuncData[colKey]) {
|
|
@@ -1476,7 +1475,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1476
1475
|
column.renderSortNumber = scItem.sNum;
|
|
1477
1476
|
}
|
|
1478
1477
|
});
|
|
1479
|
-
const newCollectCols =
|
|
1478
|
+
const newCollectCols = index.default.toArrayTree(index.default.orderBy(allCols, "renderSortNumber"), { key: "id", parentKey: "parentId", children: "children" });
|
|
1480
1479
|
internalData.collectColumn = newCollectCols;
|
|
1481
1480
|
internalData.tableFullColumn = util.getColumnList(newCollectCols);
|
|
1482
1481
|
reactData.updateColFlag++;
|
|
@@ -1528,11 +1527,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1528
1527
|
}
|
|
1529
1528
|
};
|
|
1530
1529
|
if (isGroup) {
|
|
1531
|
-
|
|
1530
|
+
index.default.eachTree(collectColumn, handleFunc);
|
|
1532
1531
|
} else {
|
|
1533
1532
|
tableFullColumn.forEach(handleFunc);
|
|
1534
1533
|
}
|
|
1535
|
-
|
|
1534
|
+
index.default.each(fullAllDataRowIdData, (rowRest) => {
|
|
1536
1535
|
rowRest.height = 0;
|
|
1537
1536
|
});
|
|
1538
1537
|
reactData.isAllOverflow = isAllOverflow;
|
|
@@ -1560,9 +1559,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1560
1559
|
let checkboxColumn;
|
|
1561
1560
|
let radioColumn;
|
|
1562
1561
|
let htmlColumn;
|
|
1563
|
-
const handleFunc = (column,
|
|
1562
|
+
const handleFunc = (column, index2, items, path, parentColumn) => {
|
|
1564
1563
|
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 };
|
|
1564
|
+
const rest = { $index: -1, _index: -1, column, colid, index: index2, items, parent: parentColumn || null, width: 0, oLeft: 0 };
|
|
1566
1565
|
if (field) {
|
|
1567
1566
|
if (fullColFieldData[field]) {
|
|
1568
1567
|
log.errLog("vxe.error.colRepet", ["field", field]);
|
|
@@ -1627,9 +1626,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1627
1626
|
fullColIdData[colid] = rest;
|
|
1628
1627
|
};
|
|
1629
1628
|
if (isGroup) {
|
|
1630
|
-
|
|
1629
|
+
index.default.eachTree(collectColumn, (column, index2, items, path, parentColumn, nodes) => {
|
|
1631
1630
|
column.level = nodes.length;
|
|
1632
|
-
handleFunc(column,
|
|
1631
|
+
handleFunc(column, index2, items, path, parentColumn);
|
|
1633
1632
|
});
|
|
1634
1633
|
} else {
|
|
1635
1634
|
tableFullColumn.forEach(handleFunc);
|
|
@@ -1691,7 +1690,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1691
1690
|
const firstCellEl = cellElemList[0];
|
|
1692
1691
|
if (firstCellEl && firstCellEl.parentElement) {
|
|
1693
1692
|
const cellStyle = getComputedStyle(firstCellEl.parentElement);
|
|
1694
|
-
leftRightPadding = Math.ceil(
|
|
1693
|
+
leftRightPadding = Math.ceil(index.default.toNumber(cellStyle.paddingLeft) + index.default.toNumber(cellStyle.paddingRight));
|
|
1695
1694
|
}
|
|
1696
1695
|
let colWidth = column.renderAutoWidth - leftRightPadding;
|
|
1697
1696
|
for (let i = 0; i < cellElemList.length; i++) {
|
|
@@ -1742,37 +1741,37 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1742
1741
|
const { columnStore } = reactData;
|
|
1743
1742
|
const { resizeList, pxMinList, autoMinList, pxList, scaleList, scaleMinList, autoList, remainList } = columnStore;
|
|
1744
1743
|
pxMinList.forEach((column) => {
|
|
1745
|
-
const minWidth =
|
|
1744
|
+
const minWidth = index.default.toInteger(column.minWidth);
|
|
1746
1745
|
tWidth += minWidth;
|
|
1747
1746
|
column.renderWidth = minWidth;
|
|
1748
1747
|
});
|
|
1749
1748
|
autoMinList.forEach((column) => {
|
|
1750
|
-
const caWidth = Math.max(60,
|
|
1749
|
+
const caWidth = Math.max(60, index.default.toInteger(column.renderAutoWidth));
|
|
1751
1750
|
tWidth += caWidth;
|
|
1752
1751
|
column.renderWidth = caWidth;
|
|
1753
1752
|
});
|
|
1754
1753
|
scaleMinList.forEach((column) => {
|
|
1755
|
-
const smWidth = Math.floor(
|
|
1754
|
+
const smWidth = Math.floor(index.default.toInteger(column.minWidth) * meanWidth);
|
|
1756
1755
|
tWidth += smWidth;
|
|
1757
1756
|
column.renderWidth = smWidth;
|
|
1758
1757
|
});
|
|
1759
1758
|
scaleList.forEach((column) => {
|
|
1760
|
-
const sfWidth = Math.floor(
|
|
1759
|
+
const sfWidth = Math.floor(index.default.toInteger(column.width) * meanWidth);
|
|
1761
1760
|
tWidth += sfWidth;
|
|
1762
1761
|
column.renderWidth = sfWidth;
|
|
1763
1762
|
});
|
|
1764
1763
|
pxList.forEach((column) => {
|
|
1765
|
-
const pWidth =
|
|
1764
|
+
const pWidth = index.default.toInteger(column.width);
|
|
1766
1765
|
tWidth += pWidth;
|
|
1767
1766
|
column.renderWidth = pWidth;
|
|
1768
1767
|
});
|
|
1769
1768
|
autoList.forEach((column) => {
|
|
1770
|
-
const aWidth = Math.max(60,
|
|
1769
|
+
const aWidth = Math.max(60, index.default.toInteger(column.renderAutoWidth));
|
|
1771
1770
|
tWidth += aWidth;
|
|
1772
1771
|
column.renderWidth = aWidth;
|
|
1773
1772
|
});
|
|
1774
1773
|
resizeList.forEach((column) => {
|
|
1775
|
-
const reWidth =
|
|
1774
|
+
const reWidth = index.default.toInteger(column.resizeWidth);
|
|
1776
1775
|
tWidth += reWidth;
|
|
1777
1776
|
column.renderWidth = reWidth;
|
|
1778
1777
|
});
|
|
@@ -1828,7 +1827,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1828
1827
|
}
|
|
1829
1828
|
if (!firstCellStyle) {
|
|
1830
1829
|
firstCellStyle = getComputedStyle(cellElem);
|
|
1831
|
-
topBottomPadding = firstCellStyle ? Math.ceil(
|
|
1830
|
+
topBottomPadding = firstCellStyle ? Math.ceil(index.default.toNumber(firstCellStyle.paddingTop) + index.default.toNumber(firstCellStyle.paddingBottom)) : 0;
|
|
1832
1831
|
}
|
|
1833
1832
|
if (!scrollXLoad) {
|
|
1834
1833
|
cellStyle.height = orHeight;
|
|
@@ -1874,31 +1873,31 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1874
1873
|
}
|
|
1875
1874
|
let cellValue;
|
|
1876
1875
|
if (sortBy) {
|
|
1877
|
-
cellValue =
|
|
1876
|
+
cellValue = index.default.isFunction(sortBy) ? sortBy({ row, column }) : index.default.get(row, sortBy);
|
|
1878
1877
|
} else {
|
|
1879
1878
|
cellValue = $xeTable.getCellLabel(row, column);
|
|
1880
1879
|
}
|
|
1881
1880
|
if (!sortType || sortType === "auto") {
|
|
1882
|
-
return isNaN(cellValue) ? cellValue :
|
|
1881
|
+
return isNaN(cellValue) ? cellValue : index.default.toNumber(cellValue);
|
|
1883
1882
|
} else if (sortType === "number") {
|
|
1884
|
-
return
|
|
1883
|
+
return index.default.toNumber(cellValue);
|
|
1885
1884
|
} else if (sortType === "string") {
|
|
1886
|
-
return
|
|
1885
|
+
return index.default.toValueString(cellValue);
|
|
1887
1886
|
}
|
|
1888
1887
|
return cellValue;
|
|
1889
1888
|
} : (row) => {
|
|
1890
1889
|
let cellValue;
|
|
1891
1890
|
if (sortBy) {
|
|
1892
|
-
cellValue =
|
|
1891
|
+
cellValue = index.default.isFunction(sortBy) ? sortBy({ row, column }) : index.default.get(row, sortBy);
|
|
1893
1892
|
} else {
|
|
1894
1893
|
cellValue = $xeTable.getCellLabel(row, column);
|
|
1895
1894
|
}
|
|
1896
1895
|
if (!sortType || sortType === "auto") {
|
|
1897
|
-
return isNaN(cellValue) ? cellValue :
|
|
1896
|
+
return isNaN(cellValue) ? cellValue : index.default.toNumber(cellValue);
|
|
1898
1897
|
} else if (sortType === "number") {
|
|
1899
|
-
return
|
|
1898
|
+
return index.default.toNumber(cellValue);
|
|
1900
1899
|
} else if (sortType === "string") {
|
|
1901
|
-
return
|
|
1900
|
+
return index.default.toValueString(cellValue);
|
|
1902
1901
|
}
|
|
1903
1902
|
return cellValue;
|
|
1904
1903
|
};
|
|
@@ -1908,17 +1907,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1908
1907
|
const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
|
|
1909
1908
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
1910
1909
|
const fullMaps = {};
|
|
1911
|
-
afterFullData.forEach((row,
|
|
1910
|
+
afterFullData.forEach((row, index2) => {
|
|
1912
1911
|
const rowid = handleGetRowId(row);
|
|
1913
1912
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1914
|
-
const seq =
|
|
1913
|
+
const seq = index2 + 1;
|
|
1915
1914
|
if (rowRest) {
|
|
1916
1915
|
if (!treeConfig) {
|
|
1917
1916
|
rowRest.seq = seq;
|
|
1918
1917
|
}
|
|
1919
|
-
rowRest._index =
|
|
1918
|
+
rowRest._index = index2;
|
|
1920
1919
|
} else {
|
|
1921
|
-
const rest = { row, rowid, seq, index: -1, $index: -1, _index:
|
|
1920
|
+
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
1921
|
fullAllDataRowIdData[rowid] = rest;
|
|
1923
1922
|
fullDataRowIdData[rowid] = rest;
|
|
1924
1923
|
}
|
|
@@ -1936,13 +1935,13 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1936
1935
|
if (treeConfig) {
|
|
1937
1936
|
let _treeIndex = 0;
|
|
1938
1937
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
1939
|
-
|
|
1938
|
+
index.default.eachTree(afterTreeFullData, (row, index2, items, path) => {
|
|
1940
1939
|
const rowid = handleGetRowId(row);
|
|
1941
1940
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1942
1941
|
const seq = path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
|
|
1943
1942
|
if (rowRest) {
|
|
1944
1943
|
rowRest.seq = seq;
|
|
1945
|
-
rowRest.treeIndex =
|
|
1944
|
+
rowRest.treeIndex = index2;
|
|
1946
1945
|
rowRest._tIndex = _treeIndex;
|
|
1947
1946
|
} else {
|
|
1948
1947
|
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 +1952,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1953
1952
|
fullMaps[rowid] = row;
|
|
1954
1953
|
}, { children: transform ? treeOpts.mapChildrenField : childrenField });
|
|
1955
1954
|
if (transform) {
|
|
1956
|
-
afterFullData.forEach((row,
|
|
1955
|
+
afterFullData.forEach((row, index2) => {
|
|
1957
1956
|
const rowid = handleGetRowId(row);
|
|
1958
1957
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
1959
|
-
const seq =
|
|
1958
|
+
const seq = index2 + 1;
|
|
1960
1959
|
if (rowRest) {
|
|
1961
1960
|
if (!treeConfig) {
|
|
1962
1961
|
rowRest.seq = seq;
|
|
1963
1962
|
}
|
|
1964
|
-
rowRest._index =
|
|
1963
|
+
rowRest._index = index2;
|
|
1965
1964
|
}
|
|
1966
1965
|
});
|
|
1967
1966
|
}
|
|
@@ -1981,7 +1980,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1981
1980
|
const expandMaps = {};
|
|
1982
1981
|
if (treeConfig && treeOpts.transform) {
|
|
1983
1982
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
1984
|
-
|
|
1983
|
+
index.default.eachTree(internalData.afterTreeFullData, (row, index2, items, path, parentRow) => {
|
|
1985
1984
|
const rowid = handleGetRowId(row);
|
|
1986
1985
|
const parentRowid = handleGetRowId(parentRow);
|
|
1987
1986
|
if (!parentRow || expandMaps[parentRowid] && treeExpandedMaps[parentRowid]) {
|
|
@@ -1998,7 +1997,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
1998
1997
|
return fullData;
|
|
1999
1998
|
} else if (isRowGroupStatus) {
|
|
2000
1999
|
const { childrenField } = aggregateOpts;
|
|
2001
|
-
|
|
2000
|
+
index.default.eachTree(internalData.afterGroupFullData, (row, index2, items, path, parentRow) => {
|
|
2002
2001
|
const rowid = handleGetRowId(row);
|
|
2003
2002
|
const parentRowid = handleGetRowId(parentRow);
|
|
2004
2003
|
if (!parentRow || expandMaps[parentRowid] && rowGroupExpandedMaps[parentRowid]) {
|
|
@@ -2053,7 +2052,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2053
2052
|
}
|
|
2054
2053
|
});
|
|
2055
2054
|
if (sortMultiple && chronological && orderColumns.length > 1) {
|
|
2056
|
-
orderColumns =
|
|
2055
|
+
orderColumns = index.default.orderBy(orderColumns, "sortTime");
|
|
2057
2056
|
}
|
|
2058
2057
|
if (!allRemoteFilter && filterColumns.length) {
|
|
2059
2058
|
const handleFilter = (row) => {
|
|
@@ -2072,11 +2071,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2072
2071
|
} else if (tdFilterMethod) {
|
|
2073
2072
|
return itemList.some((item) => tdFilterMethod({ value: item.value, option: item, cellValue, row, column, $table: $xeTable }));
|
|
2074
2073
|
}
|
|
2075
|
-
return valueList.indexOf(
|
|
2074
|
+
return valueList.indexOf(index.default.get(row, column.field)) > -1;
|
|
2076
2075
|
});
|
|
2077
2076
|
};
|
|
2078
2077
|
if (isRowGroupStatus) {
|
|
2079
|
-
tableTree =
|
|
2078
|
+
tableTree = index.default.searchTree(tableFullGroupData, handleFilter, {
|
|
2080
2079
|
original: true,
|
|
2081
2080
|
isEvery: true,
|
|
2082
2081
|
children: aggregateOpts.mapChildrenField,
|
|
@@ -2084,7 +2083,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2084
2083
|
});
|
|
2085
2084
|
tableData = tableTree;
|
|
2086
2085
|
} else if (treeConfig && transform && isFilterDeep !== false) {
|
|
2087
|
-
tableTree =
|
|
2086
|
+
tableTree = index.default.searchTree(tableFullTreeData, handleFilter, {
|
|
2088
2087
|
original: true,
|
|
2089
2088
|
isEvery,
|
|
2090
2089
|
children: mapChildrenField,
|
|
@@ -2097,7 +2096,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2097
2096
|
}
|
|
2098
2097
|
} else {
|
|
2099
2098
|
if (isRowGroupStatus) {
|
|
2100
|
-
tableTree =
|
|
2099
|
+
tableTree = index.default.searchTree(tableFullGroupData, () => true, {
|
|
2101
2100
|
original: true,
|
|
2102
2101
|
isEvery: true,
|
|
2103
2102
|
children: aggregateOpts.mapChildrenField,
|
|
@@ -2105,7 +2104,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2105
2104
|
});
|
|
2106
2105
|
tableData = tableTree;
|
|
2107
2106
|
} else if (treeConfig && transform && isFilterDeep !== false) {
|
|
2108
|
-
tableTree =
|
|
2107
|
+
tableTree = index.default.searchTree(tableFullTreeData, () => true, {
|
|
2109
2108
|
original: true,
|
|
2110
2109
|
isEvery,
|
|
2111
2110
|
children: mapChildrenField,
|
|
@@ -2121,14 +2120,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2121
2120
|
if (isRowGroupStatus) {
|
|
2122
2121
|
if (allSortMethod) {
|
|
2123
2122
|
const sortRests = allSortMethod({ data: tableTree, sortList: orderColumns, $table: $xeTable });
|
|
2124
|
-
tableTree =
|
|
2123
|
+
tableTree = index.default.isArray(sortRests) ? sortRests : tableTree;
|
|
2125
2124
|
} else {
|
|
2126
|
-
const treeList =
|
|
2125
|
+
const treeList = index.default.toTreeArray(tableTree, {
|
|
2127
2126
|
key: aggregateOpts.rowField,
|
|
2128
2127
|
parentKey: aggregateOpts.parentField,
|
|
2129
2128
|
children: aggregateOpts.mapChildrenField
|
|
2130
2129
|
});
|
|
2131
|
-
tableTree =
|
|
2130
|
+
tableTree = index.default.toArrayTree(index.default.orderBy(treeList, orderColumns.map(({ column, order }) => [getOrderField(column), order])), {
|
|
2132
2131
|
key: aggregateOpts.rowField,
|
|
2133
2132
|
parentKey: aggregateOpts.parentField,
|
|
2134
2133
|
children: aggregateOpts.childrenField,
|
|
@@ -2139,12 +2138,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2139
2138
|
} else if (treeConfig && transform && isSortDeep !== false) {
|
|
2140
2139
|
if (allSortMethod) {
|
|
2141
2140
|
const sortRests = allSortMethod({ data: tableTree, sortList: orderColumns, $table: $xeTable });
|
|
2142
|
-
tableTree =
|
|
2141
|
+
tableTree = index.default.isArray(sortRests) ? sortRests : tableTree;
|
|
2143
2142
|
} else {
|
|
2144
|
-
const treeList =
|
|
2143
|
+
const treeList = index.default.toTreeArray(tableTree, {
|
|
2145
2144
|
children: mapChildrenField
|
|
2146
2145
|
});
|
|
2147
|
-
tableTree =
|
|
2146
|
+
tableTree = index.default.toArrayTree(index.default.orderBy(treeList, orderColumns.map(({ column, order }) => [getOrderField(column), order])), {
|
|
2148
2147
|
key: rowField,
|
|
2149
2148
|
parentKey: parentField,
|
|
2150
2149
|
children: childrenField,
|
|
@@ -2155,16 +2154,16 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2155
2154
|
} else {
|
|
2156
2155
|
if (allSortMethod) {
|
|
2157
2156
|
const sortRests = allSortMethod({ data: tableData, sortList: orderColumns, $table: $xeTable });
|
|
2158
|
-
tableData =
|
|
2157
|
+
tableData = index.default.isArray(sortRests) ? sortRests : tableData;
|
|
2159
2158
|
} else {
|
|
2160
|
-
tableData =
|
|
2159
|
+
tableData = index.default.orderBy(tableData, orderColumns.map(({ column, order }) => [getOrderField(column), order]));
|
|
2161
2160
|
}
|
|
2162
2161
|
tableTree = tableData;
|
|
2163
2162
|
}
|
|
2164
2163
|
}
|
|
2165
2164
|
} else {
|
|
2166
2165
|
if (isRowGroupStatus) {
|
|
2167
|
-
tableTree =
|
|
2166
|
+
tableTree = index.default.searchTree(tableFullGroupData, () => true, {
|
|
2168
2167
|
original: true,
|
|
2169
2168
|
isEvery: true,
|
|
2170
2169
|
children: aggregateOpts.mapChildrenField,
|
|
@@ -2172,7 +2171,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2172
2171
|
});
|
|
2173
2172
|
tableData = tableTree;
|
|
2174
2173
|
} else if (treeConfig && transform && isSortDeep !== false) {
|
|
2175
|
-
tableTree =
|
|
2174
|
+
tableTree = index.default.searchTree(tableFullTreeData, () => true, {
|
|
2176
2175
|
original: true,
|
|
2177
2176
|
isEvery,
|
|
2178
2177
|
children: mapChildrenField,
|
|
@@ -2313,8 +2312,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2313
2312
|
rowExpandEl.style.top = `${tHeaderHeight}px`;
|
|
2314
2313
|
}
|
|
2315
2314
|
internalData.tBodyHeight = tbHeight;
|
|
2316
|
-
containerList.forEach((name,
|
|
2317
|
-
const fixedType =
|
|
2315
|
+
containerList.forEach((name, index2) => {
|
|
2316
|
+
const fixedType = index2 > 0 ? name : "";
|
|
2318
2317
|
const layoutList = ["header", "body", "footer"];
|
|
2319
2318
|
const isFixedLeft = fixedType === "left";
|
|
2320
2319
|
let fixedColumn = [];
|
|
@@ -2472,17 +2471,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2472
2471
|
const sortOpts = computeSortOpts.value;
|
|
2473
2472
|
let { defaultSort } = sortOpts;
|
|
2474
2473
|
if (defaultSort) {
|
|
2475
|
-
if (!
|
|
2474
|
+
if (!index.default.isArray(defaultSort)) {
|
|
2476
2475
|
defaultSort = [defaultSort];
|
|
2477
2476
|
}
|
|
2478
2477
|
if (defaultSort.length) {
|
|
2479
|
-
(sortConfig.multiple ? defaultSort : defaultSort.slice(0, 1)).forEach((item,
|
|
2478
|
+
(sortConfig.multiple ? defaultSort : defaultSort.slice(0, 1)).forEach((item, index2) => {
|
|
2480
2479
|
const { field, order } = item;
|
|
2481
2480
|
if (field && order) {
|
|
2482
2481
|
const column = $xeTable.getColumnByField(field);
|
|
2483
2482
|
if (column && column.sortable) {
|
|
2484
2483
|
column.order = order;
|
|
2485
|
-
column.sortTime = Date.now() +
|
|
2484
|
+
column.sortTime = Date.now() + index2;
|
|
2486
2485
|
}
|
|
2487
2486
|
}
|
|
2488
2487
|
});
|
|
@@ -2576,7 +2575,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2576
2575
|
return vue.nextTick();
|
|
2577
2576
|
};
|
|
2578
2577
|
const handleCheckedCheckboxRow = (rows, value, isForce) => {
|
|
2579
|
-
if (rows && !
|
|
2578
|
+
if (rows && !index.default.isArray(rows)) {
|
|
2580
2579
|
rows = [rows];
|
|
2581
2580
|
}
|
|
2582
2581
|
$xeTable.handleBatchSelectRows(rows, !!value, isForce);
|
|
@@ -2601,21 +2600,21 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2601
2600
|
if (checked) {
|
|
2602
2601
|
selectRowMaps[handleGetRowId(row)] = row;
|
|
2603
2602
|
}
|
|
2604
|
-
|
|
2603
|
+
index.default.set(row, checkField, checked);
|
|
2605
2604
|
}
|
|
2606
2605
|
if ((treeConfig || isRowGroupStatus) && indeterminateField) {
|
|
2607
|
-
|
|
2606
|
+
index.default.set(row, indeterminateField, false);
|
|
2608
2607
|
}
|
|
2609
2608
|
};
|
|
2610
2609
|
if (treeConfig || isRowGroupStatus) {
|
|
2611
|
-
|
|
2610
|
+
index.default.eachTree(afterFullData, checkValFn, { children: childrenField });
|
|
2612
2611
|
} else {
|
|
2613
2612
|
afterFullData.forEach(checkValFn);
|
|
2614
2613
|
}
|
|
2615
2614
|
} else {
|
|
2616
2615
|
if (isRowGroupStatus) {
|
|
2617
2616
|
if (checked) {
|
|
2618
|
-
|
|
2617
|
+
index.default.eachTree(afterGroupFullData, (row) => {
|
|
2619
2618
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
2620
2619
|
const rowid = handleGetRowId(row);
|
|
2621
2620
|
selectRowMaps[rowid] = row;
|
|
@@ -2623,7 +2622,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2623
2622
|
}, { children: aggregateOpts.mapChildrenField });
|
|
2624
2623
|
} else {
|
|
2625
2624
|
if (!isForce && checkMethod) {
|
|
2626
|
-
|
|
2625
|
+
index.default.eachTree(afterGroupFullData, (row) => {
|
|
2627
2626
|
const rowid = handleGetRowId(row);
|
|
2628
2627
|
if (checkMethod({ $table: $xeTable, row }) ? false : selectCheckboxMaps[rowid]) {
|
|
2629
2628
|
selectRowMaps[rowid] = row;
|
|
@@ -2633,7 +2632,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2633
2632
|
}
|
|
2634
2633
|
} else if (treeConfig) {
|
|
2635
2634
|
if (checked) {
|
|
2636
|
-
|
|
2635
|
+
index.default.eachTree(afterTreeFullData, (row) => {
|
|
2637
2636
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
2638
2637
|
const rowid = handleGetRowId(row);
|
|
2639
2638
|
selectRowMaps[rowid] = row;
|
|
@@ -2641,7 +2640,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2641
2640
|
}, { children: childrenField });
|
|
2642
2641
|
} else {
|
|
2643
2642
|
if (!isForce && checkMethod) {
|
|
2644
|
-
|
|
2643
|
+
index.default.eachTree(afterTreeFullData, (row) => {
|
|
2645
2644
|
const rowid = handleGetRowId(row);
|
|
2646
2645
|
if (checkMethod({ $table: $xeTable, row }) ? false : selectCheckboxMaps[rowid]) {
|
|
2647
2646
|
selectRowMaps[rowid] = row;
|
|
@@ -2678,7 +2677,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2678
2677
|
}
|
|
2679
2678
|
if (reserve) {
|
|
2680
2679
|
if (checked) {
|
|
2681
|
-
|
|
2680
|
+
index.default.each(selectRowMaps, (row, rowid) => {
|
|
2682
2681
|
checkboxReserveRowMap[rowid] = row;
|
|
2683
2682
|
});
|
|
2684
2683
|
} else {
|
|
@@ -2767,7 +2766,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2767
2766
|
if (treeExpandLazyLoadedMaps[rowid]) {
|
|
2768
2767
|
delete treeExpandLazyLoadedMaps[rowid];
|
|
2769
2768
|
}
|
|
2770
|
-
if (!
|
|
2769
|
+
if (!index.default.isArray(childRecords)) {
|
|
2771
2770
|
childRecords = [];
|
|
2772
2771
|
}
|
|
2773
2772
|
if (childRecords) {
|
|
@@ -2890,8 +2889,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2890
2889
|
const virtualXOpts = computeVirtualXOpts.value;
|
|
2891
2890
|
if (scrollXLoad) {
|
|
2892
2891
|
const { toVisibleIndex: toXVisibleIndex, visibleSize: visibleXSize } = handleVirtualXVisible();
|
|
2893
|
-
const offsetXSize = Math.max(0, virtualXOpts.oSize ?
|
|
2894
|
-
scrollXStore.preloadSize =
|
|
2892
|
+
const offsetXSize = Math.max(0, virtualXOpts.oSize ? index.default.toNumber(virtualXOpts.oSize) : 0);
|
|
2893
|
+
scrollXStore.preloadSize = index.default.toNumber(virtualXOpts.preSize);
|
|
2895
2894
|
scrollXStore.offsetSize = offsetXSize;
|
|
2896
2895
|
scrollXStore.visibleSize = visibleXSize;
|
|
2897
2896
|
scrollXStore.endIndex = Math.max(scrollXStore.startIndex + scrollXStore.visibleSize + offsetXSize, scrollXStore.endIndex);
|
|
@@ -2908,8 +2907,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
2908
2907
|
reactData.rowHeight = rowHeight;
|
|
2909
2908
|
const { toVisibleIndex: toYVisibleIndex, visibleSize: visibleYSize } = handleVirtualYVisible();
|
|
2910
2909
|
if (scrollYLoad) {
|
|
2911
|
-
const offsetYSize = Math.max(0, virtualYOpts.oSize ?
|
|
2912
|
-
scrollYStore.preloadSize =
|
|
2910
|
+
const offsetYSize = Math.max(0, virtualYOpts.oSize ? index.default.toNumber(virtualYOpts.oSize) : 0);
|
|
2911
|
+
scrollYStore.preloadSize = index.default.toNumber(virtualYOpts.preSize);
|
|
2913
2912
|
scrollYStore.offsetSize = offsetYSize;
|
|
2914
2913
|
scrollYStore.visibleSize = visibleYSize;
|
|
2915
2914
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
@@ -3055,7 +3054,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3055
3054
|
const aggGroupFields = [];
|
|
3056
3055
|
const aggGroupConfs = [];
|
|
3057
3056
|
if (groupFields) {
|
|
3058
|
-
(
|
|
3057
|
+
(index.default.isArray(groupFields) ? groupFields : [groupFields]).forEach((field) => {
|
|
3059
3058
|
aggGroupFields.push(field);
|
|
3060
3059
|
aggGroupConfs.push({
|
|
3061
3060
|
field
|
|
@@ -3073,9 +3072,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3073
3072
|
const { mapChildrenField } = aggregateOpts;
|
|
3074
3073
|
const aggCalcMethod = aggregateOpts.calcValuesMethod || aggregateOpts.countMethod || aggregateOpts.aggregateMethod;
|
|
3075
3074
|
if (mapChildrenField) {
|
|
3076
|
-
|
|
3075
|
+
index.default.lastEach(aggList, (aggRow) => {
|
|
3077
3076
|
let count = 0;
|
|
3078
|
-
|
|
3077
|
+
index.default.each(aggRow[mapChildrenField], (row) => {
|
|
3079
3078
|
if (row.isAggregate) {
|
|
3080
3079
|
count += row.childCount || 0;
|
|
3081
3080
|
} else {
|
|
@@ -3088,7 +3087,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3088
3087
|
$xeTable.handlePivotTableAggregateData(aggList);
|
|
3089
3088
|
} else {
|
|
3090
3089
|
if (aggFuncColumns.length) {
|
|
3091
|
-
|
|
3090
|
+
index.default.lastEach(aggList, (aggRow) => {
|
|
3092
3091
|
const aggDtObj = {};
|
|
3093
3092
|
const aggData = aggRow.aggData;
|
|
3094
3093
|
const groupField = aggRow.groupField;
|
|
@@ -3121,7 +3120,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3121
3120
|
};
|
|
3122
3121
|
let aggVal = 0;
|
|
3123
3122
|
if (childList.length && childList[0].isAggregate) {
|
|
3124
|
-
|
|
3123
|
+
index.default.each(childList, (row) => {
|
|
3125
3124
|
if (row.isAggregate) {
|
|
3126
3125
|
const currAggData2 = row.aggData[field];
|
|
3127
3126
|
if (currAggData2) {
|
|
@@ -3152,7 +3151,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3152
3151
|
const { mapChildrenField } = aggregateOpts;
|
|
3153
3152
|
if ((aggregateConfig || rowGroupConfig) && isRowGroupStatus) {
|
|
3154
3153
|
const aggList = [];
|
|
3155
|
-
|
|
3154
|
+
index.default.eachTree(tableFullGroupData, (row) => {
|
|
3156
3155
|
if (row.isAggregate) {
|
|
3157
3156
|
aggList.push(row);
|
|
3158
3157
|
}
|
|
@@ -3180,8 +3179,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3180
3179
|
const aggList = [];
|
|
3181
3180
|
const rowkey = util.getRowkey($xeTable);
|
|
3182
3181
|
list.forEach((row) => {
|
|
3183
|
-
const cellValue = groupColumn ? $xeTable.getCellLabel(row, groupColumn) :
|
|
3184
|
-
const groupValue =
|
|
3182
|
+
const cellValue = groupColumn ? $xeTable.getCellLabel(row, groupColumn) : index.default.get(row, groupField);
|
|
3183
|
+
const groupValue = index.default.eqNull(cellValue) ? "" : cellValue;
|
|
3185
3184
|
let childList = groupMaps[groupValue];
|
|
3186
3185
|
if (!childList) {
|
|
3187
3186
|
childList = [];
|
|
@@ -3192,7 +3191,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3192
3191
|
}
|
|
3193
3192
|
childList.push(row);
|
|
3194
3193
|
});
|
|
3195
|
-
|
|
3194
|
+
index.default.objectEach(groupMaps, (childList, groupValue) => {
|
|
3196
3195
|
const { fullData: childFullData, treeData: childTreeData } = handleGroupData(childList, rowGroups.slice(1));
|
|
3197
3196
|
const aggRow = {
|
|
3198
3197
|
isAggregate: true,
|
|
@@ -3286,7 +3285,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3286
3285
|
if (childrenField === treeOpts.mapChildrenField) {
|
|
3287
3286
|
log.errLog("vxe.error.errConflicts", ["tree-config.childrenField", "tree-config.mapChildrenField"]);
|
|
3288
3287
|
}
|
|
3289
|
-
treeData =
|
|
3288
|
+
treeData = index.default.toArrayTree(fullData, {
|
|
3290
3289
|
key: treeOpts.rowField,
|
|
3291
3290
|
parentKey: treeOpts.parentField,
|
|
3292
3291
|
children: childrenField,
|
|
@@ -3452,7 +3451,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3452
3451
|
reactData.tableColumn = tableColumn;
|
|
3453
3452
|
};
|
|
3454
3453
|
const handleUpdateColumn = () => {
|
|
3455
|
-
const columnList =
|
|
3454
|
+
const columnList = index.default.orderBy(internalData.collectColumn, "renderSortNumber");
|
|
3456
3455
|
internalData.collectColumn = columnList;
|
|
3457
3456
|
const tFullColumn = util.getColumnList(columnList);
|
|
3458
3457
|
internalData.tableFullColumn = tFullColumn;
|
|
@@ -3491,7 +3490,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3491
3490
|
const leftGroupList = [];
|
|
3492
3491
|
const centerGroupList = [];
|
|
3493
3492
|
const rightGroupList = [];
|
|
3494
|
-
|
|
3493
|
+
index.default.eachTree(collectColumn, (column, index$1, items, path, parentColumn) => {
|
|
3495
3494
|
const isColGroup = utils.hasChildrenList(column);
|
|
3496
3495
|
if (parentColumn && parentColumn.fixed) {
|
|
3497
3496
|
column.fixed = parentColumn.fixed;
|
|
@@ -3500,7 +3499,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3500
3499
|
log.errLog("vxe.error.groupFixed");
|
|
3501
3500
|
}
|
|
3502
3501
|
if (isColGroup) {
|
|
3503
|
-
column.visible = !!
|
|
3502
|
+
column.visible = !!index.default.findTree(column.children, (subColumn) => utils.hasChildrenList(subColumn) ? false : subColumn.visible);
|
|
3504
3503
|
} else if (column.visible) {
|
|
3505
3504
|
if (column.fixed === "left") {
|
|
3506
3505
|
leftList.push(column);
|
|
@@ -3558,15 +3557,15 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3558
3557
|
scrollXStore.visibleEndIndex = visibleSize;
|
|
3559
3558
|
}
|
|
3560
3559
|
}
|
|
3561
|
-
if (visibleColumn.length !== internalData.visibleColumn.length || !internalData.visibleColumn.every((column,
|
|
3560
|
+
if (visibleColumn.length !== internalData.visibleColumn.length || !internalData.visibleColumn.every((column, index2) => column === visibleColumn[index2])) {
|
|
3562
3561
|
$xeTable.clearMergeCells();
|
|
3563
3562
|
$xeTable.clearMergeFooterItems();
|
|
3564
3563
|
}
|
|
3565
|
-
visibleColumn.forEach((column,
|
|
3564
|
+
visibleColumn.forEach((column, index2) => {
|
|
3566
3565
|
const colid = column.id;
|
|
3567
3566
|
const colRest = fullColumnIdData[colid];
|
|
3568
3567
|
if (colRest) {
|
|
3569
|
-
colRest._index =
|
|
3568
|
+
colRest._index = index2;
|
|
3570
3569
|
}
|
|
3571
3570
|
});
|
|
3572
3571
|
handleTableColumn();
|
|
@@ -3587,10 +3586,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3587
3586
|
const fullColIdData = {};
|
|
3588
3587
|
const fullColFieldData = {};
|
|
3589
3588
|
let sortIndex = 1;
|
|
3590
|
-
|
|
3589
|
+
index.default.eachTree(collectColumn, (column, index2, items, path, parentColumn) => {
|
|
3591
3590
|
const { id: colid, field } = column;
|
|
3592
3591
|
const parentId = parentColumn ? parentColumn.id : null;
|
|
3593
|
-
const rest = { $index: -1, _index: -1, column, colid, index, items, parent: parentColumn || null, width: 0, oLeft: 0 };
|
|
3592
|
+
const rest = { $index: -1, _index: -1, column, colid, index: index2, items, parent: parentColumn || null, width: 0, oLeft: 0 };
|
|
3594
3593
|
column.parentId = parentId;
|
|
3595
3594
|
column.defaultParentId = parentId;
|
|
3596
3595
|
column.sortNumber = sortIndex;
|
|
@@ -3684,7 +3683,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3684
3683
|
let validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: treeNodeColumn, columnIndex, $columnIndex, row })) : rows;
|
|
3685
3684
|
if (accordion) {
|
|
3686
3685
|
validRows = validRows.length ? [validRows[validRows.length - 1]] : [];
|
|
3687
|
-
const matchObj =
|
|
3686
|
+
const matchObj = index.default.findTree(tableFullTreeData, (item) => item === validRows[0], { children: childrenField });
|
|
3688
3687
|
if (matchObj) {
|
|
3689
3688
|
matchObj.items.forEach((item) => {
|
|
3690
3689
|
const rowid = handleGetRowId(item);
|
|
@@ -3755,7 +3754,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
3755
3754
|
if (mapChildrenField) {
|
|
3756
3755
|
if (accordion) {
|
|
3757
3756
|
validRows = validRows.length ? [validRows[validRows.length - 1]] : [];
|
|
3758
|
-
const matchObj =
|
|
3757
|
+
const matchObj = index.default.findTree(tableFullGroupData, (item) => util.getRowid($xeTable, item) === util.getRowid($xeTable, validRows[0]), { children: mapChildrenField });
|
|
3759
3758
|
if (matchObj) {
|
|
3760
3759
|
matchObj.items.forEach((item) => {
|
|
3761
3760
|
const rowid = handleGetRowId(item);
|
|
@@ -4082,7 +4081,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4082
4081
|
const bodyScrollElem = util.getRefElem(elemStore["main-body-scroll"]);
|
|
4083
4082
|
if (rowExpandEl && bodyScrollElem) {
|
|
4084
4083
|
let isUpdateHeight = false;
|
|
4085
|
-
|
|
4084
|
+
index.default.arrayEach(rowExpandEl.children, (reEl) => {
|
|
4086
4085
|
const expandEl = reEl;
|
|
4087
4086
|
const rowid = expandEl.getAttribute("rowid") || "";
|
|
4088
4087
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
@@ -4168,7 +4167,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4168
4167
|
tableData.forEach((row, rIndex) => {
|
|
4169
4168
|
handleNodeRow(row, rIndex, tableData);
|
|
4170
4169
|
});
|
|
4171
|
-
|
|
4170
|
+
index.default.lastArrayEach(expParentList, ({ row, nextRow }) => {
|
|
4172
4171
|
const rowid = handleGetRowId(row);
|
|
4173
4172
|
const childList = row[transform ? mapChildrenField : childrenField];
|
|
4174
4173
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
@@ -4215,12 +4214,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4215
4214
|
const handleColumnVisible = (visible) => {
|
|
4216
4215
|
return function(fieldOrColumn) {
|
|
4217
4216
|
let status = false;
|
|
4218
|
-
const cols =
|
|
4217
|
+
const cols = index.default.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn];
|
|
4219
4218
|
cols.forEach((item) => {
|
|
4220
4219
|
const column = util.handleFieldOrColumn($xeTable, item);
|
|
4221
4220
|
if (column) {
|
|
4222
4221
|
if (column.children && column.children.length) {
|
|
4223
|
-
|
|
4222
|
+
index.default.eachTree([column], (item2) => {
|
|
4224
4223
|
item2.visible = visible;
|
|
4225
4224
|
item2.renderVisible = visible;
|
|
4226
4225
|
});
|
|
@@ -4322,14 +4321,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4322
4321
|
setRow(rows, record) {
|
|
4323
4322
|
if (rows && record) {
|
|
4324
4323
|
let rest = rows;
|
|
4325
|
-
if (!
|
|
4324
|
+
if (!index.default.isArray(rows)) {
|
|
4326
4325
|
rest = [rows];
|
|
4327
4326
|
}
|
|
4328
4327
|
const rowkey = util.getRowkey($xeTable);
|
|
4329
4328
|
rest.forEach((row) => {
|
|
4330
4329
|
const rowid = util.getRowid($xeTable, row);
|
|
4331
|
-
const newRecord =
|
|
4332
|
-
|
|
4330
|
+
const newRecord = index.default.clone(Object.assign({}, record), true);
|
|
4331
|
+
index.default.set(newRecord, rowkey, rowid);
|
|
4333
4332
|
Object.assign(row, newRecord);
|
|
4334
4333
|
});
|
|
4335
4334
|
}
|
|
@@ -4351,17 +4350,17 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4351
4350
|
return vue.nextTick();
|
|
4352
4351
|
}
|
|
4353
4352
|
const rowkey = util.getRowkey($xeTable);
|
|
4354
|
-
const rowid =
|
|
4353
|
+
const rowid = index.default.get(row, rowkey);
|
|
4355
4354
|
const oRow = sourceDataRowIdData[rowid];
|
|
4356
4355
|
if (oRow && row) {
|
|
4357
4356
|
if (field) {
|
|
4358
|
-
const newValue =
|
|
4359
|
-
|
|
4360
|
-
|
|
4357
|
+
const newValue = index.default.clone(index.default.get(record || row, field), true);
|
|
4358
|
+
index.default.set(row, field, newValue);
|
|
4359
|
+
index.default.set(oRow, field, newValue);
|
|
4361
4360
|
} else {
|
|
4362
|
-
const newRecord =
|
|
4363
|
-
|
|
4364
|
-
|
|
4361
|
+
const newRecord = index.default.clone(Object.assign({}, record), true);
|
|
4362
|
+
index.default.set(newRecord, rowkey, rowid);
|
|
4363
|
+
index.default.destructuring(oRow, Object.assign(row, newRecord));
|
|
4365
4364
|
}
|
|
4366
4365
|
}
|
|
4367
4366
|
reactData.tableData = tableData.slice(0);
|
|
@@ -4387,25 +4386,25 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4387
4386
|
return $xeTable.createData(childRecords).then((rows) => {
|
|
4388
4387
|
if (keepSource) {
|
|
4389
4388
|
const rowid = util.getRowid($xeTable, row);
|
|
4390
|
-
const matchObj =
|
|
4389
|
+
const matchObj = index.default.findTree(tableSourceData, (item) => rowid === util.getRowid($xeTable, item), { children: childrenField });
|
|
4391
4390
|
if (matchObj) {
|
|
4392
|
-
matchObj.item[childrenField] =
|
|
4391
|
+
matchObj.item[childrenField] = index.default.clone(rows, true);
|
|
4393
4392
|
}
|
|
4394
4393
|
rows.forEach((childRow) => {
|
|
4395
4394
|
const rowid2 = util.getRowid($xeTable, childRow);
|
|
4396
|
-
sourceDataRowIdData[rowid2] =
|
|
4395
|
+
sourceDataRowIdData[rowid2] = index.default.clone(childRow, true);
|
|
4397
4396
|
});
|
|
4398
4397
|
}
|
|
4399
|
-
|
|
4398
|
+
index.default.eachTree(rows, (childRow, index2, items, path, parentItem, nodes) => {
|
|
4400
4399
|
const rowid = util.getRowid($xeTable, childRow);
|
|
4401
4400
|
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 };
|
|
4401
|
+
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
4402
|
fullDataRowIdData[rowid] = rest;
|
|
4404
4403
|
fullAllDataRowIdData[rowid] = rest;
|
|
4405
4404
|
}, { children: childrenField });
|
|
4406
4405
|
row[childrenField] = rows;
|
|
4407
4406
|
if (transform) {
|
|
4408
|
-
row[mapChildrenField] =
|
|
4407
|
+
row[mapChildrenField] = index.default.clone(rows, false);
|
|
4409
4408
|
}
|
|
4410
4409
|
updateAfterDataIndex();
|
|
4411
4410
|
return rows;
|
|
@@ -4418,7 +4417,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4418
4417
|
*/
|
|
4419
4418
|
loadColumn(columns) {
|
|
4420
4419
|
const { lastScrollLeft, lastScrollTop } = internalData;
|
|
4421
|
-
const collectColumn =
|
|
4420
|
+
const collectColumn = index.default.mapTree(columns, (column) => vue.reactive(cell.Cell.createColumn($xeTable, column)));
|
|
4422
4421
|
return handleInitColumn(collectColumn).then(() => {
|
|
4423
4422
|
let targetScrollLeft = lastScrollLeft;
|
|
4424
4423
|
let targetScrollTop = lastScrollTop;
|
|
@@ -4540,7 +4539,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4540
4539
|
* @param {Array/Object} records 新数据
|
|
4541
4540
|
*/
|
|
4542
4541
|
createRow(records) {
|
|
4543
|
-
const isArr =
|
|
4542
|
+
const isArr = index.default.isArray(records);
|
|
4544
4543
|
if (!isArr) {
|
|
4545
4544
|
records = [records || {}];
|
|
4546
4545
|
}
|
|
@@ -4565,11 +4564,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4565
4564
|
}
|
|
4566
4565
|
let targetRows = rows;
|
|
4567
4566
|
if (rows) {
|
|
4568
|
-
if (!
|
|
4567
|
+
if (!index.default.isArray(rows)) {
|
|
4569
4568
|
targetRows = [rows];
|
|
4570
4569
|
}
|
|
4571
4570
|
} else {
|
|
4572
|
-
targetRows =
|
|
4571
|
+
targetRows = index.default.toArray($xeTable.getUpdateRecords());
|
|
4573
4572
|
}
|
|
4574
4573
|
let reDelFlag = false;
|
|
4575
4574
|
if (targetRows.length) {
|
|
@@ -4582,9 +4581,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4582
4581
|
const oRow = sourceDataRowIdData[rowid];
|
|
4583
4582
|
if (oRow && row) {
|
|
4584
4583
|
if (field) {
|
|
4585
|
-
|
|
4584
|
+
index.default.set(row, field, index.default.clone(index.default.get(oRow, field), true));
|
|
4586
4585
|
} else {
|
|
4587
|
-
|
|
4586
|
+
index.default.destructuring(row, index.default.clone(oRow, true));
|
|
4588
4587
|
}
|
|
4589
4588
|
if (!fullDataRowIdData[rowid] && $xeTable.isRemoveByRow(row)) {
|
|
4590
4589
|
if (removeRowMaps[rowid]) {
|
|
@@ -4633,11 +4632,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4633
4632
|
const { tableFullData, visibleColumn } = internalData;
|
|
4634
4633
|
if (!arguments.length) {
|
|
4635
4634
|
rows = tableFullData;
|
|
4636
|
-
} else if (rows && !
|
|
4635
|
+
} else if (rows && !index.default.isArray(rows)) {
|
|
4637
4636
|
rows = [rows];
|
|
4638
4637
|
}
|
|
4639
4638
|
if (field) {
|
|
4640
|
-
rows.forEach((row) =>
|
|
4639
|
+
rows.forEach((row) => index.default.set(row, field, null));
|
|
4641
4640
|
} else {
|
|
4642
4641
|
rows.forEach((row) => {
|
|
4643
4642
|
visibleColumn.forEach((column) => {
|
|
@@ -4719,11 +4718,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4719
4718
|
columnIndex: $xeTable.getColumnIndex(column)
|
|
4720
4719
|
};
|
|
4721
4720
|
if (formatter) {
|
|
4722
|
-
if (
|
|
4721
|
+
if (index.default.isString(formatter)) {
|
|
4723
4722
|
const gFormatOpts = formats.get(formatter);
|
|
4724
4723
|
const tcFormatMethod = gFormatOpts ? gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod : null;
|
|
4725
4724
|
cellLabel = tcFormatMethod ? tcFormatMethod(formatParams) : "";
|
|
4726
|
-
} else if (
|
|
4725
|
+
} else if (index.default.isArray(formatter)) {
|
|
4727
4726
|
const gFormatOpts = formats.get(formatter[0]);
|
|
4728
4727
|
const tcFormatMethod = gFormatOpts ? gFormatOpts.tableCellFormatMethod || gFormatOpts.cellFormatMethod : null;
|
|
4729
4728
|
cellLabel = tcFormatMethod ? tcFormatMethod(formatParams, ...formatter.slice(1)) : "";
|
|
@@ -4762,7 +4761,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4762
4761
|
clearFormatterCache(isUpdate) {
|
|
4763
4762
|
const { tableData, tableColumn } = reactData;
|
|
4764
4763
|
const { fullAllDataRowIdData } = internalData;
|
|
4765
|
-
|
|
4764
|
+
index.default.each(fullAllDataRowIdData, (rowRest) => {
|
|
4766
4765
|
if (rowRest.formatData) {
|
|
4767
4766
|
rowRest.formatData = void 0;
|
|
4768
4767
|
}
|
|
@@ -4784,10 +4783,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4784
4783
|
const { footerFormatter } = column;
|
|
4785
4784
|
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
4786
4785
|
let itemValue = "";
|
|
4787
|
-
if (
|
|
4786
|
+
if (index.default.isArray(row)) {
|
|
4788
4787
|
itemValue = row[_columnIndex];
|
|
4789
4788
|
} else {
|
|
4790
|
-
itemValue =
|
|
4789
|
+
itemValue = index.default.get(row, column.field);
|
|
4791
4790
|
}
|
|
4792
4791
|
let cellLabel = itemValue;
|
|
4793
4792
|
if (footerFormatter) {
|
|
@@ -4823,11 +4822,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4823
4822
|
_columnIndex,
|
|
4824
4823
|
columnIndex: $xeTable.getColumnIndex(column)
|
|
4825
4824
|
};
|
|
4826
|
-
if (
|
|
4825
|
+
if (index.default.isString(footerFormatter)) {
|
|
4827
4826
|
const gFormatOpts = formats.get(footerFormatter);
|
|
4828
4827
|
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4829
4828
|
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams) : "";
|
|
4830
|
-
} else if (
|
|
4829
|
+
} else if (index.default.isArray(footerFormatter)) {
|
|
4831
4830
|
const gFormatOpts = formats.get(footerFormatter[0]);
|
|
4832
4831
|
const fcFormatMethod = gFormatOpts ? gFormatOpts.tableFooterCellFormatMethod : null;
|
|
4833
4832
|
cellLabel = fcFormatMethod ? fcFormatMethod(footerFormatParams, ...footerFormatter.slice(1)) : "";
|
|
@@ -4861,7 +4860,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4861
4860
|
clearFooterFormatterCache(isUpdate) {
|
|
4862
4861
|
const { tableData, tableColumn } = reactData;
|
|
4863
4862
|
const { footerFullDataRowData } = internalData;
|
|
4864
|
-
|
|
4863
|
+
index.default.each(footerFullDataRowData, (rowRest) => {
|
|
4865
4864
|
if (rowRest.formatData) {
|
|
4866
4865
|
rowRest.formatData = void 0;
|
|
4867
4866
|
}
|
|
@@ -4891,7 +4890,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4891
4890
|
*/
|
|
4892
4891
|
removeInsertRow() {
|
|
4893
4892
|
const { insertRowMaps } = internalData;
|
|
4894
|
-
return $xeTable.remove(
|
|
4893
|
+
return $xeTable.remove(index.default.values(insertRowMaps));
|
|
4895
4894
|
},
|
|
4896
4895
|
/**
|
|
4897
4896
|
* 检查行或列数据是否发生改变
|
|
@@ -4901,7 +4900,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4901
4900
|
const { fullDataRowIdData, sourceDataRowIdData } = internalData;
|
|
4902
4901
|
const keepFields = computeKeepFields.value;
|
|
4903
4902
|
if (keepSource) {
|
|
4904
|
-
const rowid =
|
|
4903
|
+
const rowid = index.default.isString(rowidOrRow) || index.default.isNumber(rowidOrRow) ? rowidOrRow : util.getRowid($xeTable, rowidOrRow);
|
|
4905
4904
|
const rowRest = fullDataRowIdData[rowid];
|
|
4906
4905
|
if (!rowRest) {
|
|
4907
4906
|
return false;
|
|
@@ -4927,7 +4926,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4927
4926
|
*/
|
|
4928
4927
|
getColumns(columnIndex) {
|
|
4929
4928
|
const { visibleColumn } = internalData;
|
|
4930
|
-
return
|
|
4929
|
+
return index.default.isUndefined(columnIndex) ? visibleColumn.slice(0) : visibleColumn[columnIndex];
|
|
4931
4930
|
},
|
|
4932
4931
|
/**
|
|
4933
4932
|
* 根据列获取列的唯一主键
|
|
@@ -4982,7 +4981,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
4982
4981
|
let prevDragCol = null;
|
|
4983
4982
|
const colRest = dragCol ? fullColumnIdData[dragCol.id] : null;
|
|
4984
4983
|
let defPos = "left";
|
|
4985
|
-
if (
|
|
4984
|
+
if (index.default.isNumber(targetFieldOrColumn)) {
|
|
4986
4985
|
if (colRest && targetFieldOrColumn) {
|
|
4987
4986
|
let currList = colRest.items;
|
|
4988
4987
|
let offsetIndex = colRest._index + targetFieldOrColumn;
|
|
@@ -5023,7 +5022,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5023
5022
|
let prevDragRow = null;
|
|
5024
5023
|
let defPos = "top";
|
|
5025
5024
|
const rowRest = dragRow ? fullAllDataRowIdData[util.getRowid($xeTable, dragRow)] : null;
|
|
5026
|
-
if (
|
|
5025
|
+
if (index.default.isNumber(targetRowidOrRow)) {
|
|
5027
5026
|
if (rowRest && targetRowidOrRow) {
|
|
5028
5027
|
let currList = afterFullData;
|
|
5029
5028
|
let offsetIndex = rowRest._index + targetRowidOrRow;
|
|
@@ -5068,7 +5067,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5068
5067
|
*/
|
|
5069
5068
|
getData(rowIndex) {
|
|
5070
5069
|
const tableSynchData = props$1.data || internalData.tableSynchData;
|
|
5071
|
-
return
|
|
5070
|
+
return index.default.isUndefined(rowIndex) ? tableSynchData.slice(0) : tableSynchData[rowIndex];
|
|
5072
5071
|
},
|
|
5073
5072
|
/**
|
|
5074
5073
|
* 用于多选行,获取已选中的数据
|
|
@@ -5087,14 +5086,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5087
5086
|
if (checkField) {
|
|
5088
5087
|
if (treeConfig) {
|
|
5089
5088
|
const currTableData = isFull ? transform ? tableFullTreeData : tableFullData : transform ? tableFullTreeData : afterFullData;
|
|
5090
|
-
rowList =
|
|
5089
|
+
rowList = index.default.filterTree(currTableData, (row) => index.default.get(row, checkField), { children: transform ? mapChildrenField : childrenField });
|
|
5091
5090
|
} else {
|
|
5092
5091
|
const currTableData = isFull ? tableFullData : afterFullData;
|
|
5093
|
-
rowList = currTableData.filter((row) =>
|
|
5092
|
+
rowList = currTableData.filter((row) => index.default.get(row, checkField));
|
|
5094
5093
|
}
|
|
5095
5094
|
} else {
|
|
5096
5095
|
const currMaps = isFull || treeConfig && !transform ? fullDataRowIdData : afterFullRowMaps;
|
|
5097
|
-
|
|
5096
|
+
index.default.each(selectCheckboxMaps, (row, rowid) => {
|
|
5098
5097
|
if (currMaps[rowid]) {
|
|
5099
5098
|
rowList.push(fullDataRowIdData[rowid].row);
|
|
5100
5099
|
}
|
|
@@ -5114,7 +5113,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5114
5113
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
5115
5114
|
if (rowOrRowid && treeConfig) {
|
|
5116
5115
|
let rowid;
|
|
5117
|
-
if (
|
|
5116
|
+
if (index.default.isString(rowOrRowid)) {
|
|
5118
5117
|
rowid = rowOrRowid;
|
|
5119
5118
|
} else {
|
|
5120
5119
|
rowid = util.getRowid($xeTable, rowOrRowid);
|
|
@@ -5137,7 +5136,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5137
5136
|
const { fullAllDataRowIdData } = internalData;
|
|
5138
5137
|
if (rowOrRowid && treeConfig) {
|
|
5139
5138
|
let rowid;
|
|
5140
|
-
if (
|
|
5139
|
+
if (index.default.isString(rowOrRowid)) {
|
|
5141
5140
|
rowid = rowOrRowid;
|
|
5142
5141
|
} else {
|
|
5143
5142
|
rowid = util.getRowid($xeTable, rowOrRowid);
|
|
@@ -5159,7 +5158,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5159
5158
|
const { fullAllDataRowIdData } = internalData;
|
|
5160
5159
|
if (rowOrRowid && treeConfig) {
|
|
5161
5160
|
let rowid;
|
|
5162
|
-
if (
|
|
5161
|
+
if (index.default.isString(rowOrRowid)) {
|
|
5163
5162
|
rowid = rowOrRowid;
|
|
5164
5163
|
} else {
|
|
5165
5164
|
rowid = util.getRowid($xeTable, rowOrRowid);
|
|
@@ -5183,7 +5182,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5183
5182
|
*/
|
|
5184
5183
|
getRowById(cellValue) {
|
|
5185
5184
|
const { fullAllDataRowIdData } = internalData;
|
|
5186
|
-
const rowid =
|
|
5185
|
+
const rowid = index.default.eqNull(cellValue) ? "" : encodeURIComponent(cellValue || "");
|
|
5187
5186
|
return fullAllDataRowIdData[rowid] ? fullAllDataRowIdData[rowid].row : null;
|
|
5188
5187
|
},
|
|
5189
5188
|
/**
|
|
@@ -5224,7 +5223,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5224
5223
|
*/
|
|
5225
5224
|
setColumnFixed(fieldOrColumn, fixed) {
|
|
5226
5225
|
let status = false;
|
|
5227
|
-
const cols =
|
|
5226
|
+
const cols = index.default.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn];
|
|
5228
5227
|
const columnOpts = computeColumnOpts.value;
|
|
5229
5228
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
5230
5229
|
for (let i = 0; i < cols.length; i++) {
|
|
@@ -5241,7 +5240,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5241
5240
|
}
|
|
5242
5241
|
return vue.nextTick();
|
|
5243
5242
|
}
|
|
5244
|
-
|
|
5243
|
+
index.default.eachTree([targetColumn], (column2) => {
|
|
5245
5244
|
column2.fixed = fixed;
|
|
5246
5245
|
column2.renderFixed = fixed;
|
|
5247
5246
|
});
|
|
@@ -5261,12 +5260,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5261
5260
|
*/
|
|
5262
5261
|
clearColumnFixed(fieldOrColumn) {
|
|
5263
5262
|
let status = false;
|
|
5264
|
-
const cols =
|
|
5263
|
+
const cols = index.default.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn];
|
|
5265
5264
|
cols.forEach((item) => {
|
|
5266
5265
|
const column = util.handleFieldOrColumn($xeTable, item);
|
|
5267
5266
|
const targetColumn = util.getRootColumn($xeTable, column);
|
|
5268
5267
|
if (targetColumn && targetColumn.fixed) {
|
|
5269
|
-
|
|
5268
|
+
index.default.eachTree([targetColumn], (column2) => {
|
|
5270
5269
|
column2.fixed = null;
|
|
5271
5270
|
column2.renderFixed = null;
|
|
5272
5271
|
});
|
|
@@ -5292,8 +5291,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5292
5291
|
setColumnWidth(fieldOrColumn, width) {
|
|
5293
5292
|
const { elemStore } = internalData;
|
|
5294
5293
|
let status = false;
|
|
5295
|
-
const cols =
|
|
5296
|
-
let cWidth =
|
|
5294
|
+
const cols = index.default.isArray(fieldOrColumn) ? fieldOrColumn : [fieldOrColumn];
|
|
5295
|
+
let cWidth = index.default.toInteger(width);
|
|
5297
5296
|
if (dom.isScale(width)) {
|
|
5298
5297
|
const bodyScrollElem = util.getRefElem(elemStore["main-body-scroll"]);
|
|
5299
5298
|
const bodyWidth = bodyScrollElem ? bodyScrollElem.clientWidth - 1 : 0;
|
|
@@ -5354,10 +5353,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5354
5353
|
const { fullAllDataRowIdData } = internalData;
|
|
5355
5354
|
let status = false;
|
|
5356
5355
|
if (heightConf) {
|
|
5357
|
-
|
|
5356
|
+
index.default.each(heightConf, (height, rowid) => {
|
|
5358
5357
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5359
5358
|
if (rowRest) {
|
|
5360
|
-
const rHeight =
|
|
5359
|
+
const rHeight = index.default.toInteger(height);
|
|
5361
5360
|
if (rHeight) {
|
|
5362
5361
|
rowRest.resizeHeight = rHeight;
|
|
5363
5362
|
if (!status) {
|
|
@@ -5398,13 +5397,13 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5398
5397
|
},
|
|
5399
5398
|
recalcRowHeight(rowOrId) {
|
|
5400
5399
|
const { fullAllDataRowIdData } = internalData;
|
|
5401
|
-
const rows =
|
|
5400
|
+
const rows = index.default.isArray(rowOrId) ? rowOrId : [rowOrId];
|
|
5402
5401
|
const el = refElem.value;
|
|
5403
5402
|
if (el) {
|
|
5404
5403
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5405
5404
|
el.setAttribute("data-calc-row", "Y");
|
|
5406
5405
|
rows.forEach((row) => {
|
|
5407
|
-
const rowid =
|
|
5406
|
+
const rowid = index.default.isString(row) || index.default.isNumber(row) ? row : handleGetRowId(row);
|
|
5408
5407
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5409
5408
|
if (rowRest) {
|
|
5410
5409
|
rowRest.resizeHeight = calcCellAutoHeight(rowRest, el);
|
|
@@ -5418,8 +5417,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5418
5417
|
setRowHeight(rowOrId, height) {
|
|
5419
5418
|
const { fullAllDataRowIdData } = internalData;
|
|
5420
5419
|
let status = false;
|
|
5421
|
-
const rows =
|
|
5422
|
-
let rHeight =
|
|
5420
|
+
const rows = index.default.isArray(rowOrId) ? rowOrId : [rowOrId];
|
|
5421
|
+
let rHeight = index.default.toInteger(height);
|
|
5423
5422
|
if (dom.isScale(height)) {
|
|
5424
5423
|
const tableBody = refTableBody.value;
|
|
5425
5424
|
const bodyElem = tableBody ? tableBody.$el : null;
|
|
@@ -5429,7 +5428,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5429
5428
|
if (rHeight) {
|
|
5430
5429
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5431
5430
|
rows.forEach((row) => {
|
|
5432
|
-
const rowid =
|
|
5431
|
+
const rowid = index.default.isString(row) || index.default.isNumber(row) ? row : handleGetRowId(row);
|
|
5433
5432
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5434
5433
|
if (rowRest) {
|
|
5435
5434
|
rowRest.resizeHeight = rHeight;
|
|
@@ -5452,7 +5451,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5452
5451
|
const rowOpts = computeRowOpts.value;
|
|
5453
5452
|
const cellOpts = computeCellOpts.value;
|
|
5454
5453
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
5455
|
-
const rowid =
|
|
5454
|
+
const rowid = index.default.isString(rowOrId) || index.default.isNumber(rowOrId) ? rowOrId : util.getRowid($xeTable, rowOrId);
|
|
5456
5455
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5457
5456
|
if (rowRest) {
|
|
5458
5457
|
return rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
@@ -5553,7 +5552,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5553
5552
|
if (treeConfig) {
|
|
5554
5553
|
const fullRest = [];
|
|
5555
5554
|
const defRest = [];
|
|
5556
|
-
|
|
5555
|
+
index.default.each(treeIndeterminateRowMaps, (item, rowid) => {
|
|
5557
5556
|
if (item) {
|
|
5558
5557
|
fullRest.push(item);
|
|
5559
5558
|
if (fullDataRowIdData[rowid]) {
|
|
@@ -5574,14 +5573,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5574
5573
|
* @param {Boolean} value 是否选中
|
|
5575
5574
|
*/
|
|
5576
5575
|
setCheckboxRow(rows, checked) {
|
|
5577
|
-
if (rows && !
|
|
5576
|
+
if (rows && !index.default.isArray(rows)) {
|
|
5578
5577
|
rows = [rows];
|
|
5579
5578
|
}
|
|
5580
5579
|
return handleCheckedCheckboxRow(rows, checked, true);
|
|
5581
5580
|
},
|
|
5582
5581
|
setCheckboxRowKey(keys, checked) {
|
|
5583
5582
|
const { fullAllDataRowIdData } = internalData;
|
|
5584
|
-
if (!
|
|
5583
|
+
if (!index.default.isArray(keys)) {
|
|
5585
5584
|
keys = [keys];
|
|
5586
5585
|
}
|
|
5587
5586
|
const rows = [];
|
|
@@ -5599,7 +5598,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5599
5598
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
5600
5599
|
const { checkField } = checkboxOpts;
|
|
5601
5600
|
if (checkField) {
|
|
5602
|
-
return
|
|
5601
|
+
return index.default.get(row, checkField);
|
|
5603
5602
|
}
|
|
5604
5603
|
return !!updateCheckboxFlag && !!selectCheckboxMaps[util.getRowid($xeTable, row)];
|
|
5605
5604
|
},
|
|
@@ -5611,7 +5610,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5611
5610
|
if (checkField) {
|
|
5612
5611
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
5613
5612
|
if (rowRest) {
|
|
5614
|
-
return
|
|
5613
|
+
return index.default.get(rowRest.row, checkField);
|
|
5615
5614
|
}
|
|
5616
5615
|
return false;
|
|
5617
5616
|
}
|
|
@@ -5632,7 +5631,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5632
5631
|
const { selectCheckboxMaps } = internalData;
|
|
5633
5632
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
5634
5633
|
const { checkField } = checkboxOpts;
|
|
5635
|
-
const checked = checkField ? !
|
|
5634
|
+
const checked = checkField ? !index.default.get(row, checkField) : !selectCheckboxMaps[util.getRowid($xeTable, row)];
|
|
5636
5635
|
$xeTable.handleBatchSelectRows([row], checked, true);
|
|
5637
5636
|
$xeTable.checkSelectionStatus();
|
|
5638
5637
|
return vue.nextTick();
|
|
@@ -5662,12 +5661,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5662
5661
|
} else {
|
|
5663
5662
|
const rowkey = util.getRowkey($xeTable);
|
|
5664
5663
|
if (treeConfig) {
|
|
5665
|
-
const matchObj =
|
|
5664
|
+
const matchObj = index.default.findTree(afterFullData, (row) => rowid === index.default.get(row, rowkey), { children: childrenField });
|
|
5666
5665
|
if (matchObj) {
|
|
5667
5666
|
return radioReserveRow;
|
|
5668
5667
|
}
|
|
5669
5668
|
} else {
|
|
5670
|
-
if (!afterFullData.some((row) => rowid ===
|
|
5669
|
+
if (!afterFullData.some((row) => rowid === index.default.get(row, rowkey))) {
|
|
5671
5670
|
return radioReserveRow;
|
|
5672
5671
|
}
|
|
5673
5672
|
}
|
|
@@ -5693,7 +5692,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5693
5692
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5694
5693
|
const afterFullIdMaps = {};
|
|
5695
5694
|
if (treeConfig) {
|
|
5696
|
-
|
|
5695
|
+
index.default.eachTree(afterFullData, (row) => {
|
|
5697
5696
|
afterFullIdMaps[handleGetRowId(row)] = 1;
|
|
5698
5697
|
}, { children: childrenField });
|
|
5699
5698
|
} else {
|
|
@@ -5701,7 +5700,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5701
5700
|
afterFullIdMaps[handleGetRowId(row)] = 1;
|
|
5702
5701
|
});
|
|
5703
5702
|
}
|
|
5704
|
-
|
|
5703
|
+
index.default.each(checkboxReserveRowMap, (oldRow, oldRowid) => {
|
|
5705
5704
|
if (oldRow) {
|
|
5706
5705
|
if (isFull) {
|
|
5707
5706
|
if (!fullDataRowIdData[oldRowid]) {
|
|
@@ -5743,12 +5742,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5743
5742
|
if (checkField) {
|
|
5744
5743
|
const handleClearChecked = (item) => {
|
|
5745
5744
|
if (treeConfig && indeterminateField) {
|
|
5746
|
-
|
|
5745
|
+
index.default.set(item, indeterminateField, false);
|
|
5747
5746
|
}
|
|
5748
|
-
|
|
5747
|
+
index.default.set(item, checkField, false);
|
|
5749
5748
|
};
|
|
5750
5749
|
if (treeConfig) {
|
|
5751
|
-
|
|
5750
|
+
index.default.eachTree(tableFullData, handleClearChecked, { children: childrenField });
|
|
5752
5751
|
} else {
|
|
5753
5752
|
tableFullData.forEach(handleClearChecked);
|
|
5754
5753
|
}
|
|
@@ -5775,7 +5774,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5775
5774
|
reactData.currentRow = row;
|
|
5776
5775
|
if (rowOpts.isCurrent || props$1.highlightCurrentRow) {
|
|
5777
5776
|
if (el) {
|
|
5778
|
-
|
|
5777
|
+
index.default.arrayEach(el.querySelectorAll(`[rowid="${util.getRowid($xeTable, row)}"]`), (elem) => dom.addClass(elem, "row--current"));
|
|
5779
5778
|
}
|
|
5780
5779
|
}
|
|
5781
5780
|
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
@@ -5825,7 +5824,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5825
5824
|
reactData.currentRow = null;
|
|
5826
5825
|
internalData.hoverRow = null;
|
|
5827
5826
|
if (el) {
|
|
5828
|
-
|
|
5827
|
+
index.default.arrayEach(el.querySelectorAll(".row--current"), (elem) => dom.removeClass(elem, "row--current"));
|
|
5829
5828
|
}
|
|
5830
5829
|
if ($xeGanttView && $xeGanttView.handleUpdateCurrentRow) {
|
|
5831
5830
|
$xeGanttView.handleUpdateCurrentRow();
|
|
@@ -5912,7 +5911,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5912
5911
|
setPendingRow(rows, status) {
|
|
5913
5912
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5914
5913
|
const { pendingRowMaps } = internalData;
|
|
5915
|
-
if (rows && !
|
|
5914
|
+
if (rows && !index.default.isArray(rows)) {
|
|
5916
5915
|
rows = [rows];
|
|
5917
5916
|
}
|
|
5918
5917
|
if (status) {
|
|
@@ -5936,7 +5935,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5936
5935
|
togglePendingRow(rows) {
|
|
5937
5936
|
const { handleGetRowId } = util.createHandleGetRowId($xeTable);
|
|
5938
5937
|
const { pendingRowMaps } = internalData;
|
|
5939
|
-
if (rows && !
|
|
5938
|
+
if (rows && !index.default.isArray(rows)) {
|
|
5940
5939
|
rows = [rows];
|
|
5941
5940
|
}
|
|
5942
5941
|
rows.forEach((row) => {
|
|
@@ -5963,7 +5962,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5963
5962
|
getPendingRecords() {
|
|
5964
5963
|
const { fullAllDataRowIdData, pendingRowMaps } = internalData;
|
|
5965
5964
|
const insertRecords = [];
|
|
5966
|
-
|
|
5965
|
+
index.default.each(pendingRowMaps, (row, rowid) => {
|
|
5967
5966
|
if (fullAllDataRowIdData[rowid]) {
|
|
5968
5967
|
insertRecords.push(row);
|
|
5969
5968
|
}
|
|
@@ -5979,23 +5978,23 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
5979
5978
|
const sortOpts = computeSortOpts.value;
|
|
5980
5979
|
const { multiple, remote, orders } = sortOpts;
|
|
5981
5980
|
if (sortConfs) {
|
|
5982
|
-
if (
|
|
5981
|
+
if (index.default.isString(sortConfs)) {
|
|
5983
5982
|
sortConfs = [
|
|
5984
5983
|
{ field: sortConfs, order: sortOrder }
|
|
5985
5984
|
];
|
|
5986
5985
|
}
|
|
5987
5986
|
}
|
|
5988
|
-
if (!
|
|
5987
|
+
if (!index.default.isArray(sortConfs)) {
|
|
5989
5988
|
sortConfs = [sortConfs];
|
|
5990
5989
|
}
|
|
5991
5990
|
if (sortConfs.length) {
|
|
5992
5991
|
if (!multiple) {
|
|
5993
5992
|
clearAllSort();
|
|
5994
5993
|
}
|
|
5995
|
-
(multiple ? sortConfs : [sortConfs[0]]).forEach((confs, index) => {
|
|
5994
|
+
(multiple ? sortConfs : [sortConfs[0]]).forEach((confs, index$1) => {
|
|
5996
5995
|
let { field, order } = confs;
|
|
5997
5996
|
let column = field;
|
|
5998
|
-
if (
|
|
5997
|
+
if (index.default.isString(field)) {
|
|
5999
5998
|
column = $xeTable.getColumnByField(field);
|
|
6000
5999
|
}
|
|
6001
6000
|
if (column && column.sortable) {
|
|
@@ -6005,7 +6004,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6005
6004
|
if (column.order !== order) {
|
|
6006
6005
|
column.order = order;
|
|
6007
6006
|
}
|
|
6008
|
-
column.sortTime = Date.now() + index;
|
|
6007
|
+
column.sortTime = Date.now() + index$1;
|
|
6009
6008
|
}
|
|
6010
6009
|
});
|
|
6011
6010
|
if (!remote) {
|
|
@@ -6106,7 +6105,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6106
6105
|
}
|
|
6107
6106
|
});
|
|
6108
6107
|
if (multiple && chronological && sortList.length > 1) {
|
|
6109
|
-
return
|
|
6108
|
+
return index.default.orderBy(sortList, "sortTime");
|
|
6110
6109
|
}
|
|
6111
6110
|
return sortList;
|
|
6112
6111
|
},
|
|
@@ -6277,7 +6276,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6277
6276
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
6278
6277
|
let expandedRows = [];
|
|
6279
6278
|
if (props$1.treeConfig) {
|
|
6280
|
-
|
|
6279
|
+
index.default.eachTree(tableFullTreeData, (row) => {
|
|
6281
6280
|
expandedRows.push(row);
|
|
6282
6281
|
}, { children: childrenField });
|
|
6283
6282
|
} else {
|
|
@@ -6302,7 +6301,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6302
6301
|
const columnIndex = expandColumn ? $xeTable.getColumnIndex(expandColumn) : -1;
|
|
6303
6302
|
const $columnIndex = expandColumn ? $xeTable.getVMColumnIndex(expandColumn) : -1;
|
|
6304
6303
|
if (rows) {
|
|
6305
|
-
if (!
|
|
6304
|
+
if (!index.default.isArray(rows)) {
|
|
6306
6305
|
rows = [rows];
|
|
6307
6306
|
}
|
|
6308
6307
|
if (accordion) {
|
|
@@ -6390,7 +6389,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6390
6389
|
},
|
|
6391
6390
|
getRowExpandRecords() {
|
|
6392
6391
|
const rest = [];
|
|
6393
|
-
|
|
6392
|
+
index.default.each(internalData.rowExpandedMaps, (item) => {
|
|
6394
6393
|
if (item) {
|
|
6395
6394
|
rest.push(item);
|
|
6396
6395
|
}
|
|
@@ -6405,7 +6404,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6405
6404
|
log.errLog("vxe.error.reqProp", ["aggregate-config"]);
|
|
6406
6405
|
return vue.nextTick();
|
|
6407
6406
|
}
|
|
6408
|
-
const confList = fieldOrColumns ?
|
|
6407
|
+
const confList = fieldOrColumns ? index.default.isArray(fieldOrColumns) ? fieldOrColumns : [fieldOrColumns] : [];
|
|
6409
6408
|
if (maxGroupSize && confList.length > maxGroupSize) {
|
|
6410
6409
|
if (index_esm.VxeUI.modal) {
|
|
6411
6410
|
index_esm.VxeUI.modal.message({
|
|
@@ -6417,7 +6416,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6417
6416
|
}
|
|
6418
6417
|
if (confList.length) {
|
|
6419
6418
|
handleUpdateRowGroup(confList.map((fieldOrColumn) => {
|
|
6420
|
-
return
|
|
6419
|
+
return index.default.isString(fieldOrColumn) ? fieldOrColumn : fieldOrColumn.field;
|
|
6421
6420
|
}));
|
|
6422
6421
|
return loadTableData(internalData.tableSynchData, false, true);
|
|
6423
6422
|
}
|
|
@@ -6483,7 +6482,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6483
6482
|
},
|
|
6484
6483
|
setRowGroupExpand(rows, expanded) {
|
|
6485
6484
|
if (rows) {
|
|
6486
|
-
if (!
|
|
6485
|
+
if (!index.default.isArray(rows)) {
|
|
6487
6486
|
rows = [rows];
|
|
6488
6487
|
}
|
|
6489
6488
|
return handleRowGroupVirtualExpand(rows, expanded);
|
|
@@ -6495,7 +6494,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6495
6494
|
const aggregateOpts = computeAggregateOpts.value;
|
|
6496
6495
|
const { childrenField } = aggregateOpts;
|
|
6497
6496
|
if (groupFields) {
|
|
6498
|
-
if (!
|
|
6497
|
+
if (!index.default.isArray(groupFields)) {
|
|
6499
6498
|
groupFields = [groupFields];
|
|
6500
6499
|
}
|
|
6501
6500
|
if (isRowGroupStatus) {
|
|
@@ -6504,7 +6503,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6504
6503
|
groupFields.forEach((groupField) => {
|
|
6505
6504
|
gfKeys[groupField] = true;
|
|
6506
6505
|
});
|
|
6507
|
-
|
|
6506
|
+
index.default.eachTree(internalData.afterGroupFullData, (row) => {
|
|
6508
6507
|
if (row.isAggregate && gfKeys[row.groupField]) {
|
|
6509
6508
|
rows.push(row);
|
|
6510
6509
|
}
|
|
@@ -6522,7 +6521,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6522
6521
|
const { mapChildrenField } = aggregateOpts;
|
|
6523
6522
|
const rgExpandedMaps = {};
|
|
6524
6523
|
if (expanded && mapChildrenField) {
|
|
6525
|
-
|
|
6524
|
+
index.default.eachTree(tableFullGroupData, (row) => {
|
|
6526
6525
|
if (row[mapChildrenField] && row[mapChildrenField].length) {
|
|
6527
6526
|
rgExpandedMaps[util.getRowid($xeTable, row)] = row;
|
|
6528
6527
|
}
|
|
@@ -6545,7 +6544,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6545
6544
|
},
|
|
6546
6545
|
getTreeExpandRecords() {
|
|
6547
6546
|
const rest = [];
|
|
6548
|
-
|
|
6547
|
+
index.default.each(internalData.treeExpandedMaps, (item) => {
|
|
6549
6548
|
if (item) {
|
|
6550
6549
|
rest.push(item);
|
|
6551
6550
|
}
|
|
@@ -6566,7 +6565,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6566
6565
|
const treeOpts = computeTreeOpts.value;
|
|
6567
6566
|
const { transform } = treeOpts;
|
|
6568
6567
|
if (rows) {
|
|
6569
|
-
if (!
|
|
6568
|
+
if (!index.default.isArray(rows)) {
|
|
6570
6569
|
rows = [rows];
|
|
6571
6570
|
}
|
|
6572
6571
|
rows.forEach((row) => {
|
|
@@ -6580,7 +6579,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6580
6579
|
}
|
|
6581
6580
|
});
|
|
6582
6581
|
} else {
|
|
6583
|
-
|
|
6582
|
+
index.default.each(fullAllDataRowIdData, (rowRest) => {
|
|
6584
6583
|
rowRest.treeLoaded = false;
|
|
6585
6584
|
});
|
|
6586
6585
|
internalData.treeExpandedMaps = {};
|
|
@@ -6637,7 +6636,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6637
6636
|
const { transform, lazy } = treeOpts;
|
|
6638
6637
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
6639
6638
|
const expandeds = [];
|
|
6640
|
-
|
|
6639
|
+
index.default.eachTree(tableFullData, (row) => {
|
|
6641
6640
|
const rowChildren = row[childrenField];
|
|
6642
6641
|
if (lazy || rowChildren && rowChildren.length) {
|
|
6643
6642
|
expandeds.push(row);
|
|
@@ -6662,7 +6661,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6662
6661
|
const treeOpts = computeTreeOpts.value;
|
|
6663
6662
|
const { transform } = treeOpts;
|
|
6664
6663
|
if (rows) {
|
|
6665
|
-
if (!
|
|
6664
|
+
if (!index.default.isArray(rows)) {
|
|
6666
6665
|
rows = [rows];
|
|
6667
6666
|
}
|
|
6668
6667
|
if (rows.length) {
|
|
@@ -6695,7 +6694,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6695
6694
|
const expList = $xeTable.getTreeExpandRecords();
|
|
6696
6695
|
internalData.treeExpandedMaps = {};
|
|
6697
6696
|
if (reserve) {
|
|
6698
|
-
|
|
6697
|
+
index.default.eachTree(tableFullTreeData, (row) => handleTreeExpandReserve(row, false), { children: childrenField });
|
|
6699
6698
|
}
|
|
6700
6699
|
return $xeTable.handleTableData().then(() => {
|
|
6701
6700
|
if (transform) {
|
|
@@ -6768,12 +6767,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6768
6767
|
const yHandleEl = refScrollYHandleElem.value;
|
|
6769
6768
|
internalData.intoRunScroll = true;
|
|
6770
6769
|
if (scrollLeft) {
|
|
6771
|
-
if (!
|
|
6770
|
+
if (!index.default.isNumber(scrollLeft)) {
|
|
6772
6771
|
scrollTop = scrollLeft.top;
|
|
6773
6772
|
scrollLeft = scrollLeft.left;
|
|
6774
6773
|
}
|
|
6775
6774
|
}
|
|
6776
|
-
if (
|
|
6775
|
+
if (index.default.isNumber(scrollLeft)) {
|
|
6777
6776
|
dom.setScrollLeft(xHandleEl, scrollLeft);
|
|
6778
6777
|
dom.setScrollLeft(bodyScrollElem, scrollLeft);
|
|
6779
6778
|
dom.setScrollLeft(headerScrollElem, scrollLeft);
|
|
@@ -6782,7 +6781,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6782
6781
|
loadScrollXData();
|
|
6783
6782
|
}
|
|
6784
6783
|
}
|
|
6785
|
-
if (
|
|
6784
|
+
if (index.default.isNumber(scrollTop)) {
|
|
6786
6785
|
dom.setScrollTop(yHandleEl, scrollTop);
|
|
6787
6786
|
dom.setScrollTop(bodyScrollElem, scrollTop);
|
|
6788
6787
|
dom.setScrollTop(leftScrollElem, scrollTop);
|
|
@@ -6808,7 +6807,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
6808
6807
|
const { fullAllDataRowIdData, _sToTime } = internalData;
|
|
6809
6808
|
const rest = [];
|
|
6810
6809
|
let row;
|
|
6811
|
-
if (
|
|
6810
|
+
if (index.default.isString(rowOrRowid) || index.default.isNumber(rowOrRowid)) {
|
|
6812
6811
|
const rowid = rowOrRowid;
|
|
6813
6812
|
const rowRest = rowid ? fullAllDataRowIdData[rowid] : null;
|
|
6814
6813
|
if (rowRest) {
|
|
@@ -7149,7 +7148,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7149
7148
|
let hasVisible = 0;
|
|
7150
7149
|
let hasAggFunc = 0;
|
|
7151
7150
|
const sortMaps = {};
|
|
7152
|
-
|
|
7151
|
+
index.default.eachTree(collectColumn, (column, index2, items, path, parentColumn) => {
|
|
7153
7152
|
const colKey = column.getKey();
|
|
7154
7153
|
if (!colKey) {
|
|
7155
7154
|
log.errLog("vxe.error.reqProp", [`${column.getTitle() || column.type || ""} -> column.field=?`]);
|
|
@@ -7706,7 +7705,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7706
7705
|
}
|
|
7707
7706
|
}
|
|
7708
7707
|
} else if (hasBackspaceKey && keyboardConfig && treeConfig && keyboardOpts.isBack && (rowOpts.isCurrent || highlightCurrentRow) && currentRow) {
|
|
7709
|
-
const { parent: parentRow } =
|
|
7708
|
+
const { parent: parentRow } = index.default.findTree(internalData.afterTreeFullData, (item) => item === currentRow, { children: childrenField });
|
|
7710
7709
|
if (parentRow) {
|
|
7711
7710
|
evnt.preventDefault();
|
|
7712
7711
|
const params = {
|
|
@@ -7847,7 +7846,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7847
7846
|
const el = refElem.value;
|
|
7848
7847
|
if (el) {
|
|
7849
7848
|
const clss = "row--drag-origin";
|
|
7850
|
-
|
|
7849
|
+
index.default.arrayEach(el.querySelectorAll(`.${clss}`), (elem) => {
|
|
7851
7850
|
elem.draggable = false;
|
|
7852
7851
|
dom.removeClass(elem, clss);
|
|
7853
7852
|
});
|
|
@@ -7858,7 +7857,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7858
7857
|
if (el) {
|
|
7859
7858
|
const clss = "row--drag-origin";
|
|
7860
7859
|
const rowid = util.getRowid($xeTable, row);
|
|
7861
|
-
|
|
7860
|
+
index.default.arrayEach(el.querySelectorAll(`[rowid="${rowid}"]`), (elem) => {
|
|
7862
7861
|
dom.addClass(elem, clss);
|
|
7863
7862
|
});
|
|
7864
7863
|
}
|
|
@@ -7885,11 +7884,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7885
7884
|
const el = refElem.value;
|
|
7886
7885
|
if (el) {
|
|
7887
7886
|
const colQuerys = [];
|
|
7888
|
-
|
|
7887
|
+
index.default.eachTree([column], (item) => {
|
|
7889
7888
|
colQuerys.push(`[colid="${item.id}"]`);
|
|
7890
7889
|
});
|
|
7891
7890
|
const clss = "col--drag-origin";
|
|
7892
|
-
|
|
7891
|
+
index.default.arrayEach(el.querySelectorAll(colQuerys.join(",")), (elem) => {
|
|
7893
7892
|
dom.addClass(elem, clss);
|
|
7894
7893
|
});
|
|
7895
7894
|
}
|
|
@@ -7898,7 +7897,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
7898
7897
|
const el = refElem.value;
|
|
7899
7898
|
if (el) {
|
|
7900
7899
|
const clss = "col--drag-origin";
|
|
7901
|
-
|
|
7900
|
+
index.default.arrayEach(el.querySelectorAll(`.${clss}`), (elem) => {
|
|
7902
7901
|
elem.draggable = false;
|
|
7903
7902
|
dom.removeClass(elem, clss);
|
|
7904
7903
|
});
|
|
@@ -8058,8 +8057,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8058
8057
|
const { column, row } = params;
|
|
8059
8058
|
const { showAll, contentMethod } = tipOpts;
|
|
8060
8059
|
const customContent = contentMethod ? contentMethod(params) : null;
|
|
8061
|
-
const useCustom = contentMethod && !
|
|
8062
|
-
const content = useCustom ? customContent :
|
|
8060
|
+
const useCustom = contentMethod && !index.default.eqNull(customContent);
|
|
8061
|
+
const content = useCustom ? customContent : index.default.toString(column.type === "html" ? tipOverEl.innerText : tipOverEl.textContent).trim();
|
|
8063
8062
|
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
8064
8063
|
if (content && (showAll || useCustom || isOver)) {
|
|
8065
8064
|
const tipContent = utils.formatText(content);
|
|
@@ -8085,7 +8084,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8085
8084
|
if ($xeGGWrapper) {
|
|
8086
8085
|
return $xeGGWrapper.callSlot(slotFunc, params);
|
|
8087
8086
|
}
|
|
8088
|
-
if (
|
|
8087
|
+
if (index.default.isFunction(slotFunc)) {
|
|
8089
8088
|
return vn.getSlotVNs(slotFunc(params));
|
|
8090
8089
|
}
|
|
8091
8090
|
}
|
|
@@ -8153,36 +8152,36 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8153
8152
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
8154
8153
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
8155
8154
|
const rowkey = util.getRowkey($xeTable);
|
|
8156
|
-
if (!
|
|
8155
|
+
if (!index.default.isArray(records)) {
|
|
8157
8156
|
records = [records];
|
|
8158
8157
|
}
|
|
8159
8158
|
return records.map((record) => {
|
|
8160
8159
|
internalData.tableFullColumn.forEach((column) => {
|
|
8161
8160
|
const { field, editRender } = column;
|
|
8162
|
-
if (field && !
|
|
8161
|
+
if (field && !index.default.has(record, field) && !record[field]) {
|
|
8163
8162
|
let cellValue = null;
|
|
8164
8163
|
if (editRender) {
|
|
8165
8164
|
const { defaultValue } = editRender;
|
|
8166
|
-
if (
|
|
8165
|
+
if (index.default.isFunction(defaultValue)) {
|
|
8167
8166
|
cellValue = defaultValue({ column });
|
|
8168
|
-
} else if (!
|
|
8167
|
+
} else if (!index.default.isUndefined(defaultValue)) {
|
|
8169
8168
|
cellValue = defaultValue;
|
|
8170
8169
|
}
|
|
8171
8170
|
}
|
|
8172
|
-
|
|
8171
|
+
index.default.set(record, field, cellValue);
|
|
8173
8172
|
}
|
|
8174
8173
|
});
|
|
8175
8174
|
const otherFields = [radioOpts.labelField, checkboxOpts.checkField, checkboxOpts.labelField, expandOpts.labelField];
|
|
8176
8175
|
otherFields.forEach((key) => {
|
|
8177
|
-
if (key && utils.eqEmptyValue(
|
|
8178
|
-
|
|
8176
|
+
if (key && utils.eqEmptyValue(index.default.get(record, key))) {
|
|
8177
|
+
index.default.set(record, key, null);
|
|
8179
8178
|
}
|
|
8180
8179
|
});
|
|
8181
|
-
if (treeConfig && treeOpts.lazy &&
|
|
8180
|
+
if (treeConfig && treeOpts.lazy && index.default.isUndefined(record[childrenField])) {
|
|
8182
8181
|
record[childrenField] = null;
|
|
8183
8182
|
}
|
|
8184
|
-
if (utils.eqEmptyValue(
|
|
8185
|
-
|
|
8183
|
+
if (utils.eqEmptyValue(index.default.get(record, rowkey))) {
|
|
8184
|
+
index.default.set(record, rowkey, util.createRowId(rowOpts, record, rowkey));
|
|
8186
8185
|
}
|
|
8187
8186
|
return record;
|
|
8188
8187
|
});
|
|
@@ -8230,13 +8229,13 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8230
8229
|
const fullDataRowIdMaps = {};
|
|
8231
8230
|
const idMaps = {};
|
|
8232
8231
|
const { handleUpdateRowId } = util.createHandleUpdateRowId($xeTable);
|
|
8233
|
-
const handleRowCache = (row,
|
|
8232
|
+
const handleRowCache = (row, index2, items, currIndex, parentRow, rowid, level, seq) => {
|
|
8234
8233
|
let rowRest = fullAllDataRowIdMaps[rowid];
|
|
8235
8234
|
if (idMaps[rowid]) {
|
|
8236
8235
|
log.errLog("vxe.error.repeatKey", [currKeyField, rowid]);
|
|
8237
8236
|
}
|
|
8238
8237
|
if (!rowRest) {
|
|
8239
|
-
rowRest = { row, rowid, seq, index: -1, _index: -1, $index: -1, treeIndex:
|
|
8238
|
+
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
8239
|
fullDataRowIdMaps[rowid] = rowRest;
|
|
8241
8240
|
fullAllDataRowIdMaps[rowid] = rowRest;
|
|
8242
8241
|
}
|
|
@@ -8247,7 +8246,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8247
8246
|
rowRest.parent = parentRow;
|
|
8248
8247
|
rowRest.level = level;
|
|
8249
8248
|
rowRest.index = currIndex;
|
|
8250
|
-
rowRest.treeIndex =
|
|
8249
|
+
rowRest.treeIndex = index2;
|
|
8251
8250
|
if (selectCheckboxMaps[rowid]) {
|
|
8252
8251
|
selectCheckboxMaps[rowid] = row;
|
|
8253
8252
|
}
|
|
@@ -8263,7 +8262,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8263
8262
|
const { lazy } = treeOpts;
|
|
8264
8263
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
8265
8264
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
8266
|
-
|
|
8265
|
+
index.default.eachTree(tableFullTreeData, (row, index2, items, path, parentRow, nodes) => {
|
|
8267
8266
|
const rowid = handleUpdateRowId(row);
|
|
8268
8267
|
if (treeConfig && lazy) {
|
|
8269
8268
|
if (row[hasChildField] && row[childrenField] === void 0) {
|
|
@@ -8275,18 +8274,18 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8275
8274
|
}
|
|
8276
8275
|
}
|
|
8277
8276
|
}
|
|
8278
|
-
handleRowCache(row,
|
|
8277
|
+
handleRowCache(row, index2, items, parentRow ? -1 : index2, parentRow, rowid, nodes.length - 1, util.toTreePathSeq(path));
|
|
8279
8278
|
}, { children: childrenField });
|
|
8280
8279
|
} else if (isRowGroupStatus) {
|
|
8281
8280
|
const aggregateOpts = computeAggregateOpts.value;
|
|
8282
8281
|
const { mapChildrenField } = aggregateOpts;
|
|
8283
|
-
|
|
8282
|
+
index.default.eachTree(tableFullGroupData, (row, index2, items, path, parentRow, nodes) => {
|
|
8284
8283
|
const rowid = handleUpdateRowId(row);
|
|
8285
|
-
handleRowCache(row,
|
|
8284
|
+
handleRowCache(row, index2, items, parentRow ? -1 : index2, parentRow, rowid, nodes.length - 1, util.toTreePathSeq(path));
|
|
8286
8285
|
}, { children: mapChildrenField });
|
|
8287
8286
|
} else {
|
|
8288
|
-
tableFullData.forEach((row,
|
|
8289
|
-
handleRowCache(row,
|
|
8287
|
+
tableFullData.forEach((row, index2, items) => {
|
|
8288
|
+
handleRowCache(row, index2, items, index2, null, handleUpdateRowId(row), 0, index2 + 1);
|
|
8290
8289
|
});
|
|
8291
8290
|
}
|
|
8292
8291
|
internalData.fullDataRowIdData = fullDataRowIdMaps;
|
|
@@ -8296,7 +8295,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8296
8295
|
cacheSourceMap(fullData) {
|
|
8297
8296
|
const { treeConfig } = props$1;
|
|
8298
8297
|
const treeOpts = computeTreeOpts.value;
|
|
8299
|
-
const sourceData =
|
|
8298
|
+
const sourceData = index.default.clone(fullData, true);
|
|
8300
8299
|
const { handleUpdateRowId } = util.createHandleUpdateRowId($xeTable);
|
|
8301
8300
|
const sourceRowIdData = {};
|
|
8302
8301
|
const handleSourceRow = (row) => {
|
|
@@ -8305,7 +8304,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8305
8304
|
};
|
|
8306
8305
|
if (treeConfig) {
|
|
8307
8306
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
8308
|
-
|
|
8307
|
+
index.default.eachTree(sourceData, handleSourceRow, { children: treeOpts.transform ? treeOpts.mapChildrenField : childrenField });
|
|
8309
8308
|
} else {
|
|
8310
8309
|
sourceData.forEach(handleSourceRow);
|
|
8311
8310
|
}
|
|
@@ -8396,14 +8395,14 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8396
8395
|
if (!cell2) {
|
|
8397
8396
|
return;
|
|
8398
8397
|
}
|
|
8399
|
-
const cellParams =
|
|
8398
|
+
const cellParams = index.default.assign(params, { cell: cell2, $table: $xeTable });
|
|
8400
8399
|
let dragLeft = 0;
|
|
8401
8400
|
const tableRect = tableEl.getBoundingClientRect();
|
|
8402
8401
|
const rightContainerRect = rightContainerElem ? rightContainerElem.getBoundingClientRect() : null;
|
|
8403
8402
|
const cellRect = cell2.getBoundingClientRect();
|
|
8404
8403
|
const dragBtnRect = dragBtnElem.getBoundingClientRect();
|
|
8405
8404
|
const dragBtnWidth = dragBtnElem.clientWidth;
|
|
8406
|
-
const dragBtnOffsetWidth =
|
|
8405
|
+
const dragBtnOffsetWidth = index.default.floor(dragBtnWidth / 2);
|
|
8407
8406
|
const dragPosLeft = dragBtnRect.x - tableRect.x + dragBtnOffsetWidth;
|
|
8408
8407
|
const minInterval = util.getColReMinWidth(cellParams) - dragBtnOffsetWidth;
|
|
8409
8408
|
const dragMinLeft = isRightFixed ? 0 : cellRect.x - tableRect.x + dragBtnWidth + minInterval;
|
|
@@ -8510,7 +8509,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8510
8509
|
const { column } = params;
|
|
8511
8510
|
let resizeColumn = column;
|
|
8512
8511
|
if (column.children && column.children.length) {
|
|
8513
|
-
|
|
8512
|
+
index.default.eachTree(column.children, (childColumn) => {
|
|
8514
8513
|
resizeColumn = childColumn;
|
|
8515
8514
|
});
|
|
8516
8515
|
}
|
|
@@ -8590,7 +8589,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8590
8589
|
let cellMinHeight = 0;
|
|
8591
8590
|
if (cellEl) {
|
|
8592
8591
|
const cellStyle = getComputedStyle(cellEl);
|
|
8593
|
-
cellMinHeight = Math.max(1, Math.ceil(
|
|
8592
|
+
cellMinHeight = Math.max(1, Math.ceil(index.default.toNumber(cellStyle.paddingTop) + index.default.toNumber(cellStyle.paddingBottom)));
|
|
8594
8593
|
}
|
|
8595
8594
|
const minTop = trRect.y - tableRect.y + cellMinHeight;
|
|
8596
8595
|
const updateEvent = (evnt2) => {
|
|
@@ -8821,7 +8820,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8821
8820
|
if (isRowGroupStatus) {
|
|
8822
8821
|
const mapChildrenField = aggregateOpts.mapChildrenField;
|
|
8823
8822
|
if (mapChildrenField) {
|
|
8824
|
-
|
|
8823
|
+
index.default.eachTree(afterGroupFullData, (row) => {
|
|
8825
8824
|
const rowid = handleGetRowId(row);
|
|
8826
8825
|
const childList = row[mapChildrenField];
|
|
8827
8826
|
if (childList && childList.length && !childRowMaps[rowid]) {
|
|
@@ -8832,7 +8831,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8832
8831
|
}
|
|
8833
8832
|
} else if (treeConfig) {
|
|
8834
8833
|
const { transform, mapChildrenField } = treeOpts;
|
|
8835
|
-
|
|
8834
|
+
index.default.eachTree(afterTreeFullData, (row) => {
|
|
8836
8835
|
const rowid = handleGetRowId(row);
|
|
8837
8836
|
const childList = row[transform ? mapChildrenField : childrenField];
|
|
8838
8837
|
if (childList && childList.length && !childRowMaps[rowid]) {
|
|
@@ -8840,7 +8839,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8840
8839
|
childRowList.unshift([row, rowid, childList]);
|
|
8841
8840
|
} else {
|
|
8842
8841
|
if (indeterminateField) {
|
|
8843
|
-
|
|
8842
|
+
index.default.set(row, indeterminateField, false);
|
|
8844
8843
|
}
|
|
8845
8844
|
}
|
|
8846
8845
|
}, { children: transform ? mapChildrenField : childrenField });
|
|
@@ -8855,7 +8854,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8855
8854
|
const cLen = childList.length;
|
|
8856
8855
|
childList.forEach(checkMethod ? (item) => {
|
|
8857
8856
|
const childRowid = handleGetRowId(item);
|
|
8858
|
-
const isSelect = checkField ?
|
|
8857
|
+
const isSelect = checkField ? index.default.get(item, checkField) : selectCheckboxMaps[childRowid];
|
|
8859
8858
|
if (checkMethod({ $table: $xeTable, row: item })) {
|
|
8860
8859
|
if (isSelect) {
|
|
8861
8860
|
sLen++;
|
|
@@ -8872,7 +8871,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8872
8871
|
}
|
|
8873
8872
|
} : (item) => {
|
|
8874
8873
|
const childRowid = handleGetRowId(item);
|
|
8875
|
-
const isSelect = checkField ?
|
|
8874
|
+
const isSelect = checkField ? index.default.get(item, checkField) : selectCheckboxMaps[childRowid];
|
|
8876
8875
|
if (isSelect) {
|
|
8877
8876
|
sLen++;
|
|
8878
8877
|
} else if (treeIndeterminateRowMaps[childRowid]) {
|
|
@@ -8898,10 +8897,10 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8898
8897
|
}
|
|
8899
8898
|
const halfSelect = !isSelected && (sLen > 0 || hLen > 0);
|
|
8900
8899
|
if (checkField) {
|
|
8901
|
-
|
|
8900
|
+
index.default.set(row, checkField, isSelected);
|
|
8902
8901
|
}
|
|
8903
8902
|
if (indeterminateField) {
|
|
8904
|
-
|
|
8903
|
+
index.default.set(row, indeterminateField, halfSelect);
|
|
8905
8904
|
}
|
|
8906
8905
|
if (isSelected) {
|
|
8907
8906
|
if (!checkField) {
|
|
@@ -8945,7 +8944,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8945
8944
|
const rootList = treeConfig ? afterTreeFullData : isRowGroupStatus ? afterGroupFullData : afterFullData;
|
|
8946
8945
|
rootList.forEach(checkMethod ? (row) => {
|
|
8947
8946
|
const childRowid = handleGetRowId(row);
|
|
8948
|
-
const selected = checkField ?
|
|
8947
|
+
const selected = checkField ? index.default.get(row, checkField) : selectCheckboxMaps[childRowid];
|
|
8949
8948
|
if (isRowGroupStatus && $xeTable.isAggregateRecord(row)) {
|
|
8950
8949
|
const childList = row[mapChildrenField || ""];
|
|
8951
8950
|
if (selected) {
|
|
@@ -8973,7 +8972,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8973
8972
|
}
|
|
8974
8973
|
} : (row) => {
|
|
8975
8974
|
const childRowid = handleGetRowId(row);
|
|
8976
|
-
const selected = checkField ?
|
|
8975
|
+
const selected = checkField ? index.default.get(row, checkField) : selectCheckboxMaps[childRowid];
|
|
8977
8976
|
if (selected) {
|
|
8978
8977
|
sLen++;
|
|
8979
8978
|
} else if (treeIndeterminateRowMaps[childRowid]) {
|
|
@@ -8984,7 +8983,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
8984
8983
|
const isSelected = rootList.length > 0 ? vLen > 0 ? sLen >= vLen : sLen >= rootList.length : false;
|
|
8985
8984
|
let halfSelect = !isSelected && (sLen > 0 || hLen > 0 || dsLen > 0 || dhLen > 0);
|
|
8986
8985
|
if (!isSelected && !halfSelect && showReserveStatus) {
|
|
8987
|
-
halfSelect = !
|
|
8986
|
+
halfSelect = !index.default.isEmpty(checkboxReserveRowMap);
|
|
8988
8987
|
}
|
|
8989
8988
|
reactData.isAllSelected = isSelected;
|
|
8990
8989
|
reactData.isIndeterminate = halfSelect;
|
|
@@ -9011,11 +9010,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9011
9010
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
|
|
9012
9011
|
if (checkField) {
|
|
9013
9012
|
if ((treeConfig || isRowGroupStatus) && !checkStrictly) {
|
|
9014
|
-
|
|
9013
|
+
index.default.eachTree(rows, (row) => {
|
|
9015
9014
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
9016
|
-
|
|
9015
|
+
index.default.set(row, checkField, checked);
|
|
9017
9016
|
if (indeterminateField) {
|
|
9018
|
-
|
|
9017
|
+
index.default.set(row, indeterminateField, false);
|
|
9019
9018
|
}
|
|
9020
9019
|
handleCheckboxReserveRow(row, checked);
|
|
9021
9020
|
}
|
|
@@ -9025,7 +9024,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9025
9024
|
}
|
|
9026
9025
|
rows.forEach((row) => {
|
|
9027
9026
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
9028
|
-
|
|
9027
|
+
index.default.set(row, checkField, checked);
|
|
9029
9028
|
handleCheckboxReserveRow(row, checked);
|
|
9030
9029
|
}
|
|
9031
9030
|
});
|
|
@@ -9034,7 +9033,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9034
9033
|
}
|
|
9035
9034
|
if (!checkStrictly) {
|
|
9036
9035
|
if (isRowGroupStatus) {
|
|
9037
|
-
|
|
9036
|
+
index.default.eachTree(rows, (row) => {
|
|
9038
9037
|
const rowid = handleGetRowId(row);
|
|
9039
9038
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
9040
9039
|
if (checked) {
|
|
@@ -9050,7 +9049,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9050
9049
|
reactData.updateCheckboxFlag++;
|
|
9051
9050
|
return;
|
|
9052
9051
|
} else if (treeConfig) {
|
|
9053
|
-
|
|
9052
|
+
index.default.eachTree(rows, (row) => {
|
|
9054
9053
|
const rowid = handleGetRowId(row);
|
|
9055
9054
|
if (isForce || (!checkMethod || checkMethod({ $table: $xeTable, row }))) {
|
|
9056
9055
|
if (checked) {
|
|
@@ -9421,7 +9420,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9421
9420
|
}
|
|
9422
9421
|
let checked = false;
|
|
9423
9422
|
if (checkField) {
|
|
9424
|
-
checked = !
|
|
9423
|
+
checked = !index.default.get(row, checkField);
|
|
9425
9424
|
} else {
|
|
9426
9425
|
checked = !selectCheckboxMaps[util.getRowid($xeTable, row)];
|
|
9427
9426
|
}
|
|
@@ -9706,7 +9705,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9706
9705
|
if ($xeTable.hasCellRules(type, row, column)) {
|
|
9707
9706
|
const cell2 = $xeTable.getCellElement(row, column);
|
|
9708
9707
|
if (cell2) {
|
|
9709
|
-
const customVal = !
|
|
9708
|
+
const customVal = !index.default.isUndefined(cellValue);
|
|
9710
9709
|
return $xeTable.validCellRules(type, row, column, cellValue).then(() => {
|
|
9711
9710
|
if (customVal && validStore.visible) {
|
|
9712
9711
|
util.setCellValue(row, column, cellValue);
|
|
@@ -9858,7 +9857,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9858
9857
|
if (oldRest && newRest) {
|
|
9859
9858
|
const { level: oldLevel } = oldRest;
|
|
9860
9859
|
const { level: newLevel } = newRest;
|
|
9861
|
-
|
|
9860
|
+
index.default.eachTree([dragRow], (item) => {
|
|
9862
9861
|
oldAllMaps[util.getRowid($xeTable, item)] = item;
|
|
9863
9862
|
}, { children: mapChildrenField });
|
|
9864
9863
|
if (oldLevel && newLevel) {
|
|
@@ -9921,7 +9920,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9921
9920
|
if (treeConfig) {
|
|
9922
9921
|
if (transform) {
|
|
9923
9922
|
if (oldRest && newRest) {
|
|
9924
|
-
const fullList =
|
|
9923
|
+
const fullList = index.default.toTreeArray(internalData.afterTreeFullData, {
|
|
9925
9924
|
updated: false,
|
|
9926
9925
|
key: rowField,
|
|
9927
9926
|
parentKey: parentField,
|
|
@@ -9933,12 +9932,12 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
9933
9932
|
const ntfIndex = ptfIndex + dragOffsetIndex;
|
|
9934
9933
|
fullList.splice(ntfIndex, 0, dragRow);
|
|
9935
9934
|
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
9936
|
-
|
|
9935
|
+
index.default.each(dragRow[childrenField], (childRow) => {
|
|
9937
9936
|
childRow[parentField] = dragRow[parentField];
|
|
9938
9937
|
});
|
|
9939
9938
|
}
|
|
9940
9939
|
dragRow[parentField] = isDragToChildFlag ? prevDragRow[rowField] : prevDragRow[parentField];
|
|
9941
|
-
internalData.tableFullTreeData =
|
|
9940
|
+
internalData.tableFullTreeData = index.default.toArrayTree(fullList, {
|
|
9942
9941
|
key: rowField,
|
|
9943
9942
|
parentKey: parentField,
|
|
9944
9943
|
children: childrenField,
|
|
@@ -10096,7 +10095,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10096
10095
|
rsIndex = dragRowRest.$index;
|
|
10097
10096
|
}
|
|
10098
10097
|
const dragRangeList = rsIndex > -1 && rsIndex < tableData.length - 1 ? tableData.slice(rsIndex + 1) : [];
|
|
10099
|
-
const dragList =
|
|
10098
|
+
const dragList = index.default.toTreeArray([dragRow], {
|
|
10100
10099
|
updated: true,
|
|
10101
10100
|
children: mapChildrenField
|
|
10102
10101
|
});
|
|
@@ -10203,7 +10202,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10203
10202
|
}
|
|
10204
10203
|
let insertRest = Promise.resolve();
|
|
10205
10204
|
if (treeConfig) {
|
|
10206
|
-
const dragList =
|
|
10205
|
+
const dragList = index.default.toTreeArray([dragRow], {
|
|
10207
10206
|
updated: true,
|
|
10208
10207
|
children: mapChildrenField
|
|
10209
10208
|
});
|
|
@@ -10460,7 +10459,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10460
10459
|
const dragAllTargetCols = [];
|
|
10461
10460
|
let dragColWidth = 0;
|
|
10462
10461
|
if (animation) {
|
|
10463
|
-
|
|
10462
|
+
index.default.eachTree([dragColumn], (column) => {
|
|
10464
10463
|
if (!dragTargetColumn && (!column.children || !column.children.length)) {
|
|
10465
10464
|
dragTargetColumn = column;
|
|
10466
10465
|
dragColWidth += column.renderWidth;
|
|
@@ -10483,7 +10482,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10483
10482
|
let oafIndex = -1;
|
|
10484
10483
|
let nafIndex = -1;
|
|
10485
10484
|
const oldAllMaps = {};
|
|
10486
|
-
|
|
10485
|
+
index.default.eachTree([dragColumn], (column) => {
|
|
10487
10486
|
oldAllMaps[column.id] = column;
|
|
10488
10487
|
});
|
|
10489
10488
|
let isSelfToChildStatus = false;
|
|
@@ -10541,7 +10540,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10541
10540
|
if (!status) {
|
|
10542
10541
|
return errRest;
|
|
10543
10542
|
}
|
|
10544
|
-
const oldewMatchRest =
|
|
10543
|
+
const oldewMatchRest = index.default.findTree(collectColumn, (item) => item.id === dragColumn.id);
|
|
10545
10544
|
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
10546
10545
|
if (oldewMatchRest) {
|
|
10547
10546
|
const { items: oCols, index: oIndex } = oldewMatchRest;
|
|
@@ -10561,7 +10560,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10561
10560
|
}
|
|
10562
10561
|
}
|
|
10563
10562
|
}
|
|
10564
|
-
const newMatchRest =
|
|
10563
|
+
const newMatchRest = index.default.findTree(collectColumn, (item) => item.id === newColumn.id);
|
|
10565
10564
|
if (newMatchRest) {
|
|
10566
10565
|
const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
|
|
10567
10566
|
if (isCrossDrag && isToChildDrag && isDragToChildFlag) {
|
|
@@ -10575,9 +10574,9 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10575
10574
|
nafIndex = nIndex;
|
|
10576
10575
|
}
|
|
10577
10576
|
}
|
|
10578
|
-
|
|
10577
|
+
index.default.eachTree(collectColumn, (column, index2, items, path, parentColumn) => {
|
|
10579
10578
|
if (!parentColumn) {
|
|
10580
|
-
const sortIndex =
|
|
10579
|
+
const sortIndex = index2 + 1;
|
|
10581
10580
|
column.renderSortNumber = sortIndex;
|
|
10582
10581
|
}
|
|
10583
10582
|
});
|
|
@@ -10614,7 +10613,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10614
10613
|
const { visibleColumn, fullColumnIdData: fullColumnIdData2 } = internalData;
|
|
10615
10614
|
let dragNewColumn = null;
|
|
10616
10615
|
const dragNewColMaps = {};
|
|
10617
|
-
|
|
10616
|
+
index.default.eachTree([dragColumn], (column) => {
|
|
10618
10617
|
if (!dragNewColumn && (!column.children || !column.children.length)) {
|
|
10619
10618
|
dragNewColumn = column;
|
|
10620
10619
|
}
|
|
@@ -10624,7 +10623,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10624
10623
|
dragNewColumn = dragColumn;
|
|
10625
10624
|
}
|
|
10626
10625
|
if (dragColWidth && dragAllTargetCols.length) {
|
|
10627
|
-
const _newColIndex =
|
|
10626
|
+
const _newColIndex = index.default.findIndexOf(visibleColumn, (column) => !!dragNewColumn && column.id === dragNewColumn.id);
|
|
10628
10627
|
const firstCol = tableColumn[0];
|
|
10629
10628
|
const firstColRest = fullColumnIdData2[firstCol.id];
|
|
10630
10629
|
if (firstColRest) {
|
|
@@ -10660,7 +10659,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
10660
10659
|
dragRangeList.push(column);
|
|
10661
10660
|
}
|
|
10662
10661
|
}
|
|
10663
|
-
|
|
10662
|
+
index.default.eachTree([newColumn], (column) => {
|
|
10664
10663
|
if (!dragRangeMaps[column.id]) {
|
|
10665
10664
|
dragRangeMaps[column.id] = column;
|
|
10666
10665
|
dragRangeList.push(column);
|
|
@@ -11265,11 +11264,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11265
11264
|
const aggregateOpts = computeAggregateOpts.value;
|
|
11266
11265
|
const treeOpts = computeTreeOpts.value;
|
|
11267
11266
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
11268
|
-
const matchObj =
|
|
11267
|
+
const matchObj = index.default.findTree(tableFullData, (item) => $xeTable.eqRow(item, row), { children: isRowGroupStatus ? aggregateOpts.mapChildrenField : childrenField });
|
|
11269
11268
|
if (matchObj) {
|
|
11270
11269
|
const nodes = matchObj.nodes;
|
|
11271
|
-
nodes.forEach((row2,
|
|
11272
|
-
if (
|
|
11270
|
+
nodes.forEach((row2, index2) => {
|
|
11271
|
+
if (index2 < nodes.length - 1 && !$xeTable.isTreeExpandByRow(row2)) {
|
|
11273
11272
|
rests.push($xeTable.setTreeExpand(row2, true));
|
|
11274
11273
|
}
|
|
11275
11274
|
});
|
|
@@ -11561,7 +11560,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11561
11560
|
const el = refElem.value;
|
|
11562
11561
|
$xeTable.clearHoverRow();
|
|
11563
11562
|
if (el) {
|
|
11564
|
-
|
|
11563
|
+
index.default.arrayEach(el.querySelectorAll(`.vxe-body--row[rowid="${rowid}"]`), (elem) => dom.addClass(elem, "row--hover"));
|
|
11565
11564
|
}
|
|
11566
11565
|
internalData.hoverRow = row;
|
|
11567
11566
|
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
@@ -11572,7 +11571,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11572
11571
|
const $xeGanttView = internalData.xeGanttView;
|
|
11573
11572
|
const el = refElem.value;
|
|
11574
11573
|
if (el) {
|
|
11575
|
-
|
|
11574
|
+
index.default.arrayEach(el.querySelectorAll(".vxe-body--row.row--hover"), (elem) => dom.removeClass(elem, "row--hover"));
|
|
11576
11575
|
}
|
|
11577
11576
|
internalData.hoverRow = null;
|
|
11578
11577
|
if ($xeGanttView && $xeGanttView.handleUpdateHoverRow) {
|
|
@@ -11587,7 +11586,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11587
11586
|
return $xeTable.getCellElement(row, column);
|
|
11588
11587
|
},
|
|
11589
11588
|
findRowIndexOf(list, row) {
|
|
11590
|
-
return row ?
|
|
11589
|
+
return row ? index.default.findIndexOf(list, (item) => $xeTable.eqRow(item, row)) : -1;
|
|
11591
11590
|
},
|
|
11592
11591
|
eqRow(row1, row2) {
|
|
11593
11592
|
if (row1 && row2) {
|
|
@@ -11617,8 +11616,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11617
11616
|
const { overscrollBehavior: overscrollYBehavior } = scrollbarYOpts;
|
|
11618
11617
|
const isFixedLeft = fixedType === "left";
|
|
11619
11618
|
const fixedColumn = isFixedLeft ? columnStore.leftList : columnStore.rightList;
|
|
11620
|
-
const osXBehavior =
|
|
11621
|
-
const osYBehavior =
|
|
11619
|
+
const osXBehavior = index.default.eqNull(overscrollXBehavior) ? scrollbarOpts.overscrollBehavior : overscrollXBehavior;
|
|
11620
|
+
const osYBehavior = index.default.eqNull(overscrollYBehavior) ? scrollbarOpts.overscrollBehavior : overscrollYBehavior;
|
|
11622
11621
|
return vue.h("div", {
|
|
11623
11622
|
ref: isFixedLeft ? refLeftContainer : refRightContainer,
|
|
11624
11623
|
class: [`vxe-table--fixed-${fixedType}-wrapper`, `sx--${scrollbarXOpts.visible}`, `sy--${scrollbarYOpts.visible}`, {
|
|
@@ -11784,7 +11783,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11784
11783
|
cellStyle.height = `${expandHeight}px`;
|
|
11785
11784
|
}
|
|
11786
11785
|
if (isRowGroupStatus || treeConfig) {
|
|
11787
|
-
cellStyle.paddingLeft = `${rowLevel * (
|
|
11786
|
+
cellStyle.paddingLeft = `${rowLevel * (index.default.isNumber(indent) ? indent : treeOpts.indent) + 30}px`;
|
|
11788
11787
|
}
|
|
11789
11788
|
let columnIndex = -1;
|
|
11790
11789
|
let $columnIndex = -1;
|
|
@@ -11914,8 +11913,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
11914
11913
|
const { overscrollBehavior: overscrollXBehavior } = scrollbarXOpts;
|
|
11915
11914
|
const { overscrollBehavior: overscrollYBehavior } = scrollbarYOpts;
|
|
11916
11915
|
const { leftList, rightList } = columnStore;
|
|
11917
|
-
const osXBehavior =
|
|
11918
|
-
const osYBehavior =
|
|
11916
|
+
const osXBehavior = index.default.eqNull(overscrollXBehavior) ? scrollbarOpts.overscrollBehavior : overscrollXBehavior;
|
|
11917
|
+
const osYBehavior = index.default.eqNull(overscrollYBehavior) ? scrollbarOpts.overscrollBehavior : overscrollYBehavior;
|
|
11919
11918
|
return vue.h("div", {
|
|
11920
11919
|
ref: refTableViewportElem,
|
|
11921
11920
|
class: ["vxe-table--viewport-wrapper", {
|
|
@@ -12333,7 +12332,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12333
12332
|
staticColumnFlag.value++;
|
|
12334
12333
|
});
|
|
12335
12334
|
vue.watch(staticColumnFlag, () => {
|
|
12336
|
-
vue.nextTick(() => handleInitColumn(
|
|
12335
|
+
vue.nextTick(() => handleInitColumn(index.default.clone(reactData.staticColumns)));
|
|
12337
12336
|
});
|
|
12338
12337
|
const tableColumnFlag = vue.ref(0);
|
|
12339
12338
|
vue.watch(() => reactData.tableColumn.length, () => {
|
|
@@ -12506,7 +12505,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12506
12505
|
const { setupTable } = options;
|
|
12507
12506
|
if (setupTable) {
|
|
12508
12507
|
const hookRest = setupTable($xeTable);
|
|
12509
|
-
if (hookRest &&
|
|
12508
|
+
if (hookRest && index.default.isObject(hookRest)) {
|
|
12510
12509
|
Object.assign($xeTable, hookRest);
|
|
12511
12510
|
}
|
|
12512
12511
|
}
|
|
@@ -12615,11 +12614,11 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12615
12614
|
if (props$1.aggregateConfig && props$1.rowGroupConfig) {
|
|
12616
12615
|
log.warnLog("vxe.error.notSupportProp", ["aggregate-config", "row-group-config", "row-group-config=null"]);
|
|
12617
12616
|
}
|
|
12618
|
-
if (importConfig && importOpts.types && !importOpts.importMethod && !
|
|
12619
|
-
log.warnLog("vxe.error.errProp", [`export-config.types=${importOpts.types.join(",")}`, importOpts.types.filter((type) =>
|
|
12617
|
+
if (importConfig && importOpts.types && !importOpts.importMethod && !index.default.includeArrays(index.default.keys(importOpts._typeMaps), importOpts.types)) {
|
|
12618
|
+
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
12619
|
}
|
|
12621
|
-
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !
|
|
12622
|
-
log.warnLog("vxe.error.errProp", [`export-config.types=${exportOpts.types.join(",")}`, exportOpts.types.filter((type) =>
|
|
12620
|
+
if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !index.default.includeArrays(index.default.keys(exportOpts._typeMaps), exportOpts.types)) {
|
|
12621
|
+
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
12622
|
}
|
|
12624
12623
|
if (!props$1.id) {
|
|
12625
12624
|
if ((props$1.customConfig ? utils.isEnableConf(customOpts) : customOpts.enabled) && customOpts.storage) {
|
|
@@ -12706,7 +12705,7 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12706
12705
|
log.warnLog("vxe.error.reqSupportProp", ["edit-config & edit-rules", "min-height"]);
|
|
12707
12706
|
}
|
|
12708
12707
|
if (treeConfig) {
|
|
12709
|
-
|
|
12708
|
+
index.default.arrayEach(["rowField", "parentField", "childrenField", "hasChildField", "mapChildrenField"], (key) => {
|
|
12710
12709
|
const val = treeOpts[key];
|
|
12711
12710
|
if (val && val.indexOf(".") > -1) {
|
|
12712
12711
|
log.errLog("vxe.error.errProp", [`${key}=${val}`, `${key}=${val.split(".")[0]}`]);
|
|
@@ -12795,8 +12794,8 @@ const VxeTableComponent = comp.defineVxeComponent({
|
|
|
12795
12794
|
globalEvents.off($xeTable, "resize");
|
|
12796
12795
|
globalEvents.off($xeTable, "contextmenu");
|
|
12797
12796
|
$xeTable.preventEvent(null, "beforeUnmount", { $table: $xeTable });
|
|
12798
|
-
|
|
12799
|
-
|
|
12797
|
+
index.default.assign(reactData, util.createReactData());
|
|
12798
|
+
index.default.assign(internalData, util.createInternalData());
|
|
12800
12799
|
});
|
|
12801
12800
|
vue.onUnmounted(() => {
|
|
12802
12801
|
$xeTable.preventEvent(null, "unmounted", { $table: $xeTable });
|