vxe-table 4.23.4 → 4.23.6
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/dist/all.esm.js +32459 -33908
- package/dist/style.css +4501 -1
- package/dist/style.mini.css +1 -0
- package/es/colgroup/index.d.ts +760 -0
- package/es/colgroup/index.js +16 -13
- package/es/column/index.d.ts +760 -0
- package/es/column/index.js +16 -13
- package/es/components.d.ts +9 -0
- package/es/components.js +29 -29
- package/es/grid/index.d.ts +2824 -0
- package/es/grid/index.js +14 -9
- package/es/grid/src/emits.d.ts +2 -0
- package/es/grid/src/emits.js +18 -15
- package/es/grid/src/grid.d.ts +556 -0
- package/es/grid/src/grid.js +1695 -1758
- package/es/grid/src/props.d.ts +200 -0
- package/es/grid/src/props.js +19 -6
- 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 +6 -3
- package/es/index.js +6 -0
- package/es/locale/lang/ar-EG.d.ts +908 -2
- package/es/locale/lang/ar-EG.js +906 -903
- package/es/locale/lang/de-DE.d.ts +908 -2
- package/es/locale/lang/de-DE.js +906 -903
- package/es/locale/lang/en-US.d.ts +908 -2
- package/es/locale/lang/en-US.js +906 -903
- package/es/locale/lang/es-ES.d.ts +908 -2
- package/es/locale/lang/es-ES.js +906 -903
- package/es/locale/lang/fr-FR.d.ts +908 -2
- package/es/locale/lang/fr-FR.js +906 -903
- package/es/locale/lang/hu-HU.d.ts +908 -2
- package/es/locale/lang/hu-HU.js +906 -903
- package/es/locale/lang/hy-AM.d.ts +908 -2
- package/es/locale/lang/hy-AM.js +906 -903
- package/es/locale/lang/id-ID.d.ts +908 -2
- package/es/locale/lang/id-ID.js +906 -903
- package/es/locale/lang/it-IT.d.ts +908 -2
- package/es/locale/lang/it-IT.js +906 -903
- package/es/locale/lang/ja-JP.d.ts +908 -2
- package/es/locale/lang/ja-JP.js +906 -903
- package/es/locale/lang/ko-KR.d.ts +908 -2
- package/es/locale/lang/ko-KR.js +906 -903
- package/es/locale/lang/ms-MY.d.ts +908 -2
- package/es/locale/lang/ms-MY.js +906 -903
- package/es/locale/lang/nb-NO.d.ts +908 -2
- package/es/locale/lang/nb-NO.js +906 -903
- package/es/locale/lang/pt-BR.d.ts +908 -2
- package/es/locale/lang/pt-BR.js +906 -903
- package/es/locale/lang/ru-RU.d.ts +908 -2
- package/es/locale/lang/ru-RU.js +906 -903
- package/es/locale/lang/th-TH.d.ts +908 -2
- package/es/locale/lang/th-TH.js +906 -903
- package/es/locale/lang/ug-CN.d.ts +908 -2
- package/es/locale/lang/ug-CN.js +906 -903
- package/es/locale/lang/uk-UA.d.ts +908 -2
- package/es/locale/lang/uk-UA.js +906 -903
- package/es/locale/lang/uz-UZ.d.ts +908 -2
- package/es/locale/lang/uz-UZ.js +906 -903
- package/es/locale/lang/vi-VN.d.ts +908 -2
- package/es/locale/lang/vi-VN.js +906 -903
- package/es/locale/lang/zh-CHT.d.ts +908 -2
- package/es/locale/lang/zh-CHT.js +906 -903
- package/es/locale/lang/zh-CN.d.ts +908 -2
- package/es/locale/lang/zh-CN.js +906 -903
- 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/table/index.d.ts +2672 -0
- package/es/table/index.js +16 -11
- package/es/table/module/custom/hook.d.ts +1 -0
- package/es/table/module/custom/hook.js +462 -483
- package/es/table/module/custom/panel.d.ts +17 -0
- package/es/table/module/custom/panel.js +1482 -1559
- package/es/table/module/edit/hook.d.ts +1 -0
- package/es/table/module/edit/hook.js +1008 -1078
- package/es/table/module/export/export-panel.d.ts +27 -0
- package/es/table/module/export/export-panel.js +523 -575
- package/es/table/module/export/hook.d.ts +1 -0
- package/es/table/module/export/hook.js +1805 -1884
- package/es/table/module/export/import-panel.d.ts +27 -0
- package/es/table/module/export/import-panel.js +244 -252
- package/es/table/module/export/util.d.ts +5 -0
- package/es/table/module/export/util.js +20 -17
- package/es/table/module/filter/hook.d.ts +1 -0
- package/es/table/module/filter/hook.js +472 -487
- package/es/table/module/filter/panel.d.ts +16 -0
- package/es/table/module/filter/panel.js +251 -275
- package/es/table/module/keyboard/hook.d.ts +1 -0
- package/es/table/module/keyboard/hook.js +445 -497
- package/es/table/module/menu/hook.d.ts +1 -0
- package/es/table/module/menu/hook.js +295 -315
- package/es/table/module/menu/panel.d.ts +2 -0
- package/es/table/module/menu/panel.js +164 -183
- package/es/table/module/validator/hook.d.ts +1 -0
- package/es/table/module/validator/hook.js +522 -571
- package/es/table/render/index.d.ts +1 -0
- package/es/table/render/index.js +1402 -1362
- package/es/table/src/body.d.ts +24 -0
- package/es/table/src/body.js +850 -865
- package/es/table/src/cell.d.ts +192 -0
- package/es/table/src/cell.js +1209 -1207
- package/es/table/src/column.d.ts +263 -0
- package/es/table/src/column.js +178 -174
- package/es/table/src/columnInfo.d.ts +13 -0
- package/es/table/src/columnInfo.js +202 -196
- package/es/table/src/emits.d.ts +2 -0
- package/es/table/src/emits.js +126 -119
- package/es/table/src/footer.d.ts +45 -0
- package/es/table/src/footer.js +336 -340
- package/es/table/src/group.d.ts +178 -0
- package/es/table/src/group.js +49 -46
- package/es/table/src/header.d.ts +26 -0
- package/es/table/src/header.js +517 -519
- package/es/table/src/props.d.ts +238 -0
- package/es/table/src/props.js +331 -328
- package/es/table/src/store.d.ts +6 -0
- package/es/table/src/store.js +9 -6
- package/es/table/src/table.d.ts +539 -0
- package/es/table/src/table.js +14064 -15041
- package/es/table/src/use/cell-view.d.ts +10 -0
- package/es/table/src/use/cell-view.js +36 -33
- package/es/table/src/use/index.d.ts +1 -0
- package/es/table/src/use/index.js +1 -1
- package/es/table/src/util.d.ts +74 -0
- package/es/table/src/util.js +1038 -1026
- package/es/table/style.css +1 -1
- package/es/table/style.mini.css +1 -0
- package/es/toolbar/index.d.ts +340 -0
- package/es/toolbar/index.js +14 -9
- package/es/toolbar/src/toolbar.d.ts +75 -0
- package/es/toolbar/src/toolbar.js +605 -613
- package/es/toolbar/{style.min.css → style.mini.css} +1 -1
- package/es/ui/index.d.ts +86 -0
- package/es/ui/index.js +457 -501
- 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 +5 -2
- package/es/ui/src/dom.d.ts +80 -0
- package/es/ui/src/dom.js +377 -380
- package/es/ui/src/log.d.ts +6 -0
- package/es/ui/src/log.js +18 -13
- package/es/ui/src/utils.d.ts +23 -0
- package/es/ui/src/utils.js +57 -53
- package/es/ui/src/vn.d.ts +7 -0
- package/es/ui/src/vn.js +49 -42
- package/es/v-x-e-table/index.d.ts +3 -0
- package/es/v-x-e-table/index.js +6 -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 +1 -1
- 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/es/vxe-toolbar/{style.min.css → 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 +58 -92
- package/lib/grid/index.js +42 -14
- package/lib/grid/src/emits.js +37 -6
- package/lib/grid/src/grid.js +850 -1195
- package/lib/grid/src/props.js +27 -11
- package/lib/grid/style/index.js +1 -1
- package/lib/{vxe-grid/style/style.min.css → grid/style/style.mini.css} +1 -1
- package/lib/iconfont.1792977622800.ttf +0 -0
- package/lib/iconfont.1792977622800.woff +0 -0
- package/lib/iconfont.1792977622800.woff2 +0 -0
- package/lib/index.common.js +35 -19
- package/lib/index.js +37 -0
- package/lib/index.umd.js +30586 -24322
- package/lib/index.umd.min.js +3 -1
- package/lib/locale/ar-EG.umd.js +948 -0
- package/lib/locale/de-DE.umd.js +948 -0
- package/lib/locale/en-US.umd.js +948 -0
- package/lib/locale/es-ES.umd.js +948 -0
- package/lib/locale/fr-FR.umd.js +948 -0
- package/lib/locale/hu-HU.umd.js +948 -0
- package/lib/locale/hy-AM.umd.js +948 -0
- package/lib/locale/id-ID.umd.js +948 -0
- package/lib/locale/it-IT.umd.js +948 -0
- package/lib/locale/ja-JP.umd.js +948 -0
- package/lib/locale/ko-KR.umd.js +948 -0
- package/lib/locale/lang/ar-EG.js +681 -664
- package/lib/locale/lang/ar-EG.umd.js +913 -892
- package/lib/locale/lang/de-DE.js +681 -664
- package/lib/locale/lang/de-DE.umd.js +913 -892
- package/lib/locale/lang/en-US.js +678 -661
- package/lib/locale/lang/en-US.umd.js +913 -892
- package/lib/locale/lang/es-ES.js +681 -664
- package/lib/locale/lang/es-ES.umd.js +913 -892
- package/lib/locale/lang/fr-FR.js +654 -637
- package/lib/locale/lang/fr-FR.umd.js +913 -892
- package/lib/locale/lang/hu-HU.js +681 -664
- package/lib/locale/lang/hu-HU.umd.js +913 -892
- package/lib/locale/lang/hy-AM.js +681 -664
- package/lib/locale/lang/hy-AM.umd.js +913 -892
- package/lib/locale/lang/id-ID.js +681 -664
- package/lib/locale/lang/id-ID.umd.js +913 -892
- package/lib/locale/lang/it-IT.js +661 -644
- package/lib/locale/lang/it-IT.umd.js +912 -891
- package/lib/locale/lang/ja-JP.js +710 -693
- package/lib/locale/lang/ja-JP.umd.js +913 -892
- package/lib/locale/lang/ko-KR.js +681 -664
- package/lib/locale/lang/ko-KR.umd.js +913 -892
- package/lib/locale/lang/ms-MY.js +681 -664
- package/lib/locale/lang/ms-MY.umd.js +913 -892
- package/lib/locale/lang/nb-NO.js +681 -664
- package/lib/locale/lang/nb-NO.umd.js +913 -892
- package/lib/locale/lang/pt-BR.js +681 -664
- package/lib/locale/lang/pt-BR.umd.js +913 -892
- package/lib/locale/lang/ru-RU.js +690 -673
- package/lib/locale/lang/ru-RU.umd.js +913 -892
- package/lib/locale/lang/th-TH.js +681 -664
- package/lib/locale/lang/th-TH.umd.js +913 -892
- package/lib/locale/lang/ug-CN.js +681 -664
- package/lib/locale/lang/ug-CN.umd.js +913 -892
- package/lib/locale/lang/uk-UA.js +674 -657
- package/lib/locale/lang/uk-UA.umd.js +913 -892
- package/lib/locale/lang/uz-UZ.js +583 -566
- package/lib/locale/lang/uz-UZ.umd.js +908 -887
- package/lib/locale/lang/vi-VN.js +681 -664
- package/lib/locale/lang/vi-VN.umd.js +913 -892
- package/lib/locale/lang/zh-CHT.js +681 -664
- package/lib/locale/lang/zh-CHT.umd.js +913 -892
- package/lib/locale/lang/zh-CN.js +681 -664
- package/lib/locale/lang/zh-CN.umd.js +913 -892
- package/lib/locale/lang/zh-HK.js +928 -7
- package/lib/locale/lang/zh-HK.umd.js +945 -20
- package/lib/locale/lang/zh-MO.js +928 -7
- package/lib/locale/lang/zh-MO.umd.js +945 -20
- package/lib/locale/lang/zh-TC.js +928 -7
- package/lib/locale/lang/zh-TC.umd.js +948 -0
- package/lib/locale/lang/zh-TW.js +928 -7
- package/lib/locale/lang/zh-TW.umd.js +945 -20
- package/lib/locale/ms-MY.umd.js +948 -0
- package/lib/locale/nb-NO.umd.js +948 -0
- package/lib/locale/pt-BR.umd.js +948 -0
- package/lib/locale/ru-RU.umd.js +948 -0
- package/lib/locale/th-TH.umd.js +948 -0
- package/lib/locale/ug-CN.umd.js +948 -0
- package/lib/locale/uk-UA.umd.js +948 -0
- package/lib/locale/uz-UZ.umd.js +948 -0
- package/lib/locale/vi-VN.umd.js +948 -0
- package/lib/locale/zh-CHT.umd.js +948 -0
- package/lib/locale/zh-CN.umd.js +948 -0
- package/lib/locale/zh-HK.umd.js +948 -0
- package/lib/locale/zh-MO.umd.js +948 -0
- package/lib/locale/zh-TC.umd.js +948 -0
- package/lib/locale/zh-TW.umd.js +948 -0
- package/lib/style.css +4501 -1
- package/lib/style.mini.css +1 -0
- package/lib/table/index.js +45 -17
- package/lib/table/module/custom/hook.js +132 -252
- package/lib/table/module/custom/panel.js +919 -970
- package/lib/table/module/edit/hook.js +250 -620
- package/lib/table/module/export/export-panel.js +390 -347
- package/lib/table/module/export/hook.js +745 -1179
- package/lib/table/module/export/import-panel.js +170 -136
- package/lib/table/module/export/util.js +37 -14
- package/lib/table/module/filter/hook.js +127 -227
- package/lib/table/module/filter/panel.js +177 -208
- package/lib/table/module/keyboard/hook.js +93 -172
- package/lib/table/module/menu/hook.js +86 -165
- package/lib/table/module/menu/panel.js +176 -141
- package/lib/table/module/validator/hook.js +164 -271
- package/lib/table/render/index.js +700 -1147
- package/lib/table/src/body.js +426 -559
- package/lib/table/src/cell.js +619 -987
- package/lib/table/src/column.js +55 -30
- package/lib/table/src/columnInfo.js +88 -110
- package/lib/table/src/emits.js +145 -13
- package/lib/table/src/footer.js +181 -240
- package/lib/table/src/group.js +56 -34
- package/lib/table/src/header.js +292 -367
- package/lib/table/src/props.js +27 -12
- package/lib/table/src/store.js +25 -9
- package/lib/table/src/table.js +14179 -1019
- package/lib/table/src/use/cell-view.js +47 -37
- package/lib/table/src/use/index.js +17 -15
- package/lib/table/src/util.js +236 -337
- package/lib/table/style/index.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.mini.css +1 -0
- package/lib/toolbar/index.js +42 -14
- package/lib/toolbar/src/toolbar.js +271 -379
- package/lib/toolbar/style/index.js +1 -1
- package/lib/toolbar/style/{style.min.css → style.mini.css} +1 -1
- package/lib/ui/index.js +153 -195
- package/lib/ui/src/anime.js +49 -29
- package/lib/ui/src/comp.js +23 -6
- package/lib/ui/src/dom.js +114 -147
- package/lib/ui/src/log.js +34 -18
- package/lib/ui/src/utils.js +57 -45
- package/lib/ui/src/vn.js +60 -34
- package/lib/ui/style/index.js +1 -1
- package/lib/v-x-e-table/index.js +35 -19
- package/lib/vxe-colgroup/index.js +35 -19
- package/lib/vxe-colgroup/style/index.js +1 -1
- package/lib/vxe-column/index.js +35 -19
- package/lib/vxe-column/style/index.js +1 -1
- package/lib/vxe-grid/index.js +35 -19
- package/lib/vxe-grid/style/index.js +1 -1
- package/{es/grid/style.min.css → lib/vxe-grid/style/style.mini.css} +1 -1
- package/lib/vxe-table/index.js +35 -19
- package/lib/vxe-table/style/index.js +1 -1
- package/lib/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.mini.css +1 -0
- package/lib/vxe-toolbar/index.js +35 -19
- package/lib/vxe-toolbar/style/index.js +1 -1
- package/lib/vxe-toolbar/style/{style.min.css → style.mini.css} +1 -1
- package/lib/vxe-ui/index.js +35 -19
- package/lib/vxe-ui/style/index.js +1 -1
- package/package.json +8 -4
- 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/module/edit/hook.ts +2 -2
- package/packages/table/src/table.ts +64 -28
- package/packages/ui/index.ts +1 -28
- package/dist/style.min.css +0 -1
- package/es/index.css +0 -1
- package/es/index.min.css +0 -1
- package/es/style.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/emits.min.js +0 -1
- package/lib/grid/src/grid.min.js +0 -1
- package/lib/grid/src/props.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/hook.min.js +0 -1
- package/lib/table/module/custom/panel.min.js +0 -1
- package/lib/table/module/edit/hook.min.js +0 -1
- package/lib/table/module/export/export-panel.min.js +0 -1
- package/lib/table/module/export/hook.min.js +0 -1
- package/lib/table/module/export/import-panel.min.js +0 -1
- package/lib/table/module/export/util.min.js +0 -1
- package/lib/table/module/filter/hook.min.js +0 -1
- package/lib/table/module/filter/panel.min.js +0 -1
- package/lib/table/module/keyboard/hook.min.js +0 -1
- package/lib/table/module/menu/hook.min.js +0 -1
- package/lib/table/module/menu/panel.min.js +0 -1
- package/lib/table/module/validator/hook.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/emits.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/props.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/use/cell-view.min.js +0 -1
- package/lib/table/src/use/index.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 -21
- 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/iconfont.1792740941484.ttf → dist/iconfont.1792977622800.ttf} +0 -0
- /package/{es/iconfont.1792740941484.woff → dist/iconfont.1792977622800.woff} +0 -0
- /package/{es/iconfont.1792740941484.woff2 → dist/iconfont.1792977622800.woff2} +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/{lib/iconfont.1792740941484.ttf → es/iconfont.1792977622800.ttf} +0 -0
- /package/{lib/iconfont.1792740941484.woff → es/iconfont.1792977622800.woff} +0 -0
- /package/{lib/iconfont.1792740941484.woff2 → es/iconfont.1792977622800.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/{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/body.js
CHANGED
|
@@ -1,883 +1,868 @@
|
|
|
1
|
-
import { h, ref, inject, nextTick, onMounted, onUnmounted } from
|
|
2
|
-
import { defineVxeComponent } from
|
|
3
|
-
import XEUtils from
|
|
4
|
-
import { VxeUI } from
|
|
5
|
-
import { getRowid, createHandleGetRowId, getCellRestHeight } from
|
|
6
|
-
import { updateCellTitle, getPropClass } from
|
|
7
|
-
import { isEnableConf, getDefaultConfig, hasEnableConf } from
|
|
8
|
-
import { getSlotVNs } from
|
|
1
|
+
import { h, ref, inject, nextTick, onMounted, onUnmounted } from "vue";
|
|
2
|
+
import { defineVxeComponent } from "../../ui/src/comp";
|
|
3
|
+
import XEUtils from "xe-utils";
|
|
4
|
+
import { VxeUI } from "../../ui";
|
|
5
|
+
import { getRowid, createHandleGetRowId, getCellRestHeight } from "./util";
|
|
6
|
+
import { updateCellTitle, getPropClass } from "../../ui/src/dom";
|
|
7
|
+
import { isEnableConf, getDefaultConfig, hasEnableConf } from "../../ui/src/utils";
|
|
8
|
+
import { getSlotVNs } from "../../ui/src/vn";
|
|
9
9
|
const { getI18n, renderer, renderEmptyElement } = VxeUI;
|
|
10
|
-
const sourceType =
|
|
11
|
-
const renderType =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
const sourceType = "table";
|
|
11
|
+
const renderType = "body";
|
|
12
|
+
var body_default = defineVxeComponent({
|
|
13
|
+
name: "VxeTableBody",
|
|
14
|
+
props: {
|
|
15
|
+
tableData: Array,
|
|
16
|
+
tableColumn: Array,
|
|
17
|
+
fixedColumn: Array,
|
|
18
|
+
fixedType: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
setup(props) {
|
|
24
|
+
const $xeTable = inject("$xeTable", {});
|
|
25
|
+
const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
26
|
+
const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeResizableOpts, computeVirtualXOpts, computeVirtualYOpts, computeIsBodyRenderOptimize, computeRendererOpts } = $xeTable.getComputeMaps();
|
|
27
|
+
const refElem = ref();
|
|
28
|
+
const refBodyScroll = ref();
|
|
29
|
+
const refBodyTable = ref();
|
|
30
|
+
const refBodyColgroup = ref();
|
|
31
|
+
const refBodyTBody = ref();
|
|
32
|
+
const refBodyXSpace = ref();
|
|
33
|
+
const refBodyYSpace = ref();
|
|
34
|
+
const refBodyEmptyBlock = ref();
|
|
35
|
+
const isVMScrollProcess = () => {
|
|
36
|
+
const { delayHover } = tableProps;
|
|
37
|
+
const { isDragResize } = tableReactData;
|
|
38
|
+
const { lastSTime } = tableInternalData;
|
|
39
|
+
return !!(isDragResize || lastSTime && Date.now() < lastSTime + delayHover);
|
|
40
|
+
};
|
|
41
|
+
const renderLine = (rowid, params, cellHeight) => {
|
|
42
|
+
const { column } = params;
|
|
43
|
+
const { treeConfig } = tableProps;
|
|
44
|
+
const cellOpts = computeCellOpts.value;
|
|
45
|
+
const rowOpts = computeRowOpts.value;
|
|
46
|
+
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
47
|
+
const treeOpts = computeTreeOpts.value;
|
|
48
|
+
const { slots, treeNode } = column;
|
|
49
|
+
const { fullAllDataRowIdData } = tableInternalData;
|
|
50
|
+
if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
|
|
51
|
+
if (slots && slots.line) {
|
|
52
|
+
return $xeTable.callSlot(slots.line, params);
|
|
21
53
|
}
|
|
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
|
-
|
|
54
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
55
|
+
let rLevel = 0;
|
|
56
|
+
let prevRow = null;
|
|
57
|
+
let parentRow = null;
|
|
58
|
+
let lineHeight = "";
|
|
59
|
+
if (rowRest) {
|
|
60
|
+
rLevel = rowRest.level;
|
|
61
|
+
prevRow = rowRest.items[rowRest.treeIndex - 1];
|
|
62
|
+
parentRow = rowRest.parent;
|
|
63
|
+
}
|
|
64
|
+
if (!rLevel && !treeOpts.showRootLine) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
if (prevRow) {
|
|
68
|
+
const prevRowRest = fullAllDataRowIdData[getRowid($xeTable, prevRow)] || {};
|
|
69
|
+
lineHeight = `${prevRowRest.lineHeight || 0}px`;
|
|
70
|
+
} else if (rLevel && parentRow) {
|
|
71
|
+
const parentRowRest = fullAllDataRowIdData[getRowid($xeTable, parentRow)] || {};
|
|
72
|
+
lineHeight = `calc(-1em + ${Math.floor(cellHeight / 2 + getCellRestHeight(parentRowRest, cellOpts, rowOpts, defaultRowHeight) / 2)}px)`;
|
|
73
|
+
}
|
|
74
|
+
return [
|
|
75
|
+
h("div", {
|
|
76
|
+
key: "tl",
|
|
77
|
+
class: "vxe-tree--line-wrapper"
|
|
78
|
+
}, [
|
|
79
|
+
h("div", {
|
|
80
|
+
class: "vxe-tree--line",
|
|
81
|
+
style: {
|
|
82
|
+
height: lineHeight,
|
|
83
|
+
bottom: `-${Math.floor(cellHeight / 2)}px`,
|
|
84
|
+
left: `calc(${rLevel * treeOpts.indent}px + 1em)`
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
])
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
return [];
|
|
91
|
+
};
|
|
92
|
+
const renderTdColumn = (seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, columns, items) => {
|
|
93
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
94
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
95
|
+
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
96
|
+
const { tableData, tableColumn, dragRow, overflowX, overflowY, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps, currColFlag } = tableReactData;
|
|
97
|
+
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore, keepUpdateFieldMaps, currentCol } = tableInternalData;
|
|
98
|
+
const cellOpts = computeCellOpts.value;
|
|
99
|
+
const validOpts = computeValidOpts.value;
|
|
100
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
101
|
+
const editOpts = computeEditOpts.value;
|
|
102
|
+
const tooltipOpts = computeTooltipOpts.value;
|
|
103
|
+
const resizableOpts = computeResizableOpts.value;
|
|
104
|
+
const virtualXOpts = computeVirtualXOpts.value;
|
|
105
|
+
const virtualYOpts = computeVirtualYOpts.value;
|
|
106
|
+
const rendererOpts = computeRendererOpts.value;
|
|
107
|
+
const { isAllColumnDrag, isAllRowDrag } = resizableOpts;
|
|
108
|
+
const rowOpts = computeRowOpts.value;
|
|
109
|
+
const rowDragOpts = computeRowDragOpts.value;
|
|
110
|
+
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
111
|
+
const customCellHeight = calcCellHeightFlag ? cellOpts.height || rowOpts.height : 0;
|
|
112
|
+
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = rowDragOpts;
|
|
113
|
+
const columnOpts = computeColumnOpts.value;
|
|
114
|
+
const mouseOpts = computeMouseOpts.value;
|
|
115
|
+
const areaOpts = computeAreaOpts.value;
|
|
116
|
+
const cellOffsetWidth = computeCellOffsetWidth.value;
|
|
117
|
+
const { selectCellToRow } = areaOpts;
|
|
118
|
+
const { field, type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column;
|
|
119
|
+
const { verticalAlign: allVerticalAlign, minHeight, maxHeight } = cellOpts;
|
|
120
|
+
const { actived } = editStore;
|
|
121
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
122
|
+
const colid = column.id;
|
|
123
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
124
|
+
const renderOpts = editRender || cellRender;
|
|
125
|
+
const compConf = renderOpts && renderOpts.name ? rendererOpts[renderOpts.name] || renderer.get(renderOpts.name) : null;
|
|
126
|
+
const compCellClassName = compConf ? compConf.tableCellClassName || compConf.cellClassName : null;
|
|
127
|
+
const compCellStyle = compConf ? compConf.tableCellStyle || compConf.cellStyle : "";
|
|
128
|
+
const showAllTip = tooltipOpts.showAll;
|
|
129
|
+
const columnIndex = colRest.index;
|
|
130
|
+
const _columnIndex = colRest._index;
|
|
131
|
+
const isEdit = isEnableConf(editRender);
|
|
132
|
+
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
133
|
+
let fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
134
|
+
const cellPadding = getDefaultConfig(padding, allPadding === null ? cellOpts.padding : allPadding);
|
|
135
|
+
const isAllCellPadding = cellPadding === true;
|
|
136
|
+
const isCellPaddingTop = cellPadding ? isAllCellPadding || cellPadding.top !== false : false;
|
|
137
|
+
const isCellPaddingBottom = cellPadding ? isAllCellPadding || cellPadding.bottom !== false : false;
|
|
138
|
+
const isCellPaddingLeft = cellPadding ? isAllCellPadding || cellPadding.left !== false : false;
|
|
139
|
+
const isCellPaddingRight = cellPadding ? isAllCellPadding || cellPadding.right !== false : false;
|
|
140
|
+
const cellOverflow = getDefaultConfig(showOverflow, allShowOverflow);
|
|
141
|
+
const showEllipsis = (cellOverflow === true ? tooltipOpts.mode : cellOverflow) === "ellipsis";
|
|
142
|
+
const showTitle = (cellOverflow === true ? tooltipOpts.mode : cellOverflow) === "title";
|
|
143
|
+
const showTooltip = (cellOverflow === true ? tooltipOpts.mode : cellOverflow) === "tooltip";
|
|
144
|
+
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
|
|
145
|
+
const showResizable = XEUtils.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
|
|
146
|
+
const isCsHeight = !!customCellHeight;
|
|
147
|
+
const isRsHeight = resizeHeight > 0;
|
|
148
|
+
let isDirty;
|
|
149
|
+
const tdOns = {};
|
|
150
|
+
const cellAlign = align || (compConf ? compConf.tableCellAlign : "") || allAlign;
|
|
151
|
+
const cellVerticalAlign = XEUtils.eqNull(verticalAlign) ? allVerticalAlign : verticalAlign;
|
|
152
|
+
const errorValidItem = validErrorMaps[`${rowid}:${colid}`];
|
|
153
|
+
const showValidTip = editRules && validOpts.showErrorMessage && (validOpts.message === "default" ? height || tableData.length > 1 : validOpts.message === "inline");
|
|
154
|
+
const tdAttrs = { colid };
|
|
155
|
+
const cellParams = {
|
|
156
|
+
$table: $xeTable,
|
|
157
|
+
$grid: $xeGrid,
|
|
158
|
+
$gantt: $xeGantt,
|
|
159
|
+
isEdit: false,
|
|
160
|
+
seq,
|
|
161
|
+
rowid,
|
|
162
|
+
row,
|
|
163
|
+
rowIndex,
|
|
164
|
+
$rowIndex,
|
|
165
|
+
_rowIndex,
|
|
166
|
+
column,
|
|
167
|
+
columnIndex,
|
|
168
|
+
$columnIndex,
|
|
169
|
+
_columnIndex,
|
|
170
|
+
fixed: fixedType,
|
|
171
|
+
source: sourceType,
|
|
172
|
+
type: renderType,
|
|
173
|
+
isHidden: !!fixedHiddenColumn,
|
|
174
|
+
level: rowLevel,
|
|
175
|
+
visibleData: afterFullData,
|
|
176
|
+
data: tableData,
|
|
177
|
+
items
|
|
178
|
+
};
|
|
179
|
+
let isRowDragCell = false;
|
|
180
|
+
let isDisabledDrag = false;
|
|
181
|
+
if (rowOpts.drag) {
|
|
182
|
+
isRowDragCell = rowDragOpts.trigger === "row" || column.dragSort && rowDragOpts.trigger === "cell";
|
|
183
|
+
}
|
|
184
|
+
if (isRowDragCell) {
|
|
185
|
+
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
186
|
+
}
|
|
187
|
+
if (showTitle || showTooltip || showAllTip || tooltipConfig) {
|
|
188
|
+
tdOns.onMouseover = (evnt) => {
|
|
189
|
+
if (!isVMScrollProcess()) {
|
|
190
|
+
if (showTitle) {
|
|
191
|
+
updateCellTitle(evnt.currentTarget, column);
|
|
192
|
+
} else if (showTooltip || showAllTip) {
|
|
193
|
+
$xeTable.triggerBodyTooltipEvent(evnt, cellParams);
|
|
91
194
|
}
|
|
92
|
-
|
|
195
|
+
}
|
|
196
|
+
$xeTable.dispatchEvent("cell-mouseenter", Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
93
197
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const { columnKey, resizable: allResizable, showOverflow: allShowOverflow, border, height, treeConfig, cellClassName: allCellClassName, cellStyle, align: allAlign, spanMethod, mouseConfig, editConfig, editRules, tooltipConfig, padding: allPadding } = tableProps;
|
|
101
|
-
const { tableData, tableColumn, dragRow, overflowX, overflowY, scrollXLoad, scrollYLoad, mergeBodyFlag, calcCellHeightFlag, resizeHeightFlag, resizeWidthFlag, editStore, isAllOverflow, validErrorMaps, currColFlag } = tableReactData;
|
|
102
|
-
const { fullAllDataRowIdData, fullColumnIdData, mergeBodyCellMaps, visibleColumn, afterFullData, mergeBodyList, scrollXStore, scrollYStore, keepUpdateFieldMaps, currentCol } = tableInternalData;
|
|
103
|
-
const cellOpts = computeCellOpts.value;
|
|
104
|
-
const validOpts = computeValidOpts.value;
|
|
105
|
-
const checkboxOpts = computeCheckboxOpts.value;
|
|
106
|
-
const editOpts = computeEditOpts.value;
|
|
107
|
-
const tooltipOpts = computeTooltipOpts.value;
|
|
108
|
-
const resizableOpts = computeResizableOpts.value;
|
|
109
|
-
const virtualXOpts = computeVirtualXOpts.value;
|
|
110
|
-
const virtualYOpts = computeVirtualYOpts.value;
|
|
111
|
-
const rendererOpts = computeRendererOpts.value;
|
|
112
|
-
const { isAllColumnDrag, isAllRowDrag } = resizableOpts;
|
|
113
|
-
const rowOpts = computeRowOpts.value;
|
|
114
|
-
const rowDragOpts = computeRowDragOpts.value;
|
|
115
|
-
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
116
|
-
const customCellHeight = calcCellHeightFlag ? (cellOpts.height || rowOpts.height) : 0;
|
|
117
|
-
const { disabledMethod: dragDisabledMethod, isCrossDrag, isPeerDrag } = rowDragOpts;
|
|
118
|
-
const columnOpts = computeColumnOpts.value;
|
|
119
|
-
const mouseOpts = computeMouseOpts.value;
|
|
120
|
-
const areaOpts = computeAreaOpts.value;
|
|
121
|
-
const cellOffsetWidth = computeCellOffsetWidth.value;
|
|
122
|
-
const { selectCellToRow } = areaOpts;
|
|
123
|
-
const { field, type, cellRender, editRender, align, showOverflow, className, treeNode, rowResize, padding, verticalAlign, slots } = column;
|
|
124
|
-
const { verticalAlign: allVerticalAlign, minHeight, maxHeight } = cellOpts;
|
|
125
|
-
const { actived } = editStore;
|
|
126
|
-
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
127
|
-
const colid = column.id;
|
|
128
|
-
const colRest = fullColumnIdData[colid] || {};
|
|
129
|
-
const renderOpts = editRender || cellRender;
|
|
130
|
-
const compConf = renderOpts && renderOpts.name ? (rendererOpts[renderOpts.name] || renderer.get(renderOpts.name)) : null;
|
|
131
|
-
const compCellClassName = compConf ? (compConf.tableCellClassName || compConf.cellClassName) : null;
|
|
132
|
-
const compCellStyle = compConf ? (compConf.tableCellStyle || compConf.cellStyle) : '';
|
|
133
|
-
const showAllTip = tooltipOpts.showAll;
|
|
134
|
-
const columnIndex = colRest.index;
|
|
135
|
-
const _columnIndex = colRest._index;
|
|
136
|
-
const isEdit = isEnableConf(editRender);
|
|
137
|
-
const resizeHeight = resizeHeightFlag ? rowRest.resizeHeight : 0;
|
|
138
|
-
let fixedHiddenColumn = overflowX && (fixedType ? column.fixed !== fixedType : !!column.fixed);
|
|
139
|
-
const cellPadding = getDefaultConfig(padding, (allPadding === null ? cellOpts.padding : allPadding));
|
|
140
|
-
const isAllCellPadding = cellPadding === true;
|
|
141
|
-
const isCellPaddingTop = cellPadding ? (isAllCellPadding || cellPadding.top !== false) : false;
|
|
142
|
-
const isCellPaddingBottom = cellPadding ? (isAllCellPadding || cellPadding.bottom !== false) : false;
|
|
143
|
-
const isCellPaddingLeft = cellPadding ? (isAllCellPadding || cellPadding.left !== false) : false;
|
|
144
|
-
const isCellPaddingRight = cellPadding ? (isAllCellPadding || cellPadding.right !== false) : false;
|
|
145
|
-
const cellOverflow = getDefaultConfig(showOverflow, allShowOverflow);
|
|
146
|
-
const showEllipsis = (cellOverflow === true ? tooltipOpts.mode : cellOverflow) === 'ellipsis';
|
|
147
|
-
const showTitle = (cellOverflow === true ? tooltipOpts.mode : cellOverflow) === 'title';
|
|
148
|
-
const showTooltip = (cellOverflow === true ? tooltipOpts.mode : cellOverflow) === 'tooltip';
|
|
149
|
-
const hasEllipsis = isAllOverflow || showTitle || showTooltip || showEllipsis;
|
|
150
|
-
const showResizable = (XEUtils.isBoolean(column.resizable) ? column.resizable : (columnOpts.resizable || allResizable));
|
|
151
|
-
const isCsHeight = !!customCellHeight;
|
|
152
|
-
const isRsHeight = resizeHeight > 0;
|
|
153
|
-
let isDirty;
|
|
154
|
-
const tdOns = {};
|
|
155
|
-
const cellAlign = align || (compConf ? compConf.tableCellAlign : '') || allAlign;
|
|
156
|
-
const cellVerticalAlign = XEUtils.eqNull(verticalAlign) ? allVerticalAlign : verticalAlign;
|
|
157
|
-
const errorValidItem = validErrorMaps[`${rowid}:${colid}`];
|
|
158
|
-
const showValidTip = editRules && validOpts.showErrorMessage && (validOpts.message === 'default' ? (height || tableData.length > 1) : validOpts.message === 'inline');
|
|
159
|
-
const tdAttrs = { colid };
|
|
160
|
-
const cellParams = {
|
|
161
|
-
$table: $xeTable,
|
|
162
|
-
$grid: $xeGrid,
|
|
163
|
-
$gantt: $xeGantt,
|
|
164
|
-
isEdit: false,
|
|
165
|
-
seq,
|
|
166
|
-
rowid,
|
|
167
|
-
row,
|
|
168
|
-
rowIndex,
|
|
169
|
-
$rowIndex,
|
|
170
|
-
_rowIndex,
|
|
171
|
-
column,
|
|
172
|
-
columnIndex,
|
|
173
|
-
$columnIndex,
|
|
174
|
-
_columnIndex,
|
|
175
|
-
fixed: fixedType,
|
|
176
|
-
source: sourceType,
|
|
177
|
-
type: renderType,
|
|
178
|
-
isHidden: !!fixedHiddenColumn,
|
|
179
|
-
level: rowLevel,
|
|
180
|
-
visibleData: afterFullData,
|
|
181
|
-
data: tableData,
|
|
182
|
-
items
|
|
183
|
-
};
|
|
184
|
-
let isRowDragCell = false;
|
|
185
|
-
let isDisabledDrag = false;
|
|
186
|
-
if (rowOpts.drag) {
|
|
187
|
-
isRowDragCell = rowDragOpts.trigger === 'row' || (column.dragSort && rowDragOpts.trigger === 'cell');
|
|
188
|
-
}
|
|
189
|
-
if (isRowDragCell) {
|
|
190
|
-
isDisabledDrag = !!(dragDisabledMethod && dragDisabledMethod(cellParams));
|
|
191
|
-
}
|
|
192
|
-
// hover 进入事件
|
|
193
|
-
if (showTitle || showTooltip || showAllTip || tooltipConfig) {
|
|
194
|
-
tdOns.onMouseover = (evnt) => {
|
|
195
|
-
if (!isVMScrollProcess()) {
|
|
196
|
-
if (showTitle) {
|
|
197
|
-
updateCellTitle(evnt.currentTarget, column);
|
|
198
|
-
}
|
|
199
|
-
else if (showTooltip || showAllTip) {
|
|
200
|
-
// 如果配置了显示 tooltip
|
|
201
|
-
$xeTable.triggerBodyTooltipEvent(evnt, cellParams);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
$xeTable.dispatchEvent('cell-mouseenter', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
// hover 退出事件
|
|
208
|
-
if (showTooltip || showAllTip || tooltipConfig) {
|
|
209
|
-
tdOns.onMouseleave = (evnt) => {
|
|
210
|
-
if (!isVMScrollProcess()) {
|
|
211
|
-
if (showTooltip || showAllTip) {
|
|
212
|
-
$xeTable.handleTargetLeaveEvent(evnt);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
$xeTable.dispatchEvent('cell-mouseleave', Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
// 按下事件处理
|
|
219
|
-
if (isRowDragCell || checkboxOpts.range || hasEnableConf(mouseConfig, mouseOpts)) {
|
|
220
|
-
tdOns.onMousedown = (evnt) => {
|
|
221
|
-
$xeTable.triggerCellMousedownEvent(evnt, cellParams);
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
// 拖拽列事件
|
|
225
|
-
if (isRowDragCell) {
|
|
226
|
-
tdOns.onMouseup = $xeTable.triggerCellMouseupEvent;
|
|
227
|
-
}
|
|
228
|
-
// 点击事件处理
|
|
229
|
-
tdOns.onClick = (evnt) => {
|
|
230
|
-
$xeTable.triggerCellClickEvent(evnt, cellParams);
|
|
231
|
-
};
|
|
232
|
-
// 双击事件处理
|
|
233
|
-
tdOns.onDblclick = (evnt) => {
|
|
234
|
-
$xeTable.triggerCellDblclickEvent(evnt, cellParams);
|
|
235
|
-
};
|
|
236
|
-
let isMergeCell = false;
|
|
237
|
-
let mergeColspan = 1;
|
|
238
|
-
let mergeRowspan = 1;
|
|
239
|
-
// 合并行或列
|
|
240
|
-
if (mergeBodyFlag && mergeBodyList.length) {
|
|
241
|
-
const spanRest = mergeBodyCellMaps[`${_rowIndex}:${_columnIndex}`];
|
|
242
|
-
if (spanRest) {
|
|
243
|
-
const { rowspan, colspan } = spanRest;
|
|
244
|
-
if (!rowspan || !colspan) {
|
|
245
|
-
return renderEmptyElement($xeTable);
|
|
246
|
-
}
|
|
247
|
-
if (rowspan > 1) {
|
|
248
|
-
isMergeCell = true;
|
|
249
|
-
mergeRowspan = rowspan;
|
|
250
|
-
tdAttrs.rowspan = rowspan;
|
|
251
|
-
}
|
|
252
|
-
if (colspan > 1) {
|
|
253
|
-
isMergeCell = true;
|
|
254
|
-
mergeColspan = colspan;
|
|
255
|
-
tdAttrs.colspan = colspan;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
else if (spanMethod) {
|
|
260
|
-
// 自定义合并行或列的方法
|
|
261
|
-
const { rowspan = 1, colspan = 1 } = spanMethod(cellParams) || {};
|
|
262
|
-
if (!rowspan || !colspan) {
|
|
263
|
-
return renderEmptyElement($xeTable);
|
|
264
|
-
}
|
|
265
|
-
if (rowspan > 1) {
|
|
266
|
-
isMergeCell = true;
|
|
267
|
-
mergeRowspan = rowspan;
|
|
268
|
-
tdAttrs.rowspan = rowspan;
|
|
269
|
-
}
|
|
270
|
-
if (colspan > 1) {
|
|
271
|
-
isMergeCell = true;
|
|
272
|
-
mergeColspan = colspan;
|
|
273
|
-
tdAttrs.colspan = colspan;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
// 如果被合并不可隐藏
|
|
277
|
-
if (fixedHiddenColumn && isMergeCell) {
|
|
278
|
-
if (tdAttrs.colspan > 1 || tdAttrs.rowspan > 1) {
|
|
279
|
-
fixedHiddenColumn = false;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
// 如果编辑列开启显示状态
|
|
283
|
-
if (!fixedHiddenColumn && editConfig && (editOpts.showStatus || editOpts.showUpdateStatus) && keepUpdateFieldMaps[field]) {
|
|
284
|
-
isDirty = $xeTable.isUpdateByRow(row, field);
|
|
285
|
-
}
|
|
286
|
-
const isVNAutoHeight = !hasEllipsis && (scrollYLoad || scrollXLoad);
|
|
287
|
-
let cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
288
|
-
const isLastColumn = $columnIndex === columns.length - 1;
|
|
289
|
-
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
|
|
290
|
-
let isVNPreEmptyStatus = false;
|
|
291
|
-
if (!isMergeCell) {
|
|
292
|
-
if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
|
|
293
|
-
if (overflowY && scrollYLoad && tableData.length > 16 && !treeConfig && !virtualYOpts.immediate && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
294
|
-
isVNPreEmptyStatus = true;
|
|
295
|
-
}
|
|
296
|
-
else if (overflowX && scrollXLoad && tableColumn.length > 10 && !virtualXOpts.immediate && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
297
|
-
isVNPreEmptyStatus = true;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
if (mergeRowspan > 1) {
|
|
302
|
-
const mEndRow = afterFullData[_rowIndex + mergeRowspan - 1];
|
|
303
|
-
if (mEndRow) {
|
|
304
|
-
const meRowRest = fullAllDataRowIdData[getRowid($xeTable, mEndRow)];
|
|
305
|
-
if (meRowRest) {
|
|
306
|
-
cellHeight += meRowRest.oTop + getCellRestHeight(meRowRest, cellOpts, rowOpts, defaultRowHeight) - rowRest.oTop - getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
const tcStyle = {};
|
|
311
|
-
if (maxHeight) {
|
|
312
|
-
tcStyle.maxHeight = maxHeight + 'px';
|
|
313
|
-
}
|
|
314
|
-
if (hasEllipsis && resizeWidthFlag) {
|
|
315
|
-
let mergeColWidth = 0;
|
|
316
|
-
if (mergeColspan > 1) {
|
|
317
|
-
for (let index = 1; index < mergeColspan; index++) {
|
|
318
|
-
const nextColumn = visibleColumn[columnIndex + index];
|
|
319
|
-
if (nextColumn) {
|
|
320
|
-
mergeColWidth += nextColumn.renderWidth;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
tcStyle.width = (column.renderWidth + mergeColWidth - cellOffsetWidth) + 'px';
|
|
198
|
+
}
|
|
199
|
+
if (showTooltip || showAllTip || tooltipConfig) {
|
|
200
|
+
tdOns.onMouseleave = (evnt) => {
|
|
201
|
+
if (!isVMScrollProcess()) {
|
|
202
|
+
if (showTooltip || showAllTip) {
|
|
203
|
+
$xeTable.handleTargetLeaveEvent(evnt);
|
|
325
204
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
205
|
+
}
|
|
206
|
+
$xeTable.dispatchEvent("cell-mouseleave", Object.assign({ cell: evnt.currentTarget }, cellParams), evnt);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
if (isRowDragCell || checkboxOpts.range || hasEnableConf(mouseConfig, mouseOpts)) {
|
|
210
|
+
tdOns.onMousedown = (evnt) => {
|
|
211
|
+
$xeTable.triggerCellMousedownEvent(evnt, cellParams);
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
if (isRowDragCell) {
|
|
215
|
+
tdOns.onMouseup = $xeTable.triggerCellMouseupEvent;
|
|
216
|
+
}
|
|
217
|
+
tdOns.onClick = (evnt) => {
|
|
218
|
+
$xeTable.triggerCellClickEvent(evnt, cellParams);
|
|
219
|
+
};
|
|
220
|
+
tdOns.onDblclick = (evnt) => {
|
|
221
|
+
$xeTable.triggerCellDblclickEvent(evnt, cellParams);
|
|
222
|
+
};
|
|
223
|
+
let isMergeCell = false;
|
|
224
|
+
let mergeColspan = 1;
|
|
225
|
+
let mergeRowspan = 1;
|
|
226
|
+
if (mergeBodyFlag && mergeBodyList.length) {
|
|
227
|
+
const spanRest = mergeBodyCellMaps[`${_rowIndex}:${_columnIndex}`];
|
|
228
|
+
if (spanRest) {
|
|
229
|
+
const { rowspan, colspan } = spanRest;
|
|
230
|
+
if (!rowspan || !colspan) {
|
|
231
|
+
return renderEmptyElement($xeTable);
|
|
232
|
+
}
|
|
233
|
+
if (rowspan > 1) {
|
|
234
|
+
isMergeCell = true;
|
|
235
|
+
mergeRowspan = rowspan;
|
|
236
|
+
tdAttrs.rowspan = rowspan;
|
|
237
|
+
}
|
|
238
|
+
if (colspan > 1) {
|
|
239
|
+
isMergeCell = true;
|
|
240
|
+
mergeColspan = colspan;
|
|
241
|
+
tdAttrs.colspan = colspan;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
} else if (spanMethod) {
|
|
245
|
+
const { rowspan = 1, colspan = 1 } = spanMethod(cellParams) || {};
|
|
246
|
+
if (!rowspan || !colspan) {
|
|
247
|
+
return renderEmptyElement($xeTable);
|
|
248
|
+
}
|
|
249
|
+
if (rowspan > 1) {
|
|
250
|
+
isMergeCell = true;
|
|
251
|
+
mergeRowspan = rowspan;
|
|
252
|
+
tdAttrs.rowspan = rowspan;
|
|
253
|
+
}
|
|
254
|
+
if (colspan > 1) {
|
|
255
|
+
isMergeCell = true;
|
|
256
|
+
mergeColspan = colspan;
|
|
257
|
+
tdAttrs.colspan = colspan;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (fixedHiddenColumn && isMergeCell) {
|
|
261
|
+
if (tdAttrs.colspan > 1 || tdAttrs.rowspan > 1) {
|
|
262
|
+
fixedHiddenColumn = false;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (!fixedHiddenColumn && editConfig && (editOpts.showStatus || editOpts.showUpdateStatus) && keepUpdateFieldMaps[field]) {
|
|
266
|
+
isDirty = $xeTable.isUpdateByRow(row, field);
|
|
267
|
+
}
|
|
268
|
+
const isVNAutoHeight = !hasEllipsis && (scrollYLoad || scrollXLoad);
|
|
269
|
+
let cellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
270
|
+
const isLastColumn = $columnIndex === columns.length - 1;
|
|
271
|
+
const isAutoCellWidth = !column.resizeWidth && (column.minWidth === "auto" || column.width === "auto");
|
|
272
|
+
let isVNPreEmptyStatus = false;
|
|
273
|
+
if (!isMergeCell) {
|
|
274
|
+
if (!dragRow || getRowid($xeTable, dragRow) !== rowid) {
|
|
275
|
+
if (overflowY && scrollYLoad && tableData.length > 16 && !treeConfig && !virtualYOpts.immediate && (_rowIndex < scrollYStore.visibleStartIndex - scrollYStore.preloadSize || _rowIndex > scrollYStore.visibleEndIndex + scrollYStore.preloadSize)) {
|
|
276
|
+
isVNPreEmptyStatus = true;
|
|
277
|
+
} else if (overflowX && scrollXLoad && tableColumn.length > 10 && !virtualXOpts.immediate && !column.fixed && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
|
|
278
|
+
isVNPreEmptyStatus = true;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (mergeRowspan > 1) {
|
|
283
|
+
const mEndRow = afterFullData[_rowIndex + mergeRowspan - 1];
|
|
284
|
+
if (mEndRow) {
|
|
285
|
+
const meRowRest = fullAllDataRowIdData[getRowid($xeTable, mEndRow)];
|
|
286
|
+
if (meRowRest) {
|
|
287
|
+
cellHeight += meRowRest.oTop + getCellRestHeight(meRowRest, cellOpts, rowOpts, defaultRowHeight) - rowRest.oTop - getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
const tcStyle = {};
|
|
292
|
+
if (maxHeight) {
|
|
293
|
+
tcStyle.maxHeight = maxHeight + "px";
|
|
294
|
+
}
|
|
295
|
+
if (hasEllipsis && resizeWidthFlag) {
|
|
296
|
+
let mergeColWidth = 0;
|
|
297
|
+
if (mergeColspan > 1) {
|
|
298
|
+
for (let index = 1; index < mergeColspan; index++) {
|
|
299
|
+
const nextColumn = visibleColumn[columnIndex + index];
|
|
300
|
+
if (nextColumn) {
|
|
301
|
+
mergeColWidth += nextColumn.renderWidth;
|
|
400
302
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
tcStyle.width = column.renderWidth + mergeColWidth - cellOffsetWidth + "px";
|
|
306
|
+
}
|
|
307
|
+
if (scrollYLoad || scrollXLoad || hasEllipsis || isCsHeight || isRsHeight) {
|
|
308
|
+
tcStyle.height = cellHeight + "px";
|
|
309
|
+
} else {
|
|
310
|
+
tcStyle.minHeight = cellHeight + "px";
|
|
311
|
+
}
|
|
312
|
+
if (minHeight) {
|
|
313
|
+
tcStyle.minHeight = minHeight + "px";
|
|
314
|
+
}
|
|
315
|
+
const tdVNs = [];
|
|
316
|
+
if (fixedHiddenColumn && isAllOverflow) {
|
|
317
|
+
tdVNs.push(
|
|
318
|
+
h("div", {
|
|
319
|
+
key: "tc",
|
|
320
|
+
class: ["vxe-cell", {
|
|
321
|
+
"c--title": showTitle,
|
|
322
|
+
"c--tooltip": showTooltip,
|
|
323
|
+
"c--ellipsis": showEllipsis
|
|
324
|
+
}],
|
|
325
|
+
style: tcStyle
|
|
326
|
+
})
|
|
327
|
+
);
|
|
328
|
+
} else {
|
|
329
|
+
if (treeConfig) {
|
|
330
|
+
tdVNs.push(...renderLine(rowid, cellParams, cellHeight));
|
|
331
|
+
}
|
|
332
|
+
const clVNs = [];
|
|
333
|
+
if (!isVNPreEmptyStatus) {
|
|
334
|
+
clVNs.push(
|
|
335
|
+
h("div", {
|
|
336
|
+
colid,
|
|
337
|
+
rowid,
|
|
338
|
+
class: "vxe-cell--wrapper vxe-body-cell--wrapper"
|
|
339
|
+
}, column.renderCell(cellParams))
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
tdVNs.push(
|
|
343
|
+
h("div", {
|
|
344
|
+
key: "tc",
|
|
345
|
+
class: ["vxe-cell", {
|
|
346
|
+
"c--title": showTitle,
|
|
347
|
+
"c--tooltip": showTooltip,
|
|
348
|
+
"c--ellipsis": showEllipsis
|
|
349
|
+
}],
|
|
350
|
+
style: tcStyle,
|
|
351
|
+
title: showTitle ? $xeTable.getCellLabel(row, column) : null
|
|
352
|
+
}, clVNs)
|
|
353
|
+
);
|
|
354
|
+
if (showValidTip && errorValidItem) {
|
|
355
|
+
const errRule = errorValidItem.rule;
|
|
356
|
+
const validSlot = slots ? slots.valid : null;
|
|
357
|
+
const validParams = { ...cellParams, ...errorValidItem, rule: errorValidItem };
|
|
358
|
+
tdVNs.push(
|
|
359
|
+
h("div", {
|
|
360
|
+
key: "tcv",
|
|
361
|
+
class: ["vxe-cell--valid-error-tip", getPropClass(validOpts.className, validParams)],
|
|
362
|
+
style: errRule && errRule.maxWidth ? {
|
|
363
|
+
width: errRule.maxWidth + "px"
|
|
364
|
+
} : null
|
|
365
|
+
}, [
|
|
366
|
+
h("div", {
|
|
367
|
+
class: `vxe-cell--valid-error-wrapper vxe-cell--valid-error-theme-${validOpts.theme || "normal"}`
|
|
368
|
+
}, [
|
|
369
|
+
validSlot ? $xeTable.callSlot(validSlot, validParams) : [
|
|
370
|
+
h("span", {
|
|
371
|
+
class: "vxe-cell--valid-error-msg"
|
|
372
|
+
}, errorValidItem.content)
|
|
373
|
+
]
|
|
374
|
+
])
|
|
375
|
+
])
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
let showAreaRowStatus = false;
|
|
380
|
+
if (hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area && !_columnIndex && selectCellToRow) {
|
|
381
|
+
showAreaRowStatus = true;
|
|
382
|
+
}
|
|
383
|
+
if (!fixedHiddenColumn && showResizable && isAllColumnDrag) {
|
|
384
|
+
tdVNs.push(
|
|
385
|
+
h("div", {
|
|
386
|
+
key: "tcc",
|
|
387
|
+
class: ["vxe-cell--col-resizable", {
|
|
388
|
+
"is--line": !border || border === "none"
|
|
389
|
+
}],
|
|
390
|
+
onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
|
|
391
|
+
onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
|
|
392
|
+
})
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
if ((rowResize || isAllRowDrag) && rowOpts.resizable) {
|
|
396
|
+
tdVNs.push(
|
|
397
|
+
h("div", {
|
|
398
|
+
key: "tcr",
|
|
399
|
+
class: "vxe-cell--row-resizable",
|
|
400
|
+
onMousedown: (evnt) => $xeTable.handleRowResizeMousedownEvent(evnt, cellParams),
|
|
401
|
+
onDblclick: (evnt) => $xeTable.handleRowResizeDblclickEvent(evnt, cellParams)
|
|
402
|
+
})
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
return h("td", {
|
|
406
|
+
class: [
|
|
407
|
+
"vxe-table--column vxe-body--column",
|
|
408
|
+
colid,
|
|
409
|
+
cellVerticalAlign ? `col--vertical-${cellVerticalAlign}` : "",
|
|
410
|
+
cellAlign ? `col--${cellAlign}` : "",
|
|
411
|
+
type ? `col--${type}` : "",
|
|
412
|
+
{
|
|
413
|
+
"col--last": isLastColumn,
|
|
414
|
+
"col--tree-node": treeNode,
|
|
415
|
+
"col--edit": isEdit,
|
|
416
|
+
"col--ellipsis": hasEllipsis,
|
|
417
|
+
"col--cs-height": isCsHeight,
|
|
418
|
+
"col--rs-height": isRsHeight,
|
|
419
|
+
"col--to-row": showAreaRowStatus,
|
|
420
|
+
"col--auto-height": isVNAutoHeight,
|
|
421
|
+
"col--max-height": maxHeight,
|
|
422
|
+
"fixed--width": !isAutoCellWidth,
|
|
423
|
+
"fixed--hidden": fixedHiddenColumn,
|
|
424
|
+
"is--pg-top": isCellPaddingTop,
|
|
425
|
+
"is--pg-bottom": isCellPaddingBottom,
|
|
426
|
+
"is--pg-left": isCellPaddingLeft,
|
|
427
|
+
"is--pg-right": isCellPaddingRight,
|
|
428
|
+
"is--progress": fixedHiddenColumn && isAllOverflow || isVNPreEmptyStatus,
|
|
429
|
+
"is--drag-cell": isRowDragCell && (isCrossDrag || isPeerDrag || !rowLevel),
|
|
430
|
+
"is--drag-disabled": isDisabledDrag,
|
|
431
|
+
"col--dirty": isDirty,
|
|
432
|
+
"col--active": editConfig && isEdit && (actived.row === row && (actived.column === column || editOpts.mode === "row")),
|
|
433
|
+
"col--valid-error": !!errorValidItem,
|
|
434
|
+
"show--valid-bg": errorValidItem && validOpts.showErrorBackground,
|
|
435
|
+
"col--current": currColFlag && currentCol === column
|
|
436
|
+
},
|
|
437
|
+
getPropClass(compCellClassName, cellParams),
|
|
438
|
+
getPropClass(className, cellParams),
|
|
439
|
+
getPropClass(allCellClassName, cellParams)
|
|
440
|
+
],
|
|
441
|
+
key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex,
|
|
442
|
+
...tdAttrs,
|
|
443
|
+
style: Object.assign({}, XEUtils.isFunction(compCellStyle) ? compCellStyle(cellParams) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(cellParams) : cellStyle),
|
|
444
|
+
...tdOns
|
|
445
|
+
}, isOptimizeMode && fixedHiddenColumn ? [] : tdVNs);
|
|
446
|
+
};
|
|
447
|
+
const renderRows = (fixedType, isOptimizeMode, tableData, tableColumn) => {
|
|
448
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
449
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
450
|
+
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
|
|
451
|
+
const { hasFixedColumn, treeExpandedFlag, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
|
|
452
|
+
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps, currentRow } = tableInternalData;
|
|
453
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
454
|
+
const radioOpts = computeRadioOpts.value;
|
|
455
|
+
const treeOpts = computeTreeOpts.value;
|
|
456
|
+
const editOpts = computeEditOpts.value;
|
|
457
|
+
const rowOpts = computeRowOpts.value;
|
|
458
|
+
const columnOpts = computeColumnOpts.value;
|
|
459
|
+
const { transform, seqMode } = treeOpts;
|
|
460
|
+
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
461
|
+
const rows = [];
|
|
462
|
+
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
463
|
+
const isDeepRow = treeConfig || isRowGroupStatus;
|
|
464
|
+
tableData.forEach((row, $rowIndex) => {
|
|
465
|
+
const rowid = handleGetRowId(row);
|
|
466
|
+
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
467
|
+
let rowIndex = $rowIndex;
|
|
468
|
+
let rowLevel = 0;
|
|
469
|
+
let seq = -1;
|
|
470
|
+
let _rowIndex = -1;
|
|
471
|
+
const hasRowGroupAggregate = isRowGroupStatus && row.isAggregate;
|
|
472
|
+
const trOn = {};
|
|
473
|
+
if (rowOpts.isHover || highlightHoverRow) {
|
|
474
|
+
trOn.onMouseover = (evnt) => {
|
|
475
|
+
if (isVMScrollProcess()) {
|
|
476
|
+
return;
|
|
410
477
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
onDblclick: (evnt) => $xeTable.handleRowResizeDblclickEvent(evnt, cellParams)
|
|
417
|
-
}));
|
|
478
|
+
$xeTable.triggerHoverEvent(evnt, { row, rowIndex });
|
|
479
|
+
};
|
|
480
|
+
trOn.onMouseleave = () => {
|
|
481
|
+
if (isVMScrollProcess()) {
|
|
482
|
+
return;
|
|
418
483
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
'col--dirty': isDirty,
|
|
445
|
-
'col--active': editConfig && isEdit && (actived.row === row && (actived.column === column || editOpts.mode === 'row')),
|
|
446
|
-
'col--valid-error': !!errorValidItem,
|
|
447
|
-
'show--valid-bg': errorValidItem && validOpts.showErrorBackground,
|
|
448
|
-
'col--current': currColFlag && currentCol === column
|
|
449
|
-
},
|
|
450
|
-
getPropClass(compCellClassName, cellParams),
|
|
451
|
-
getPropClass(className, cellParams),
|
|
452
|
-
getPropClass(allCellClassName, cellParams)
|
|
453
|
-
], key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex }, tdAttrs), { style: Object.assign({}, XEUtils.isFunction(compCellStyle) ? compCellStyle(cellParams) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(cellParams) : cellStyle) }), tdOns), isOptimizeMode && fixedHiddenColumn ? [] : tdVNs);
|
|
454
|
-
};
|
|
455
|
-
const renderRows = (fixedType, isOptimizeMode, tableData, tableColumn) => {
|
|
456
|
-
const $xeGrid = $xeTable.xeGrid;
|
|
457
|
-
const $xeGantt = $xeTable.xeGantt;
|
|
458
|
-
const { stripe, rowKey, highlightHoverRow, rowClassName, rowStyle, editConfig, treeConfig } = tableProps;
|
|
459
|
-
const { hasFixedColumn, treeExpandedFlag, scrollYLoad, isAllOverflow, rowExpandedFlag, expandColumn, selectRadioRow, pendingRowFlag, rowExpandHeightFlag, isRowGroupStatus } = tableReactData;
|
|
460
|
-
const { fullAllDataRowIdData, fullColumnIdData, treeExpandedMaps, pendingRowMaps, rowExpandedMaps, currentRow } = tableInternalData;
|
|
461
|
-
const checkboxOpts = computeCheckboxOpts.value;
|
|
462
|
-
const radioOpts = computeRadioOpts.value;
|
|
463
|
-
const treeOpts = computeTreeOpts.value;
|
|
464
|
-
const editOpts = computeEditOpts.value;
|
|
465
|
-
const rowOpts = computeRowOpts.value;
|
|
466
|
-
const columnOpts = computeColumnOpts.value;
|
|
467
|
-
const { transform, seqMode } = treeOpts;
|
|
468
|
-
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
469
|
-
const rows = [];
|
|
470
|
-
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
471
|
-
const isDeepRow = treeConfig || isRowGroupStatus;
|
|
472
|
-
tableData.forEach((row, $rowIndex) => {
|
|
473
|
-
const rowid = handleGetRowId(row);
|
|
474
|
-
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
475
|
-
let rowIndex = $rowIndex;
|
|
476
|
-
let rowLevel = 0;
|
|
477
|
-
let seq = -1;
|
|
478
|
-
let _rowIndex = -1;
|
|
479
|
-
const hasRowGroupAggregate = isRowGroupStatus && row.isAggregate;
|
|
480
|
-
const trOn = {};
|
|
481
|
-
// 当前行事件
|
|
482
|
-
if (rowOpts.isHover || highlightHoverRow) {
|
|
483
|
-
trOn.onMouseover = (evnt) => {
|
|
484
|
-
if (isVMScrollProcess()) {
|
|
485
|
-
return;
|
|
486
|
-
}
|
|
487
|
-
$xeTable.triggerHoverEvent(evnt, { row, rowIndex });
|
|
488
|
-
};
|
|
489
|
-
trOn.onMouseleave = () => {
|
|
490
|
-
if (isVMScrollProcess()) {
|
|
491
|
-
return;
|
|
492
|
-
}
|
|
493
|
-
$xeTable.clearHoverRow();
|
|
494
|
-
};
|
|
495
|
-
}
|
|
496
|
-
if (rowRest) {
|
|
497
|
-
rowIndex = rowRest.index;
|
|
498
|
-
_rowIndex = rowRest._index;
|
|
499
|
-
rowLevel = rowRest.level;
|
|
500
|
-
seq = rowRest.seq;
|
|
501
|
-
if (hasRowGroupAggregate || (treeConfig && transform && seqMode === 'increasing')) {
|
|
502
|
-
seq = rowRest._index + 1;
|
|
503
|
-
}
|
|
504
|
-
else if ((treeConfig && seqMode === 'fixed')) {
|
|
505
|
-
seq = rowRest._tIndex + 1;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
const params = {
|
|
509
|
-
$table: $xeTable,
|
|
510
|
-
seq,
|
|
511
|
-
rowid,
|
|
512
|
-
fixed: fixedType,
|
|
513
|
-
type: renderType,
|
|
514
|
-
level: rowLevel,
|
|
515
|
-
row,
|
|
516
|
-
rowIndex,
|
|
517
|
-
$rowIndex,
|
|
518
|
-
_rowIndex
|
|
519
|
-
};
|
|
520
|
-
// 行是否被展开
|
|
521
|
-
const isExpandRow = expandColumn && !!rowExpandedFlag && !!rowExpandedMaps[rowid];
|
|
522
|
-
// 树节点是否被展开
|
|
523
|
-
let isExpandTree = false;
|
|
524
|
-
let rowChildren = [];
|
|
525
|
-
let isNewRow = false;
|
|
526
|
-
if (editConfig) {
|
|
527
|
-
isNewRow = $xeTable.isInsertByRow(row);
|
|
528
|
-
}
|
|
529
|
-
if (treeConfig && !scrollYLoad && !transform) {
|
|
530
|
-
rowChildren = row[childrenField];
|
|
531
|
-
isExpandTree = !!treeExpandedFlag && rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid];
|
|
532
|
-
}
|
|
533
|
-
// 拖拽行事件
|
|
534
|
-
if (rowOpts.drag && !isRowGroupStatus && (!treeConfig || transform)) {
|
|
535
|
-
trOn.onDragstart = $xeTable.handleRowDragDragstartEvent;
|
|
536
|
-
trOn.onDragend = $xeTable.handleRowDragDragendEvent;
|
|
537
|
-
trOn.onDragover = $xeTable.handleRowDragDragoverEvent;
|
|
538
|
-
}
|
|
539
|
-
const trClass = [
|
|
540
|
-
'vxe-body--row',
|
|
541
|
-
isDeepRow ? `row--level-${rowLevel}` : '',
|
|
542
|
-
{
|
|
543
|
-
'row--stripe': stripe && (_rowIndex + 1) % 2 === 0,
|
|
544
|
-
'is--new': isNewRow,
|
|
545
|
-
'is--expand-row': isExpandRow,
|
|
546
|
-
'is--expand-tree': isExpandTree,
|
|
547
|
-
'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
548
|
-
'row--radio': radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
|
|
549
|
-
'row--checked': checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
|
|
550
|
-
'row--pending': !!pendingRowFlag && !!pendingRowMaps[rowid],
|
|
551
|
-
'row--group': hasRowGroupAggregate,
|
|
552
|
-
'row--current': currentRow && rowid === getRowid($xeTable, currentRow)
|
|
553
|
-
},
|
|
554
|
-
getPropClass(rowClassName, params)
|
|
555
|
-
];
|
|
556
|
-
const tdVNs = tableColumn.map((column, $columnIndex) => {
|
|
557
|
-
return renderTdColumn(seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
558
|
-
});
|
|
559
|
-
rows.push(h('tr', Object.assign({ class: trClass, rowid: rowid, style: rowStyle ? (XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle) : null, key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex }, trOn), tdVNs));
|
|
560
|
-
// 如果行被展开了
|
|
561
|
-
if (isExpandRow) {
|
|
562
|
-
const expandOpts = computeExpandOpts.value;
|
|
563
|
-
const { height: expandHeight, padding, mode: expandMode } = expandOpts;
|
|
564
|
-
if (expandMode === 'fixed') {
|
|
565
|
-
const currExpHeight = rowRest.expandHeight;
|
|
566
|
-
let expHeight = 0;
|
|
567
|
-
if (rowExpandHeightFlag) {
|
|
568
|
-
if (currExpHeight || expandHeight) {
|
|
569
|
-
expHeight = (currExpHeight || expandHeight || 0) + 1;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
rows.push(h('tr', {
|
|
573
|
-
class: 'vxe-body--row-expanded-place',
|
|
574
|
-
key: `expand_${rowid}`,
|
|
575
|
-
rowid
|
|
576
|
-
}, [
|
|
577
|
-
h('td', {
|
|
578
|
-
class: 'vxe-body--row-expanded-place-column',
|
|
579
|
-
colspan: tableColumn.length,
|
|
580
|
-
style: {
|
|
581
|
-
height: `${expHeight}px`
|
|
582
|
-
}
|
|
583
|
-
})
|
|
584
|
-
]));
|
|
585
|
-
}
|
|
586
|
-
else {
|
|
587
|
-
const cellStyle = {};
|
|
588
|
-
if (expandHeight) {
|
|
589
|
-
cellStyle.height = `${expandHeight}px`;
|
|
590
|
-
}
|
|
591
|
-
if (treeConfig) {
|
|
592
|
-
cellStyle.paddingLeft = `${(rowLevel * treeOpts.indent) + 30}px`;
|
|
593
|
-
}
|
|
594
|
-
const { showOverflow } = expandColumn || {};
|
|
595
|
-
const colid = expandColumn.id;
|
|
596
|
-
const colRest = fullColumnIdData[colid] || {};
|
|
597
|
-
const hasEllipsis = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
598
|
-
let columnIndex = -1;
|
|
599
|
-
let $columnIndex = -1;
|
|
600
|
-
let _columnIndex = -1;
|
|
601
|
-
if (colRest) {
|
|
602
|
-
columnIndex = colRest.index;
|
|
603
|
-
$columnIndex = colRest.$index;
|
|
604
|
-
_columnIndex = colRest._index;
|
|
605
|
-
}
|
|
606
|
-
const expandParams = {
|
|
607
|
-
$table: $xeTable,
|
|
608
|
-
$grid: $xeGrid,
|
|
609
|
-
$gantt: $xeGantt,
|
|
610
|
-
seq,
|
|
611
|
-
column: expandColumn,
|
|
612
|
-
columnIndex,
|
|
613
|
-
$columnIndex,
|
|
614
|
-
_columnIndex,
|
|
615
|
-
fixed: fixedType,
|
|
616
|
-
source: sourceType,
|
|
617
|
-
type: renderType,
|
|
618
|
-
level: rowLevel,
|
|
619
|
-
row,
|
|
620
|
-
rowid,
|
|
621
|
-
rowIndex,
|
|
622
|
-
$rowIndex,
|
|
623
|
-
_rowIndex,
|
|
624
|
-
isHidden: false,
|
|
625
|
-
isEdit: false,
|
|
626
|
-
visibleData: [],
|
|
627
|
-
data: [],
|
|
628
|
-
items: []
|
|
629
|
-
};
|
|
630
|
-
rows.push(h('tr', {
|
|
631
|
-
class: ['vxe-body--expanded-row', {
|
|
632
|
-
'is--padding': padding
|
|
633
|
-
}],
|
|
634
|
-
key: `expand_${rowid}`
|
|
635
|
-
}, [
|
|
636
|
-
h('td', {
|
|
637
|
-
class: ['vxe-body--expanded-column', {
|
|
638
|
-
'fixed--hidden': fixedType && !hasFixedColumn,
|
|
639
|
-
'col--ellipsis': hasEllipsis
|
|
640
|
-
}],
|
|
641
|
-
colspan: tableColumn.length
|
|
642
|
-
}, [
|
|
643
|
-
h('div', {
|
|
644
|
-
class: ['vxe-body--expanded-cell', {
|
|
645
|
-
'is--ellipsis': expandHeight
|
|
646
|
-
}],
|
|
647
|
-
style: cellStyle
|
|
648
|
-
}, [
|
|
649
|
-
expandColumn.renderData(expandParams)
|
|
650
|
-
])
|
|
651
|
-
])
|
|
652
|
-
]));
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
// 如果是树形表格
|
|
656
|
-
if (isExpandTree) {
|
|
657
|
-
rows.push(...renderRows(fixedType, isOptimizeMode, rowChildren, tableColumn));
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
return rows;
|
|
484
|
+
$xeTable.clearHoverRow();
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
if (rowRest) {
|
|
488
|
+
rowIndex = rowRest.index;
|
|
489
|
+
_rowIndex = rowRest._index;
|
|
490
|
+
rowLevel = rowRest.level;
|
|
491
|
+
seq = rowRest.seq;
|
|
492
|
+
if (hasRowGroupAggregate || treeConfig && transform && seqMode === "increasing") {
|
|
493
|
+
seq = rowRest._index + 1;
|
|
494
|
+
} else if (treeConfig && seqMode === "fixed") {
|
|
495
|
+
seq = rowRest._tIndex + 1;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
const params = {
|
|
499
|
+
$table: $xeTable,
|
|
500
|
+
seq,
|
|
501
|
+
rowid,
|
|
502
|
+
fixed: fixedType,
|
|
503
|
+
type: renderType,
|
|
504
|
+
level: rowLevel,
|
|
505
|
+
row,
|
|
506
|
+
rowIndex,
|
|
507
|
+
$rowIndex,
|
|
508
|
+
_rowIndex
|
|
661
509
|
};
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
510
|
+
const isExpandRow = expandColumn && !!rowExpandedFlag && !!rowExpandedMaps[rowid];
|
|
511
|
+
let isExpandTree = false;
|
|
512
|
+
let rowChildren = [];
|
|
513
|
+
let isNewRow = false;
|
|
514
|
+
if (editConfig) {
|
|
515
|
+
isNewRow = $xeTable.isInsertByRow(row);
|
|
516
|
+
}
|
|
517
|
+
if (treeConfig && !scrollYLoad && !transform) {
|
|
518
|
+
rowChildren = row[childrenField];
|
|
519
|
+
isExpandTree = !!treeExpandedFlag && rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid];
|
|
520
|
+
}
|
|
521
|
+
if (rowOpts.drag && !isRowGroupStatus && (!treeConfig || transform)) {
|
|
522
|
+
trOn.onDragstart = $xeTable.handleRowDragDragstartEvent;
|
|
523
|
+
trOn.onDragend = $xeTable.handleRowDragDragendEvent;
|
|
524
|
+
trOn.onDragover = $xeTable.handleRowDragDragoverEvent;
|
|
525
|
+
}
|
|
526
|
+
const trClass = [
|
|
527
|
+
"vxe-body--row",
|
|
528
|
+
isDeepRow ? `row--level-${rowLevel}` : "",
|
|
529
|
+
{
|
|
530
|
+
"row--stripe": stripe && (_rowIndex + 1) % 2 === 0,
|
|
531
|
+
"is--new": isNewRow,
|
|
532
|
+
"is--expand-row": isExpandRow,
|
|
533
|
+
"is--expand-tree": isExpandTree,
|
|
534
|
+
"row--new": isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
|
|
535
|
+
"row--radio": radioOpts.highlight && $xeTable.eqRow(selectRadioRow, row),
|
|
536
|
+
"row--checked": checkboxOpts.highlight && $xeTable.isCheckedByCheckboxRow(row),
|
|
537
|
+
"row--pending": !!pendingRowFlag && !!pendingRowMaps[rowid],
|
|
538
|
+
"row--group": hasRowGroupAggregate,
|
|
539
|
+
"row--current": currentRow && rowid === getRowid($xeTable, currentRow)
|
|
540
|
+
},
|
|
541
|
+
getPropClass(rowClassName, params)
|
|
542
|
+
];
|
|
543
|
+
const tdVNs = tableColumn.map((column, $columnIndex) => {
|
|
544
|
+
return renderTdColumn(seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
|
|
689
545
|
});
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
546
|
+
rows.push(
|
|
547
|
+
h("tr", {
|
|
548
|
+
class: trClass,
|
|
549
|
+
rowid,
|
|
550
|
+
style: rowStyle ? XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
|
|
551
|
+
key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
|
|
552
|
+
...trOn
|
|
553
|
+
}, tdVNs)
|
|
554
|
+
);
|
|
555
|
+
if (isExpandRow) {
|
|
556
|
+
const expandOpts = computeExpandOpts.value;
|
|
557
|
+
const { height: expandHeight, padding, mode: expandMode } = expandOpts;
|
|
558
|
+
if (expandMode === "fixed") {
|
|
559
|
+
const currExpHeight = rowRest.expandHeight;
|
|
560
|
+
let expHeight = 0;
|
|
561
|
+
if (rowExpandHeightFlag) {
|
|
562
|
+
if (currExpHeight || expandHeight) {
|
|
563
|
+
expHeight = (currExpHeight || expandHeight || 0) + 1;
|
|
564
|
+
}
|
|
706
565
|
}
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
}
|
|
566
|
+
rows.push(
|
|
567
|
+
h("tr", {
|
|
568
|
+
class: "vxe-body--row-expanded-place",
|
|
569
|
+
key: `expand_${rowid}`,
|
|
570
|
+
rowid
|
|
571
|
+
}, [
|
|
572
|
+
h("td", {
|
|
573
|
+
class: "vxe-body--row-expanded-place-column",
|
|
574
|
+
colspan: tableColumn.length,
|
|
575
|
+
style: {
|
|
576
|
+
height: `${expHeight}px`
|
|
577
|
+
}
|
|
578
|
+
})
|
|
579
|
+
])
|
|
580
|
+
);
|
|
581
|
+
} else {
|
|
582
|
+
const cellStyle = {};
|
|
583
|
+
if (expandHeight) {
|
|
584
|
+
cellStyle.height = `${expandHeight}px`;
|
|
711
585
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
if (renderDataList.length > 2) {
|
|
715
|
-
const dRowRest = fullAllDataRowIdData[getRowid($xeTable, dragRow)];
|
|
716
|
-
if (dRowRest) {
|
|
717
|
-
const drIndex = dRowRest._index;
|
|
718
|
-
const firstRow = renderDataList[0];
|
|
719
|
-
const lastRow = renderDataList[renderDataList.length - 1];
|
|
720
|
-
const firstRowRest = fullAllDataRowIdData[getRowid($xeTable, firstRow)];
|
|
721
|
-
const lastRowRest = fullAllDataRowIdData[getRowid($xeTable, lastRow)];
|
|
722
|
-
if (firstRowRest && lastRowRest) {
|
|
723
|
-
const frIndex = firstRowRest._index;
|
|
724
|
-
const lrIndex = lastRowRest._index;
|
|
725
|
-
if (drIndex < frIndex) {
|
|
726
|
-
renderDataList = [dragRow].concat(renderDataList);
|
|
727
|
-
}
|
|
728
|
-
else if (drIndex > lrIndex) {
|
|
729
|
-
renderDataList = renderDataList.concat([dragRow]);
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
}
|
|
586
|
+
if (treeConfig) {
|
|
587
|
+
cellStyle.paddingLeft = `${rowLevel * treeOpts.indent + 30}px`;
|
|
734
588
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
if (firstColRest && lastColRest) {
|
|
747
|
-
const fcIndex = firstColRest._index;
|
|
748
|
-
const lcIndex = lastColRest._index;
|
|
749
|
-
if (dcIndex < fcIndex) {
|
|
750
|
-
renderColumnList = [dragCol].concat(renderColumnList);
|
|
751
|
-
}
|
|
752
|
-
else if (dcIndex > lcIndex) {
|
|
753
|
-
renderColumnList = renderColumnList.concat([dragCol]);
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
}
|
|
589
|
+
const { showOverflow } = expandColumn || {};
|
|
590
|
+
const colid = expandColumn.id;
|
|
591
|
+
const colRest = fullColumnIdData[colid] || {};
|
|
592
|
+
const hasEllipsis = XEUtils.eqNull(showOverflow) ? isAllOverflow : showOverflow;
|
|
593
|
+
let columnIndex = -1;
|
|
594
|
+
let $columnIndex = -1;
|
|
595
|
+
let _columnIndex = -1;
|
|
596
|
+
if (colRest) {
|
|
597
|
+
columnIndex = colRest.index;
|
|
598
|
+
$columnIndex = colRest.$index;
|
|
599
|
+
_columnIndex = colRest._index;
|
|
759
600
|
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
601
|
+
const expandParams = {
|
|
602
|
+
$table: $xeTable,
|
|
603
|
+
$grid: $xeGrid,
|
|
604
|
+
$gantt: $xeGantt,
|
|
605
|
+
seq,
|
|
606
|
+
column: expandColumn,
|
|
607
|
+
columnIndex,
|
|
608
|
+
$columnIndex,
|
|
609
|
+
_columnIndex,
|
|
610
|
+
fixed: fixedType,
|
|
611
|
+
source: sourceType,
|
|
612
|
+
type: renderType,
|
|
613
|
+
level: rowLevel,
|
|
614
|
+
row,
|
|
615
|
+
rowid,
|
|
616
|
+
rowIndex,
|
|
617
|
+
$rowIndex,
|
|
618
|
+
_rowIndex,
|
|
619
|
+
isHidden: false,
|
|
620
|
+
isEdit: false,
|
|
621
|
+
visibleData: [],
|
|
622
|
+
data: [],
|
|
623
|
+
items: []
|
|
624
|
+
};
|
|
625
|
+
rows.push(
|
|
626
|
+
h("tr", {
|
|
627
|
+
class: ["vxe-body--expanded-row", {
|
|
628
|
+
"is--padding": padding
|
|
629
|
+
}],
|
|
630
|
+
key: `expand_${rowid}`
|
|
631
|
+
}, [
|
|
632
|
+
h("td", {
|
|
633
|
+
class: ["vxe-body--expanded-column", {
|
|
634
|
+
"fixed--hidden": fixedType && !hasFixedColumn,
|
|
635
|
+
"col--ellipsis": hasEllipsis
|
|
636
|
+
}],
|
|
637
|
+
colspan: tableColumn.length
|
|
638
|
+
}, [
|
|
639
|
+
h("div", {
|
|
640
|
+
class: ["vxe-body--expanded-cell", {
|
|
641
|
+
"is--ellipsis": expandHeight
|
|
642
|
+
}],
|
|
643
|
+
style: cellStyle
|
|
644
|
+
}, [
|
|
645
|
+
expandColumn.renderData(expandParams)
|
|
646
|
+
])
|
|
647
|
+
])
|
|
648
|
+
])
|
|
649
|
+
);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (isExpandTree) {
|
|
653
|
+
rows.push(...renderRows(fixedType, isOptimizeMode, rowChildren, tableColumn));
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
return rows;
|
|
657
|
+
};
|
|
658
|
+
onMounted(() => {
|
|
659
|
+
nextTick(() => {
|
|
660
|
+
const { fixedType } = props;
|
|
661
|
+
const { elemStore } = tableInternalData;
|
|
662
|
+
const prefix = `${fixedType || "main"}-body-`;
|
|
663
|
+
elemStore[`${prefix}wrapper`] = refElem;
|
|
664
|
+
elemStore[`${prefix}scroll`] = refBodyScroll;
|
|
665
|
+
elemStore[`${prefix}table`] = refBodyTable;
|
|
666
|
+
elemStore[`${prefix}colgroup`] = refBodyColgroup;
|
|
667
|
+
elemStore[`${prefix}list`] = refBodyTBody;
|
|
668
|
+
elemStore[`${prefix}xSpace`] = refBodyXSpace;
|
|
669
|
+
elemStore[`${prefix}ySpace`] = refBodyYSpace;
|
|
670
|
+
elemStore[`${prefix}emptyBlock`] = refBodyEmptyBlock;
|
|
671
|
+
});
|
|
672
|
+
});
|
|
673
|
+
onUnmounted(() => {
|
|
674
|
+
const { fixedType } = props;
|
|
675
|
+
const { elemStore } = tableInternalData;
|
|
676
|
+
const prefix = `${fixedType || "main"}-body-`;
|
|
677
|
+
elemStore[`${prefix}wrapper`] = null;
|
|
678
|
+
elemStore[`${prefix}scroll`] = null;
|
|
679
|
+
elemStore[`${prefix}table`] = null;
|
|
680
|
+
elemStore[`${prefix}colgroup`] = null;
|
|
681
|
+
elemStore[`${prefix}list`] = null;
|
|
682
|
+
elemStore[`${prefix}xSpace`] = null;
|
|
683
|
+
elemStore[`${prefix}ySpace`] = null;
|
|
684
|
+
elemStore[`${prefix}emptyBlock`] = null;
|
|
685
|
+
});
|
|
686
|
+
const renderVN = () => {
|
|
687
|
+
const { slots } = tableContext;
|
|
688
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
689
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
690
|
+
const { fixedColumn, fixedType, tableColumn } = props;
|
|
691
|
+
const { mouseConfig } = tableProps;
|
|
692
|
+
const { isGroup, tableData, isColLoading, overflowX, scrollXLoad, scrollYLoad, dragRow, dragCol } = tableReactData;
|
|
693
|
+
const { visibleColumn, fullAllDataRowIdData, fullColumnIdData } = tableInternalData;
|
|
694
|
+
const emptyOpts = computeEmptyOpts.value;
|
|
695
|
+
const mouseOpts = computeMouseOpts.value;
|
|
696
|
+
const isBodyRenderOptimize = computeIsBodyRenderOptimize.value;
|
|
697
|
+
let renderDataList = tableData;
|
|
698
|
+
let renderColumnList = tableColumn;
|
|
699
|
+
const isOptimizeMode = isBodyRenderOptimize;
|
|
700
|
+
if (!isColLoading && (fixedType || !overflowX)) {
|
|
701
|
+
renderColumnList = visibleColumn;
|
|
702
|
+
}
|
|
703
|
+
if (fixedType) {
|
|
704
|
+
if (isOptimizeMode) {
|
|
705
|
+
renderColumnList = fixedColumn || [];
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
if (scrollYLoad && dragRow) {
|
|
709
|
+
if (renderDataList.length > 2) {
|
|
710
|
+
const dRowRest = fullAllDataRowIdData[getRowid($xeTable, dragRow)];
|
|
711
|
+
if (dRowRest) {
|
|
712
|
+
const drIndex = dRowRest._index;
|
|
713
|
+
const firstRow = renderDataList[0];
|
|
714
|
+
const lastRow = renderDataList[renderDataList.length - 1];
|
|
715
|
+
const firstRowRest = fullAllDataRowIdData[getRowid($xeTable, firstRow)];
|
|
716
|
+
const lastRowRest = fullAllDataRowIdData[getRowid($xeTable, lastRow)];
|
|
717
|
+
if (firstRowRest && lastRowRest) {
|
|
718
|
+
const frIndex = firstRowRest._index;
|
|
719
|
+
const lrIndex = lastRowRest._index;
|
|
720
|
+
if (drIndex < frIndex) {
|
|
721
|
+
renderDataList = [dragRow].concat(renderDataList);
|
|
722
|
+
} else if (drIndex > lrIndex) {
|
|
723
|
+
renderDataList = renderDataList.concat([dragRow]);
|
|
724
|
+
}
|
|
765
725
|
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
if (!fixedType && !isGroup) {
|
|
730
|
+
if (scrollXLoad && dragCol) {
|
|
731
|
+
if (renderColumnList.length > 2) {
|
|
732
|
+
const dCowRest = fullColumnIdData[dragCol.id];
|
|
733
|
+
if (dCowRest) {
|
|
734
|
+
const dcIndex = dCowRest._index;
|
|
735
|
+
const firstCol = renderColumnList[0];
|
|
736
|
+
const lastCol = renderColumnList[renderColumnList.length - 1];
|
|
737
|
+
const firstColRest = fullColumnIdData[firstCol.id];
|
|
738
|
+
const lastColRest = fullColumnIdData[lastCol.id];
|
|
739
|
+
if (firstColRest && lastColRest) {
|
|
740
|
+
const fcIndex = firstColRest._index;
|
|
741
|
+
const lcIndex = lastColRest._index;
|
|
742
|
+
if (dcIndex < fcIndex) {
|
|
743
|
+
renderColumnList = [dragCol].concat(renderColumnList);
|
|
744
|
+
} else if (dcIndex > lcIndex) {
|
|
745
|
+
renderColumnList = renderColumnList.concat([dragCol]);
|
|
775
746
|
}
|
|
747
|
+
}
|
|
776
748
|
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
let emptyContent;
|
|
753
|
+
const emptySlot = slots ? slots.empty : null;
|
|
754
|
+
const emptyParams = { $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt };
|
|
755
|
+
if (emptySlot) {
|
|
756
|
+
emptyContent = $xeTable.callSlot(emptySlot, emptyParams);
|
|
757
|
+
} else {
|
|
758
|
+
const rendererOpts = computeRendererOpts.value;
|
|
759
|
+
const compConf = emptyOpts.name ? rendererOpts[emptyOpts.name] || renderer.get(emptyOpts.name) : null;
|
|
760
|
+
const rtEmptyView = compConf ? compConf.renderTableEmpty || compConf.renderTableEmptyView || compConf.renderEmpty : null;
|
|
761
|
+
if (rtEmptyView) {
|
|
762
|
+
emptyContent = getSlotVNs(rtEmptyView(emptyOpts, emptyParams));
|
|
763
|
+
} else {
|
|
764
|
+
emptyContent = tableProps.emptyText || getI18n("vxe.table.emptyText");
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
return h("div", {
|
|
768
|
+
ref: refElem,
|
|
769
|
+
class: ["vxe-table--body-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
|
|
770
|
+
xid: xID
|
|
771
|
+
}, [
|
|
772
|
+
h("div", {
|
|
773
|
+
ref: refBodyScroll,
|
|
774
|
+
class: "vxe-table--body-inner-wrapper",
|
|
775
|
+
onScroll(evnt) {
|
|
776
|
+
$xeTable.triggerBodyScrollEvent(evnt, fixedType);
|
|
777
|
+
}
|
|
778
|
+
}, [
|
|
779
|
+
fixedType ? renderEmptyElement($xeTable) : h("div", {
|
|
780
|
+
ref: refBodyXSpace,
|
|
781
|
+
class: "vxe-body--x-space"
|
|
782
|
+
}),
|
|
783
|
+
h("div", {
|
|
784
|
+
ref: refBodyYSpace,
|
|
785
|
+
class: "vxe-body--y-space"
|
|
786
|
+
}),
|
|
787
|
+
h("table", {
|
|
788
|
+
ref: refBodyTable,
|
|
789
|
+
class: "vxe-table--body",
|
|
790
|
+
xid: xID,
|
|
791
|
+
cellspacing: 0,
|
|
792
|
+
cellpadding: 0,
|
|
793
|
+
border: 0,
|
|
794
|
+
xvm: isOptimizeMode ? "1" : null
|
|
795
|
+
}, [
|
|
796
|
+
/**
|
|
797
|
+
* 列宽
|
|
798
|
+
*/
|
|
799
|
+
h("colgroup", {
|
|
800
|
+
ref: refBodyColgroup
|
|
801
|
+
}, renderColumnList.map((column, $columnIndex) => {
|
|
802
|
+
return h("col", {
|
|
803
|
+
name: column.id,
|
|
804
|
+
key: $columnIndex,
|
|
805
|
+
style: {
|
|
806
|
+
width: `${column.renderWidth}px`
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
})),
|
|
810
|
+
/**
|
|
811
|
+
* 内容
|
|
812
|
+
*/
|
|
813
|
+
h("tbody", {
|
|
814
|
+
ref: refBodyTBody
|
|
815
|
+
}, renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList))
|
|
816
|
+
]),
|
|
817
|
+
h("div", {
|
|
818
|
+
class: "vxe-table--checkbox-range"
|
|
819
|
+
}),
|
|
820
|
+
hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? h("div", {
|
|
821
|
+
class: "vxe-table--cell-area",
|
|
822
|
+
xid: xID
|
|
823
|
+
}, [
|
|
824
|
+
h("span", {
|
|
825
|
+
class: "vxe-table--cell-main-area"
|
|
826
|
+
}, mouseOpts.extension ? [
|
|
827
|
+
h("span", {
|
|
828
|
+
class: "vxe-table--cell-main-area-btn",
|
|
829
|
+
onMousedown(evnt) {
|
|
830
|
+
if ($xeTable.triggerCellAreaExtendMousedownEvent) {
|
|
831
|
+
$xeTable.triggerCellAreaExtendMousedownEvent(evnt, { $table: $xeTable, fixed: fixedType, type: renderType });
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
})
|
|
835
|
+
] : []),
|
|
836
|
+
h("span", {
|
|
837
|
+
class: "vxe-table--cell-clip-area"
|
|
838
|
+
}),
|
|
839
|
+
h("span", {
|
|
840
|
+
class: "vxe-table--cell-extend-area"
|
|
841
|
+
}),
|
|
842
|
+
h("span", {
|
|
843
|
+
class: "vxe-table--cell-multi-area"
|
|
844
|
+
}),
|
|
845
|
+
h("span", {
|
|
846
|
+
class: "vxe-table--cell-active-area"
|
|
847
|
+
}),
|
|
848
|
+
h("span", {
|
|
849
|
+
class: "vxe-table--cell-row-status-area"
|
|
850
|
+
})
|
|
851
|
+
]) : renderEmptyElement($xeTable),
|
|
852
|
+
!fixedType ? h("div", {
|
|
853
|
+
class: "vxe-table--empty-block",
|
|
854
|
+
ref: refBodyEmptyBlock
|
|
855
|
+
}, [
|
|
856
|
+
h("div", {
|
|
857
|
+
class: "vxe-table--empty-content"
|
|
858
|
+
}, emptyContent)
|
|
859
|
+
]) : renderEmptyElement($xeTable)
|
|
860
|
+
])
|
|
861
|
+
]);
|
|
862
|
+
};
|
|
863
|
+
return renderVN;
|
|
864
|
+
}
|
|
883
865
|
});
|
|
866
|
+
export {
|
|
867
|
+
body_default as default
|
|
868
|
+
};
|