tomtaw-vxe-table 3.25.13 → 3.25.14
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/colgroup/index.d.ts +122 -0
- package/es/colgroup/index.js +16 -13
- package/es/column/index.d.ts +122 -0
- package/es/column/index.js +16 -13
- package/es/components.d.ts +12 -0
- package/es/components.js +28 -31
- package/es/grid/index.d.ts +1252 -0
- package/es/grid/index.js +18 -13
- package/es/grid/src/grid.d.ts +638 -0
- package/es/grid/src/grid.js +1883 -1876
- package/es/{vxe-grid/style.min.css → grid/style.mini.css} +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.esm.js +14 -21
- package/es/index.js +15 -0
- package/es/locale/lang/ar-EG.d.ts +908 -2
- package/es/locale/lang/ar-EG.js +906 -899
- package/es/locale/lang/de-DE.d.ts +908 -2
- package/es/locale/lang/de-DE.js +906 -899
- package/es/locale/lang/en-US.d.ts +908 -2
- package/es/locale/lang/en-US.js +906 -899
- package/es/locale/lang/es-ES.d.ts +908 -2
- package/es/locale/lang/es-ES.js +906 -899
- package/es/locale/lang/fr-FR.d.ts +908 -2
- package/es/locale/lang/fr-FR.js +906 -899
- package/es/locale/lang/hu-HU.d.ts +908 -2
- package/es/locale/lang/hu-HU.js +906 -899
- package/es/locale/lang/hy-AM.d.ts +908 -2
- package/es/locale/lang/hy-AM.js +906 -899
- package/es/locale/lang/id-ID.d.ts +908 -2
- package/es/locale/lang/id-ID.js +906 -899
- package/es/locale/lang/it-IT.d.ts +908 -2
- package/es/locale/lang/it-IT.js +906 -899
- package/es/locale/lang/ja-JP.d.ts +908 -2
- package/es/locale/lang/ja-JP.js +906 -899
- package/es/locale/lang/ko-KR.d.ts +908 -2
- package/es/locale/lang/ko-KR.js +906 -899
- package/es/locale/lang/ms-MY.d.ts +908 -2
- package/es/locale/lang/ms-MY.js +906 -899
- package/es/locale/lang/nb-NO.d.ts +908 -2
- package/es/locale/lang/nb-NO.js +906 -899
- package/es/locale/lang/pt-BR.d.ts +908 -2
- package/es/locale/lang/pt-BR.js +906 -899
- package/es/locale/lang/ru-RU.d.ts +908 -2
- package/es/locale/lang/ru-RU.js +906 -899
- package/es/locale/lang/th-TH.d.ts +908 -2
- package/es/locale/lang/th-TH.js +906 -899
- package/es/locale/lang/ug-CN.d.ts +908 -2
- package/es/locale/lang/ug-CN.js +906 -899
- package/es/locale/lang/uk-UA.d.ts +908 -2
- package/es/locale/lang/uk-UA.js +906 -899
- package/es/locale/lang/uz-UZ.d.ts +908 -2
- package/es/locale/lang/uz-UZ.js +906 -899
- package/es/locale/lang/vi-VN.d.ts +908 -2
- package/es/locale/lang/vi-VN.js +906 -899
- package/es/locale/lang/zh-CHT.d.ts +908 -2
- package/es/locale/lang/zh-CHT.js +906 -899
- package/es/locale/lang/zh-CN.d.ts +908 -2
- package/es/locale/lang/zh-CN.js +906 -899
- package/es/locale/lang/zh-HK.d.ts +908 -2
- package/es/locale/lang/zh-HK.js +910 -2
- package/es/locale/lang/zh-MO.d.ts +908 -2
- package/es/locale/lang/zh-MO.js +910 -2
- package/es/locale/lang/zh-TC.d.ts +908 -0
- package/es/locale/lang/zh-TC.js +910 -2
- package/es/locale/lang/zh-TW.d.ts +908 -2
- package/es/locale/lang/zh-TW.js +910 -2
- package/es/style.css +4499 -1
- package/es/style.mini.css +1 -0
- package/es/table/index.d.ts +4 -0
- package/es/table/index.js +49 -44
- package/es/table/module/custom/mixin.d.ts +4 -0
- package/es/table/module/custom/mixin.js +476 -487
- package/es/table/module/custom/panel.d.ts +57 -0
- package/es/table/module/custom/panel.js +1939 -1771
- package/es/table/module/edit/mixin.d.ts +2 -0
- package/es/table/module/edit/mixin.js +1097 -1110
- package/es/table/module/export/export-panel.d.ts +51 -0
- package/es/table/module/export/export-panel.js +718 -683
- package/es/table/module/export/import-panel.d.ts +39 -0
- package/es/table/module/export/import-panel.js +327 -294
- package/es/table/module/export/mixin.d.ts +2 -0
- package/es/table/module/export/mixin.js +1838 -1860
- package/es/table/module/export/util.d.ts +5 -0
- package/es/table/module/export/util.js +20 -17
- package/es/table/module/filter/mixin.d.ts +4 -0
- package/es/table/module/filter/mixin.js +492 -508
- package/es/table/module/filter/panel.d.ts +41 -0
- package/es/table/module/filter/panel.js +342 -293
- package/es/table/module/keyboard/mixin.d.ts +12 -0
- package/es/table/module/keyboard/mixin.js +462 -507
- package/es/table/module/menu/mixin.d.ts +25 -0
- package/es/table/module/menu/mixin.js +302 -320
- package/es/table/module/menu/panel.d.ts +22 -0
- package/es/table/module/menu/panel.js +246 -197
- package/es/table/module/validator/mixin.d.ts +4 -0
- package/es/table/module/validator/mixin.js +516 -561
- package/es/table/render/index.d.ts +1 -0
- package/es/table/render/index.js +1472 -1476
- package/es/table/src/body.d.ts +8 -0
- package/es/table/src/body.js +950 -886
- package/es/table/src/cell.d.ts +148 -0
- package/es/table/src/cell.js +1348 -1212
- package/es/table/src/column.d.ts +150 -0
- package/es/table/src/column.js +202 -199
- package/es/table/src/columnInfo.d.ts +12 -0
- package/es/table/src/columnInfo.js +210 -205
- package/es/table/src/expand-height.d.ts +14 -0
- package/es/table/src/expand-height.js +109 -127
- package/es/table/src/footer.d.ts +8 -0
- package/es/table/src/footer.js +388 -354
- package/es/table/src/group.d.ts +59 -0
- package/es/table/src/group.js +52 -50
- package/es/table/src/header.d.ts +11 -0
- package/es/table/src/header.js +611 -564
- package/es/table/src/layout-scheduler.d.ts +13 -0
- package/es/table/src/layout-scheduler.js +118 -138
- package/es/table/src/methods.d.ts +2 -0
- package/es/table/src/methods.js +13243 -13956
- package/es/table/src/props.d.ts +239 -0
- package/es/table/src/props.js +315 -312
- package/es/table/src/scroll-sync.d.ts +9 -0
- package/es/table/src/scroll-sync.js +57 -65
- package/es/table/src/store.d.ts +7 -0
- package/es/table/src/store.js +9 -6
- package/es/table/src/table.d.ts +2 -0
- package/es/table/src/table.js +2729 -2668
- package/es/table/src/util.d.ts +70 -0
- package/es/table/src/util.js +1018 -1017
- package/es/table/style.css +31 -12
- package/es/table/style.mini.css +1 -0
- package/es/toolbar/index.d.ts +148 -0
- package/es/toolbar/index.js +14 -9
- package/es/toolbar/src/toolbar.d.ts +81 -0
- package/es/toolbar/src/toolbar.js +791 -766
- package/es/toolbar/{style.min.css → style.mini.css} +1 -1
- package/es/ui/index.d.ts +85 -0
- package/es/ui/index.js +460 -503
- package/es/ui/src/anime.d.ts +10 -0
- package/es/ui/src/anime.js +40 -40
- package/es/ui/src/comp.d.ts +2 -0
- package/es/ui/src/comp.js +4 -1
- package/es/ui/src/dom.d.ts +80 -0
- package/es/ui/src/dom.js +373 -378
- package/es/ui/src/log.d.ts +6 -0
- package/es/ui/src/log.js +18 -13
- package/es/ui/src/utils.d.ts +24 -0
- package/es/ui/src/utils.js +61 -56
- package/es/ui/src/vn.d.ts +7 -0
- package/es/ui/src/vn.js +61 -52
- package/es/v-x-e-table/index.d.ts +2 -0
- package/es/v-x-e-table/index.js +5 -3
- package/es/vxe-colgroup/index.d.ts +3 -0
- package/es/vxe-colgroup/index.js +6 -3
- package/es/vxe-column/index.d.ts +3 -0
- package/es/vxe-column/index.js +6 -3
- package/es/vxe-grid/index.d.ts +3 -0
- package/es/vxe-grid/index.js +6 -3
- package/{lib/grid/style/style.min.css → es/vxe-grid/style.mini.css} +1 -1
- package/es/vxe-table/index.d.ts +3 -0
- package/es/vxe-table/index.js +6 -3
- package/es/vxe-table/style.css +31 -12
- package/es/vxe-table/style.mini.css +1 -0
- package/es/vxe-toolbar/index.d.ts +3 -0
- package/es/vxe-toolbar/index.js +6 -3
- package/{lib/toolbar/style/style.min.css → es/vxe-toolbar/style.mini.css} +1 -1
- package/es/vxe-ui/index.d.ts +3 -0
- package/es/vxe-ui/index.js +6 -3
- package/lib/colgroup/index.js +44 -18
- package/lib/colgroup/style/index.js +1 -1
- package/lib/column/index.js +44 -18
- package/lib/column/style/index.js +1 -1
- package/lib/components.js +55 -92
- package/lib/grid/index.js +42 -14
- package/lib/grid/src/grid.js +860 -1112
- package/lib/grid/style/index.js +1 -1
- package/{es/grid/style.min.css → lib/grid/style/style.mini.css} +1 -1
- package/lib/index.common.js +43 -19
- package/lib/index.js +46 -0
- package/lib/index.umd.js +26848 -20027
- package/lib/index.umd.min.js +3 -1
- package/lib/locale/ar-EG.umd.js +948 -0
- package/lib/locale/ar-EG.umd.min.js +1 -0
- package/lib/locale/de-DE.umd.js +948 -0
- package/lib/locale/de-DE.umd.min.js +1 -0
- package/lib/locale/en-US.umd.js +948 -0
- package/lib/locale/en-US.umd.min.js +1 -0
- package/lib/locale/es-ES.umd.js +948 -0
- package/lib/locale/es-ES.umd.min.js +1 -0
- package/lib/locale/fr-FR.umd.js +948 -0
- package/lib/locale/fr-FR.umd.min.js +1 -0
- package/lib/locale/hu-HU.umd.js +948 -0
- package/lib/locale/hu-HU.umd.min.js +1 -0
- package/lib/locale/hy-AM.umd.js +948 -0
- package/lib/locale/hy-AM.umd.min.js +1 -0
- package/lib/locale/id-ID.umd.js +948 -0
- package/lib/locale/id-ID.umd.min.js +1 -0
- package/lib/locale/it-IT.umd.js +948 -0
- package/lib/locale/it-IT.umd.min.js +1 -0
- package/lib/locale/ja-JP.umd.js +948 -0
- package/lib/locale/ja-JP.umd.min.js +1 -0
- package/lib/locale/ko-KR.umd.js +948 -0
- package/lib/locale/ko-KR.umd.min.js +1 -0
- package/lib/locale/lang/ar-EG.js +683 -662
- package/lib/locale/lang/ar-EG.umd.js +913 -888
- package/lib/locale/lang/ar-EG.umd.min.js +1 -0
- package/lib/locale/lang/de-DE.js +683 -662
- package/lib/locale/lang/de-DE.umd.js +913 -888
- package/lib/locale/lang/de-DE.umd.min.js +1 -0
- package/lib/locale/lang/en-US.js +680 -659
- package/lib/locale/lang/en-US.umd.js +913 -888
- package/lib/locale/lang/en-US.umd.min.js +1 -0
- package/lib/locale/lang/es-ES.js +683 -662
- package/lib/locale/lang/es-ES.umd.js +913 -888
- package/lib/locale/lang/es-ES.umd.min.js +1 -0
- package/lib/locale/lang/fr-FR.js +656 -635
- package/lib/locale/lang/fr-FR.umd.js +913 -888
- package/lib/locale/lang/fr-FR.umd.min.js +1 -0
- package/lib/locale/lang/hu-HU.js +683 -662
- package/lib/locale/lang/hu-HU.umd.js +913 -888
- package/lib/locale/lang/hu-HU.umd.min.js +1 -0
- package/lib/locale/lang/hy-AM.js +683 -662
- package/lib/locale/lang/hy-AM.umd.js +913 -888
- package/lib/locale/lang/hy-AM.umd.min.js +1 -0
- package/lib/locale/lang/id-ID.js +683 -662
- package/lib/locale/lang/id-ID.umd.js +913 -888
- package/lib/locale/lang/id-ID.umd.min.js +1 -0
- package/lib/locale/lang/it-IT.js +663 -642
- package/lib/locale/lang/it-IT.umd.js +912 -887
- package/lib/locale/lang/it-IT.umd.min.js +1 -0
- package/lib/locale/lang/ja-JP.js +712 -691
- package/lib/locale/lang/ja-JP.umd.js +913 -888
- package/lib/locale/lang/ja-JP.umd.min.js +1 -0
- package/lib/locale/lang/ko-KR.js +683 -662
- package/lib/locale/lang/ko-KR.umd.js +913 -888
- package/lib/locale/lang/ko-KR.umd.min.js +1 -0
- package/lib/locale/lang/ms-MY.js +683 -662
- package/lib/locale/lang/ms-MY.umd.js +913 -888
- package/lib/locale/lang/ms-MY.umd.min.js +1 -0
- package/lib/locale/lang/nb-NO.js +683 -662
- package/lib/locale/lang/nb-NO.umd.js +913 -888
- package/lib/locale/lang/nb-NO.umd.min.js +1 -0
- package/lib/locale/lang/pt-BR.js +683 -662
- package/lib/locale/lang/pt-BR.umd.js +913 -888
- package/lib/locale/lang/pt-BR.umd.min.js +1 -0
- package/lib/locale/lang/ru-RU.js +692 -671
- package/lib/locale/lang/ru-RU.umd.js +913 -888
- package/lib/locale/lang/ru-RU.umd.min.js +1 -0
- package/lib/locale/lang/th-TH.js +683 -662
- package/lib/locale/lang/th-TH.umd.js +913 -888
- package/lib/locale/lang/th-TH.umd.min.js +1 -0
- package/lib/locale/lang/ug-CN.js +683 -662
- package/lib/locale/lang/ug-CN.umd.js +913 -888
- package/lib/locale/lang/ug-CN.umd.min.js +1 -0
- package/lib/locale/lang/uk-UA.js +676 -655
- package/lib/locale/lang/uk-UA.umd.js +913 -888
- package/lib/locale/lang/uk-UA.umd.min.js +1 -0
- package/lib/locale/lang/uz-UZ.js +585 -564
- package/lib/locale/lang/uz-UZ.umd.js +908 -883
- package/lib/locale/lang/uz-UZ.umd.min.js +1 -0
- package/lib/locale/lang/vi-VN.js +683 -662
- package/lib/locale/lang/vi-VN.umd.js +913 -888
- package/lib/locale/lang/vi-VN.umd.min.js +1 -0
- package/lib/locale/lang/zh-CHT.js +683 -662
- package/lib/locale/lang/zh-CHT.umd.js +913 -888
- package/lib/locale/lang/zh-CHT.umd.min.js +1 -0
- package/lib/locale/lang/zh-CN.js +683 -662
- package/lib/locale/lang/zh-CN.umd.js +913 -888
- package/lib/locale/lang/zh-CN.umd.min.js +1 -0
- package/lib/locale/lang/zh-HK.js +928 -7
- package/lib/locale/lang/zh-HK.umd.js +945 -20
- package/lib/locale/lang/zh-HK.umd.min.js +1 -0
- package/lib/locale/lang/zh-MO.js +928 -7
- package/lib/locale/lang/zh-MO.umd.js +945 -20
- package/lib/locale/lang/zh-MO.umd.min.js +1 -0
- package/lib/locale/lang/zh-TC.js +928 -7
- package/lib/locale/lang/zh-TC.umd.js +948 -0
- package/lib/locale/lang/zh-TC.umd.min.js +1 -0
- package/lib/locale/lang/zh-TW.js +928 -7
- package/lib/locale/lang/zh-TW.umd.js +945 -20
- package/lib/locale/lang/zh-TW.umd.min.js +1 -0
- package/lib/locale/ms-MY.umd.js +948 -0
- package/lib/locale/ms-MY.umd.min.js +1 -0
- package/lib/locale/nb-NO.umd.js +948 -0
- package/lib/locale/nb-NO.umd.min.js +1 -0
- package/lib/locale/pt-BR.umd.js +948 -0
- package/lib/locale/pt-BR.umd.min.js +1 -0
- package/lib/locale/ru-RU.umd.js +948 -0
- package/lib/locale/ru-RU.umd.min.js +1 -0
- package/lib/locale/th-TH.umd.js +948 -0
- package/lib/locale/th-TH.umd.min.js +1 -0
- package/lib/locale/ug-CN.umd.js +948 -0
- package/lib/locale/ug-CN.umd.min.js +1 -0
- package/lib/locale/uk-UA.umd.js +948 -0
- package/lib/locale/uk-UA.umd.min.js +1 -0
- package/lib/locale/uz-UZ.umd.js +948 -0
- package/lib/locale/uz-UZ.umd.min.js +1 -0
- package/lib/locale/vi-VN.umd.js +948 -0
- package/lib/locale/vi-VN.umd.min.js +1 -0
- package/lib/locale/zh-CHT.umd.js +948 -0
- package/lib/locale/zh-CHT.umd.min.js +1 -0
- package/lib/locale/zh-CN.umd.js +948 -0
- package/lib/locale/zh-CN.umd.min.js +1 -0
- package/lib/locale/zh-HK.umd.js +948 -0
- package/lib/locale/zh-HK.umd.min.js +1 -0
- package/lib/locale/zh-MO.umd.js +948 -0
- package/lib/locale/zh-MO.umd.min.js +1 -0
- package/lib/locale/zh-TC.umd.js +948 -0
- package/lib/locale/zh-TC.umd.min.js +1 -0
- package/lib/locale/zh-TW.umd.js +948 -0
- package/lib/locale/zh-TW.umd.min.js +1 -0
- package/lib/style.css +4499 -1
- package/lib/style.mini.css +1 -0
- package/lib/table/index.js +60 -32
- package/lib/table/module/custom/mixin.js +166 -262
- package/lib/table/module/custom/panel.js +1277 -1076
- package/lib/table/module/edit/mixin.js +347 -645
- package/lib/table/module/export/export-panel.js +526 -399
- package/lib/table/module/export/import-panel.js +210 -141
- package/lib/table/module/export/mixin.js +898 -1253
- package/lib/table/module/export/util.js +37 -14
- package/lib/table/module/filter/mixin.js +110 -196
- package/lib/table/module/filter/panel.js +229 -186
- package/lib/table/module/keyboard/mixin.js +104 -153
- package/lib/table/module/menu/mixin.js +89 -151
- package/lib/table/module/menu/panel.js +243 -140
- package/lib/table/module/validator/mixin.js +188 -278
- package/lib/table/render/index.js +777 -1230
- package/lib/table/src/body.js +542 -556
- package/lib/table/src/cell.js +783 -933
- package/lib/table/src/column.js +49 -23
- package/lib/table/src/columnInfo.js +86 -104
- package/lib/table/src/expand-height.js +43 -47
- package/lib/table/src/footer.js +231 -234
- package/lib/table/src/group.js +45 -23
- package/lib/table/src/header.js +352 -357
- package/lib/table/src/layout-scheduler.js +44 -48
- package/lib/table/src/methods.js +13656 -945
- package/lib/table/src/props.js +33 -36
- package/lib/table/src/scroll-sync.js +28 -17
- package/lib/table/src/store.js +24 -8
- package/lib/table/src/table.js +1217 -1302
- package/lib/table/src/util.js +218 -304
- package/lib/table/style/index.js +1 -1
- package/lib/table/style/style.css +31 -12
- package/lib/table/style/style.mini.css +1 -0
- package/lib/toolbar/index.js +42 -14
- package/lib/toolbar/src/toolbar.js +302 -357
- package/lib/toolbar/style/index.js +1 -1
- package/lib/{vxe-toolbar/style/style.min.css → toolbar/style/style.mini.css} +1 -1
- package/lib/ui/index.js +152 -194
- package/lib/ui/src/anime.js +49 -29
- package/lib/ui/src/comp.js +22 -6
- package/lib/ui/src/dom.js +126 -158
- package/lib/ui/src/log.js +34 -18
- package/lib/ui/src/utils.js +59 -47
- package/lib/ui/src/vn.js +72 -45
- package/lib/ui/style/index.js +1 -1
- package/lib/v-x-e-table/index.js +33 -20
- package/lib/vxe-colgroup/index.js +35 -20
- package/lib/vxe-colgroup/style/index.js +1 -1
- package/lib/vxe-column/index.js +35 -20
- package/lib/vxe-column/style/index.js +1 -1
- package/lib/vxe-grid/index.js +35 -20
- package/lib/vxe-grid/style/index.js +1 -1
- package/lib/vxe-grid/style/{style.min.css → style.mini.css} +1 -1
- package/lib/vxe-table/index.js +35 -20
- package/lib/vxe-table/style/index.js +1 -1
- package/lib/vxe-table/style/style.css +31 -12
- package/lib/vxe-table/style/style.mini.css +1 -0
- package/lib/vxe-toolbar/index.js +35 -20
- package/lib/vxe-toolbar/style/index.js +1 -1
- package/{es/vxe-toolbar/style.min.css → lib/vxe-toolbar/style/style.mini.css} +1 -1
- package/lib/vxe-ui/index.js +35 -20
- package/lib/vxe-ui/style/index.js +1 -1
- package/package.json +21 -6
- package/packages/colgroup/index.ts +2 -2
- package/packages/column/index.ts +2 -2
- package/packages/components.ts +12 -10
- package/packages/grid/index.ts +2 -2
- package/packages/grid/src/grid.ts +437 -351
- package/packages/index.ts +11 -0
- package/packages/locale/lang/ar-EG.ts +4 -0
- package/packages/locale/lang/de-DE.ts +4 -0
- package/packages/locale/lang/en-US.ts +4 -0
- package/packages/locale/lang/es-ES.ts +4 -0
- package/packages/locale/lang/fr-FR.ts +22 -18
- package/packages/locale/lang/hu-HU.ts +4 -0
- package/packages/locale/lang/hy-AM.ts +4 -0
- package/packages/locale/lang/id-ID.ts +4 -0
- package/packages/locale/lang/it-IT.ts +8 -4
- package/packages/locale/lang/ja-JP.ts +4 -0
- package/packages/locale/lang/ko-KR.ts +4 -0
- package/packages/locale/lang/ms-MY.ts +4 -0
- package/packages/locale/lang/nb-NO.ts +4 -0
- package/packages/locale/lang/pt-BR.ts +4 -0
- package/packages/locale/lang/ru-RU.ts +4 -0
- package/packages/locale/lang/th-TH.ts +4 -0
- package/packages/locale/lang/ug-CN.ts +4 -0
- package/packages/locale/lang/uk-UA.ts +5 -1
- package/packages/locale/lang/uz-UZ.ts +17 -13
- package/packages/locale/lang/vi-VN.ts +4 -0
- package/packages/locale/lang/zh-CHT.ts +4 -0
- package/packages/locale/lang/zh-CN.ts +4 -0
- package/packages/locale/lang/zh-HK.ts +907 -3
- package/packages/locale/lang/zh-MO.ts +907 -3
- package/packages/locale/lang/zh-TC.ts +907 -3
- package/packages/locale/lang/zh-TW.ts +907 -3
- package/packages/table/index.ts +6 -6
- package/packages/table/module/custom/mixin.ts +73 -66
- package/packages/table/module/custom/panel.ts +1176 -925
- package/packages/table/module/edit/mixin.ts +253 -173
- package/packages/table/module/export/export-panel.ts +541 -461
- package/packages/table/module/export/import-panel.ts +179 -136
- package/packages/table/module/export/mixin.ts +725 -633
- package/packages/table/module/export/util.ts +4 -3
- package/packages/table/module/filter/mixin.ts +58 -54
- package/packages/table/module/filter/panel.ts +176 -122
- package/packages/table/module/keyboard/mixin.ts +35 -31
- package/packages/table/module/menu/mixin.ts +12 -12
- package/packages/table/module/menu/panel.ts +225 -158
- package/packages/table/module/validator/mixin.ts +179 -162
- package/packages/table/render/index.ts +362 -285
- package/packages/table/src/body.ts +383 -284
- package/packages/table/src/cell.ts +579 -410
- package/packages/table/src/column.ts +6 -6
- package/packages/table/src/columnInfo.ts +7 -7
- package/packages/table/src/expand-height.ts +27 -26
- package/packages/table/src/footer.ts +172 -127
- package/packages/table/src/group.ts +5 -5
- package/packages/table/src/header.ts +275 -211
- package/packages/table/src/layout-scheduler.ts +7 -9
- package/packages/table/src/methods.ts +2132 -1809
- package/packages/table/src/props.ts +1 -1
- package/packages/table/src/scroll-sync.ts +5 -5
- package/packages/table/src/store.ts +1 -1
- package/packages/table/src/table.ts +1062 -871
- package/packages/table/src/util.ts +58 -71
- package/packages/toolbar/index.ts +2 -2
- package/packages/toolbar/src/toolbar.ts +245 -191
- package/packages/ui/index.ts +9 -36
- package/packages/ui/src/anime.ts +10 -11
- package/packages/ui/src/dom.ts +52 -49
- package/packages/ui/src/log.ts +2 -2
- package/packages/ui/src/utils.ts +13 -13
- package/packages/ui/src/vn.ts +8 -7
- package/packages/v-x-e-table/index.ts +0 -1
- package/styles/components/table-module/filter.scss +26 -13
- package/styles/components/table.scss +6 -0
- package/styles/theme/base.scss +1 -0
- package/types/all.d.ts +1 -1
- package/es/index.css +0 -1
- package/es/index.min.css +0 -1
- package/es/style.min.css +0 -1
- package/es/table/style.min.css +0 -1
- package/es/vxe-table/style.min.css +0 -1
- package/es/vxe-v-x-e-table/index.js +0 -3
- package/lib/colgroup/index.min.js +0 -1
- package/lib/column/index.min.js +0 -1
- package/lib/components.min.js +0 -1
- package/lib/grid/index.min.js +0 -1
- package/lib/grid/src/grid.min.js +0 -1
- package/lib/index.css +0 -1
- package/lib/index.min.css +0 -1
- package/lib/locale/lang/ar-EG.d.ts +0 -2
- package/lib/locale/lang/ar-EG.min.js +0 -1
- package/lib/locale/lang/de-DE.d.ts +0 -2
- package/lib/locale/lang/de-DE.min.js +0 -1
- package/lib/locale/lang/en-US.d.ts +0 -2
- package/lib/locale/lang/en-US.min.js +0 -1
- package/lib/locale/lang/es-ES.d.ts +0 -2
- package/lib/locale/lang/es-ES.min.js +0 -1
- package/lib/locale/lang/fr-FR.d.ts +0 -2
- package/lib/locale/lang/fr-FR.min.js +0 -1
- package/lib/locale/lang/hu-HU.d.ts +0 -2
- package/lib/locale/lang/hu-HU.min.js +0 -1
- package/lib/locale/lang/hy-AM.d.ts +0 -2
- package/lib/locale/lang/hy-AM.min.js +0 -1
- package/lib/locale/lang/id-ID.d.ts +0 -2
- package/lib/locale/lang/id-ID.min.js +0 -1
- package/lib/locale/lang/it-IT.d.ts +0 -2
- package/lib/locale/lang/it-IT.min.js +0 -1
- package/lib/locale/lang/ja-JP.d.ts +0 -2
- package/lib/locale/lang/ja-JP.min.js +0 -1
- package/lib/locale/lang/ko-KR.d.ts +0 -2
- package/lib/locale/lang/ko-KR.min.js +0 -1
- package/lib/locale/lang/ms-MY.d.ts +0 -2
- package/lib/locale/lang/ms-MY.min.js +0 -1
- package/lib/locale/lang/nb-NO.d.ts +0 -2
- package/lib/locale/lang/nb-NO.min.js +0 -1
- package/lib/locale/lang/pt-BR.d.ts +0 -2
- package/lib/locale/lang/pt-BR.min.js +0 -1
- package/lib/locale/lang/ru-RU.d.ts +0 -2
- package/lib/locale/lang/ru-RU.min.js +0 -1
- package/lib/locale/lang/th-TH.d.ts +0 -2
- package/lib/locale/lang/th-TH.min.js +0 -1
- package/lib/locale/lang/ug-CN.d.ts +0 -2
- package/lib/locale/lang/ug-CN.min.js +0 -1
- package/lib/locale/lang/uk-UA.d.ts +0 -2
- package/lib/locale/lang/uk-UA.min.js +0 -1
- package/lib/locale/lang/uz-UZ.d.ts +0 -2
- package/lib/locale/lang/uz-UZ.min.js +0 -1
- package/lib/locale/lang/vi-VN.d.ts +0 -2
- package/lib/locale/lang/vi-VN.min.js +0 -1
- package/lib/locale/lang/zh-CHT.d.ts +0 -2
- package/lib/locale/lang/zh-CHT.min.js +0 -1
- package/lib/locale/lang/zh-CN.d.ts +0 -2
- package/lib/locale/lang/zh-CN.min.js +0 -1
- package/lib/locale/lang/zh-HK.d.ts +0 -2
- package/lib/locale/lang/zh-HK.min.js +0 -1
- package/lib/locale/lang/zh-MO.d.ts +0 -2
- package/lib/locale/lang/zh-MO.min.js +0 -1
- package/lib/locale/lang/zh-TC.min.js +0 -1
- package/lib/locale/lang/zh-TW.d.ts +0 -2
- package/lib/locale/lang/zh-TW.min.js +0 -1
- package/lib/style.min.css +0 -1
- package/lib/table/index.min.js +0 -1
- package/lib/table/module/custom/mixin.min.js +0 -1
- package/lib/table/module/custom/panel.min.js +0 -1
- package/lib/table/module/edit/mixin.min.js +0 -1
- package/lib/table/module/export/export-panel.min.js +0 -1
- package/lib/table/module/export/import-panel.min.js +0 -1
- package/lib/table/module/export/mixin.min.js +0 -1
- package/lib/table/module/export/util.min.js +0 -1
- package/lib/table/module/filter/mixin.min.js +0 -1
- package/lib/table/module/filter/panel.min.js +0 -1
- package/lib/table/module/keyboard/mixin.min.js +0 -1
- package/lib/table/module/menu/mixin.min.js +0 -1
- package/lib/table/module/menu/panel.min.js +0 -1
- package/lib/table/module/validator/mixin.min.js +0 -1
- package/lib/table/render/index.min.js +0 -1
- package/lib/table/src/body.min.js +0 -1
- package/lib/table/src/cell.min.js +0 -1
- package/lib/table/src/column.min.js +0 -1
- package/lib/table/src/columnInfo.min.js +0 -1
- package/lib/table/src/expand-height.min.js +0 -1
- package/lib/table/src/footer.min.js +0 -1
- package/lib/table/src/group.min.js +0 -1
- package/lib/table/src/header.min.js +0 -1
- package/lib/table/src/layout-scheduler.min.js +0 -1
- package/lib/table/src/methods.min.js +0 -1
- package/lib/table/src/props.min.js +0 -1
- package/lib/table/src/scroll-sync.min.js +0 -1
- package/lib/table/src/store.min.js +0 -1
- package/lib/table/src/table.min.js +0 -1
- package/lib/table/src/util.min.js +0 -1
- package/lib/table/style/style.min.css +0 -1
- package/lib/toolbar/index.min.js +0 -1
- package/lib/toolbar/src/toolbar.min.js +0 -1
- package/lib/ui/index.min.js +0 -1
- package/lib/ui/src/anime.min.js +0 -1
- package/lib/ui/src/comp.min.js +0 -1
- package/lib/ui/src/dom.min.js +0 -1
- package/lib/ui/src/log.min.js +0 -1
- package/lib/ui/src/utils.min.js +0 -1
- package/lib/ui/src/vn.min.js +0 -1
- package/lib/ui/style/style.min.css +0 -0
- package/lib/v-x-e-table/index.min.js +0 -1
- package/lib/v-x-e-table/style/index.js +0 -1
- package/lib/v-x-e-table/style/style.css +0 -0
- package/lib/v-x-e-table/style/style.min.css +0 -0
- package/lib/vxe-colgroup/index.min.js +0 -1
- package/lib/vxe-colgroup/style/style.min.css +0 -0
- package/lib/vxe-column/index.min.js +0 -1
- package/lib/vxe-column/style/style.min.css +0 -0
- package/lib/vxe-grid/index.min.js +0 -1
- package/lib/vxe-table/index.min.js +0 -1
- package/lib/vxe-table/style/style.min.css +0 -1
- package/lib/vxe-toolbar/index.min.js +0 -1
- package/lib/vxe-ui/index.min.js +0 -1
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/lib/vxe-v-x-e-table/index.js +0 -22
- package/lib/vxe-v-x-e-table/index.min.js +0 -1
- package/lib/vxe-v-x-e-table/style/index.js +0 -1
- 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/es/colgroup/{style.min.css → style.mini.css} +0 -0
- /package/es/column/{style.min.css → style.mini.css} +0 -0
- /package/es/{iconfont.1792648484860.ttf → iconfont.1793178568083.ttf} +0 -0
- /package/es/{iconfont.1792648484860.woff → iconfont.1793178568083.woff} +0 -0
- /package/es/{iconfont.1792648484860.woff2 → iconfont.1793178568083.woff2} +0 -0
- /package/es/ui/{style.min.css → style.mini.css} +0 -0
- /package/es/{v-x-e-table/style.css → vxe-colgroup/style.mini.css} +0 -0
- /package/es/{v-x-e-table/style.min.css → vxe-column/style.mini.css} +0 -0
- /package/es/{vxe-colgroup/style.min.css → vxe-ui/style.mini.css} +0 -0
- /package/{es/vxe-column/style.min.css → lib/colgroup/style/style.mini.css} +0 -0
- /package/{es/vxe-ui/style.min.css → lib/column/style/style.mini.css} +0 -0
- /package/lib/{iconfont.1792648484860.ttf → iconfont.1793178568083.ttf} +0 -0
- /package/lib/{iconfont.1792648484860.woff → iconfont.1793178568083.woff} +0 -0
- /package/lib/{iconfont.1792648484860.woff2 → iconfont.1793178568083.woff2} +0 -0
- /package/{es/vxe-v-x-e-table/style.css → lib/ui/style/style.mini.css} +0 -0
- /package/{es/vxe-v-x-e-table/style.min.css → lib/vxe-colgroup/style/style.mini.css} +0 -0
- /package/lib/{colgroup/style/style.min.css → vxe-column/style/style.mini.css} +0 -0
- /package/lib/{column/style/style.min.css → vxe-ui/style/style.mini.css} +0 -0
package/es/table/src/header.js
CHANGED
|
@@ -1,587 +1,634 @@
|
|
|
1
|
-
import XEUtils from
|
|
2
|
-
import { VxeUI } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { getSlotVNs } from '../../ui/src/vn';
|
|
1
|
+
import XEUtils from "xe-utils";
|
|
2
|
+
import { VxeUI } from "@vxe-ui/core";
|
|
3
|
+
import { isEnableConf, getClass, getDefaultConfig, hasEnableConf } from "../../ui/src/utils";
|
|
4
|
+
import { getCalcHeight, convertHeaderColumnToRows, convertHeaderToGridRows } from "./util";
|
|
5
|
+
import { getSlotVNs } from "../../ui/src/vn";
|
|
7
6
|
const { renderer, renderEmptyElement } = VxeUI;
|
|
8
|
-
const sourceType =
|
|
9
|
-
const renderType =
|
|
7
|
+
const sourceType = "table";
|
|
8
|
+
const renderType = "header";
|
|
10
9
|
function renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, cols) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (!rowspan || !colspan) {
|
|
95
|
-
return null;
|
|
96
|
-
}
|
|
97
|
-
if (rowspan > 1) {
|
|
98
|
-
isMergeCell = true;
|
|
99
|
-
thAttrs.rowspan = rowspan;
|
|
100
|
-
}
|
|
101
|
-
if (colspan > 1) {
|
|
102
|
-
isMergeCell = true;
|
|
103
|
-
thAttrs.colspan = colspan;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
const thOns = {
|
|
108
|
-
click: (evnt) => $xeTable.triggerHeaderCellClickEvent(evnt, cellParams),
|
|
109
|
-
dblclick: (evnt) => $xeTable.triggerHeaderCellDblclickEvent(evnt, cellParams)
|
|
110
|
-
};
|
|
111
|
-
const isColDragCell = columnOpts.drag && columnDragOpts.trigger === 'cell';
|
|
112
|
-
let isDisabledDrag = false;
|
|
113
|
-
if (isColDragCell) {
|
|
114
|
-
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
115
|
-
}
|
|
116
|
-
// 按下事件处理
|
|
117
|
-
if (hasEnableConf(mouseConfig, mouseOpts) || isColDragCell) {
|
|
118
|
-
thOns.mousedown = (evnt) => $xeTable.triggerHeaderCellMousedownEvent(evnt, cellParams);
|
|
119
|
-
}
|
|
120
|
-
// 拖拽列事件
|
|
121
|
-
if (columnOpts.drag) {
|
|
122
|
-
thOns.dragstart = $xeTable.handleHeaderCellDragDragstartEvent;
|
|
123
|
-
thOns.dragend = $xeTable.handleHeaderCellDragDragendEvent;
|
|
124
|
-
thOns.dragover = $xeTable.handleHeaderCellDragDragoverEvent;
|
|
125
|
-
if (isColDragCell) {
|
|
126
|
-
thOns.mouseup = $xeTable.handleHeaderCellDragMouseupEvent;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
const isLastColumn = $columnIndex === cols.length - 1;
|
|
130
|
-
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
131
|
-
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
132
|
-
let isVNPreEmptyStatus = false;
|
|
133
|
-
if (isOptimizeMode && overflowX && !isGroup && !isMergeCell) {
|
|
134
|
-
if (!dragCol || dragCol.id !== colid) {
|
|
135
|
-
if (scrollXLoad && tableColumn.length > 10 && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
136
|
-
isVNPreEmptyStatus = true;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
10
|
+
const props = _vm;
|
|
11
|
+
const $xeTable = _vm.$parent;
|
|
12
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
13
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
14
|
+
const tableProps = $xeTable;
|
|
15
|
+
const tableReactData = $xeTable;
|
|
16
|
+
const tableInternalData = $xeTable;
|
|
17
|
+
const { fixedType } = props;
|
|
18
|
+
const { resizable: allResizable, columnKey, showCustomHeader, headerCellClassName, headerCellStyle, showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign, mouseConfig } = tableProps;
|
|
19
|
+
const { dragCol, scrollXLoad, scrollYLoad, overflowX, mergeHeadFlag, tableColumn, currColFlag } = tableReactData;
|
|
20
|
+
const { fullColumnIdData, scrollXStore, mergeHeaderList, mergeHeaderCellMaps, currentCol } = tableInternalData;
|
|
21
|
+
const virtualXOpts = $xeTable.computeVirtualXOpts;
|
|
22
|
+
const columnOpts = $xeTable.computeColumnOpts;
|
|
23
|
+
const columnDragOpts = $xeTable.computeColumnDragOpts;
|
|
24
|
+
const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts;
|
|
25
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
26
|
+
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
27
|
+
const headerCellOpts = $xeTable.computeHeaderCellOpts;
|
|
28
|
+
const rendererOpts = $xeTable.computeRendererOpts;
|
|
29
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
30
|
+
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
31
|
+
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
32
|
+
const isLastRow = _rowIndex === headerGroups.length - 1;
|
|
33
|
+
return cols.map((column, $columnIndex) => {
|
|
34
|
+
const { type, showHeaderOverflow, headerAlign, align, filters, headerClassName, editRender, cellRender } = column;
|
|
35
|
+
const colid = column.id;
|
|
36
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
37
|
+
const renderOpts = editRender || cellRender;
|
|
38
|
+
const compConf = renderOpts && renderOpts.name ? rendererOpts[renderOpts.name] || renderer.get(renderOpts.name) : null;
|
|
39
|
+
const isColGroup = column.children && column.children.length;
|
|
40
|
+
const fixedHiddenColumn = overflowX && !isColGroup && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
41
|
+
const cellPadding = getDefaultConfig(headerCellOpts.padding, cellOpts.padding);
|
|
42
|
+
const isAllCellPadding = cellPadding === true;
|
|
43
|
+
const isCellPaddingTop = cellPadding ? isAllCellPadding || cellPadding.top !== false : false;
|
|
44
|
+
const isCellPaddingBottom = cellPadding ? isAllCellPadding || cellPadding.bottom !== false : false;
|
|
45
|
+
const isCellPaddingLeft = cellPadding ? isAllCellPadding || cellPadding.left !== false : false;
|
|
46
|
+
const isCellPaddingRight = cellPadding ? isAllCellPadding || cellPadding.right !== false : false;
|
|
47
|
+
const headOverflow = getDefaultConfig(showHeaderOverflow, allColumnHeaderOverflow);
|
|
48
|
+
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : "") || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : "") || allAlign;
|
|
49
|
+
const showEllipsis = headOverflow === "ellipsis";
|
|
50
|
+
const showTitle = headOverflow === "title";
|
|
51
|
+
const showTooltip = headOverflow === true ? headerTooltipOpts.mode === "tooltip" : headOverflow === "tooltip";
|
|
52
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
53
|
+
let hasFilter = false;
|
|
54
|
+
let firstFilterOption = null;
|
|
55
|
+
if (filters) {
|
|
56
|
+
firstFilterOption = filters[0];
|
|
57
|
+
hasFilter = filters.some((item) => item.checked);
|
|
58
|
+
}
|
|
59
|
+
const columnIndex = colRest.index;
|
|
60
|
+
const _columnIndex = showCustomHeader ? $columnIndex : colRest._index;
|
|
61
|
+
const cellParams = {
|
|
62
|
+
$table: $xeTable,
|
|
63
|
+
$grid: $xeGrid,
|
|
64
|
+
$gantt: $xeGantt,
|
|
65
|
+
rowIndex: _rowIndex,
|
|
66
|
+
_rowIndex,
|
|
67
|
+
$rowIndex: _rowIndex,
|
|
68
|
+
column,
|
|
69
|
+
columnIndex,
|
|
70
|
+
$columnIndex,
|
|
71
|
+
_columnIndex,
|
|
72
|
+
firstFilterOption,
|
|
73
|
+
fixed: fixedType,
|
|
74
|
+
source: sourceType,
|
|
75
|
+
type: renderType,
|
|
76
|
+
isHidden: fixedHiddenColumn,
|
|
77
|
+
hasFilter
|
|
78
|
+
};
|
|
79
|
+
const thAttrs = {
|
|
80
|
+
colid
|
|
81
|
+
};
|
|
82
|
+
let isMergeCell = false;
|
|
83
|
+
if (!showCustomHeader) {
|
|
84
|
+
thAttrs.colspan = column.colSpan > 1 ? column.colSpan : null;
|
|
85
|
+
thAttrs.rowspan = column.rowSpan > 1 ? column.rowSpan : null;
|
|
86
|
+
}
|
|
87
|
+
if (mergeHeadFlag && mergeHeaderList.length && (showCustomHeader || isLastRow)) {
|
|
88
|
+
const spanRest = mergeHeaderCellMaps[`${_rowIndex}:${showCustomHeader ? $columnIndex : _columnIndex}`];
|
|
89
|
+
if (spanRest) {
|
|
90
|
+
const { rowspan, colspan } = spanRest;
|
|
91
|
+
if (!rowspan || !colspan) {
|
|
92
|
+
return null;
|
|
139
93
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
94
|
+
if (rowspan > 1) {
|
|
95
|
+
isMergeCell = true;
|
|
96
|
+
thAttrs.rowspan = rowspan;
|
|
143
97
|
}
|
|
144
|
-
|
|
145
|
-
|
|
98
|
+
if (colspan > 1) {
|
|
99
|
+
isMergeCell = true;
|
|
100
|
+
thAttrs.colspan = colspan;
|
|
146
101
|
}
|
|
147
|
-
|
|
148
|
-
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const thOns = {
|
|
105
|
+
click: (evnt) => $xeTable.triggerHeaderCellClickEvent(evnt, cellParams),
|
|
106
|
+
dblclick: (evnt) => $xeTable.triggerHeaderCellDblclickEvent(evnt, cellParams)
|
|
107
|
+
};
|
|
108
|
+
const isColDragCell = columnOpts.drag && columnDragOpts.trigger === "cell";
|
|
109
|
+
let isDisabledDrag = false;
|
|
110
|
+
if (isColDragCell) {
|
|
111
|
+
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
112
|
+
}
|
|
113
|
+
if (hasEnableConf(mouseConfig, mouseOpts) || isColDragCell) {
|
|
114
|
+
thOns.mousedown = (evnt) => $xeTable.triggerHeaderCellMousedownEvent(evnt, cellParams);
|
|
115
|
+
}
|
|
116
|
+
if (columnOpts.drag) {
|
|
117
|
+
thOns.dragstart = $xeTable.handleHeaderCellDragDragstartEvent;
|
|
118
|
+
thOns.dragend = $xeTable.handleHeaderCellDragDragendEvent;
|
|
119
|
+
thOns.dragover = $xeTable.handleHeaderCellDragDragoverEvent;
|
|
120
|
+
if (isColDragCell) {
|
|
121
|
+
thOns.mouseup = $xeTable.handleHeaderCellDragMouseupEvent;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const isLastColumn = $columnIndex === cols.length - 1;
|
|
125
|
+
const showResizable = XEUtils.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
|
|
126
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === "auto" || column.width === "auto");
|
|
127
|
+
let isVNPreEmptyStatus = false;
|
|
128
|
+
if (isOptimizeMode && overflowX && !isGroup && !isMergeCell) {
|
|
129
|
+
if (!dragCol || dragCol.id !== colid) {
|
|
130
|
+
if (scrollXLoad && tableColumn.length > 10 && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
131
|
+
isVNPreEmptyStatus = true;
|
|
149
132
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const tcStyle = {};
|
|
136
|
+
if (hasEllipsis) {
|
|
137
|
+
tcStyle.height = `${currCellHeight}px`;
|
|
138
|
+
} else {
|
|
139
|
+
tcStyle.minHeight = `${currCellHeight}px`;
|
|
140
|
+
}
|
|
141
|
+
if (showCustomHeader) {
|
|
142
|
+
} else if (isColGroup && !isLastRow) {
|
|
143
|
+
let childWidth = 0;
|
|
144
|
+
XEUtils.eachTree(column.children, (childRow) => {
|
|
145
|
+
if (childRow.visible && (!childRow.children || !childRow.children.length)) {
|
|
146
|
+
childWidth += childRow.renderWidth;
|
|
158
147
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
148
|
+
});
|
|
149
|
+
tcStyle.width = `${childWidth}px`;
|
|
150
|
+
}
|
|
151
|
+
return h(
|
|
152
|
+
"th",
|
|
153
|
+
{
|
|
154
|
+
class: [
|
|
155
|
+
"vxe-table--column vxe-header--column",
|
|
156
|
+
colid,
|
|
157
|
+
fixedHiddenColumn ? "fixed--hidden" : "fixed--visible",
|
|
158
|
+
{
|
|
159
|
+
[`col--${headAlign}`]: headAlign,
|
|
160
|
+
[`col--${type}`]: type,
|
|
161
|
+
"col--last": isLastColumn,
|
|
162
|
+
"col--fixed": column.fixed,
|
|
163
|
+
"col--group": isColGroup,
|
|
164
|
+
"col--ellipsis": hasEllipsis,
|
|
165
|
+
"fixed--width": !isAutoCellWidth,
|
|
166
|
+
"is--pg-top": isCellPaddingTop,
|
|
167
|
+
"is--pg-bottom": isCellPaddingBottom,
|
|
168
|
+
"is--pg-left": isCellPaddingLeft,
|
|
169
|
+
"is--pg-right": isCellPaddingRight,
|
|
170
|
+
"is--sortable": column.sortable,
|
|
171
|
+
"col--filter": !!filters,
|
|
172
|
+
"is--filter-active": hasFilter,
|
|
173
|
+
"is--drag-active": columnOpts.drag && !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
|
|
174
|
+
"is--drag-disabled": columnOpts.drag && isDisabledDrag,
|
|
175
|
+
"col--current": currColFlag && currentCol === column
|
|
176
|
+
},
|
|
177
|
+
getClass(headerClassName, cellParams),
|
|
178
|
+
getClass(headerCellClassName, cellParams)
|
|
179
|
+
],
|
|
180
|
+
attrs: thAttrs,
|
|
181
|
+
style: headerCellStyle ? XEUtils.isFunction(headerCellStyle) ? headerCellStyle(cellParams) : headerCellStyle : void 0,
|
|
182
|
+
on: thOns,
|
|
183
|
+
key: showCustomHeader ? `${colid}${$columnIndex}` : columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag || isColGroup ? colid : $columnIndex
|
|
184
|
+
},
|
|
185
|
+
[
|
|
186
|
+
h(
|
|
187
|
+
"div",
|
|
188
|
+
{
|
|
189
|
+
class: [
|
|
190
|
+
"vxe-cell",
|
|
191
|
+
{
|
|
192
|
+
"c--title": showTitle,
|
|
193
|
+
"c--tooltip": showTooltip,
|
|
194
|
+
"c--ellipsis": showEllipsis
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
style: tcStyle
|
|
198
|
+
},
|
|
199
|
+
isVNPreEmptyStatus || isOptimizeMode && fixedHiddenColumn ? [] : [
|
|
200
|
+
h(
|
|
201
|
+
"div",
|
|
202
|
+
{
|
|
203
|
+
attrs: {
|
|
204
|
+
colid
|
|
205
|
+
},
|
|
206
|
+
class: "vxe-cell--wrapper vxe-header-cell--wrapper"
|
|
207
|
+
},
|
|
208
|
+
column.renderHeader(h, cellParams)
|
|
209
|
+
)
|
|
210
|
+
]
|
|
211
|
+
),
|
|
212
|
+
/**
|
|
213
|
+
* 列宽拖动
|
|
214
|
+
*/
|
|
215
|
+
!fixedHiddenColumn && showResizable && (!showCustomHeader || isLastRow) ? h("div", {
|
|
216
|
+
class: "vxe-cell--col-resizable",
|
|
217
|
+
on: {
|
|
218
|
+
mousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
219
|
+
dblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
220
|
+
}
|
|
221
|
+
}) : renderEmptyElement($xeTable)
|
|
222
|
+
]
|
|
223
|
+
);
|
|
224
|
+
});
|
|
215
225
|
}
|
|
216
226
|
function renderFilterRows(h, _vm, isOptimizeMode, cols) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
227
|
+
const props = _vm;
|
|
228
|
+
const $xeTable = _vm.$parent;
|
|
229
|
+
const $xeGrid = $xeTable.$xeGrid;
|
|
230
|
+
const $xeGantt = $xeTable.$xeGantt;
|
|
231
|
+
const tableProps = $xeTable;
|
|
232
|
+
const tableReactData = $xeTable;
|
|
233
|
+
const tableInternalData = $xeTable;
|
|
234
|
+
const { fixedType } = props;
|
|
235
|
+
const { showHeaderOverflow: allColumnHeaderOverflow, headerAlign: allHeaderAlign, align: allAlign } = tableProps;
|
|
236
|
+
const { overflowX, currColFlag } = tableReactData;
|
|
237
|
+
const { fullColumnIdData, currentCol } = tableInternalData;
|
|
238
|
+
const headerTooltipOpts = $xeTable.computeHeaderTooltipOpts;
|
|
239
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
240
|
+
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
241
|
+
const headerCellOpts = $xeTable.computeHeaderCellOpts;
|
|
242
|
+
const floatingFilterOpts = $xeTable.computeFloatingFilterOpts;
|
|
243
|
+
const rendererOpts = $xeTable.computeRendererOpts;
|
|
244
|
+
const { cellClassName } = floatingFilterOpts;
|
|
245
|
+
const currCellHeight = getCalcHeight(headerCellOpts.height) || defaultRowHeight;
|
|
246
|
+
return cols.map((column, $columnIndex) => {
|
|
247
|
+
const { type, showHeaderOverflow, headerAlign, align, filters, editRender, cellRender, floatingFilters, filterRender, slots } = column;
|
|
248
|
+
const colid = column.id;
|
|
249
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
250
|
+
const renderOpts = editRender || cellRender;
|
|
251
|
+
const compConf = renderOpts && renderOpts.name ? rendererOpts[renderOpts.name] || renderer.get(renderOpts.name) : null;
|
|
252
|
+
const flCompConf = isEnableConf(filterRender) && filterRender.name ? rendererOpts[filterRender.name] || renderer.get(filterRender.name) : null;
|
|
253
|
+
const rtFloatingFilter = flCompConf ? flCompConf.renderTableFloatingFilter : null;
|
|
254
|
+
const flSlot = slots ? slots.floatingFilter || slots["floating-filter"] : null;
|
|
255
|
+
const fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
256
|
+
const isPadding = XEUtils.isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
|
|
257
|
+
const headOverflow = XEUtils.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
258
|
+
const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : "") || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : "") || allAlign;
|
|
259
|
+
const showEllipsis = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) === "ellipsis";
|
|
260
|
+
const showTitle = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) === "title";
|
|
261
|
+
const showTooltip = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) === "tooltip";
|
|
262
|
+
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
263
|
+
let hasFilter = false;
|
|
264
|
+
let firstFilterOption = null;
|
|
265
|
+
if (filters) {
|
|
266
|
+
firstFilterOption = filters[0];
|
|
267
|
+
hasFilter = filters.some((item) => item.checked);
|
|
268
|
+
}
|
|
269
|
+
const columnIndex = colRest.index;
|
|
270
|
+
const _columnIndex = colRest._index;
|
|
271
|
+
const cellParams = {
|
|
272
|
+
$table: $xeTable,
|
|
273
|
+
$grid: $xeGrid,
|
|
274
|
+
$gantt: $xeGantt,
|
|
275
|
+
column,
|
|
276
|
+
columnIndex,
|
|
277
|
+
$columnIndex,
|
|
278
|
+
_columnIndex,
|
|
279
|
+
option: firstFilterOption,
|
|
280
|
+
fixed: fixedType,
|
|
281
|
+
source: sourceType,
|
|
282
|
+
type: renderType,
|
|
283
|
+
isHidden: fixedHiddenColumn,
|
|
284
|
+
hasFilter
|
|
285
|
+
};
|
|
286
|
+
const thAttrs = {
|
|
287
|
+
colid
|
|
288
|
+
};
|
|
289
|
+
const isLastColumn = $columnIndex === cols.length - 1;
|
|
290
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === "auto" || column.width === "auto");
|
|
291
|
+
const tcStyle = {};
|
|
292
|
+
if (hasEllipsis) {
|
|
293
|
+
tcStyle.height = `${currCellHeight}px`;
|
|
294
|
+
} else {
|
|
295
|
+
tcStyle.minHeight = `${currCellHeight}px`;
|
|
296
|
+
}
|
|
297
|
+
return h(
|
|
298
|
+
"th",
|
|
299
|
+
{
|
|
300
|
+
class: [
|
|
301
|
+
"vxe-table--column vxe-header--column is--floating-filters",
|
|
302
|
+
colid,
|
|
303
|
+
fixedHiddenColumn ? "fixed--hidden" : "fixed--visible",
|
|
304
|
+
{
|
|
305
|
+
[`col--${headAlign}`]: headAlign,
|
|
306
|
+
[`col--${type}`]: type,
|
|
307
|
+
"col--last": isLastColumn,
|
|
308
|
+
"col--fixed": column.fixed,
|
|
309
|
+
"col--ellipsis": hasEllipsis,
|
|
310
|
+
"fixed--width": !isAutoCellWidth,
|
|
311
|
+
"is--padding": isPadding,
|
|
312
|
+
"is--sortable": column.sortable,
|
|
313
|
+
"col--current": currColFlag && currentCol === column
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
key: colid,
|
|
317
|
+
attrs: thAttrs
|
|
318
|
+
},
|
|
319
|
+
[
|
|
320
|
+
h(
|
|
321
|
+
"div",
|
|
322
|
+
{
|
|
323
|
+
class: [
|
|
324
|
+
"vxe-cell",
|
|
325
|
+
"" + (cellClassName || ""),
|
|
326
|
+
{
|
|
327
|
+
"c--title": showTitle,
|
|
328
|
+
"c--tooltip": showTooltip,
|
|
329
|
+
"c--ellipsis": showEllipsis
|
|
330
|
+
}
|
|
300
331
|
],
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
h(
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}, flSlot
|
|
320
|
-
? $xeTable.callSlot(flSlot, cellParams, h)
|
|
321
|
-
: (rtFloatingFilter && firstFilterOption
|
|
322
|
-
? getSlotVNs(rtFloatingFilter.call($xeTable, h, filterRender, cellParams))
|
|
323
|
-
: []))
|
|
324
|
-
])
|
|
325
|
-
]);
|
|
326
|
-
});
|
|
332
|
+
style: tcStyle
|
|
333
|
+
},
|
|
334
|
+
isOptimizeMode && fixedHiddenColumn && !floatingFilters ? [] : [
|
|
335
|
+
h(
|
|
336
|
+
"div",
|
|
337
|
+
{
|
|
338
|
+
attrs: {
|
|
339
|
+
colid
|
|
340
|
+
},
|
|
341
|
+
class: "vxe-cell--wrapper vxe-header-cell--wrapper"
|
|
342
|
+
},
|
|
343
|
+
flSlot ? $xeTable.callSlot(flSlot, cellParams, h) : rtFloatingFilter && firstFilterOption ? getSlotVNs(rtFloatingFilter.call($xeTable, h, filterRender, cellParams)) : []
|
|
344
|
+
)
|
|
345
|
+
]
|
|
346
|
+
)
|
|
347
|
+
]
|
|
348
|
+
);
|
|
349
|
+
});
|
|
327
350
|
}
|
|
328
351
|
function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups, renderColumnList) {
|
|
352
|
+
const props = _vm;
|
|
353
|
+
const $xeTable = _vm.$parent;
|
|
354
|
+
const tableProps = $xeTable;
|
|
355
|
+
const { fixedType } = props;
|
|
356
|
+
const { headerRowClassName, headerRowStyle } = tableProps;
|
|
357
|
+
const floatingFilterOpts = $xeTable.computeFloatingFilterOpts;
|
|
358
|
+
const rowVNs = headerGroups.map((cols, _rowIndex) => {
|
|
359
|
+
const params = { $table: $xeTable, rowIndex: _rowIndex, _rowIndex, $rowIndex: _rowIndex, fixed: fixedType, type: renderType };
|
|
360
|
+
return h(
|
|
361
|
+
"tr",
|
|
362
|
+
{
|
|
363
|
+
key: _rowIndex,
|
|
364
|
+
class: ["vxe-header--row", headerRowClassName ? XEUtils.isFunction(headerRowClassName) ? headerRowClassName(params) : headerRowClassName : ""],
|
|
365
|
+
style: headerRowStyle ? XEUtils.isFunction(headerRowStyle) ? headerRowStyle(params) : headerRowStyle : void 0
|
|
366
|
+
},
|
|
367
|
+
renderRows(h, _vm, isGroup, isOptimizeMode, headerGroups, _rowIndex, cols)
|
|
368
|
+
);
|
|
369
|
+
});
|
|
370
|
+
if (floatingFilterOpts.enabled) {
|
|
371
|
+
rowVNs.push(
|
|
372
|
+
h(
|
|
373
|
+
"tr",
|
|
374
|
+
{
|
|
375
|
+
key: "ff",
|
|
376
|
+
class: ["vxe-header--row is--floating-filters", "" + (floatingFilterOpts.rowClassName || "")]
|
|
377
|
+
},
|
|
378
|
+
renderFilterRows(h, _vm, isOptimizeMode, renderColumnList)
|
|
379
|
+
)
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
return rowVNs;
|
|
383
|
+
}
|
|
384
|
+
var header_default = {
|
|
385
|
+
name: "VxeTableHeader",
|
|
386
|
+
props: {
|
|
387
|
+
tableData: Array,
|
|
388
|
+
tableColumn: Array,
|
|
389
|
+
tableGroupColumn: Array,
|
|
390
|
+
fixedColumn: Array,
|
|
391
|
+
fixedType: {
|
|
392
|
+
type: String,
|
|
393
|
+
default: null
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
data() {
|
|
397
|
+
const headerColumn = [];
|
|
398
|
+
return {
|
|
399
|
+
headerColumn
|
|
400
|
+
};
|
|
401
|
+
},
|
|
402
|
+
watch: {
|
|
403
|
+
tableColumn() {
|
|
404
|
+
const _vm = this;
|
|
405
|
+
_vm.uploadColumn();
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
created() {
|
|
409
|
+
const _vm = this;
|
|
410
|
+
_vm.uploadColumn();
|
|
411
|
+
},
|
|
412
|
+
mounted() {
|
|
413
|
+
const _vm = this;
|
|
329
414
|
const props = _vm;
|
|
330
415
|
const $xeTable = _vm.$parent;
|
|
331
|
-
const
|
|
416
|
+
const internalData = $xeTable;
|
|
332
417
|
const { fixedType } = props;
|
|
333
|
-
const {
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
const _vm = this;
|
|
387
|
-
const props = _vm;
|
|
388
|
-
const $xeTable = _vm.$parent;
|
|
389
|
-
const internalData = $xeTable;
|
|
390
|
-
const { fixedType } = props;
|
|
391
|
-
const { elemStore } = internalData;
|
|
392
|
-
const prefix = `${fixedType || 'main'}-header-`;
|
|
393
|
-
elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
|
|
394
|
-
elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
|
|
395
|
-
elemStore[`${prefix}table`] = _vm.$refs.refHeaderTable;
|
|
396
|
-
elemStore[`${prefix}colgroup`] = _vm.$refs.refHeaderColgroup;
|
|
397
|
-
elemStore[`${prefix}list`] = _vm.$refs.refHeaderTHead;
|
|
398
|
-
elemStore[`${prefix}xSpace`] = _vm.$refs.refHeaderXSpace;
|
|
399
|
-
elemStore[`${prefix}repair`] = _vm.$refs.refHeaderBorderRepair;
|
|
400
|
-
},
|
|
401
|
-
destroyed() {
|
|
402
|
-
const _vm = this;
|
|
403
|
-
const props = _vm;
|
|
404
|
-
const $xeTable = _vm.$parent;
|
|
405
|
-
const internalData = $xeTable;
|
|
406
|
-
const { fixedType } = props;
|
|
407
|
-
const { elemStore } = internalData;
|
|
408
|
-
const prefix = `${fixedType || 'main'}-header-`;
|
|
409
|
-
elemStore[`${prefix}wrapper`] = null;
|
|
410
|
-
elemStore[`${prefix}scroll`] = null;
|
|
411
|
-
elemStore[`${prefix}table`] = null;
|
|
412
|
-
elemStore[`${prefix}colgroup`] = null;
|
|
413
|
-
elemStore[`${prefix}list`] = null;
|
|
414
|
-
elemStore[`${prefix}xSpace`] = null;
|
|
415
|
-
elemStore[`${prefix}repair`] = null;
|
|
416
|
-
},
|
|
417
|
-
render(h) {
|
|
418
|
-
const _vm = this;
|
|
419
|
-
const props = _vm;
|
|
420
|
-
const $xeTable = _vm.$parent;
|
|
421
|
-
const tableProps = $xeTable;
|
|
422
|
-
const tableReactData = $xeTable;
|
|
423
|
-
const tableInternalData = $xeTable;
|
|
424
|
-
const { xID } = $xeTable;
|
|
425
|
-
const { fixedType, fixedColumn, tableColumn } = props;
|
|
426
|
-
const { headerColumn } = _vm;
|
|
427
|
-
const { mouseConfig } = tableProps;
|
|
428
|
-
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData;
|
|
429
|
-
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
430
|
-
const mouseOpts = $xeTable.computeMouseOpts;
|
|
431
|
-
const isHeaderRenderOptimize = $xeTable.computeIsHeaderRenderOptimize;
|
|
432
|
-
let renderHeaderList = headerColumn;
|
|
433
|
-
let renderColumnList = tableColumn;
|
|
434
|
-
const isOptimizeMode = isHeaderRenderOptimize;
|
|
435
|
-
if (isGroup) {
|
|
436
|
-
renderColumnList = visibleColumn;
|
|
418
|
+
const { elemStore } = internalData;
|
|
419
|
+
const prefix = `${fixedType || "main"}-header-`;
|
|
420
|
+
elemStore[`${prefix}wrapper`] = _vm.$refs.refElem;
|
|
421
|
+
elemStore[`${prefix}scroll`] = _vm.$refs.refHeaderScroll;
|
|
422
|
+
elemStore[`${prefix}table`] = _vm.$refs.refHeaderTable;
|
|
423
|
+
elemStore[`${prefix}colgroup`] = _vm.$refs.refHeaderColgroup;
|
|
424
|
+
elemStore[`${prefix}list`] = _vm.$refs.refHeaderTHead;
|
|
425
|
+
elemStore[`${prefix}xSpace`] = _vm.$refs.refHeaderXSpace;
|
|
426
|
+
elemStore[`${prefix}repair`] = _vm.$refs.refHeaderBorderRepair;
|
|
427
|
+
},
|
|
428
|
+
destroyed() {
|
|
429
|
+
const _vm = this;
|
|
430
|
+
const props = _vm;
|
|
431
|
+
const $xeTable = _vm.$parent;
|
|
432
|
+
const internalData = $xeTable;
|
|
433
|
+
const { fixedType } = props;
|
|
434
|
+
const { elemStore } = internalData;
|
|
435
|
+
const prefix = `${fixedType || "main"}-header-`;
|
|
436
|
+
elemStore[`${prefix}wrapper`] = null;
|
|
437
|
+
elemStore[`${prefix}scroll`] = null;
|
|
438
|
+
elemStore[`${prefix}table`] = null;
|
|
439
|
+
elemStore[`${prefix}colgroup`] = null;
|
|
440
|
+
elemStore[`${prefix}list`] = null;
|
|
441
|
+
elemStore[`${prefix}xSpace`] = null;
|
|
442
|
+
elemStore[`${prefix}repair`] = null;
|
|
443
|
+
},
|
|
444
|
+
render(h) {
|
|
445
|
+
const _vm = this;
|
|
446
|
+
const props = _vm;
|
|
447
|
+
const $xeTable = _vm.$parent;
|
|
448
|
+
const tableProps = $xeTable;
|
|
449
|
+
const tableReactData = $xeTable;
|
|
450
|
+
const tableInternalData = $xeTable;
|
|
451
|
+
const { xID } = $xeTable;
|
|
452
|
+
const { fixedType, fixedColumn, tableColumn } = props;
|
|
453
|
+
const { headerColumn } = _vm;
|
|
454
|
+
const { mouseConfig } = tableProps;
|
|
455
|
+
const { isGroup, isColLoading, overflowX, scrollXLoad, dragCol } = tableReactData;
|
|
456
|
+
const { visibleColumn, fullColumnIdData } = tableInternalData;
|
|
457
|
+
const mouseOpts = $xeTable.computeMouseOpts;
|
|
458
|
+
const isHeaderRenderOptimize = $xeTable.computeIsHeaderRenderOptimize;
|
|
459
|
+
let renderHeaderList = headerColumn;
|
|
460
|
+
let renderColumnList = tableColumn;
|
|
461
|
+
const isOptimizeMode = isHeaderRenderOptimize;
|
|
462
|
+
if (isGroup) {
|
|
463
|
+
renderColumnList = visibleColumn;
|
|
464
|
+
} else {
|
|
465
|
+
if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
|
|
466
|
+
renderColumnList = visibleColumn;
|
|
467
|
+
}
|
|
468
|
+
if (fixedType) {
|
|
469
|
+
if (isOptimizeMode) {
|
|
470
|
+
renderColumnList = fixedColumn || [];
|
|
437
471
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
472
|
+
}
|
|
473
|
+
renderHeaderList = [renderColumnList];
|
|
474
|
+
}
|
|
475
|
+
if (!fixedType && !isGroup) {
|
|
476
|
+
if (scrollXLoad && dragCol) {
|
|
477
|
+
if (renderColumnList.length > 2) {
|
|
478
|
+
const dCowRest = fullColumnIdData[dragCol.id];
|
|
479
|
+
if (dCowRest) {
|
|
480
|
+
const dcIndex = dCowRest._index;
|
|
481
|
+
const firstCol = renderColumnList[0];
|
|
482
|
+
const lastCol = renderColumnList[renderColumnList.length - 1];
|
|
483
|
+
const firstColRest = fullColumnIdData[firstCol.id];
|
|
484
|
+
const lastColRest = fullColumnIdData[lastCol.id];
|
|
485
|
+
if (firstColRest && lastColRest) {
|
|
486
|
+
const fcIndex = firstColRest._index;
|
|
487
|
+
const lcIndex = lastColRest._index;
|
|
488
|
+
if (dcIndex < fcIndex) {
|
|
489
|
+
renderColumnList = [dragCol].concat(renderColumnList);
|
|
490
|
+
renderHeaderList = [[dragCol].concat(renderHeaderList[0])].concat(renderHeaderList.slice(1));
|
|
491
|
+
} else if (dcIndex > lcIndex) {
|
|
492
|
+
renderColumnList = renderColumnList.concat([dragCol]);
|
|
493
|
+
renderHeaderList = [renderHeaderList[0].concat([dragCol])].concat(renderHeaderList.slice(1));
|
|
494
|
+
}
|
|
447
495
|
}
|
|
448
|
-
|
|
496
|
+
}
|
|
449
497
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
const firstColRest = fullColumnIdData[firstCol.id];
|
|
460
|
-
const lastColRest = fullColumnIdData[lastCol.id];
|
|
461
|
-
if (firstColRest && lastColRest) {
|
|
462
|
-
const fcIndex = firstColRest._index;
|
|
463
|
-
const lcIndex = lastColRest._index;
|
|
464
|
-
if (dcIndex < fcIndex) {
|
|
465
|
-
renderColumnList = [dragCol].concat(renderColumnList);
|
|
466
|
-
renderHeaderList = [[dragCol].concat(renderHeaderList[0])].concat(renderHeaderList.slice(1));
|
|
467
|
-
}
|
|
468
|
-
else if (dcIndex > lcIndex) {
|
|
469
|
-
renderColumnList = renderColumnList.concat([dragCol]);
|
|
470
|
-
renderHeaderList = [renderHeaderList[0].concat([dragCol])].concat(renderHeaderList.slice(1));
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return h(
|
|
501
|
+
"div",
|
|
502
|
+
{
|
|
503
|
+
ref: "refElem",
|
|
504
|
+
class: ["vxe-table--header-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
|
|
505
|
+
attrs: {
|
|
506
|
+
xid: xID
|
|
476
507
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
508
|
+
},
|
|
509
|
+
[
|
|
510
|
+
h(
|
|
511
|
+
"div",
|
|
512
|
+
{
|
|
513
|
+
ref: "refHeaderScroll",
|
|
514
|
+
class: "vxe-table--header-inner-wrapper",
|
|
515
|
+
on: {
|
|
516
|
+
scroll(evnt) {
|
|
517
|
+
$xeTable.triggerHeaderScrollEvent(evnt, fixedType);
|
|
518
|
+
}
|
|
482
519
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
520
|
+
},
|
|
521
|
+
[
|
|
522
|
+
fixedType ? renderEmptyElement($xeTable) : h("div", {
|
|
523
|
+
ref: "refHeaderXSpace",
|
|
524
|
+
class: "vxe-body--x-space"
|
|
525
|
+
}),
|
|
526
|
+
h(
|
|
527
|
+
"table",
|
|
528
|
+
{
|
|
529
|
+
ref: "refHeaderTable",
|
|
530
|
+
class: "vxe-table--header",
|
|
531
|
+
attrs: {
|
|
532
|
+
xid: xID,
|
|
533
|
+
cellspacing: 0,
|
|
534
|
+
cellpadding: 0,
|
|
535
|
+
border: 0,
|
|
536
|
+
xvm: isOptimizeMode ? "1" : null
|
|
491
537
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
ref:
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
$xeTable.dispatchEvent('columns-change', { visibleColgroups, collectColumn, visibleColumn }, null);
|
|
584
|
-
});
|
|
585
|
-
}
|
|
538
|
+
},
|
|
539
|
+
[
|
|
540
|
+
/**
|
|
541
|
+
* 列宽
|
|
542
|
+
*/
|
|
543
|
+
h(
|
|
544
|
+
"colgroup",
|
|
545
|
+
{
|
|
546
|
+
ref: "refHeaderColgroup"
|
|
547
|
+
},
|
|
548
|
+
renderColumnList.map((column, $columnIndex) => {
|
|
549
|
+
return h("col", {
|
|
550
|
+
attrs: {
|
|
551
|
+
name: column.id
|
|
552
|
+
},
|
|
553
|
+
key: $columnIndex,
|
|
554
|
+
style: {
|
|
555
|
+
width: `${column.renderWidth}px`
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
})
|
|
559
|
+
),
|
|
560
|
+
/**
|
|
561
|
+
* 头部
|
|
562
|
+
*/
|
|
563
|
+
h(
|
|
564
|
+
"thead",
|
|
565
|
+
{
|
|
566
|
+
ref: "refHeaderTHead"
|
|
567
|
+
},
|
|
568
|
+
renderHeads(h, _vm, isGroup, isOptimizeMode, renderHeaderList, renderColumnList)
|
|
569
|
+
)
|
|
570
|
+
]
|
|
571
|
+
),
|
|
572
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? h(
|
|
573
|
+
"div",
|
|
574
|
+
{
|
|
575
|
+
class: "vxe-table--cell-area",
|
|
576
|
+
attrs: {
|
|
577
|
+
xid: xID
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
[
|
|
581
|
+
h("span", {
|
|
582
|
+
class: "vxe-table--cell-main-area"
|
|
583
|
+
}),
|
|
584
|
+
h("span", {
|
|
585
|
+
class: "vxe-table--cell-clip-area"
|
|
586
|
+
}),
|
|
587
|
+
h("span", {
|
|
588
|
+
class: "vxe-table--cell-extend-area"
|
|
589
|
+
}),
|
|
590
|
+
h("span", {
|
|
591
|
+
class: "vxe-table--cell-multi-area"
|
|
592
|
+
}),
|
|
593
|
+
h("span", {
|
|
594
|
+
class: "vxe-table--cell-active-area"
|
|
595
|
+
}),
|
|
596
|
+
h("span", {
|
|
597
|
+
class: "vxe-table--cell-col-status-area"
|
|
598
|
+
})
|
|
599
|
+
]
|
|
600
|
+
) : renderEmptyElement($xeTable)
|
|
601
|
+
]
|
|
602
|
+
)
|
|
603
|
+
]
|
|
604
|
+
);
|
|
605
|
+
},
|
|
606
|
+
methods: {
|
|
607
|
+
uploadColumn() {
|
|
608
|
+
const _vm = this;
|
|
609
|
+
const $xeTable = _vm.$parent;
|
|
610
|
+
const tableProps = $xeTable;
|
|
611
|
+
const tableReactData = $xeTable;
|
|
612
|
+
const tableInternalData = $xeTable;
|
|
613
|
+
const props = _vm;
|
|
614
|
+
const { showCustomHeader } = tableProps;
|
|
615
|
+
const { collectColumn, visibleColumn } = tableInternalData;
|
|
616
|
+
const { tableGroupColumn } = props;
|
|
617
|
+
const { isGroup } = tableReactData;
|
|
618
|
+
let spanColumns = isGroup ? convertHeaderColumnToRows(tableGroupColumn) : [];
|
|
619
|
+
let visibleColgroups = [];
|
|
620
|
+
if (showCustomHeader && spanColumns.length > 1) {
|
|
621
|
+
visibleColgroups = convertHeaderToGridRows(spanColumns);
|
|
622
|
+
spanColumns = visibleColgroups;
|
|
623
|
+
}
|
|
624
|
+
;
|
|
625
|
+
_vm.headerColumn = spanColumns;
|
|
626
|
+
$xeTable.$nextTick(() => {
|
|
627
|
+
$xeTable.dispatchEvent("columns-change", { visibleColgroups, collectColumn, visibleColumn }, null);
|
|
628
|
+
});
|
|
586
629
|
}
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
export {
|
|
633
|
+
header_default as default
|
|
587
634
|
};
|