vxe-table 3.8.23 → 3.9.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -77
- package/es/colgroup/index.js +17 -0
- package/es/column/index.js +17 -0
- package/es/components.js +33 -0
- package/es/grid/index.js +13 -0
- package/es/grid/src/grid.js +1100 -0
- package/es/grid/style.css +61 -0
- package/es/grid/style.min.css +1 -0
- package/es/iconfont.1725953896189.ttf +0 -0
- package/es/iconfont.1725953896189.woff +0 -0
- package/es/iconfont.1725953896189.woff2 +0 -0
- package/es/index.esm.js +3 -0
- package/es/locale/lang/en-US.d.ts +2 -0
- package/es/locale/lang/en-US.js +673 -0
- package/es/locale/lang/es-ES.d.ts +2 -0
- package/es/locale/lang/es-ES.js +673 -0
- package/es/locale/lang/hu-HU.js +671 -0
- package/es/locale/lang/ja-JP.d.ts +2 -0
- package/es/locale/lang/ja-JP.js +673 -0
- package/es/locale/lang/ko-KR.js +673 -0
- package/es/locale/lang/pt-BR.d.ts +2 -0
- package/es/locale/lang/pt-BR.js +673 -0
- package/es/locale/lang/ru-RU.js +673 -0
- package/es/locale/lang/vi-VN.js +673 -0
- package/es/locale/lang/zh-CN.d.ts +2 -0
- package/es/locale/lang/zh-CN.js +673 -0
- package/es/locale/lang/zh-HK.d.ts +2 -0
- package/es/locale/lang/zh-HK.js +2 -0
- package/es/locale/lang/zh-MO.d.ts +2 -0
- package/es/locale/lang/zh-MO.js +2 -0
- package/es/locale/lang/zh-TC.d.ts +2 -0
- package/es/locale/lang/zh-TC.js +673 -0
- package/es/locale/lang/zh-TW.d.ts +2 -0
- package/es/locale/lang/zh-TW.js +2 -0
- package/es/style.css +1 -0
- package/es/style.min.css +1 -0
- package/es/table/index.js +14 -0
- package/es/table/module/custom/mixin.js +87 -0
- package/es/table/module/custom/panel.js +974 -0
- package/es/table/module/edit/mixin.js +810 -0
- package/es/table/module/export/export-panel.js +448 -0
- package/es/table/module/export/import-panel.js +185 -0
- package/es/table/module/export/mixin.js +1463 -0
- package/es/table/module/export/util.js +20 -0
- package/es/table/module/filter/mixin.js +276 -0
- package/es/table/module/filter/panel.js +219 -0
- package/es/table/module/keyboard/mixin.js +376 -0
- package/es/table/module/menu/mixin.js +282 -0
- package/es/table/module/menu/panel.js +138 -0
- package/es/table/module/validator/mixin.js +487 -0
- package/es/table/render/index.js +796 -0
- package/es/table/src/body.js +771 -0
- package/es/table/src/cell.js +846 -0
- package/es/table/src/column.js +139 -0
- package/es/table/src/columnInfo.js +158 -0
- package/es/table/src/footer.js +279 -0
- package/es/table/src/group.js +11 -0
- package/es/table/src/header.js +302 -0
- package/es/table/src/methods.js +5640 -0
- package/es/table/src/props.js +170 -0
- package/es/table/src/table.js +1132 -0
- package/es/table/src/util.js +384 -0
- package/es/table/style.css +2805 -0
- package/es/table/style.min.css +1 -0
- package/es/toolbar/index.js +13 -0
- package/es/toolbar/src/toolbar.js +675 -0
- package/es/toolbar/style.css +91 -0
- package/es/toolbar/style.min.css +1 -0
- package/es/ui/index.js +377 -0
- package/es/ui/src/comp.js +1 -0
- package/es/ui/src/dom.js +141 -0
- package/es/ui/src/log.js +5 -0
- package/es/ui/src/utils.js +44 -0
- package/es/ui/src/vn.js +10 -0
- package/es/v-x-e-table/index.js +3 -0
- package/es/vxe-colgroup/index.js +3 -0
- package/es/vxe-column/index.js +3 -0
- package/es/vxe-grid/index.js +3 -0
- package/es/vxe-grid/style.css +61 -0
- package/es/vxe-grid/style.min.css +1 -0
- package/es/vxe-table/index.js +3 -0
- package/es/vxe-table/style.css +2805 -0
- package/es/vxe-table/style.min.css +1 -0
- package/es/vxe-toolbar/index.js +3 -0
- package/es/vxe-toolbar/style.css +91 -0
- package/es/vxe-toolbar/style.min.css +1 -0
- package/es/vxe-ui/index.js +3 -0
- package/es/vxe-v-x-e-table/index.js +3 -0
- package/helper/vetur/attributes.json +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/colgroup/index.js +12 -7
- package/lib/colgroup/index.min.js +1 -1
- package/lib/colgroup/style/style.css +0 -26
- package/lib/column/index.js +12 -7
- package/lib/column/index.min.js +1 -1
- package/lib/column/style/style.css +0 -26
- package/lib/components.js +101 -0
- package/lib/components.min.js +1 -0
- package/lib/grid/index.js +9 -8
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +114 -121
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +6 -32
- package/lib/grid/style/style.min.css +1 -1
- package/lib/iconfont.1725953896189.ttf +0 -0
- package/lib/iconfont.1725953896189.woff +0 -0
- package/lib/iconfont.1725953896189.woff2 +0 -0
- package/lib/index.common.js +5 -5
- package/lib/index.umd.js +18867 -29242
- package/lib/index.umd.min.js +1 -1
- package/lib/locale/lang/en-US.d.ts +2 -8
- package/lib/locale/lang/en-US.js +11 -6
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +11 -6
- package/lib/locale/lang/es-ES.d.ts +2 -8
- package/lib/locale/lang/es-ES.js +11 -6
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +11 -6
- package/lib/locale/lang/hu-HU.js +677 -0
- package/lib/locale/lang/hu-HU.min.js +1 -0
- package/lib/locale/lang/ja-JP.d.ts +2 -8
- package/lib/locale/lang/ja-JP.js +11 -6
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +11 -6
- package/lib/locale/lang/ko-KR.js +679 -0
- package/lib/locale/lang/ko-KR.min.js +1 -0
- package/lib/locale/lang/pt-BR.d.ts +2 -8
- package/lib/locale/lang/pt-BR.js +11 -6
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +11 -6
- package/lib/locale/lang/ru-RU.js +679 -0
- package/lib/locale/lang/ru-RU.min.js +1 -0
- package/lib/locale/lang/vi-VN.js +679 -0
- package/lib/locale/lang/vi-VN.min.js +1 -0
- package/lib/locale/lang/zh-CN.d.ts +2 -8
- package/lib/locale/lang/zh-CN.js +11 -6
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +11 -6
- package/lib/locale/lang/zh-HK.d.ts +2 -8
- package/lib/locale/lang/zh-HK.js +1 -1
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +11 -6
- package/lib/locale/lang/zh-MO.d.ts +2 -8
- package/lib/locale/lang/zh-MO.js +1 -1
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +11 -6
- package/lib/locale/lang/zh-TC.d.ts +2 -8
- package/lib/locale/lang/zh-TC.js +11 -6
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +11 -6
- package/lib/locale/lang/zh-TW.d.ts +2 -8
- package/lib/locale/lang/zh-TW.js +1 -1
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +11 -6
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/index.js +10 -31
- package/lib/table/index.min.js +1 -1
- package/lib/table/module/custom/mixin.js +117 -0
- package/lib/table/module/custom/mixin.min.js +1 -0
- package/lib/table/module/custom/panel.js +910 -0
- package/lib/table/module/custom/panel.min.js +1 -0
- package/lib/table/module/edit/mixin.js +975 -0
- package/lib/table/module/edit/mixin.min.js +1 -0
- package/lib/table/module/export/export-panel.js +412 -0
- package/lib/table/module/export/export-panel.min.js +1 -0
- package/lib/table/module/export/import-panel.js +177 -0
- package/lib/table/module/export/import-panel.min.js +1 -0
- package/lib/table/module/export/mixin.js +1735 -0
- package/lib/table/module/export/mixin.min.js +1 -0
- package/lib/table/module/export/util.js +18 -0
- package/lib/table/module/export/util.min.js +1 -0
- package/lib/table/module/filter/mixin.js +329 -0
- package/lib/table/module/filter/mixin.min.js +1 -0
- package/lib/table/module/filter/panel.js +213 -0
- package/lib/table/module/filter/panel.min.js +1 -0
- package/lib/table/module/keyboard/mixin.js +410 -0
- package/lib/table/module/keyboard/mixin.min.js +1 -0
- package/lib/table/module/menu/mixin.js +329 -0
- package/lib/table/module/menu/mixin.min.js +1 -0
- package/lib/table/module/menu/panel.js +117 -0
- package/lib/table/module/menu/panel.min.js +1 -0
- package/lib/table/module/validator/mixin.js +550 -0
- package/lib/table/module/validator/mixin.min.js +1 -0
- package/lib/table/render/index.js +895 -0
- package/lib/table/render/index.min.js +1 -0
- package/lib/table/src/body.js +38 -44
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +83 -87
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +5 -5
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +13 -21
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +14 -14
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +1 -1
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +19 -23
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +608 -599
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/props.js +296 -0
- package/lib/table/src/props.min.js +1 -0
- package/lib/table/src/table.js +150 -419
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +73 -23
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +1715 -361
- package/lib/table/style/style.min.css +1 -1
- package/lib/toolbar/index.js +9 -6
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +579 -413
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +11 -37
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/ui/index.js +382 -16
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/comp.js +9 -0
- package/lib/ui/src/comp.min.js +1 -0
- package/lib/ui/src/dom.js +184 -0
- package/lib/ui/src/dom.min.js +1 -0
- package/lib/ui/src/log.js +11 -0
- package/lib/ui/src/log.min.js +1 -0
- package/lib/ui/src/utils.js +63 -0
- package/lib/ui/src/utils.min.js +1 -0
- package/lib/ui/src/vn.js +18 -0
- package/lib/ui/src/vn.min.js +1 -0
- package/lib/v-x-e-table/index.js +10 -277
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +0 -1630
- package/lib/v-x-e-table/style/style.min.css +0 -1
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-colgroup/style/style.css +0 -26
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-column/style/style.css +0 -26
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-grid/style/style.css +6 -32
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +1715 -361
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-toolbar/style/style.css +11 -37
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/lib/vxe-ui/index.js +23 -0
- package/lib/vxe-ui/index.min.js +1 -0
- package/lib/vxe-v-x-e-table/index.js +23 -0
- package/lib/vxe-v-x-e-table/index.min.js +1 -0
- package/lib/vxe-v-x-e-table/style/style.css +0 -0
- package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
- package/package.json +18 -25
- package/packages/colgroup/index.ts +22 -0
- package/packages/column/index.ts +22 -0
- package/packages/components.ts +43 -0
- package/packages/grid/index.ts +18 -0
- package/packages/grid/src/grid.ts +1129 -0
- package/packages/index.ts +4 -0
- package/packages/locale/lang/en-US.ts +675 -0
- package/packages/locale/lang/es-ES.ts +675 -0
- package/packages/locale/lang/hu-HU.ts +673 -0
- package/packages/locale/lang/ja-JP.ts +675 -0
- package/packages/locale/lang/ko-KR.ts +675 -0
- package/packages/locale/lang/pt-BR.ts +675 -0
- package/packages/locale/lang/ru-RU.ts +675 -0
- package/packages/locale/lang/vi-VN.ts +675 -0
- package/packages/locale/lang/zh-CN.ts +675 -0
- package/packages/locale/lang/zh-TC.ts +675 -0
- package/packages/table/index.ts +19 -0
- package/packages/table/module/custom/mixin.ts +87 -0
- package/packages/table/module/custom/panel.ts +984 -0
- package/packages/table/module/edit/mixin.ts +797 -0
- package/packages/table/module/export/export-panel.ts +452 -0
- package/packages/table/module/export/import-panel.ts +188 -0
- package/packages/table/module/export/mixin.ts +1504 -0
- package/packages/table/module/export/util.ts +24 -0
- package/packages/table/module/filter/mixin.ts +273 -0
- package/packages/table/module/filter/panel.ts +220 -0
- package/packages/table/module/keyboard/mixin.ts +355 -0
- package/packages/table/module/menu/mixin.ts +272 -0
- package/packages/table/module/menu/panel.ts +141 -0
- package/packages/table/module/validator/mixin.ts +475 -0
- package/packages/table/render/index.ts +863 -0
- package/packages/table/src/body.ts +842 -0
- package/packages/table/src/cell.ts +872 -0
- package/packages/table/src/column.ts +141 -0
- package/packages/table/src/columnInfo.ts +169 -0
- package/packages/table/src/footer.ts +300 -0
- package/packages/table/src/header.ts +304 -0
- package/packages/table/src/methods.ts +5559 -0
- package/packages/table/src/props.ts +173 -0
- package/packages/table/src/table.ts +1186 -0
- package/packages/table/src/util.ts +410 -0
- package/packages/toolbar/index.ts +18 -0
- package/packages/toolbar/src/toolbar.ts +733 -0
- package/packages/ui/index.ts +397 -0
- package/packages/ui/src/comp.ts +3 -0
- package/packages/ui/src/dom.ts +163 -0
- package/packages/ui/src/log.ts +8 -0
- package/packages/ui/src/utils.ts +54 -0
- package/packages/ui/src/vn.ts +14 -0
- package/packages/v-x-e-table/index.ts +4 -0
- package/styles/all.scss +6 -32
- package/styles/base.scss +16 -0
- package/styles/components/colgroup.scss +0 -0
- package/styles/components/column.scss +0 -0
- package/styles/components/grid.scss +62 -0
- package/styles/components/icon.scss +187 -0
- package/styles/components/old-icon.scss +717 -0
- package/styles/components/table-module/all.scss +7 -0
- package/styles/components/table-module/custom.scss +381 -0
- package/styles/components/table-module/edit.scss +0 -0
- package/styles/components/table-module/export.scss +127 -0
- package/styles/components/table-module/filter.scss +112 -0
- package/styles/components/table-module/keyboard.scss +0 -0
- package/styles/components/table-module/menu.scss +86 -0
- package/styles/components/table-module/validator.scss +0 -0
- package/styles/components/table.scss +1492 -0
- package/styles/components/toolbar.scss +102 -0
- package/styles/components/ui.scss +0 -0
- package/styles/components/v-x-e-table.scss +0 -0
- package/styles/cssvar.scss +3 -2
- package/styles/default.scss +2 -0
- package/styles/helpers/mixin.scss +16 -13
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/modules.scss +6 -33
- package/styles/theme/base.scss +89 -0
- package/styles/theme/dark.scss +41 -0
- package/styles/theme/light.scss +39 -0
- package/styles/variable.scss +2 -275
- package/types/all.d.ts +45 -70
- package/types/index.d.ts +2 -7
- package/lib/all.js +0 -459
- package/lib/all.min.js +0 -1
- package/lib/button/index.d.ts +0 -4
- package/lib/button/index.js +0 -17
- package/lib/button/index.min.js +0 -1
- package/lib/button/src/button.js +0 -512
- package/lib/button/src/button.min.js +0 -1
- package/lib/button/src/group.js +0 -71
- package/lib/button/src/group.min.js +0 -1
- package/lib/button/style/style.css +0 -571
- package/lib/button/style/style.min.css +0 -1
- package/lib/button-group/index.d.ts +0 -4
- package/lib/button-group/index.js +0 -17
- package/lib/button-group/index.min.js +0 -1
- package/lib/button-group/style/style.css +0 -29
- package/lib/button-group/style/style.min.css +0 -1
- package/lib/checkbox/index.d.ts +0 -4
- package/lib/checkbox/index.js +0 -17
- package/lib/checkbox/index.min.js +0 -1
- package/lib/checkbox/src/checkbox.js +0 -138
- package/lib/checkbox/src/checkbox.min.js +0 -1
- package/lib/checkbox/src/group.js +0 -105
- package/lib/checkbox/src/group.min.js +0 -1
- package/lib/checkbox/style/index.js +0 -1
- package/lib/checkbox/style/style.css +0 -292
- package/lib/checkbox/style/style.min.css +0 -1
- package/lib/checkbox-group/index.d.ts +0 -4
- package/lib/checkbox-group/index.js +0 -17
- package/lib/checkbox-group/index.min.js +0 -1
- package/lib/checkbox-group/style/style.css +0 -26
- package/lib/colgroup/index.d.ts +0 -4
- package/lib/column/index.d.ts +0 -4
- package/lib/custom/index.d.ts +0 -4
- package/lib/custom/index.js +0 -21
- package/lib/custom/index.min.js +0 -1
- package/lib/custom/src/mixin.js +0 -117
- package/lib/custom/src/mixin.min.js +0 -1
- package/lib/custom/src/panel.js +0 -865
- package/lib/custom/src/panel.min.js +0 -1
- package/lib/custom/style/index.js +0 -1
- package/lib/custom/style/style.css +0 -629
- package/lib/custom/style/style.min.css +0 -1
- package/lib/edit/index.d.ts +0 -4
- package/lib/edit/index.js +0 -18
- package/lib/edit/index.min.js +0 -1
- package/lib/edit/src/mixin.js +0 -973
- package/lib/edit/src/mixin.min.js +0 -1
- package/lib/edit/style/index.js +0 -1
- package/lib/edit/style/style.css +0 -26
- package/lib/export/index.d.ts +0 -4
- package/lib/export/index.js +0 -59
- package/lib/export/index.min.js +0 -1
- package/lib/export/src/export-panel.js +0 -413
- package/lib/export/src/export-panel.min.js +0 -1
- package/lib/export/src/import-panel.js +0 -176
- package/lib/export/src/import-panel.min.js +0 -1
- package/lib/export/src/mixin.js +0 -1762
- package/lib/export/src/mixin.min.js +0 -1
- package/lib/export/style/index.js +0 -1
- package/lib/export/style/style.css +0 -219
- package/lib/export/style/style.min.css +0 -1
- package/lib/filter/index.d.ts +0 -4
- package/lib/filter/index.js +0 -21
- package/lib/filter/index.min.js +0 -1
- package/lib/filter/src/mixin.js +0 -328
- package/lib/filter/src/mixin.min.js +0 -1
- package/lib/filter/src/panel.js +0 -215
- package/lib/filter/src/panel.min.js +0 -1
- package/lib/filter/style/index.js +0 -1
- package/lib/filter/style/style.css +0 -166
- package/lib/filter/style/style.min.css +0 -1
- package/lib/form/index.d.ts +0 -4
- package/lib/form/index.js +0 -17
- package/lib/form/index.min.js +0 -1
- package/lib/form/src/form-config-item.js +0 -194
- package/lib/form/src/form-config-item.min.js +0 -1
- package/lib/form/src/form-gather.js +0 -36
- package/lib/form/src/form-gather.min.js +0 -1
- package/lib/form/src/form-item.js +0 -259
- package/lib/form/src/form-item.min.js +0 -1
- package/lib/form/src/form.js +0 -764
- package/lib/form/src/form.min.js +0 -1
- package/lib/form/src/render.js +0 -81
- package/lib/form/src/render.min.js +0 -1
- package/lib/form/src/util.js +0 -148
- package/lib/form/src/util.min.js +0 -1
- package/lib/form/style/index.js +0 -1
- package/lib/form/style/style.css +0 -444
- package/lib/form/style/style.min.css +0 -1
- package/lib/form-gather/index.d.ts +0 -4
- package/lib/form-gather/index.js +0 -17
- package/lib/form-gather/index.min.js +0 -1
- package/lib/form-gather/style/index.js +0 -1
- package/lib/form-gather/style/style.css +0 -26
- package/lib/form-item/index.d.ts +0 -4
- package/lib/form-item/index.js +0 -17
- package/lib/form-item/index.min.js +0 -1
- package/lib/form-item/style/index.js +0 -1
- package/lib/form-item/style/style.css +0 -26
- package/lib/grid/index.d.ts +0 -4
- package/lib/icon/index.d.ts +0 -4
- package/lib/icon/index.js +0 -17
- package/lib/icon/index.min.js +0 -1
- package/lib/icon/src/icon.js +0 -32
- package/lib/icon/src/icon.min.js +0 -1
- package/lib/icon/style/iconfont.1724894779531.ttf +0 -0
- package/lib/icon/style/iconfont.1724894779531.woff +0 -0
- package/lib/icon/style/iconfont.1724894779531.woff2 +0 -0
- package/lib/icon/style/index.js +0 -1
- package/lib/icon/style/style.css +0 -1550
- package/lib/icon/style/style.min.css +0 -1550
- package/lib/iconfont.1724894779531.ttf +0 -0
- package/lib/iconfont.1724894779531.woff +0 -0
- package/lib/iconfont.1724894779531.woff2 +0 -0
- package/lib/index.common.min.js +0 -1
- package/lib/index.css +0 -1
- package/lib/input/index.d.ts +0 -4
- package/lib/input/index.js +0 -17
- package/lib/input/index.min.js +0 -1
- package/lib/input/src/date.js +0 -44
- package/lib/input/src/date.min.js +0 -1
- package/lib/input/src/input.js +0 -2481
- package/lib/input/src/input.min.js +0 -1
- package/lib/input/src/number.js +0 -18
- package/lib/input/src/number.min.js +0 -1
- package/lib/input/style/index.js +0 -1
- package/lib/input/style/style.css +0 -1039
- package/lib/input/style/style.min.css +0 -1
- package/lib/keyboard/index.d.ts +0 -4
- package/lib/keyboard/index.js +0 -18
- package/lib/keyboard/index.min.js +0 -1
- package/lib/keyboard/src/mixin.js +0 -413
- package/lib/keyboard/src/mixin.min.js +0 -1
- package/lib/keyboard/style/index.js +0 -1
- package/lib/keyboard/style/style.css +0 -26
- package/lib/list/index.d.ts +0 -4
- package/lib/list/index.js +0 -17
- package/lib/list/index.min.js +0 -1
- package/lib/list/src/list.js +0 -356
- package/lib/list/src/list.min.js +0 -1
- package/lib/list/style/index.js +0 -1
- package/lib/list/style/style.css +0 -52
- package/lib/list/style/style.min.css +0 -1
- package/lib/loading/index.d.ts +0 -4
- package/lib/loading/index.js +0 -17
- package/lib/loading/index.min.js +0 -1
- package/lib/loading/src/loading.js +0 -46
- package/lib/loading/src/loading.min.js +0 -1
- package/lib/loading/style/index.js +0 -1
- package/lib/loading/style/style.css +0 -104
- package/lib/loading/style/style.min.css +0 -1
- package/lib/locale/lang/language.d.ts +0 -5
- package/lib/menu/index.d.ts +0 -4
- package/lib/menu/index.js +0 -21
- package/lib/menu/index.min.js +0 -1
- package/lib/menu/src/mixin.js +0 -331
- package/lib/menu/src/mixin.min.js +0 -1
- package/lib/menu/src/panel.js +0 -117
- package/lib/menu/src/panel.min.js +0 -1
- package/lib/menu/style/index.js +0 -1
- package/lib/menu/style/style.css +0 -126
- package/lib/menu/style/style.min.css +0 -1
- package/lib/mixins/size.js +0 -15
- package/lib/mixins/size.min.js +0 -1
- package/lib/modal/index.d.ts +0 -4
- package/lib/modal/index.js +0 -131
- package/lib/modal/index.min.js +0 -1
- package/lib/modal/src/modal.js +0 -1114
- package/lib/modal/src/modal.min.js +0 -1
- package/lib/modal/style/index.js +0 -1
- package/lib/modal/style/style.css +0 -354
- package/lib/modal/style/style.min.css +0 -1
- package/lib/optgroup/index.d.ts +0 -4
- package/lib/optgroup/index.js +0 -17
- package/lib/optgroup/index.min.js +0 -1
- package/lib/optgroup/style/index.js +0 -1
- package/lib/optgroup/style/style.css +0 -26
- package/lib/option/index.d.ts +0 -4
- package/lib/option/index.js +0 -17
- package/lib/option/index.min.js +0 -1
- package/lib/option/style/index.js +0 -1
- package/lib/option/style/style.css +0 -26
- package/lib/pager/index.d.ts +0 -4
- package/lib/pager/index.js +0 -17
- package/lib/pager/index.min.js +0 -1
- package/lib/pager/src/pager.js +0 -550
- package/lib/pager/src/pager.min.js +0 -1
- package/lib/pager/style/index.js +0 -1
- package/lib/pager/style/style.css +0 -329
- package/lib/pager/style/style.min.css +0 -1
- package/lib/pulldown/index.d.ts +0 -4
- package/lib/pulldown/index.js +0 -17
- package/lib/pulldown/index.min.js +0 -1
- package/lib/pulldown/src/pulldown.js +0 -316
- package/lib/pulldown/src/pulldown.min.js +0 -1
- package/lib/pulldown/style/index.js +0 -1
- package/lib/pulldown/style/style.css +0 -85
- package/lib/pulldown/style/style.min.css +0 -1
- package/lib/radio/index.d.ts +0 -4
- package/lib/radio/index.js +0 -17
- package/lib/radio/index.min.js +0 -1
- package/lib/radio/src/button.js +0 -128
- package/lib/radio/src/button.min.js +0 -1
- package/lib/radio/src/group.js +0 -97
- package/lib/radio/src/group.min.js +0 -1
- package/lib/radio/src/radio.js +0 -133
- package/lib/radio/src/radio.min.js +0 -1
- package/lib/radio/style/index.js +0 -1
- package/lib/radio/style/style.css +0 -328
- package/lib/radio/style/style.min.css +0 -1
- package/lib/radio-button/index.d.ts +0 -4
- package/lib/radio-button/index.js +0 -17
- package/lib/radio-button/index.min.js +0 -1
- package/lib/radio-button/style/index.js +0 -1
- package/lib/radio-button/style/style.css +0 -26
- package/lib/radio-group/index.d.ts +0 -4
- package/lib/radio-group/index.js +0 -17
- package/lib/radio-group/index.min.js +0 -1
- package/lib/radio-group/style/index.js +0 -1
- package/lib/radio-group/style/style.css +0 -26
- package/lib/select/index.d.ts +0 -4
- package/lib/select/index.js +0 -23
- package/lib/select/index.min.js +0 -1
- package/lib/select/src/optgroup.js +0 -57
- package/lib/select/src/optgroup.min.js +0 -1
- package/lib/select/src/option.js +0 -51
- package/lib/select/src/option.min.js +0 -1
- package/lib/select/src/select.js +0 -1068
- package/lib/select/src/select.min.js +0 -1
- package/lib/select/src/util.js +0 -74
- package/lib/select/src/util.min.js +0 -1
- package/lib/select/style/index.js +0 -1
- package/lib/select/style/style.css +0 -229
- package/lib/select/style/style.min.css +0 -1
- package/lib/switch/index.d.ts +0 -4
- package/lib/switch/index.js +0 -17
- package/lib/switch/index.min.js +0 -1
- package/lib/switch/src/switch.js +0 -161
- package/lib/switch/src/switch.min.js +0 -1
- package/lib/switch/style/index.js +0 -1
- package/lib/switch/style/style.css +0 -134
- package/lib/switch/style/style.min.css +0 -1
- package/lib/table/index.d.ts +0 -4
- package/lib/textarea/index.d.ts +0 -4
- package/lib/textarea/index.js +0 -17
- package/lib/textarea/index.min.js +0 -1
- package/lib/textarea/src/textarea.js +0 -282
- package/lib/textarea/src/textarea.min.js +0 -1
- package/lib/textarea/style/index.js +0 -1
- package/lib/textarea/style/style.css +0 -131
- package/lib/textarea/style/style.min.css +0 -1
- package/lib/toolbar/index.d.ts +0 -4
- package/lib/tools/dom.js +0 -196
- package/lib/tools/dom.min.js +0 -1
- package/lib/tools/event.js +0 -96
- package/lib/tools/event.min.js +0 -1
- package/lib/tools/log.js +0 -22
- package/lib/tools/log.min.js +0 -1
- package/lib/tools/resize.js +0 -103
- package/lib/tools/resize.min.js +0 -1
- package/lib/tools/utils.js +0 -116
- package/lib/tools/utils.min.js +0 -1
- package/lib/tools/vn.js +0 -14
- package/lib/tools/vn.min.js +0 -1
- package/lib/tooltip/index.d.ts +0 -4
- package/lib/tooltip/index.js +0 -18
- package/lib/tooltip/index.min.js +0 -1
- package/lib/tooltip/src/tooltip.js +0 -361
- package/lib/tooltip/src/tooltip.min.js +0 -1
- package/lib/tooltip/style/index.js +0 -1
- package/lib/tooltip/style/style.css +0 -130
- package/lib/tooltip/style/style.min.css +0 -1
- package/lib/ui/index.d.ts +0 -4
- package/lib/v-x-e-table/index.d.ts +0 -4
- package/lib/v-x-e-table/src/commands.js +0 -74
- package/lib/v-x-e-table/src/commands.min.js +0 -1
- package/lib/v-x-e-table/src/conf.js +0 -420
- package/lib/v-x-e-table/src/conf.min.js +0 -1
- package/lib/v-x-e-table/src/formats.js +0 -74
- package/lib/v-x-e-table/src/formats.min.js +0 -1
- package/lib/v-x-e-table/src/interceptor.js +0 -59
- package/lib/v-x-e-table/src/interceptor.min.js +0 -1
- package/lib/v-x-e-table/src/menus.js +0 -74
- package/lib/v-x-e-table/src/menus.min.js +0 -1
- package/lib/v-x-e-table/src/renderer.js +0 -1026
- package/lib/v-x-e-table/src/renderer.min.js +0 -1
- package/lib/v-x-e-table/src/store.js +0 -62
- package/lib/v-x-e-table/src/store.min.js +0 -1
- package/lib/v-x-e-table/src/theme.js +0 -25
- package/lib/v-x-e-table/src/theme.min.js +0 -1
- package/lib/v-x-e-table/src/validators.js +0 -14
- package/lib/v-x-e-table/src/validators.min.js +0 -1
- package/lib/validator/index.d.ts +0 -4
- package/lib/validator/index.js +0 -18
- package/lib/validator/index.min.js +0 -1
- package/lib/validator/src/mixin.js +0 -545
- package/lib/validator/src/mixin.min.js +0 -1
- package/lib/validator/style/index.js +0 -1
- package/lib/validator/style/style.css +0 -26
- package/lib/vxe-button/index.d.ts +0 -4
- package/lib/vxe-button/index.js +0 -23
- package/lib/vxe-button/index.min.js +0 -1
- package/lib/vxe-button/style/index.js +0 -1
- package/lib/vxe-button/style/style.css +0 -571
- package/lib/vxe-button/style/style.min.css +0 -1
- package/lib/vxe-button-group/index.d.ts +0 -4
- package/lib/vxe-button-group/index.js +0 -23
- package/lib/vxe-button-group/index.min.js +0 -1
- package/lib/vxe-button-group/style/index.js +0 -1
- package/lib/vxe-button-group/style/style.css +0 -29
- package/lib/vxe-button-group/style/style.min.css +0 -1
- package/lib/vxe-checkbox/index.d.ts +0 -4
- package/lib/vxe-checkbox/index.js +0 -23
- package/lib/vxe-checkbox/index.min.js +0 -1
- package/lib/vxe-checkbox/style/index.js +0 -1
- package/lib/vxe-checkbox/style/style.css +0 -292
- package/lib/vxe-checkbox/style/style.min.css +0 -1
- package/lib/vxe-checkbox-group/index.d.ts +0 -4
- package/lib/vxe-checkbox-group/index.js +0 -23
- package/lib/vxe-checkbox-group/index.min.js +0 -1
- package/lib/vxe-checkbox-group/style/index.js +0 -1
- package/lib/vxe-checkbox-group/style/style.css +0 -26
- package/lib/vxe-colgroup/index.d.ts +0 -4
- package/lib/vxe-column/index.d.ts +0 -4
- package/lib/vxe-form/index.d.ts +0 -4
- package/lib/vxe-form/index.js +0 -23
- package/lib/vxe-form/index.min.js +0 -1
- package/lib/vxe-form/style/index.js +0 -1
- package/lib/vxe-form/style/style.css +0 -444
- package/lib/vxe-form/style/style.min.css +0 -1
- package/lib/vxe-form-gather/index.d.ts +0 -4
- package/lib/vxe-form-gather/index.js +0 -23
- package/lib/vxe-form-gather/index.min.js +0 -1
- package/lib/vxe-form-gather/style/index.js +0 -1
- package/lib/vxe-form-gather/style/style.css +0 -26
- package/lib/vxe-form-item/index.d.ts +0 -4
- package/lib/vxe-form-item/index.js +0 -23
- package/lib/vxe-form-item/index.min.js +0 -1
- package/lib/vxe-form-item/style/index.js +0 -1
- package/lib/vxe-form-item/style/style.css +0 -26
- package/lib/vxe-grid/index.d.ts +0 -4
- package/lib/vxe-icon/index.d.ts +0 -4
- package/lib/vxe-icon/index.js +0 -23
- package/lib/vxe-icon/index.min.js +0 -1
- package/lib/vxe-icon/style/index.js +0 -1
- package/lib/vxe-icon/style/style.css +0 -1550
- package/lib/vxe-icon/style/style.min.css +0 -1
- package/lib/vxe-input/index.d.ts +0 -4
- package/lib/vxe-input/index.js +0 -23
- package/lib/vxe-input/index.min.js +0 -1
- package/lib/vxe-input/style/index.js +0 -1
- package/lib/vxe-input/style/style.css +0 -1039
- package/lib/vxe-input/style/style.min.css +0 -1
- package/lib/vxe-list/index.d.ts +0 -4
- package/lib/vxe-list/index.js +0 -23
- package/lib/vxe-list/index.min.js +0 -1
- package/lib/vxe-list/style/index.js +0 -1
- package/lib/vxe-list/style/style.css +0 -52
- package/lib/vxe-list/style/style.min.css +0 -1
- package/lib/vxe-loading/index.d.ts +0 -4
- package/lib/vxe-loading/index.js +0 -23
- package/lib/vxe-loading/index.min.js +0 -1
- package/lib/vxe-loading/style/index.js +0 -1
- package/lib/vxe-loading/style/style.css +0 -104
- package/lib/vxe-loading/style/style.min.css +0 -1
- package/lib/vxe-modal/index.d.ts +0 -4
- package/lib/vxe-modal/index.js +0 -23
- package/lib/vxe-modal/index.min.js +0 -1
- package/lib/vxe-modal/style/index.js +0 -1
- package/lib/vxe-modal/style/style.css +0 -354
- package/lib/vxe-modal/style/style.min.css +0 -1
- package/lib/vxe-optgroup/index.d.ts +0 -4
- package/lib/vxe-optgroup/index.js +0 -23
- package/lib/vxe-optgroup/index.min.js +0 -1
- package/lib/vxe-optgroup/style/index.js +0 -1
- package/lib/vxe-optgroup/style/style.css +0 -26
- package/lib/vxe-option/index.d.ts +0 -4
- package/lib/vxe-option/index.js +0 -23
- package/lib/vxe-option/index.min.js +0 -1
- package/lib/vxe-option/style/index.js +0 -1
- package/lib/vxe-option/style/style.css +0 -26
- package/lib/vxe-pager/index.d.ts +0 -4
- package/lib/vxe-pager/index.js +0 -23
- package/lib/vxe-pager/index.min.js +0 -1
- package/lib/vxe-pager/style/index.js +0 -1
- package/lib/vxe-pager/style/style.css +0 -329
- package/lib/vxe-pager/style/style.min.css +0 -1
- package/lib/vxe-pulldown/index.d.ts +0 -4
- package/lib/vxe-pulldown/index.js +0 -23
- package/lib/vxe-pulldown/index.min.js +0 -1
- package/lib/vxe-pulldown/style/index.js +0 -1
- package/lib/vxe-pulldown/style/style.css +0 -85
- package/lib/vxe-pulldown/style/style.min.css +0 -1
- package/lib/vxe-radio/index.d.ts +0 -4
- package/lib/vxe-radio/index.js +0 -23
- package/lib/vxe-radio/index.min.js +0 -1
- package/lib/vxe-radio/style/index.js +0 -1
- package/lib/vxe-radio/style/style.css +0 -328
- package/lib/vxe-radio/style/style.min.css +0 -1
- package/lib/vxe-radio-button/index.d.ts +0 -4
- package/lib/vxe-radio-button/index.js +0 -23
- package/lib/vxe-radio-button/index.min.js +0 -1
- package/lib/vxe-radio-button/style/index.js +0 -1
- package/lib/vxe-radio-button/style/style.css +0 -26
- package/lib/vxe-radio-group/index.d.ts +0 -4
- package/lib/vxe-radio-group/index.js +0 -23
- package/lib/vxe-radio-group/index.min.js +0 -1
- package/lib/vxe-radio-group/style/index.js +0 -1
- package/lib/vxe-radio-group/style/style.css +0 -26
- package/lib/vxe-select/index.d.ts +0 -4
- package/lib/vxe-select/index.js +0 -23
- package/lib/vxe-select/index.min.js +0 -1
- package/lib/vxe-select/style/index.js +0 -1
- package/lib/vxe-select/style/style.css +0 -229
- package/lib/vxe-select/style/style.min.css +0 -1
- package/lib/vxe-switch/index.d.ts +0 -4
- package/lib/vxe-switch/index.js +0 -23
- package/lib/vxe-switch/index.min.js +0 -1
- package/lib/vxe-switch/style/index.js +0 -1
- package/lib/vxe-switch/style/style.css +0 -134
- package/lib/vxe-switch/style/style.min.css +0 -1
- package/lib/vxe-table/index.d.ts +0 -4
- package/lib/vxe-table-custom-module/index.d.ts +0 -4
- package/lib/vxe-table-custom-module/index.js +0 -23
- package/lib/vxe-table-custom-module/index.min.js +0 -1
- package/lib/vxe-table-custom-module/style/index.js +0 -1
- package/lib/vxe-table-custom-module/style/style.css +0 -629
- package/lib/vxe-table-custom-module/style/style.min.css +0 -1
- package/lib/vxe-table-edit-module/index.d.ts +0 -4
- package/lib/vxe-table-edit-module/index.js +0 -23
- package/lib/vxe-table-edit-module/index.min.js +0 -1
- package/lib/vxe-table-edit-module/style/index.js +0 -1
- package/lib/vxe-table-edit-module/style/style.css +0 -26
- package/lib/vxe-table-export-module/index.d.ts +0 -4
- package/lib/vxe-table-export-module/index.js +0 -23
- package/lib/vxe-table-export-module/index.min.js +0 -1
- package/lib/vxe-table-export-module/style/index.js +0 -1
- package/lib/vxe-table-export-module/style/style.css +0 -219
- package/lib/vxe-table-export-module/style/style.min.css +0 -1
- package/lib/vxe-table-filter-module/index.d.ts +0 -4
- package/lib/vxe-table-filter-module/index.js +0 -23
- package/lib/vxe-table-filter-module/index.min.js +0 -1
- package/lib/vxe-table-filter-module/style/index.js +0 -1
- package/lib/vxe-table-filter-module/style/style.css +0 -166
- package/lib/vxe-table-filter-module/style/style.min.css +0 -1
- package/lib/vxe-table-keyboard-module/index.d.ts +0 -4
- package/lib/vxe-table-keyboard-module/index.js +0 -23
- package/lib/vxe-table-keyboard-module/index.min.js +0 -1
- package/lib/vxe-table-keyboard-module/style/index.js +0 -1
- package/lib/vxe-table-keyboard-module/style/style.css +0 -26
- package/lib/vxe-table-menu-module/index.d.ts +0 -4
- package/lib/vxe-table-menu-module/index.js +0 -23
- package/lib/vxe-table-menu-module/index.min.js +0 -1
- package/lib/vxe-table-menu-module/style/index.js +0 -1
- package/lib/vxe-table-menu-module/style/style.css +0 -126
- package/lib/vxe-table-menu-module/style/style.min.css +0 -1
- package/lib/vxe-table-validator-module/index.d.ts +0 -4
- package/lib/vxe-table-validator-module/index.js +0 -23
- package/lib/vxe-table-validator-module/index.min.js +0 -1
- package/lib/vxe-table-validator-module/style/index.js +0 -1
- package/lib/vxe-table-validator-module/style/style.css +0 -26
- package/lib/vxe-textarea/index.d.ts +0 -4
- package/lib/vxe-textarea/index.js +0 -23
- package/lib/vxe-textarea/index.min.js +0 -1
- package/lib/vxe-textarea/style/index.js +0 -1
- package/lib/vxe-textarea/style/style.css +0 -131
- package/lib/vxe-textarea/style/style.min.css +0 -1
- package/lib/vxe-toolbar/index.d.ts +0 -4
- package/lib/vxe-tooltip/index.d.ts +0 -4
- package/lib/vxe-tooltip/index.js +0 -23
- package/lib/vxe-tooltip/index.min.js +0 -1
- package/lib/vxe-tooltip/style/index.js +0 -1
- package/lib/vxe-tooltip/style/style.css +0 -130
- package/lib/vxe-tooltip/style/style.min.css +0 -1
- package/packages/all.js +0 -136
- package/packages/button/index.d.ts +0 -4
- package/packages/button/index.js +0 -13
- package/packages/button/src/button.js +0 -460
- package/packages/button/src/group.js +0 -41
- package/packages/button-group/index.d.ts +0 -4
- package/packages/button-group/index.js +0 -13
- package/packages/checkbox/index.d.ts +0 -4
- package/packages/checkbox/index.js +0 -13
- package/packages/checkbox/src/checkbox.js +0 -108
- package/packages/checkbox/src/group.js +0 -86
- package/packages/checkbox-group/index.d.ts +0 -4
- package/packages/checkbox-group/index.js +0 -13
- package/packages/colgroup/index.d.ts +0 -4
- package/packages/colgroup/index.js +0 -15
- package/packages/column/index.d.ts +0 -4
- package/packages/column/index.js +0 -15
- package/packages/custom/index.d.ts +0 -4
- package/packages/custom/index.js +0 -17
- package/packages/custom/src/mixin.js +0 -87
- package/packages/custom/src/panel.js +0 -919
- package/packages/edit/index.d.ts +0 -4
- package/packages/edit/index.js +0 -14
- package/packages/edit/src/mixin.js +0 -790
- package/packages/export/index.d.ts +0 -4
- package/packages/export/index.js +0 -42
- package/packages/export/src/export-panel.js +0 -444
- package/packages/export/src/import-panel.js +0 -184
- package/packages/export/src/mixin.js +0 -1529
- package/packages/filter/index.d.ts +0 -4
- package/packages/filter/index.js +0 -17
- package/packages/filter/src/mixin.js +0 -271
- package/packages/filter/src/panel.js +0 -210
- package/packages/form/index.d.ts +0 -4
- package/packages/form/index.js +0 -13
- package/packages/form/src/form-config-item.js +0 -182
- package/packages/form/src/form-gather.js +0 -21
- package/packages/form/src/form-item.js +0 -246
- package/packages/form/src/form.js +0 -621
- package/packages/form/src/render.js +0 -81
- package/packages/form/src/util.js +0 -117
- package/packages/form-gather/index.d.ts +0 -4
- package/packages/form-gather/index.js +0 -13
- package/packages/form-item/index.d.ts +0 -4
- package/packages/form-item/index.js +0 -13
- package/packages/grid/index.d.ts +0 -4
- package/packages/grid/index.js +0 -15
- package/packages/grid/src/grid.js +0 -1118
- package/packages/icon/index.d.ts +0 -4
- package/packages/icon/index.js +0 -13
- package/packages/icon/src/icon.js +0 -22
- package/packages/index.common.js +0 -4
- package/packages/input/index.d.ts +0 -4
- package/packages/input/index.js +0 -13
- package/packages/input/src/date.js +0 -38
- package/packages/input/src/input.js +0 -2171
- package/packages/input/src/number.js +0 -12
- package/packages/keyboard/index.d.ts +0 -4
- package/packages/keyboard/index.js +0 -14
- package/packages/keyboard/src/mixin.js +0 -355
- package/packages/list/index.d.ts +0 -4
- package/packages/list/index.js +0 -13
- package/packages/list/src/list.js +0 -294
- package/packages/loading/index.d.ts +0 -4
- package/packages/loading/index.js +0 -13
- package/packages/loading/src/loading.js +0 -45
- package/packages/locale/lang/en-US.d.ts +0 -8
- package/packages/locale/lang/en-US.js +0 -670
- package/packages/locale/lang/es-ES.d.ts +0 -8
- package/packages/locale/lang/es-ES.js +0 -670
- package/packages/locale/lang/ja-JP.d.ts +0 -8
- package/packages/locale/lang/ja-JP.js +0 -670
- package/packages/locale/lang/language.d.ts +0 -5
- package/packages/locale/lang/pt-BR.d.ts +0 -8
- package/packages/locale/lang/pt-BR.js +0 -670
- package/packages/locale/lang/zh-CN.d.ts +0 -8
- package/packages/locale/lang/zh-CN.js +0 -670
- package/packages/locale/lang/zh-HK.d.ts +0 -8
- package/packages/locale/lang/zh-MO.d.ts +0 -8
- package/packages/locale/lang/zh-TC.d.ts +0 -8
- package/packages/locale/lang/zh-TC.js +0 -670
- package/packages/locale/lang/zh-TW.d.ts +0 -8
- package/packages/menu/index.d.ts +0 -4
- package/packages/menu/index.js +0 -17
- package/packages/menu/src/mixin.js +0 -270
- package/packages/menu/src/panel.js +0 -130
- package/packages/mixins/size.js +0 -8
- package/packages/modal/index.d.ts +0 -4
- package/packages/modal/index.js +0 -116
- package/packages/modal/src/modal.js +0 -822
- package/packages/optgroup/index.d.ts +0 -4
- package/packages/optgroup/index.js +0 -13
- package/packages/option/index.d.ts +0 -4
- package/packages/option/index.js +0 -13
- package/packages/pager/index.d.ts +0 -4
- package/packages/pager/index.js +0 -13
- package/packages/pager/src/pager.js +0 -477
- package/packages/pulldown/index.d.ts +0 -4
- package/packages/pulldown/index.js +0 -13
- package/packages/pulldown/src/pulldown.js +0 -273
- package/packages/radio/index.d.ts +0 -4
- package/packages/radio/index.js +0 -13
- package/packages/radio/src/button.js +0 -102
- package/packages/radio/src/group.js +0 -76
- package/packages/radio/src/radio.js +0 -109
- package/packages/radio-button/index.d.ts +0 -4
- package/packages/radio-button/index.js +0 -13
- package/packages/radio-group/index.d.ts +0 -4
- package/packages/radio-group/index.js +0 -13
- package/packages/select/index.d.ts +0 -4
- package/packages/select/index.js +0 -19
- package/packages/select/src/optgroup.js +0 -48
- package/packages/select/src/option.js +0 -42
- package/packages/select/src/select.js +0 -921
- package/packages/select/src/util.js +0 -52
- package/packages/switch/index.d.ts +0 -4
- package/packages/switch/index.js +0 -13
- package/packages/switch/src/switch.js +0 -138
- package/packages/table/index.d.ts +0 -4
- package/packages/table/index.js +0 -35
- package/packages/table/src/body.js +0 -826
- package/packages/table/src/cell.js +0 -842
- package/packages/table/src/column.js +0 -141
- package/packages/table/src/columnInfo.js +0 -168
- package/packages/table/src/footer.js +0 -293
- package/packages/table/src/header.js +0 -295
- package/packages/table/src/methods.js +0 -5532
- package/packages/table/src/table.js +0 -1297
- package/packages/table/src/util.js +0 -364
- package/packages/textarea/index.d.ts +0 -4
- package/packages/textarea/index.js +0 -13
- package/packages/textarea/src/textarea.js +0 -224
- package/packages/toolbar/index.d.ts +0 -4
- package/packages/toolbar/index.js +0 -13
- package/packages/toolbar/src/toolbar.js +0 -467
- package/packages/tools/dom.js +0 -179
- package/packages/tools/event.js +0 -82
- package/packages/tools/log.js +0 -16
- package/packages/tools/resize.js +0 -76
- package/packages/tools/utils.js +0 -94
- package/packages/tools/vn.js +0 -8
- package/packages/tooltip/index.d.ts +0 -4
- package/packages/tooltip/index.js +0 -14
- package/packages/tooltip/src/tooltip.js +0 -285
- package/packages/ui/index.d.ts +0 -4
- package/packages/ui/index.js +0 -4
- package/packages/v-x-e-table/index.d.ts +0 -4
- package/packages/v-x-e-table/index.js +0 -196
- package/packages/v-x-e-table/src/commands.js +0 -55
- package/packages/v-x-e-table/src/conf.js +0 -420
- package/packages/v-x-e-table/src/formats.js +0 -55
- package/packages/v-x-e-table/src/interceptor.js +0 -53
- package/packages/v-x-e-table/src/menus.js +0 -55
- package/packages/v-x-e-table/src/renderer.js +0 -951
- package/packages/v-x-e-table/src/store.js +0 -44
- package/packages/v-x-e-table/src/theme.js +0 -19
- package/packages/v-x-e-table/src/validators.js +0 -7
- package/packages/validator/index.d.ts +0 -4
- package/packages/validator/index.js +0 -14
- package/packages/validator/src/mixin.js +0 -473
- package/styles/base/common.scss +0 -88
- package/styles/button-group.scss +0 -5
- package/styles/button.scss +0 -374
- package/styles/checkbox-group.scss +0 -1
- package/styles/checkbox.scss +0 -91
- package/styles/colgroup.scss +0 -1
- package/styles/column.scss +0 -1
- package/styles/css-variable.scss +0 -272
- package/styles/custom.scss +0 -386
- package/styles/edit.scss +0 -1
- package/styles/export.scss +0 -126
- package/styles/filter.scss +0 -113
- package/styles/footer.scss +0 -1
- package/styles/form-gather.scss +0 -1
- package/styles/form-item.scss +0 -1
- package/styles/form.scss +0 -366
- package/styles/grid.scss +0 -64
- package/styles/header.scss +0 -1
- package/styles/icon.scss +0 -972
- package/styles/input.scss +0 -917
- package/styles/keyboard.scss +0 -1
- package/styles/list.scss +0 -28
- package/styles/loading.scss +0 -87
- package/styles/menu.scss +0 -89
- package/styles/modal.scss +0 -387
- package/styles/old-icon.scss +0 -722
- package/styles/optgroup.scss +0 -1
- package/styles/option.scss +0 -1
- package/styles/pager.scss +0 -270
- package/styles/pulldown.scss +0 -58
- package/styles/radio-button.scss +0 -1
- package/styles/radio-group.scss +0 -1
- package/styles/radio.scss +0 -147
- package/styles/select.scss +0 -228
- package/styles/switch.scss +0 -125
- package/styles/table.scss +0 -1476
- package/styles/textarea.scss +0 -104
- package/styles/toolbar.scss +0 -103
- package/styles/tooltip.scss +0 -127
- package/styles/v-x-e-table.scss +0 -3
- package/styles/validator.scss +0 -1
- package/styles/vxe-table.scss +0 -1
- package/types/button-group.d.ts +0 -11
- package/types/button.d.ts +0 -49
- package/types/checkbox-group.d.ts +0 -17
- package/types/checkbox.d.ts +0 -33
- package/types/colgroup.d.ts +0 -155
- package/types/column.d.ts +0 -433
- package/types/component.d.ts +0 -29
- package/types/form-gather.d.ts +0 -13
- package/types/form-item.d.ts +0 -217
- package/types/form.d.ts +0 -149
- package/types/grid.d.ts +0 -169
- package/types/icon.d.ts +0 -7
- package/types/input.d.ts +0 -163
- package/types/list.d.ts +0 -71
- package/types/loading.d.ts +0 -10
- package/types/modal.d.ts +0 -329
- package/types/module/custom.d.ts +0 -11
- package/types/module/edit.d.ts +0 -67
- package/types/module/export.d.ts +0 -255
- package/types/module/filter.d.ts +0 -133
- package/types/module/index.d.ts +0 -7
- package/types/module/keyboard.d.ts +0 -11
- package/types/module/menu.d.ts +0 -85
- package/types/module/validator.d.ts +0 -77
- package/types/optgroup.d.ts +0 -20
- package/types/option.d.ts +0 -24
- package/types/pager.d.ts +0 -123
- package/types/pulldown.d.ts +0 -44
- package/types/radio-button.d.ts +0 -20
- package/types/radio-group.d.ts +0 -16
- package/types/radio.d.ts +0 -32
- package/types/select.d.ts +0 -66
- package/types/switch.d.ts +0 -22
- package/types/table.d.ts +0 -1662
- package/types/textarea.d.ts +0 -65
- package/types/toolbar.d.ts +0 -191
- package/types/tooltip.d.ts +0 -40
- package/types/v-x-e-table/commands.d.ts +0 -29
- package/types/v-x-e-table/formats.d.ts +0 -28
- package/types/v-x-e-table/index.d.ts +0 -229
- package/types/v-x-e-table/interceptor.d.ts +0 -46
- package/types/v-x-e-table/menus.d.ts +0 -24
- package/types/v-x-e-table/renderer.d.ts +0 -355
- package/types/v-x-e-table/validators.d.ts +0 -30
- /package/{lib/checkbox-group/style/style.min.css → es/colgroup/style.css} +0 -0
- /package/{lib/edit/style → es/colgroup}/style.min.css +0 -0
- /package/{lib/form-gather/style/style.min.css → es/column/style.css} +0 -0
- /package/{lib/form-item/style → es/column}/style.min.css +0 -0
- /package/{lib/keyboard/style/style.min.css → es/ui/style.css} +0 -0
- /package/{lib/optgroup/style → es/ui}/style.min.css +0 -0
- /package/{lib/option/style/style.min.css → es/v-x-e-table/style.css} +0 -0
- /package/{lib/radio-button/style → es/v-x-e-table}/style.min.css +0 -0
- /package/{lib/radio-group/style/style.min.css → es/vxe-colgroup/style.css} +0 -0
- /package/{lib/validator/style → es/vxe-colgroup}/style.min.css +0 -0
- /package/{lib/vxe-checkbox-group/style/style.min.css → es/vxe-column/style.css} +0 -0
- /package/{lib/vxe-form-gather/style → es/vxe-column}/style.min.css +0 -0
- /package/{lib/vxe-form-item/style/style.min.css → es/vxe-ui/style.css} +0 -0
- /package/{lib/vxe-optgroup/style → es/vxe-ui}/style.min.css +0 -0
- /package/{lib/vxe-option/style/style.min.css → es/vxe-v-x-e-table/style.css} +0 -0
- /package/{lib/vxe-radio-button/style → es/vxe-v-x-e-table}/style.min.css +0 -0
- /package/lib/{button-group → ui}/style/index.js +0 -0
- /package/lib/{vxe-radio-group/style/style.min.css → ui/style/style.css} +0 -0
- /package/lib/{vxe-table-edit-module → ui}/style/style.min.css +0 -0
- /package/lib/{button → vxe-ui}/style/index.js +0 -0
- /package/lib/{vxe-table-keyboard-module/style/style.min.css → vxe-ui/style/style.css} +0 -0
- /package/lib/{vxe-table-validator-module → vxe-ui}/style/style.min.css +0 -0
- /package/lib/{checkbox-group → vxe-v-x-e-table}/style/index.js +0 -0
- /package/packages/locale/lang/{zh-HK.js → zh-HK.ts} +0 -0
- /package/packages/locale/lang/{zh-MO.js → zh-MO.ts} +0 -0
- /package/packages/locale/lang/{zh-TW.js → zh-TW.ts} +0 -0
- /package/packages/table/src/{group.js → group.ts} +0 -0
|
@@ -0,0 +1,975 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
8
|
+
var _ui = require("../../../ui");
|
|
9
|
+
var _utils = require("../../../ui/src/utils");
|
|
10
|
+
var _util = require("../../src/util");
|
|
11
|
+
var _dom = require("../../../ui/src/dom");
|
|
12
|
+
var _log = require("../../../ui/src/log");
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
16
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
18
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
19
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
20
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
21
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
24
|
+
var getConfig = _ui.VxeUI.getConfig,
|
|
25
|
+
renderer = _ui.VxeUI.renderer,
|
|
26
|
+
getI18n = _ui.VxeUI.getI18n;
|
|
27
|
+
function insertTreeRow(_vm, newRecords, isAppend) {
|
|
28
|
+
var tableFullTreeData = _vm.tableFullTreeData,
|
|
29
|
+
afterFullData = _vm.afterFullData,
|
|
30
|
+
fullDataRowIdData = _vm.fullDataRowIdData,
|
|
31
|
+
fullAllDataRowIdData = _vm.fullAllDataRowIdData,
|
|
32
|
+
treeOpts = _vm.treeOpts;
|
|
33
|
+
var rowField = treeOpts.rowField,
|
|
34
|
+
parentField = treeOpts.parentField,
|
|
35
|
+
mapChildrenField = treeOpts.mapChildrenField;
|
|
36
|
+
var childrenField = treeOpts.children || treeOpts.childrenField;
|
|
37
|
+
var funcName = isAppend ? 'push' : 'unshift';
|
|
38
|
+
newRecords.forEach(function (item) {
|
|
39
|
+
var parentRowId = item[parentField];
|
|
40
|
+
var rowid = (0, _util.getRowid)(_vm, item);
|
|
41
|
+
var matchObj = parentRowId ? _xeUtils.default.findTree(tableFullTreeData, function (item) {
|
|
42
|
+
return parentRowId === item[rowField];
|
|
43
|
+
}, {
|
|
44
|
+
children: mapChildrenField
|
|
45
|
+
}) : null;
|
|
46
|
+
if (matchObj) {
|
|
47
|
+
var parentRow = matchObj.item;
|
|
48
|
+
var parentRest = fullAllDataRowIdData[(0, _util.getRowid)(_vm, parentRow)];
|
|
49
|
+
var parentLevel = parentRest ? parentRest.level : 0;
|
|
50
|
+
var parentChilds = parentRow[childrenField];
|
|
51
|
+
var mapChilds = parentRow[mapChildrenField];
|
|
52
|
+
if (!_xeUtils.default.isArray(parentChilds)) {
|
|
53
|
+
parentChilds = parentRow[childrenField] = [];
|
|
54
|
+
}
|
|
55
|
+
if (!_xeUtils.default.isArray(mapChilds)) {
|
|
56
|
+
mapChilds = parentRow[childrenField] = [];
|
|
57
|
+
}
|
|
58
|
+
parentChilds[funcName](item);
|
|
59
|
+
mapChilds[funcName](item);
|
|
60
|
+
var rest = {
|
|
61
|
+
row: item,
|
|
62
|
+
rowid: rowid,
|
|
63
|
+
seq: -1,
|
|
64
|
+
index: -1,
|
|
65
|
+
_index: -1,
|
|
66
|
+
$index: -1,
|
|
67
|
+
items: parentChilds,
|
|
68
|
+
parent: parentRow,
|
|
69
|
+
level: parentLevel + 1
|
|
70
|
+
};
|
|
71
|
+
fullDataRowIdData[rowid] = rest;
|
|
72
|
+
fullAllDataRowIdData[rowid] = rest;
|
|
73
|
+
} else {
|
|
74
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
75
|
+
if (parentRowId) {
|
|
76
|
+
(0, _log.warnLog)('vxe.error.unableInsert');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
afterFullData[funcName](item);
|
|
80
|
+
tableFullTreeData[funcName](item);
|
|
81
|
+
var _rest = {
|
|
82
|
+
row: item,
|
|
83
|
+
rowid: rowid,
|
|
84
|
+
seq: -1,
|
|
85
|
+
index: -1,
|
|
86
|
+
_index: -1,
|
|
87
|
+
$index: -1,
|
|
88
|
+
items: tableFullTreeData,
|
|
89
|
+
parent: null,
|
|
90
|
+
level: 0
|
|
91
|
+
};
|
|
92
|
+
fullDataRowIdData[rowid] = _rest;
|
|
93
|
+
fullAllDataRowIdData[rowid] = _rest;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function handleInsertRowAt(_vm, records, row, isInsertNextRow) {
|
|
98
|
+
var tableFullTreeData = _vm.tableFullTreeData,
|
|
99
|
+
mergeList = _vm.mergeList,
|
|
100
|
+
afterFullData = _vm.afterFullData,
|
|
101
|
+
editStore = _vm.editStore,
|
|
102
|
+
tableFullData = _vm.tableFullData,
|
|
103
|
+
treeConfig = _vm.treeConfig,
|
|
104
|
+
fullDataRowIdData = _vm.fullDataRowIdData,
|
|
105
|
+
fullAllDataRowIdData = _vm.fullAllDataRowIdData,
|
|
106
|
+
treeOpts = _vm.treeOpts;
|
|
107
|
+
var transform = treeOpts.transform,
|
|
108
|
+
rowField = treeOpts.rowField,
|
|
109
|
+
mapChildrenField = treeOpts.mapChildrenField;
|
|
110
|
+
var childrenField = treeOpts.children || treeOpts.childrenField;
|
|
111
|
+
if (!_xeUtils.default.isArray(records)) {
|
|
112
|
+
records = [records];
|
|
113
|
+
}
|
|
114
|
+
var newRecords = _vm.defineField(records.map(function (record) {
|
|
115
|
+
return Object.assign(treeConfig && transform ? _defineProperty(_defineProperty({}, mapChildrenField, []), childrenField, []) : {}, record);
|
|
116
|
+
}));
|
|
117
|
+
if (_xeUtils.default.eqNull(row)) {
|
|
118
|
+
// 如果为虚拟树
|
|
119
|
+
if (treeConfig && transform) {
|
|
120
|
+
insertTreeRow(_vm, newRecords, false);
|
|
121
|
+
} else {
|
|
122
|
+
afterFullData.unshift.apply(afterFullData, _toConsumableArray(newRecords));
|
|
123
|
+
tableFullData.unshift.apply(tableFullData, _toConsumableArray(newRecords));
|
|
124
|
+
// 刷新单元格合并
|
|
125
|
+
mergeList.forEach(function (mergeItem) {
|
|
126
|
+
var mergeRowIndex = mergeItem.row;
|
|
127
|
+
if (mergeRowIndex > 0) {
|
|
128
|
+
mergeItem.row = mergeRowIndex + newRecords.length;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
} else {
|
|
133
|
+
if (row === -1) {
|
|
134
|
+
// 如果为虚拟树
|
|
135
|
+
if (treeConfig && transform) {
|
|
136
|
+
insertTreeRow(_vm, newRecords, true);
|
|
137
|
+
} else {
|
|
138
|
+
afterFullData.push.apply(afterFullData, _toConsumableArray(newRecords));
|
|
139
|
+
tableFullData.push.apply(tableFullData, _toConsumableArray(newRecords));
|
|
140
|
+
// 刷新单元格合并
|
|
141
|
+
mergeList.forEach(function (mergeItem) {
|
|
142
|
+
var mergeRowIndex = mergeItem.row,
|
|
143
|
+
mergeRowspan = mergeItem.rowspan;
|
|
144
|
+
if (mergeRowIndex + mergeRowspan > afterFullData.length) {
|
|
145
|
+
mergeItem.rowspan = mergeRowspan + newRecords.length;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
// 如果为虚拟树
|
|
151
|
+
if (treeConfig && transform) {
|
|
152
|
+
var matchMapObj = _xeUtils.default.findTree(tableFullTreeData, function (item) {
|
|
153
|
+
return row[rowField] === item[rowField];
|
|
154
|
+
}, {
|
|
155
|
+
children: mapChildrenField
|
|
156
|
+
});
|
|
157
|
+
if (matchMapObj) {
|
|
158
|
+
var parentRow = matchMapObj.parent;
|
|
159
|
+
var parentMapChilds = parentRow ? parentRow[mapChildrenField] : tableFullTreeData;
|
|
160
|
+
var parentRest = fullAllDataRowIdData[(0, _util.getRowid)(_vm, parentRow)];
|
|
161
|
+
var parentLevel = parentRest ? parentRest.level : 0;
|
|
162
|
+
newRecords.forEach(function (item, i) {
|
|
163
|
+
var rowid = (0, _util.getRowid)(_vm, item);
|
|
164
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
165
|
+
if (item[treeOpts.parentField]) {
|
|
166
|
+
if (parentRow && item[treeOpts.parentField] !== parentRow[rowField]) {
|
|
167
|
+
(0, _log.errLog)('vxe.error.errProp', ["".concat(treeOpts.parentField, "=").concat(item[treeOpts.parentField]), "".concat(treeOpts.parentField, "=").concat(parentRow[rowField])]);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (parentRow) {
|
|
172
|
+
item[treeOpts.parentField] = parentRow[rowField];
|
|
173
|
+
}
|
|
174
|
+
var targetIndex = matchMapObj.index + i;
|
|
175
|
+
if (isInsertNextRow) {
|
|
176
|
+
targetIndex = targetIndex + 1;
|
|
177
|
+
}
|
|
178
|
+
parentMapChilds.splice(targetIndex, 0, item);
|
|
179
|
+
var rest = {
|
|
180
|
+
row: item,
|
|
181
|
+
rowid: rowid,
|
|
182
|
+
seq: -1,
|
|
183
|
+
index: -1,
|
|
184
|
+
_index: -1,
|
|
185
|
+
$index: -1,
|
|
186
|
+
items: parentMapChilds,
|
|
187
|
+
parent: parentRow,
|
|
188
|
+
level: parentLevel + 1
|
|
189
|
+
};
|
|
190
|
+
fullDataRowIdData[rowid] = rest;
|
|
191
|
+
fullAllDataRowIdData[rowid] = rest;
|
|
192
|
+
});
|
|
193
|
+
// 源
|
|
194
|
+
if (parentRow) {
|
|
195
|
+
var matchObj = _xeUtils.default.findTree(tableFullTreeData, function (item) {
|
|
196
|
+
return row[rowField] === item[rowField];
|
|
197
|
+
}, {
|
|
198
|
+
children: childrenField
|
|
199
|
+
});
|
|
200
|
+
if (matchObj) {
|
|
201
|
+
var parentChilds = matchObj.items;
|
|
202
|
+
var targetIndex = matchObj.index;
|
|
203
|
+
if (isInsertNextRow) {
|
|
204
|
+
targetIndex = targetIndex + 1;
|
|
205
|
+
}
|
|
206
|
+
parentChilds.splice.apply(parentChilds, [targetIndex, 0].concat(_toConsumableArray(newRecords)));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
} else {
|
|
210
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
211
|
+
(0, _log.warnLog)('vxe.error.unableInsert');
|
|
212
|
+
}
|
|
213
|
+
insertTreeRow(_vm, newRecords, true);
|
|
214
|
+
}
|
|
215
|
+
} else {
|
|
216
|
+
if (treeConfig) {
|
|
217
|
+
throw new Error(getI18n('vxe.error.noTree', ['insert']));
|
|
218
|
+
}
|
|
219
|
+
var afIndex = -1;
|
|
220
|
+
// 如果是可视索引
|
|
221
|
+
if (_xeUtils.default.isNumber(row)) {
|
|
222
|
+
if (row < afterFullData.length) {
|
|
223
|
+
afIndex = row;
|
|
224
|
+
}
|
|
225
|
+
} else {
|
|
226
|
+
afIndex = _vm.findRowIndexOf(afterFullData, row);
|
|
227
|
+
}
|
|
228
|
+
// 如果是插入指定行的下一行
|
|
229
|
+
if (isInsertNextRow) {
|
|
230
|
+
afIndex = Math.min(afterFullData.length, afIndex + 1);
|
|
231
|
+
}
|
|
232
|
+
if (afIndex === -1) {
|
|
233
|
+
throw new Error((0, _log.errLog)('vxe.error.unableInsert'));
|
|
234
|
+
}
|
|
235
|
+
afterFullData.splice.apply(afterFullData, [afIndex, 0].concat(_toConsumableArray(newRecords)));
|
|
236
|
+
tableFullData.splice.apply(tableFullData, [_vm.findRowIndexOf(tableFullData, row), 0].concat(_toConsumableArray(newRecords)));
|
|
237
|
+
// 刷新单元格合并
|
|
238
|
+
mergeList.forEach(function (mergeItem) {
|
|
239
|
+
var mergeRowIndex = mergeItem.row,
|
|
240
|
+
mergeRowspan = mergeItem.rowspan;
|
|
241
|
+
if (mergeRowIndex > afIndex) {
|
|
242
|
+
mergeItem.row = mergeRowIndex + newRecords.length;
|
|
243
|
+
} else if (mergeRowIndex + mergeRowspan > afIndex) {
|
|
244
|
+
mergeItem.rowspan = mergeRowspan + newRecords.length;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
var insertList = editStore.insertList,
|
|
251
|
+
insertMaps = editStore.insertMaps;
|
|
252
|
+
newRecords.forEach(function (newRow) {
|
|
253
|
+
var rowid = (0, _util.getRowid)(_vm, newRow);
|
|
254
|
+
insertMaps[rowid] = newRow;
|
|
255
|
+
});
|
|
256
|
+
insertList.unshift.apply(insertList, _toConsumableArray(newRecords));
|
|
257
|
+
_vm.cacheRowMap();
|
|
258
|
+
_vm.updateScrollYStatus();
|
|
259
|
+
_vm.handleTableData(treeConfig && transform);
|
|
260
|
+
if (!(treeConfig && transform)) {
|
|
261
|
+
_vm.updateAfterDataIndex();
|
|
262
|
+
}
|
|
263
|
+
_vm.updateFooter();
|
|
264
|
+
_vm.checkSelectionStatus();
|
|
265
|
+
if (_vm.scrollYLoad) {
|
|
266
|
+
_vm.updateScrollYSpace();
|
|
267
|
+
}
|
|
268
|
+
return _vm.$nextTick().then(function () {
|
|
269
|
+
_vm.updateCellAreas();
|
|
270
|
+
return _vm.recalculate();
|
|
271
|
+
}).then(function () {
|
|
272
|
+
return {
|
|
273
|
+
row: newRecords.length ? newRecords[newRecords.length - 1] : null,
|
|
274
|
+
rows: newRecords
|
|
275
|
+
};
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
var _default = exports.default = {
|
|
279
|
+
methods: {
|
|
280
|
+
/**
|
|
281
|
+
* 往表格中插入临时数据
|
|
282
|
+
*
|
|
283
|
+
* @param {*} records
|
|
284
|
+
*/
|
|
285
|
+
_insert: function _insert(records) {
|
|
286
|
+
return handleInsertRowAt(this, records, null);
|
|
287
|
+
},
|
|
288
|
+
/**
|
|
289
|
+
* 往表格指定行中插入临时数据
|
|
290
|
+
* 如果 row 为空则从插入到顶部
|
|
291
|
+
* 如果 row 为 -1 则从插入到底部
|
|
292
|
+
* 如果 row 为有效行则插入到该行的位置
|
|
293
|
+
* @param {Object/Array} records 新的数据
|
|
294
|
+
* @param {Row} row 指定行
|
|
295
|
+
* @returns
|
|
296
|
+
*/
|
|
297
|
+
_insertAt: function _insertAt(records, row) {
|
|
298
|
+
return handleInsertRowAt(this, records, row);
|
|
299
|
+
},
|
|
300
|
+
_insertNextAt: function _insertNextAt(records, row) {
|
|
301
|
+
return handleInsertRowAt(this, records, row, true);
|
|
302
|
+
},
|
|
303
|
+
/**
|
|
304
|
+
* 删除指定行数据
|
|
305
|
+
* 如果传 row 则删除一行
|
|
306
|
+
* 如果传 rows 则删除多行
|
|
307
|
+
* 如果为空则删除所有
|
|
308
|
+
*/
|
|
309
|
+
_remove: function _remove(rows) {
|
|
310
|
+
var _this = this;
|
|
311
|
+
var afterFullData = this.afterFullData,
|
|
312
|
+
tableFullData = this.tableFullData,
|
|
313
|
+
tableFullTreeData = this.tableFullTreeData,
|
|
314
|
+
treeConfig = this.treeConfig,
|
|
315
|
+
mergeList = this.mergeList,
|
|
316
|
+
editStore = this.editStore,
|
|
317
|
+
checkboxOpts = this.checkboxOpts,
|
|
318
|
+
selectCheckboxMaps = this.selectCheckboxMaps,
|
|
319
|
+
isInsertByRow = this.isInsertByRow,
|
|
320
|
+
treeOpts = this.treeOpts;
|
|
321
|
+
var transform = treeOpts.transform,
|
|
322
|
+
mapChildrenField = treeOpts.mapChildrenField;
|
|
323
|
+
var childrenField = treeOpts.children || treeOpts.childrenField;
|
|
324
|
+
var actived = editStore.actived,
|
|
325
|
+
removeList = editStore.removeList,
|
|
326
|
+
insertList = editStore.insertList,
|
|
327
|
+
insertMaps = editStore.insertMaps;
|
|
328
|
+
var checkField = checkboxOpts.checkField;
|
|
329
|
+
var delList = [];
|
|
330
|
+
if (!rows) {
|
|
331
|
+
rows = tableFullData;
|
|
332
|
+
} else if (!_xeUtils.default.isArray(rows)) {
|
|
333
|
+
rows = [rows];
|
|
334
|
+
}
|
|
335
|
+
// 如果是新增,则保存记录
|
|
336
|
+
rows.forEach(function (row) {
|
|
337
|
+
if (!isInsertByRow(row)) {
|
|
338
|
+
removeList.push(row);
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
// 如果绑定了多选属性,则更新状态
|
|
342
|
+
if (!checkField) {
|
|
343
|
+
var selectRowMaps = Object.assign({}, selectCheckboxMaps);
|
|
344
|
+
rows.forEach(function (row) {
|
|
345
|
+
var rowid = (0, _util.getRowid)(_this, row);
|
|
346
|
+
if (selectRowMaps[rowid]) {
|
|
347
|
+
delete selectRowMaps[rowid];
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
this.selectCheckboxMaps = selectRowMaps;
|
|
351
|
+
}
|
|
352
|
+
// 从数据源中移除
|
|
353
|
+
if (tableFullData === rows) {
|
|
354
|
+
rows = delList = tableFullData.slice(0);
|
|
355
|
+
this.tableFullData = [];
|
|
356
|
+
this.afterFullData = [];
|
|
357
|
+
this.clearMergeCells();
|
|
358
|
+
} else {
|
|
359
|
+
// 如果为虚拟树
|
|
360
|
+
if (treeConfig && transform) {
|
|
361
|
+
rows.forEach(function (row) {
|
|
362
|
+
var rowid = (0, _util.getRowid)(_this, row);
|
|
363
|
+
var matchMapObj = _xeUtils.default.findTree(tableFullTreeData, function (item) {
|
|
364
|
+
return rowid === (0, _util.getRowid)(_this, item);
|
|
365
|
+
}, {
|
|
366
|
+
children: mapChildrenField
|
|
367
|
+
});
|
|
368
|
+
if (matchMapObj) {
|
|
369
|
+
var rItems = matchMapObj.items.splice(matchMapObj.index, 1);
|
|
370
|
+
delList.push(rItems[0]);
|
|
371
|
+
}
|
|
372
|
+
var matchObj = _xeUtils.default.findTree(tableFullTreeData, function (item) {
|
|
373
|
+
return rowid === (0, _util.getRowid)(_this, item);
|
|
374
|
+
}, {
|
|
375
|
+
children: childrenField
|
|
376
|
+
});
|
|
377
|
+
if (matchObj) {
|
|
378
|
+
matchObj.items.splice(matchObj.index, 1);
|
|
379
|
+
}
|
|
380
|
+
var afIndex = _this.findRowIndexOf(afterFullData, row);
|
|
381
|
+
if (afIndex > -1) {
|
|
382
|
+
afterFullData.splice(afIndex, 1);
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
} else {
|
|
386
|
+
rows.forEach(function (row) {
|
|
387
|
+
var tfIndex = _this.findRowIndexOf(tableFullData, row);
|
|
388
|
+
if (tfIndex > -1) {
|
|
389
|
+
var rItems = tableFullData.splice(tfIndex, 1);
|
|
390
|
+
delList.push(rItems[0]);
|
|
391
|
+
}
|
|
392
|
+
var afIndex = _this.findRowIndexOf(afterFullData, row);
|
|
393
|
+
if (afIndex > -1) {
|
|
394
|
+
// 刷新单元格合并
|
|
395
|
+
mergeList.forEach(function (mergeItem) {
|
|
396
|
+
var mergeRowIndex = mergeItem.row,
|
|
397
|
+
mergeRowspan = mergeItem.rowspan;
|
|
398
|
+
if (mergeRowIndex > afIndex) {
|
|
399
|
+
mergeItem.row = mergeRowIndex - 1;
|
|
400
|
+
} else if (mergeRowIndex + mergeRowspan > afIndex) {
|
|
401
|
+
mergeItem.rowspan = mergeRowspan - 1;
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
afterFullData.splice(afIndex, 1);
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
// 如果当前行被激活编辑,则清除激活状态
|
|
410
|
+
if (actived.row && this.findRowIndexOf(rows, actived.row) > -1) {
|
|
411
|
+
this.clearEdit();
|
|
412
|
+
}
|
|
413
|
+
// 从新增中移除已删除的数据
|
|
414
|
+
rows.forEach(function (row) {
|
|
415
|
+
var rowid = (0, _util.getRowid)(_this, row);
|
|
416
|
+
var iIndex = _this.findRowIndexOf(insertList, row);
|
|
417
|
+
if (iIndex > -1) {
|
|
418
|
+
insertList.splice(iIndex, 1);
|
|
419
|
+
}
|
|
420
|
+
delete insertMaps[rowid];
|
|
421
|
+
});
|
|
422
|
+
this.handleTableData(treeConfig && transform);
|
|
423
|
+
if (!(treeConfig && transform)) {
|
|
424
|
+
this.updateAfterDataIndex();
|
|
425
|
+
}
|
|
426
|
+
this.updateFooter();
|
|
427
|
+
this.cacheRowMap();
|
|
428
|
+
this.checkSelectionStatus();
|
|
429
|
+
if (this.scrollYLoad) {
|
|
430
|
+
this.updateScrollYSpace();
|
|
431
|
+
}
|
|
432
|
+
return this.$nextTick().then(function () {
|
|
433
|
+
_this.updateCellAreas();
|
|
434
|
+
return _this.recalculate();
|
|
435
|
+
}).then(function () {
|
|
436
|
+
return {
|
|
437
|
+
row: delList.length ? delList[delList.length - 1] : null,
|
|
438
|
+
rows: delList
|
|
439
|
+
};
|
|
440
|
+
});
|
|
441
|
+
},
|
|
442
|
+
/**
|
|
443
|
+
* 删除复选框选中的数据
|
|
444
|
+
*/
|
|
445
|
+
_removeCheckboxRow: function _removeCheckboxRow() {
|
|
446
|
+
var _this2 = this;
|
|
447
|
+
return this.remove(this.getCheckboxRecords()).then(function (params) {
|
|
448
|
+
_this2.clearCheckboxRow();
|
|
449
|
+
return params;
|
|
450
|
+
});
|
|
451
|
+
},
|
|
452
|
+
/**
|
|
453
|
+
* 删除单选框选中的数据
|
|
454
|
+
*/
|
|
455
|
+
_removeRadioRow: function _removeRadioRow() {
|
|
456
|
+
var _this3 = this;
|
|
457
|
+
var radioRecord = this.getRadioRecord();
|
|
458
|
+
return this.remove(radioRecord || []).then(function (params) {
|
|
459
|
+
_this3.clearRadioRow();
|
|
460
|
+
return params;
|
|
461
|
+
});
|
|
462
|
+
},
|
|
463
|
+
/**
|
|
464
|
+
* 删除当前行选中的数据
|
|
465
|
+
*/
|
|
466
|
+
_removeCurrentRow: function _removeCurrentRow() {
|
|
467
|
+
var _this4 = this;
|
|
468
|
+
var currentRecord = this.getCurrentRecord();
|
|
469
|
+
return this.remove(currentRecord || []).then(function (params) {
|
|
470
|
+
_this4.clearCurrentRow();
|
|
471
|
+
return params;
|
|
472
|
+
});
|
|
473
|
+
},
|
|
474
|
+
/**
|
|
475
|
+
* 获取表格数据集,包含新增、删除、修改
|
|
476
|
+
*/
|
|
477
|
+
_getRecordset: function _getRecordset() {
|
|
478
|
+
var _this5 = this;
|
|
479
|
+
var removeRecords = this.getRemoveRecords();
|
|
480
|
+
var pendingRecords = this.getPendingRecords();
|
|
481
|
+
var delRecords = removeRecords.concat(pendingRecords);
|
|
482
|
+
// 如果已经被删除,则无需放到更新数组
|
|
483
|
+
var updateRecords = this.getUpdateRecords().filter(function (row) {
|
|
484
|
+
return !delRecords.some(function (item) {
|
|
485
|
+
return _this5.eqRow(item, row);
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
return {
|
|
489
|
+
insertRecords: this.getInsertRecords(),
|
|
490
|
+
removeRecords: removeRecords,
|
|
491
|
+
updateRecords: updateRecords,
|
|
492
|
+
pendingRecords: pendingRecords
|
|
493
|
+
};
|
|
494
|
+
},
|
|
495
|
+
/**
|
|
496
|
+
* 获取新增的临时数据
|
|
497
|
+
*/
|
|
498
|
+
_getInsertRecords: function _getInsertRecords() {
|
|
499
|
+
var _this6 = this;
|
|
500
|
+
var fullAllDataRowIdData = this.fullAllDataRowIdData;
|
|
501
|
+
var insertList = this.editStore.insertList;
|
|
502
|
+
var insertRecords = [];
|
|
503
|
+
insertList.forEach(function (row) {
|
|
504
|
+
var rowid = (0, _util.getRowid)(_this6, row);
|
|
505
|
+
if (fullAllDataRowIdData[rowid]) {
|
|
506
|
+
insertRecords.push(row);
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
return insertRecords;
|
|
510
|
+
},
|
|
511
|
+
/**
|
|
512
|
+
* 获取已删除的数据
|
|
513
|
+
*/
|
|
514
|
+
_getRemoveRecords: function _getRemoveRecords() {
|
|
515
|
+
return this.editStore.removeList;
|
|
516
|
+
},
|
|
517
|
+
/**
|
|
518
|
+
* 获取更新数据
|
|
519
|
+
* 只精准匹配 row 的更改
|
|
520
|
+
* 如果是树表格,子节点更改状态不会影响父节点的更新状态
|
|
521
|
+
*/
|
|
522
|
+
_getUpdateRecords: function _getUpdateRecords() {
|
|
523
|
+
var keepSource = this.keepSource,
|
|
524
|
+
tableFullData = this.tableFullData,
|
|
525
|
+
isUpdateByRow = this.isUpdateByRow,
|
|
526
|
+
treeConfig = this.treeConfig,
|
|
527
|
+
treeOpts = this.treeOpts,
|
|
528
|
+
editStore = this.editStore;
|
|
529
|
+
if (keepSource) {
|
|
530
|
+
var actived = editStore.actived;
|
|
531
|
+
var row = actived.row,
|
|
532
|
+
column = actived.column;
|
|
533
|
+
if (row || column) {
|
|
534
|
+
this._syncActivedCell();
|
|
535
|
+
}
|
|
536
|
+
if (treeConfig) {
|
|
537
|
+
return _xeUtils.default.filterTree(tableFullData, function (row) {
|
|
538
|
+
return isUpdateByRow(row);
|
|
539
|
+
}, treeOpts);
|
|
540
|
+
}
|
|
541
|
+
return tableFullData.filter(function (row) {
|
|
542
|
+
return isUpdateByRow(row);
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
return [];
|
|
546
|
+
},
|
|
547
|
+
/**
|
|
548
|
+
* 处理激活编辑
|
|
549
|
+
*/
|
|
550
|
+
handleEdit: function handleEdit(params, evnt) {
|
|
551
|
+
var _this7 = this;
|
|
552
|
+
var editStore = this.editStore,
|
|
553
|
+
editOpts = this.editOpts,
|
|
554
|
+
tableColumn = this.tableColumn,
|
|
555
|
+
editConfig = this.editConfig,
|
|
556
|
+
mouseConfig = this.mouseConfig;
|
|
557
|
+
var mode = editOpts.mode;
|
|
558
|
+
var actived = editStore.actived,
|
|
559
|
+
focused = editStore.focused;
|
|
560
|
+
var row = params.row,
|
|
561
|
+
column = params.column;
|
|
562
|
+
var editRender = column.editRender;
|
|
563
|
+
var cell = params.cell = params.cell || this.getCellElement(row, column);
|
|
564
|
+
var beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod;
|
|
565
|
+
if (cell && (0, _utils.isEnableConf)(editConfig) && (0, _utils.isEnableConf)(editRender)) {
|
|
566
|
+
// 激活编辑
|
|
567
|
+
if (!this.hasPendingByRow(row)) {
|
|
568
|
+
if (actived.row !== row || (mode === 'cell' ? actived.column !== column : false)) {
|
|
569
|
+
// 判断是否禁用编辑
|
|
570
|
+
var type = 'edit-disabled';
|
|
571
|
+
if (!beforeEditMethod || beforeEditMethod(Object.assign(Object.assign({}, params), {
|
|
572
|
+
$table: this,
|
|
573
|
+
$grid: this.$xegrid
|
|
574
|
+
}))) {
|
|
575
|
+
if (mouseConfig) {
|
|
576
|
+
this.clearSelected(evnt);
|
|
577
|
+
this.clearCellAreas(evnt);
|
|
578
|
+
this.clearCopyCellArea(evnt);
|
|
579
|
+
}
|
|
580
|
+
this.closeTooltip();
|
|
581
|
+
if (actived.column) {
|
|
582
|
+
this.clearEdit(evnt);
|
|
583
|
+
}
|
|
584
|
+
type = 'edit-activated';
|
|
585
|
+
column.renderHeight = cell.offsetHeight;
|
|
586
|
+
actived.args = params;
|
|
587
|
+
actived.row = row;
|
|
588
|
+
actived.column = column;
|
|
589
|
+
if (mode === 'row') {
|
|
590
|
+
tableColumn.forEach(function (column) {
|
|
591
|
+
return _this7._getColumnModel(row, column);
|
|
592
|
+
});
|
|
593
|
+
} else {
|
|
594
|
+
this._getColumnModel(row, column);
|
|
595
|
+
}
|
|
596
|
+
var afterEditMethod = editOpts.afterEditMethod;
|
|
597
|
+
this.$nextTick(function () {
|
|
598
|
+
_this7.handleFocus(params, evnt);
|
|
599
|
+
if (afterEditMethod) {
|
|
600
|
+
afterEditMethod(Object.assign(Object.assign({}, params), {
|
|
601
|
+
$table: _this7,
|
|
602
|
+
$grid: _this7.$xegrid
|
|
603
|
+
}));
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
this.emitEvent(type, {
|
|
608
|
+
row: row,
|
|
609
|
+
rowIndex: this.getRowIndex(row),
|
|
610
|
+
$rowIndex: this.getVMRowIndex(row),
|
|
611
|
+
column: column,
|
|
612
|
+
columnIndex: this.getColumnIndex(column),
|
|
613
|
+
$columnIndex: this.getVMColumnIndex(column)
|
|
614
|
+
}, evnt);
|
|
615
|
+
// v4已废弃
|
|
616
|
+
if (type === 'edit-activated') {
|
|
617
|
+
this.emitEvent('edit-actived', {
|
|
618
|
+
row: row,
|
|
619
|
+
rowIndex: this.getRowIndex(row),
|
|
620
|
+
$rowIndex: this.getVMRowIndex(row),
|
|
621
|
+
column: column,
|
|
622
|
+
columnIndex: this.getColumnIndex(column),
|
|
623
|
+
$columnIndex: this.getVMColumnIndex(column)
|
|
624
|
+
}, evnt);
|
|
625
|
+
}
|
|
626
|
+
} else {
|
|
627
|
+
var oldColumn = actived.column;
|
|
628
|
+
if (mouseConfig) {
|
|
629
|
+
this.clearSelected(evnt);
|
|
630
|
+
this.clearCellAreas(evnt);
|
|
631
|
+
this.clearCopyCellArea(evnt);
|
|
632
|
+
}
|
|
633
|
+
if (oldColumn !== column) {
|
|
634
|
+
var oldModel = oldColumn.model;
|
|
635
|
+
if (oldModel.update) {
|
|
636
|
+
(0, _util.setCellValue)(row, oldColumn, oldModel.value);
|
|
637
|
+
}
|
|
638
|
+
this.clearValidate();
|
|
639
|
+
}
|
|
640
|
+
column.renderHeight = cell.offsetHeight;
|
|
641
|
+
actived.args = params;
|
|
642
|
+
actived.column = column;
|
|
643
|
+
setTimeout(function () {
|
|
644
|
+
_this7.handleFocus(params, evnt);
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
focused.column = null;
|
|
648
|
+
focused.row = null;
|
|
649
|
+
this.focus();
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
return this.$nextTick();
|
|
653
|
+
},
|
|
654
|
+
/**
|
|
655
|
+
* @deprecated
|
|
656
|
+
*/
|
|
657
|
+
handleActived: function handleActived(params, evnt) {
|
|
658
|
+
return this.handleEdit(params, evnt);
|
|
659
|
+
},
|
|
660
|
+
_getColumnModel: function _getColumnModel(row, column) {
|
|
661
|
+
var model = column.model,
|
|
662
|
+
editRender = column.editRender;
|
|
663
|
+
if (editRender) {
|
|
664
|
+
model.value = (0, _util.getCellValue)(row, column);
|
|
665
|
+
model.update = false;
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
_setColumnModel: function _setColumnModel(row, column) {
|
|
669
|
+
var model = column.model,
|
|
670
|
+
editRender = column.editRender;
|
|
671
|
+
if (editRender && model.update) {
|
|
672
|
+
(0, _util.setCellValue)(row, column, model.value);
|
|
673
|
+
model.update = false;
|
|
674
|
+
model.value = null;
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
_syncActivedCell: function _syncActivedCell() {
|
|
678
|
+
var _this8 = this;
|
|
679
|
+
var tableColumn = this.tableColumn,
|
|
680
|
+
editStore = this.editStore,
|
|
681
|
+
editOpts = this.editOpts;
|
|
682
|
+
var actived = editStore.actived;
|
|
683
|
+
var row = actived.row,
|
|
684
|
+
column = actived.column;
|
|
685
|
+
if (row || column) {
|
|
686
|
+
if (editOpts.mode === 'row') {
|
|
687
|
+
tableColumn.forEach(function (column) {
|
|
688
|
+
return _this8._setColumnModel(row, column);
|
|
689
|
+
});
|
|
690
|
+
} else {
|
|
691
|
+
this._setColumnModel(row, column);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
},
|
|
695
|
+
_clearActived: function _clearActived(evnt) {
|
|
696
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
697
|
+
(0, _log.warnLog)('vxe.error.delFunc', ['clearActived', 'clearEdit']);
|
|
698
|
+
}
|
|
699
|
+
// 即将废弃
|
|
700
|
+
return this.clearEdit(evnt);
|
|
701
|
+
},
|
|
702
|
+
/**
|
|
703
|
+
* 清除激活的编辑
|
|
704
|
+
*/
|
|
705
|
+
_clearEdit: function _clearEdit(evnt) {
|
|
706
|
+
var editStore = this.editStore;
|
|
707
|
+
var actived = editStore.actived,
|
|
708
|
+
focused = editStore.focused;
|
|
709
|
+
var row = actived.row,
|
|
710
|
+
column = actived.column;
|
|
711
|
+
if (row || column) {
|
|
712
|
+
this._syncActivedCell();
|
|
713
|
+
actived.args = null;
|
|
714
|
+
actived.row = null;
|
|
715
|
+
actived.column = null;
|
|
716
|
+
this.updateFooter();
|
|
717
|
+
this.emitEvent('edit-closed', {
|
|
718
|
+
row: row,
|
|
719
|
+
rowIndex: this.getRowIndex(row),
|
|
720
|
+
$rowIndex: this.getVMRowIndex(row),
|
|
721
|
+
column: column,
|
|
722
|
+
columnIndex: this.getColumnIndex(column),
|
|
723
|
+
$columnIndex: this.getVMColumnIndex(column)
|
|
724
|
+
}, evnt);
|
|
725
|
+
}
|
|
726
|
+
focused.row = null;
|
|
727
|
+
focused.column = null;
|
|
728
|
+
if (getConfig().cellVaildMode === 'obsolete') {
|
|
729
|
+
if (this.clearValidate) {
|
|
730
|
+
return this.clearValidate();
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
return this.$nextTick();
|
|
734
|
+
},
|
|
735
|
+
_getActiveRecord: function _getActiveRecord() {
|
|
736
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
737
|
+
(0, _log.warnLog)('vxe.error.delFunc', ['getActiveRecord', 'getEditRecord']);
|
|
738
|
+
}
|
|
739
|
+
// 即将废弃
|
|
740
|
+
return this.getEditRecord();
|
|
741
|
+
},
|
|
742
|
+
_getEditRecord: function _getEditRecord() {
|
|
743
|
+
var $el = this.$el,
|
|
744
|
+
editStore = this.editStore,
|
|
745
|
+
afterFullData = this.afterFullData;
|
|
746
|
+
var actived = editStore.actived;
|
|
747
|
+
var args = actived.args,
|
|
748
|
+
row = actived.row;
|
|
749
|
+
if (args && this.findRowIndexOf(afterFullData, row) > -1 && $el.querySelectorAll('.vxe-body--column.col--active').length) {
|
|
750
|
+
return Object.assign({}, args);
|
|
751
|
+
}
|
|
752
|
+
return null;
|
|
753
|
+
},
|
|
754
|
+
_isActiveByRow: function _isActiveByRow(row) {
|
|
755
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
756
|
+
(0, _log.warnLog)('vxe.error.delFunc', ['isActiveByRow', 'isEditByRow']);
|
|
757
|
+
}
|
|
758
|
+
// 即将废弃
|
|
759
|
+
return this.isEditByRow(row);
|
|
760
|
+
},
|
|
761
|
+
/**
|
|
762
|
+
* 判断行是否为激活编辑状态
|
|
763
|
+
* @param {Row} row 行对象
|
|
764
|
+
*/
|
|
765
|
+
_isEditByRow: function _isEditByRow(row) {
|
|
766
|
+
return this.editStore.actived.row === row;
|
|
767
|
+
},
|
|
768
|
+
/**
|
|
769
|
+
* 处理聚焦
|
|
770
|
+
*/
|
|
771
|
+
handleFocus: function handleFocus(params) {
|
|
772
|
+
var row = params.row,
|
|
773
|
+
column = params.column,
|
|
774
|
+
cell = params.cell;
|
|
775
|
+
var editRender = column.editRender;
|
|
776
|
+
if ((0, _utils.isEnableConf)(editRender)) {
|
|
777
|
+
var compRender = renderer.get(editRender.name);
|
|
778
|
+
var autoFocus = editRender.autofocus || editRender.autoFocus;
|
|
779
|
+
var autoSelect = editRender.autoSelect || editRender.autoselect;
|
|
780
|
+
var inputElem;
|
|
781
|
+
if (!autoFocus && compRender) {
|
|
782
|
+
autoFocus = compRender.tableAutoFocus || compRender.tableAutofocus || compRender.autoFocus || compRender.autofocus;
|
|
783
|
+
}
|
|
784
|
+
if (!autoSelect && compRender) {
|
|
785
|
+
autoSelect = compRender.tableAutoSelect || compRender.autoSelect || compRender.autoselect;
|
|
786
|
+
}
|
|
787
|
+
// 如果指定了聚焦 class
|
|
788
|
+
if (_xeUtils.default.isFunction(autoFocus)) {
|
|
789
|
+
inputElem = autoFocus.call(this, params);
|
|
790
|
+
} else if (autoFocus) {
|
|
791
|
+
inputElem = cell.querySelector(autoFocus);
|
|
792
|
+
if (inputElem) {
|
|
793
|
+
inputElem.focus();
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
if (inputElem) {
|
|
797
|
+
if (autoSelect) {
|
|
798
|
+
inputElem.select();
|
|
799
|
+
} else {
|
|
800
|
+
// 保持一致行为,光标移到末端
|
|
801
|
+
if (_dom.browse.msie) {
|
|
802
|
+
var textRange = inputElem.createTextRange();
|
|
803
|
+
textRange.collapse(false);
|
|
804
|
+
textRange.select();
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
} else {
|
|
808
|
+
// 显示到可视区中
|
|
809
|
+
this.scrollToRow(row, column);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
_setActiveRow: function _setActiveRow(row) {
|
|
814
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
815
|
+
(0, _log.warnLog)('vxe.error.delFunc', ['setActiveRow', 'setEditRow']);
|
|
816
|
+
}
|
|
817
|
+
// 即将废弃
|
|
818
|
+
return this.setEditRow(row);
|
|
819
|
+
},
|
|
820
|
+
/**
|
|
821
|
+
* 激活行编辑
|
|
822
|
+
*/
|
|
823
|
+
_setEditRow: function _setEditRow(row, fieldOrColumn) {
|
|
824
|
+
var column = _xeUtils.default.find(this.visibleColumn, function (column) {
|
|
825
|
+
return (0, _utils.isEnableConf)(column.editRender);
|
|
826
|
+
});
|
|
827
|
+
if (fieldOrColumn) {
|
|
828
|
+
column = _xeUtils.default.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
829
|
+
}
|
|
830
|
+
return this.setEditCell(row, column);
|
|
831
|
+
},
|
|
832
|
+
_setActiveCell: function _setActiveCell(row, fieldOrColumn) {
|
|
833
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
834
|
+
(0, _log.warnLog)('vxe.error.delFunc', ['setActiveCell', 'setEditCell']);
|
|
835
|
+
}
|
|
836
|
+
// 即将废弃
|
|
837
|
+
return this.setEditCell(row, fieldOrColumn);
|
|
838
|
+
},
|
|
839
|
+
/**
|
|
840
|
+
* 激活单元格编辑
|
|
841
|
+
*/
|
|
842
|
+
_setEditCell: function _setEditCell(row, fieldOrColumn) {
|
|
843
|
+
var _this9 = this;
|
|
844
|
+
var editConfig = this.editConfig;
|
|
845
|
+
var column = _xeUtils.default.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
846
|
+
if (row && column && (0, _utils.isEnableConf)(editConfig) && (0, _utils.isEnableConf)(column.editRender)) {
|
|
847
|
+
return this.scrollToRow(row, true).then(function () {
|
|
848
|
+
var cell = _this9.getCellElement(row, column);
|
|
849
|
+
if (cell) {
|
|
850
|
+
_this9.handleEdit({
|
|
851
|
+
row: row,
|
|
852
|
+
rowIndex: _this9.getRowIndex(row),
|
|
853
|
+
column: column,
|
|
854
|
+
columnIndex: _this9.getColumnIndex(column),
|
|
855
|
+
cell: cell,
|
|
856
|
+
$table: _this9
|
|
857
|
+
});
|
|
858
|
+
_this9.lastCallTime = Date.now();
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
return this.$nextTick();
|
|
863
|
+
},
|
|
864
|
+
/**
|
|
865
|
+
* 只对 trigger=dblclick 有效,选中单元格
|
|
866
|
+
*/
|
|
867
|
+
_setSelectCell: function _setSelectCell(row, fieldOrColumn) {
|
|
868
|
+
var tableData = this.tableData,
|
|
869
|
+
editOpts = this.editOpts,
|
|
870
|
+
visibleColumn = this.visibleColumn;
|
|
871
|
+
var column = _xeUtils.default.isString(fieldOrColumn) ? this.getColumnByField(fieldOrColumn) : fieldOrColumn;
|
|
872
|
+
if (row && column && editOpts.trigger !== 'manual') {
|
|
873
|
+
var rowIndex = this.findRowIndexOf(tableData, row);
|
|
874
|
+
if (rowIndex > -1) {
|
|
875
|
+
var cell = this.getCellElement(row, column);
|
|
876
|
+
var params = {
|
|
877
|
+
row: row,
|
|
878
|
+
rowIndex: rowIndex,
|
|
879
|
+
column: column,
|
|
880
|
+
columnIndex: visibleColumn.indexOf(column),
|
|
881
|
+
cell: cell
|
|
882
|
+
};
|
|
883
|
+
this.handleSelected(params, {});
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
return this.$nextTick();
|
|
887
|
+
},
|
|
888
|
+
/**
|
|
889
|
+
* 处理选中源
|
|
890
|
+
*/
|
|
891
|
+
handleSelected: function handleSelected(params, evnt) {
|
|
892
|
+
var _this10 = this;
|
|
893
|
+
var mouseConfig = this.mouseConfig,
|
|
894
|
+
mouseOpts = this.mouseOpts,
|
|
895
|
+
editOpts = this.editOpts,
|
|
896
|
+
editStore = this.editStore;
|
|
897
|
+
var actived = editStore.actived,
|
|
898
|
+
selected = editStore.selected;
|
|
899
|
+
var row = params.row,
|
|
900
|
+
column = params.column;
|
|
901
|
+
var isMouseSelected = mouseConfig && mouseOpts.selected;
|
|
902
|
+
var selectMethod = function selectMethod() {
|
|
903
|
+
if (isMouseSelected && (selected.row !== row || selected.column !== column)) {
|
|
904
|
+
if (actived.row !== row || (editOpts.mode === 'cell' ? actived.column !== column : false)) {
|
|
905
|
+
_this10.clearEdit(evnt);
|
|
906
|
+
_this10.clearSelected(evnt);
|
|
907
|
+
_this10.clearCellAreas(evnt);
|
|
908
|
+
_this10.clearCopyCellArea(evnt);
|
|
909
|
+
selected.args = params;
|
|
910
|
+
selected.row = row;
|
|
911
|
+
selected.column = column;
|
|
912
|
+
if (isMouseSelected) {
|
|
913
|
+
_this10.addColSdCls();
|
|
914
|
+
}
|
|
915
|
+
_this10.focus();
|
|
916
|
+
if (evnt) {
|
|
917
|
+
_this10.emitEvent('cell-selected', params, evnt);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
return _this10.$nextTick();
|
|
922
|
+
};
|
|
923
|
+
return selectMethod();
|
|
924
|
+
},
|
|
925
|
+
/**
|
|
926
|
+
* 获取选中的单元格
|
|
927
|
+
*/
|
|
928
|
+
_getSelectedCell: function _getSelectedCell() {
|
|
929
|
+
var _this$editStore$selec = this.editStore.selected,
|
|
930
|
+
args = _this$editStore$selec.args,
|
|
931
|
+
column = _this$editStore$selec.column;
|
|
932
|
+
if (args && column) {
|
|
933
|
+
return Object.assign({}, args);
|
|
934
|
+
}
|
|
935
|
+
return null;
|
|
936
|
+
},
|
|
937
|
+
/**
|
|
938
|
+
* 清除所选中源状态
|
|
939
|
+
*/
|
|
940
|
+
_clearSelected: function _clearSelected() {
|
|
941
|
+
var selected = this.editStore.selected;
|
|
942
|
+
selected.row = null;
|
|
943
|
+
selected.column = null;
|
|
944
|
+
this.reColTitleSdCls();
|
|
945
|
+
this.reColSdCls();
|
|
946
|
+
return this.$nextTick();
|
|
947
|
+
},
|
|
948
|
+
reColTitleSdCls: function reColTitleSdCls() {
|
|
949
|
+
var headerElem = this.elemStore['main-header-list'];
|
|
950
|
+
if (headerElem) {
|
|
951
|
+
_xeUtils.default.arrayEach(headerElem.querySelectorAll('.col--title-selected'), function (elem) {
|
|
952
|
+
return (0, _dom.removeClass)(elem, 'col--title-selected');
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
reColSdCls: function reColSdCls() {
|
|
957
|
+
var cell = this.$el.querySelector('.col--selected');
|
|
958
|
+
if (cell) {
|
|
959
|
+
(0, _dom.removeClass)(cell, 'col--selected');
|
|
960
|
+
}
|
|
961
|
+
},
|
|
962
|
+
addColSdCls: function addColSdCls() {
|
|
963
|
+
var selected = this.editStore.selected;
|
|
964
|
+
var row = selected.row,
|
|
965
|
+
column = selected.column;
|
|
966
|
+
this.reColSdCls();
|
|
967
|
+
if (row && column) {
|
|
968
|
+
var cell = this.getCellElement(row, column);
|
|
969
|
+
if (cell) {
|
|
970
|
+
(0, _dom.addClass)(cell, 'col--selected');
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
};
|