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/lib/table/src/cell.js
CHANGED
|
@@ -1,261 +1,232 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty
|
|
4
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var cell_exports = {};
|
|
30
|
+
__export(cell_exports, {
|
|
31
|
+
Cell: () => Cell,
|
|
32
|
+
default: () => cell_default
|
|
5
33
|
});
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
const {
|
|
16
|
-
getConfig,
|
|
17
|
-
getI18n,
|
|
18
|
-
getIcon,
|
|
19
|
-
renderer,
|
|
20
|
-
renderEmptyElement
|
|
21
|
-
} = _ui.VxeUI;
|
|
34
|
+
module.exports = __toCommonJS(cell_exports);
|
|
35
|
+
var import_vue = require("vue");
|
|
36
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
37
|
+
var import_ui = require("../../ui");
|
|
38
|
+
var import_utils = require("../../ui/src/utils");
|
|
39
|
+
var import_dom = require("../../ui/src/dom");
|
|
40
|
+
var import_util = require("./util");
|
|
41
|
+
var import_vn = require("../../ui/src/vn");
|
|
42
|
+
const { getConfig, getI18n, getIcon, renderer, renderEmptyElement } = import_ui.VxeUI;
|
|
22
43
|
function renderTitlePrefixIcon(params) {
|
|
23
|
-
const {
|
|
24
|
-
$table,
|
|
25
|
-
column
|
|
26
|
-
} = params;
|
|
44
|
+
const { $table, column } = params;
|
|
27
45
|
const titlePrefix = column.titlePrefix || column.titleHelp;
|
|
28
46
|
if (titlePrefix) {
|
|
29
|
-
return (0,
|
|
30
|
-
class: [
|
|
47
|
+
return (0, import_vue.h)("span", {
|
|
48
|
+
class: ["vxe-cell-title-prefix-icon", titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ""],
|
|
31
49
|
onMouseenter(evnt) {
|
|
32
50
|
$table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
|
|
33
51
|
},
|
|
34
52
|
onMouseleave(evnt) {
|
|
35
53
|
$table.handleTargetLeaveEvent(evnt);
|
|
36
54
|
}
|
|
37
|
-
}, [
|
|
38
|
-
|
|
39
|
-
|
|
55
|
+
}, [
|
|
56
|
+
(0, import_vue.h)("i", {
|
|
57
|
+
class: titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX
|
|
58
|
+
})
|
|
59
|
+
]);
|
|
40
60
|
}
|
|
41
61
|
return renderEmptyElement($table);
|
|
42
62
|
}
|
|
43
63
|
function renderTitleSuffixIcon(params) {
|
|
44
|
-
const {
|
|
45
|
-
$table,
|
|
46
|
-
column
|
|
47
|
-
} = params;
|
|
64
|
+
const { $table, column } = params;
|
|
48
65
|
const titleSuffix = column.titleSuffix;
|
|
49
66
|
if (titleSuffix) {
|
|
50
|
-
return (0,
|
|
51
|
-
class: [
|
|
67
|
+
return (0, import_vue.h)("span", {
|
|
68
|
+
class: ["vxe-cell-title-suffix-icon", titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ""],
|
|
52
69
|
onMouseenter(evnt) {
|
|
53
70
|
$table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
|
|
54
71
|
},
|
|
55
72
|
onMouseleave(evnt) {
|
|
56
73
|
$table.handleTargetLeaveEvent(evnt);
|
|
57
74
|
}
|
|
58
|
-
}, [
|
|
59
|
-
|
|
60
|
-
|
|
75
|
+
}, [
|
|
76
|
+
(0, import_vue.h)("i", {
|
|
77
|
+
class: titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX
|
|
78
|
+
})
|
|
79
|
+
]);
|
|
61
80
|
}
|
|
62
81
|
return renderEmptyElement($table);
|
|
63
82
|
}
|
|
64
83
|
function renderCellDragIcon(params) {
|
|
65
|
-
const {
|
|
66
|
-
|
|
67
|
-
column
|
|
68
|
-
} = params;
|
|
69
|
-
const {
|
|
70
|
-
context
|
|
71
|
-
} = $table;
|
|
84
|
+
const { $table, column } = params;
|
|
85
|
+
const { context } = $table;
|
|
72
86
|
const tableSlots = context.slots;
|
|
73
87
|
const tableProps = $table.props;
|
|
74
|
-
const {
|
|
75
|
-
|
|
76
|
-
} =
|
|
77
|
-
const {
|
|
78
|
-
dragConfig
|
|
79
|
-
} = tableProps;
|
|
80
|
-
const {
|
|
81
|
-
computeRowDragOpts
|
|
82
|
-
} = $table.getComputeMaps();
|
|
88
|
+
const { slots } = column;
|
|
89
|
+
const { dragConfig } = tableProps;
|
|
90
|
+
const { computeRowDragOpts } = $table.getComputeMaps();
|
|
83
91
|
const rowDragOpts = computeRowDragOpts.value;
|
|
84
|
-
const {
|
|
85
|
-
icon,
|
|
86
|
-
trigger,
|
|
87
|
-
disabledMethod
|
|
88
|
-
} = rowDragOpts;
|
|
92
|
+
const { icon, trigger, disabledMethod } = rowDragOpts;
|
|
89
93
|
const rDisabledMethod = disabledMethod || (dragConfig ? dragConfig.rowDisabledMethod : null);
|
|
90
94
|
const isDisabled = rDisabledMethod && rDisabledMethod(params);
|
|
91
|
-
const rowDragIconSlot = (slots ? slots.rowDragIcon || slots[
|
|
95
|
+
const rowDragIconSlot = (slots ? slots.rowDragIcon || slots["row-drag-icon"] : null) || tableSlots.rowDragIcon || tableSlots["row-drag-icon"];
|
|
92
96
|
const ons = {};
|
|
93
|
-
if (trigger !==
|
|
94
|
-
ons.onMousedown = evnt => {
|
|
97
|
+
if (trigger !== "cell") {
|
|
98
|
+
ons.onMousedown = (evnt) => {
|
|
95
99
|
if (!isDisabled) {
|
|
96
100
|
$table.handleCellDragMousedownEvent(evnt, params);
|
|
97
101
|
}
|
|
98
102
|
};
|
|
99
103
|
ons.onMouseup = $table.handleCellDragMouseupEvent;
|
|
100
104
|
}
|
|
101
|
-
return (0,
|
|
102
|
-
key:
|
|
103
|
-
class: [
|
|
104
|
-
|
|
105
|
-
}]
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
return (0, import_vue.h)("span", {
|
|
106
|
+
key: "dg",
|
|
107
|
+
class: ["vxe-cell--drag-handle", {
|
|
108
|
+
"is--disabled": isDisabled
|
|
109
|
+
}],
|
|
110
|
+
...ons
|
|
111
|
+
}, rowDragIconSlot ? $table.callSlot(rowDragIconSlot, params) : [
|
|
112
|
+
(0, import_vue.h)("i", {
|
|
113
|
+
class: icon || (dragConfig ? dragConfig.rowIcon : "") || getIcon().TABLE_DRAG_ROW
|
|
114
|
+
})
|
|
115
|
+
]);
|
|
109
116
|
}
|
|
110
117
|
function renderCellBaseVNs(params, content) {
|
|
111
|
-
const {
|
|
112
|
-
|
|
113
|
-
column,
|
|
114
|
-
level
|
|
115
|
-
} = params;
|
|
116
|
-
const {
|
|
117
|
-
dragSort
|
|
118
|
-
} = column;
|
|
118
|
+
const { $table, column, level } = params;
|
|
119
|
+
const { dragSort } = column;
|
|
119
120
|
const tableProps = $table.props;
|
|
120
|
-
const {
|
|
121
|
-
|
|
122
|
-
dragConfig
|
|
123
|
-
} = tableProps;
|
|
124
|
-
const {
|
|
125
|
-
computeRowOpts,
|
|
126
|
-
computeRowDragOpts,
|
|
127
|
-
computeTreeOpts
|
|
128
|
-
} = $table.getComputeMaps();
|
|
121
|
+
const { treeConfig, dragConfig } = tableProps;
|
|
122
|
+
const { computeRowOpts, computeRowDragOpts, computeTreeOpts } = $table.getComputeMaps();
|
|
129
123
|
const rowOpts = computeRowOpts.value;
|
|
130
124
|
const rowDragOpts = computeRowDragOpts.value;
|
|
131
125
|
const treeOpts = computeTreeOpts.value;
|
|
132
|
-
const {
|
|
133
|
-
showIcon,
|
|
134
|
-
isPeerDrag,
|
|
135
|
-
isCrossDrag,
|
|
136
|
-
visibleMethod
|
|
137
|
-
} = rowDragOpts;
|
|
126
|
+
const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts;
|
|
138
127
|
const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
|
|
139
128
|
const vns = [];
|
|
140
|
-
if (dragSort && rowOpts.drag && (showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params))) {
|
|
129
|
+
if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
|
|
141
130
|
if (treeConfig) {
|
|
142
131
|
if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
|
|
143
|
-
vns.push(
|
|
132
|
+
vns.push(
|
|
133
|
+
renderCellDragIcon(params)
|
|
134
|
+
);
|
|
144
135
|
}
|
|
145
136
|
} else {
|
|
146
|
-
vns.push(
|
|
137
|
+
vns.push(
|
|
138
|
+
renderCellDragIcon(params)
|
|
139
|
+
);
|
|
147
140
|
}
|
|
148
141
|
}
|
|
149
|
-
return vns.concat(
|
|
142
|
+
return vns.concat(import_xe_utils.default.isArray(content) ? content : [content]);
|
|
150
143
|
}
|
|
151
144
|
function renderHeaderCellDragIcon(params) {
|
|
152
|
-
const {
|
|
153
|
-
|
|
154
|
-
column
|
|
155
|
-
} = params;
|
|
156
|
-
const {
|
|
157
|
-
context
|
|
158
|
-
} = $table;
|
|
145
|
+
const { $table, column } = params;
|
|
146
|
+
const { context } = $table;
|
|
159
147
|
const tableSlots = context.slots;
|
|
160
|
-
const {
|
|
161
|
-
|
|
162
|
-
} = column;
|
|
163
|
-
const {
|
|
164
|
-
computeColumnOpts,
|
|
165
|
-
computeColumnDragOpts
|
|
166
|
-
} = $table.getComputeMaps();
|
|
148
|
+
const { slots } = column;
|
|
149
|
+
const { computeColumnOpts, computeColumnDragOpts } = $table.getComputeMaps();
|
|
167
150
|
const columnOpts = computeColumnOpts.value;
|
|
168
151
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
169
|
-
const {
|
|
170
|
-
showIcon,
|
|
171
|
-
icon,
|
|
172
|
-
trigger,
|
|
173
|
-
isPeerDrag,
|
|
174
|
-
isCrossDrag,
|
|
175
|
-
visibleMethod,
|
|
176
|
-
disabledMethod
|
|
177
|
-
} = columnDragOpts;
|
|
152
|
+
const { showIcon, icon, trigger, isPeerDrag, isCrossDrag, visibleMethod, disabledMethod } = columnDragOpts;
|
|
178
153
|
if (columnOpts.drag && showIcon && (!visibleMethod || visibleMethod(params))) {
|
|
179
154
|
if (!column.fixed && (isPeerDrag || isCrossDrag || !column.parentId)) {
|
|
180
155
|
const isDisabled = disabledMethod && disabledMethod(params);
|
|
181
|
-
const columnDragIconSlot = (slots ? slots.columnDragIcon || slots[
|
|
156
|
+
const columnDragIconSlot = (slots ? slots.columnDragIcon || slots["column-drag-icon"] : null) || tableSlots.columnDragIcon || tableSlots["column-drag-icon"];
|
|
182
157
|
const ons = {};
|
|
183
|
-
if (trigger !==
|
|
184
|
-
ons.onMousedown = evnt => {
|
|
158
|
+
if (trigger !== "cell") {
|
|
159
|
+
ons.onMousedown = (evnt) => {
|
|
185
160
|
if (!isDisabled) {
|
|
186
161
|
$table.handleHeaderCellDragMousedownEvent(evnt, params);
|
|
187
162
|
}
|
|
188
163
|
};
|
|
189
164
|
ons.onMouseup = $table.handleHeaderCellDragMouseupEvent;
|
|
190
165
|
}
|
|
191
|
-
return (0,
|
|
192
|
-
key:
|
|
193
|
-
class: [
|
|
194
|
-
|
|
195
|
-
}]
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
166
|
+
return (0, import_vue.h)("span", {
|
|
167
|
+
key: "dg",
|
|
168
|
+
class: ["vxe-cell--drag-handle", {
|
|
169
|
+
"is--disabled": isDisabled
|
|
170
|
+
}],
|
|
171
|
+
...ons
|
|
172
|
+
}, columnDragIconSlot ? $table.callSlot(columnDragIconSlot, params) : [
|
|
173
|
+
(0, import_vue.h)("i", {
|
|
174
|
+
class: icon || getIcon().TABLE_DRAG_COLUMN
|
|
175
|
+
})
|
|
176
|
+
]);
|
|
199
177
|
}
|
|
200
178
|
}
|
|
201
179
|
return renderEmptyElement($table);
|
|
202
180
|
}
|
|
203
181
|
function renderHeaderCellBaseVNs(params, content) {
|
|
204
|
-
const vns = [
|
|
182
|
+
const vns = [
|
|
183
|
+
renderTitlePrefixIcon(params),
|
|
184
|
+
renderHeaderCellDragIcon(params),
|
|
185
|
+
...import_xe_utils.default.isArray(content) ? content : [content],
|
|
186
|
+
renderTitleSuffixIcon(params)
|
|
187
|
+
];
|
|
205
188
|
return vns;
|
|
206
189
|
}
|
|
207
190
|
function getRenderDefaultColumnTitle(column, content) {
|
|
208
|
-
if (column.type ===
|
|
209
|
-
return (0,
|
|
210
|
-
key:
|
|
191
|
+
if (column.type === "html" && import_xe_utils.default.isString(content)) {
|
|
192
|
+
return (0, import_vue.h)("span", {
|
|
193
|
+
key: "ch",
|
|
211
194
|
innerHTML: content
|
|
212
195
|
});
|
|
213
196
|
}
|
|
214
|
-
return (0,
|
|
215
|
-
key:
|
|
216
|
-
}, (0,
|
|
197
|
+
return (0, import_vue.h)("span", {
|
|
198
|
+
key: "ct"
|
|
199
|
+
}, (0, import_vn.getSlotVNs)(content));
|
|
217
200
|
}
|
|
218
201
|
function renderTitleContent(params, content) {
|
|
219
|
-
const {
|
|
220
|
-
$table,
|
|
221
|
-
column
|
|
222
|
-
} = params;
|
|
202
|
+
const { $table, column } = params;
|
|
223
203
|
const tableProps = $table.props;
|
|
224
204
|
const tableReactData = $table.reactData;
|
|
225
|
-
const {
|
|
226
|
-
|
|
227
|
-
} =
|
|
228
|
-
const {
|
|
229
|
-
showHeaderOverflow: allColumnHeaderOverflow
|
|
230
|
-
} = tableProps;
|
|
231
|
-
const {
|
|
232
|
-
isRowGroupStatus
|
|
233
|
-
} = tableReactData;
|
|
234
|
-
const {
|
|
235
|
-
showHeaderOverflow,
|
|
236
|
-
slots
|
|
237
|
-
} = column;
|
|
205
|
+
const { computeHeaderTooltipOpts } = $table.getComputeMaps();
|
|
206
|
+
const { showHeaderOverflow: allColumnHeaderOverflow } = tableProps;
|
|
207
|
+
const { isRowGroupStatus } = tableReactData;
|
|
208
|
+
const { showHeaderOverflow, slots } = column;
|
|
238
209
|
const titleSlot = slots ? slots.title : null;
|
|
239
210
|
const headerTooltipOpts = computeHeaderTooltipOpts.value;
|
|
240
211
|
const showAllTip = headerTooltipOpts.showAll;
|
|
241
|
-
const headOverflow =
|
|
242
|
-
const showTitle = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) ===
|
|
243
|
-
const showTooltip = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) ===
|
|
212
|
+
const headOverflow = import_xe_utils.default.eqNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
213
|
+
const showTitle = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) === "title";
|
|
214
|
+
const showTooltip = (headOverflow === true ? headerTooltipOpts.mode : headOverflow) === "tooltip";
|
|
244
215
|
const ons = {};
|
|
245
216
|
if (showTitle || showTooltip || showAllTip) {
|
|
246
|
-
ons.onMouseenter = evnt => {
|
|
217
|
+
ons.onMouseenter = (evnt) => {
|
|
247
218
|
if (tableReactData.isDragResize) {
|
|
248
219
|
return;
|
|
249
220
|
}
|
|
250
221
|
if (showTitle) {
|
|
251
|
-
(0,
|
|
222
|
+
(0, import_dom.updateCellTitle)(evnt.currentTarget, column);
|
|
252
223
|
} else if (showTooltip || showAllTip) {
|
|
253
224
|
$table.triggerHeaderTooltipEvent(evnt, params);
|
|
254
225
|
}
|
|
255
226
|
};
|
|
256
227
|
}
|
|
257
228
|
if (showTooltip || showAllTip) {
|
|
258
|
-
ons.onMouseleave = evnt => {
|
|
229
|
+
ons.onMouseleave = (evnt) => {
|
|
259
230
|
if (tableReactData.isDragResize) {
|
|
260
231
|
return;
|
|
261
232
|
}
|
|
@@ -265,38 +236,31 @@ function renderTitleContent(params, content) {
|
|
|
265
236
|
};
|
|
266
237
|
}
|
|
267
238
|
const titleVN = getRenderDefaultColumnTitle(column, content);
|
|
268
|
-
return [
|
|
269
|
-
|
|
270
|
-
|
|
239
|
+
return [
|
|
240
|
+
(0, import_vue.h)("span", {
|
|
241
|
+
class: "vxe-cell--title",
|
|
242
|
+
...ons
|
|
243
|
+
}, isRowGroupStatus && column.aggFunc && $table.getPivotTableAggregateRenderColTitles ? $table.getPivotTableAggregateRenderColTitles(column, titleVN) : titleSlot ? $table.callSlot(titleSlot, params) : [
|
|
244
|
+
titleVN
|
|
245
|
+
])
|
|
246
|
+
];
|
|
271
247
|
}
|
|
272
248
|
function getFooterContent(params) {
|
|
273
|
-
const {
|
|
274
|
-
$table,
|
|
275
|
-
column,
|
|
276
|
-
row
|
|
277
|
-
} = params;
|
|
249
|
+
const { $table, column, row } = params;
|
|
278
250
|
const tableProps = $table.props;
|
|
279
|
-
const {
|
|
280
|
-
|
|
281
|
-
} = tableProps;
|
|
282
|
-
const {
|
|
283
|
-
slots,
|
|
284
|
-
editRender,
|
|
285
|
-
cellRender
|
|
286
|
-
} = column;
|
|
251
|
+
const { editConfig } = tableProps;
|
|
252
|
+
const { slots, editRender, cellRender } = column;
|
|
287
253
|
const footerSlot = slots ? slots.footer : null;
|
|
288
254
|
if (footerSlot) {
|
|
289
255
|
return $table.callSlot(footerSlot, params);
|
|
290
256
|
}
|
|
291
|
-
const isEnableEdit = editConfig && (0,
|
|
292
|
-
const editRenderOpts = isEnableEdit && (0,
|
|
293
|
-
const cellRenderOpts = (0,
|
|
257
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
258
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
259
|
+
const cellRenderOpts = (0, import_utils.isEnableConf)(cellRender) ? cellRender : null;
|
|
294
260
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
295
261
|
const itemValue = $table.getFooterCellLabel(row, column);
|
|
296
262
|
if (renderOpts) {
|
|
297
|
-
const {
|
|
298
|
-
computeRendererOpts
|
|
299
|
-
} = $table.getComputeMaps();
|
|
263
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
300
264
|
const rendererOpts = computeRendererOpts.value;
|
|
301
265
|
const compConf = renderOpts.name ? rendererOpts[renderOpts.name] || renderer.get(renderOpts.name) : null;
|
|
302
266
|
if (compConf) {
|
|
@@ -306,104 +270,71 @@ function getFooterContent(params) {
|
|
|
306
270
|
cellValue: itemValue,
|
|
307
271
|
itemValue
|
|
308
272
|
});
|
|
309
|
-
return (0,
|
|
273
|
+
return (0, import_vn.getSlotVNs)(rtFooter(renderOpts, footParams));
|
|
310
274
|
}
|
|
311
275
|
}
|
|
312
276
|
}
|
|
313
|
-
return [
|
|
314
|
-
|
|
315
|
-
|
|
277
|
+
return [
|
|
278
|
+
(0, import_vue.h)("span", {
|
|
279
|
+
class: "vxe-cell--label"
|
|
280
|
+
}, (0, import_utils.formatText)(itemValue, 1))
|
|
281
|
+
];
|
|
316
282
|
}
|
|
317
283
|
function getDefaultCellLabel(params) {
|
|
318
|
-
const {
|
|
319
|
-
|
|
320
|
-
row,
|
|
321
|
-
column
|
|
322
|
-
} = params;
|
|
323
|
-
return (0, _utils.formatText)($table.getCellLabel(row, column), 1);
|
|
284
|
+
const { $table, row, column } = params;
|
|
285
|
+
return (0, import_utils.formatText)($table.getCellLabel(row, column), 1);
|
|
324
286
|
}
|
|
325
287
|
function renderCellHandle(params) {
|
|
326
|
-
const {
|
|
327
|
-
column,
|
|
328
|
-
row,
|
|
329
|
-
$table
|
|
330
|
-
} = params;
|
|
288
|
+
const { column, row, $table } = params;
|
|
331
289
|
const tableProps = $table.props;
|
|
332
290
|
const tableReactData = $table.reactData;
|
|
333
|
-
const {
|
|
334
|
-
|
|
335
|
-
} =
|
|
336
|
-
const {
|
|
337
|
-
editConfig
|
|
338
|
-
} = tableProps;
|
|
339
|
-
const {
|
|
340
|
-
type,
|
|
341
|
-
treeNode,
|
|
342
|
-
rowGroupNode,
|
|
343
|
-
editRender
|
|
344
|
-
} = column;
|
|
345
|
-
const {
|
|
346
|
-
computeEditOpts,
|
|
347
|
-
computeCheckboxOpts,
|
|
348
|
-
computeAggregateOpts
|
|
349
|
-
} = $table.getComputeMaps();
|
|
291
|
+
const { isRowGroupStatus } = tableReactData;
|
|
292
|
+
const { editConfig } = tableProps;
|
|
293
|
+
const { type, treeNode, rowGroupNode, editRender } = column;
|
|
294
|
+
const { computeEditOpts, computeCheckboxOpts, computeAggregateOpts } = $table.getComputeMaps();
|
|
350
295
|
const aggregateOpts = computeAggregateOpts.value;
|
|
351
|
-
const {
|
|
352
|
-
mode
|
|
353
|
-
} = aggregateOpts;
|
|
296
|
+
const { mode } = aggregateOpts;
|
|
354
297
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
355
298
|
const editOpts = computeEditOpts.value;
|
|
356
|
-
const isDeepCell = treeNode || isRowGroupStatus && (mode ===
|
|
299
|
+
const isDeepCell = treeNode || isRowGroupStatus && (mode === "column" ? column.field === row.groupField : rowGroupNode);
|
|
357
300
|
switch (type) {
|
|
358
|
-
case
|
|
301
|
+
case "seq":
|
|
359
302
|
return isDeepCell ? Cell.renderDeepIndexCell(params) : Cell.renderSeqCell(params);
|
|
360
|
-
case
|
|
303
|
+
case "radio":
|
|
361
304
|
return isDeepCell ? Cell.renderDeepRadioCell(params) : Cell.renderRadioCell(params);
|
|
362
|
-
case
|
|
305
|
+
case "checkbox":
|
|
363
306
|
return checkboxOpts.checkField ? isDeepCell ? Cell.renderDeepSelectionCellByProp(params) : Cell.renderCheckboxCellByProp(params) : isDeepCell ? Cell.renderDeepSelectionCell(params) : Cell.renderCheckboxCell(params);
|
|
364
|
-
case
|
|
307
|
+
case "expand":
|
|
365
308
|
return Cell.renderExpandCell(params);
|
|
366
|
-
case
|
|
309
|
+
case "html":
|
|
367
310
|
return isDeepCell ? Cell.renderDeepHTMLCell(params) : Cell.renderHTMLCell(params);
|
|
368
311
|
}
|
|
369
|
-
const isEnableEdit = editConfig && (0,
|
|
370
|
-
const editRenderOpts = isEnableEdit && (0,
|
|
312
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
313
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
371
314
|
if (editRenderOpts) {
|
|
372
|
-
return editOpts.mode ===
|
|
315
|
+
return editOpts.mode === "cell" ? isDeepCell ? Cell.renderDeepCellEdit(params) : Cell.renderCellEdit(params) : isDeepCell ? Cell.renderDeepRowEdit(params) : Cell.renderRowEdit(params);
|
|
373
316
|
}
|
|
374
317
|
return isDeepCell ? Cell.renderDeepCell(params) : Cell.renderDefaultCell(params);
|
|
375
318
|
}
|
|
376
319
|
function renderHeaderHandle(params) {
|
|
377
|
-
const {
|
|
378
|
-
column,
|
|
379
|
-
$table
|
|
380
|
-
} = params;
|
|
320
|
+
const { column, $table } = params;
|
|
381
321
|
const tableProps = $table.props;
|
|
382
|
-
const {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
const {
|
|
386
|
-
type,
|
|
387
|
-
filters,
|
|
388
|
-
sortable,
|
|
389
|
-
editRender,
|
|
390
|
-
slots
|
|
391
|
-
} = column;
|
|
392
|
-
// 兼容已废弃方式
|
|
393
|
-
if (getConfig().tableHeadeSlotToTitleSlot !== 'obsolete') {
|
|
322
|
+
const { editConfig } = tableProps;
|
|
323
|
+
const { type, filters, sortable, editRender, slots } = column;
|
|
324
|
+
if (getConfig().tableHeadeSlotToTitleSlot !== "obsolete") {
|
|
394
325
|
const headerSlot = slots ? slots.header : null;
|
|
395
326
|
if (headerSlot) {
|
|
396
327
|
return renderTitleContent(params, $table.callSlot(headerSlot, params));
|
|
397
328
|
}
|
|
398
329
|
}
|
|
399
330
|
switch (type) {
|
|
400
|
-
case
|
|
331
|
+
case "seq":
|
|
401
332
|
return Cell.renderSeqHeader(params);
|
|
402
|
-
case
|
|
333
|
+
case "radio":
|
|
403
334
|
return Cell.renderRadioHeader(params);
|
|
404
|
-
case
|
|
335
|
+
case "checkbox":
|
|
405
336
|
return Cell.renderCheckboxHeader(params);
|
|
406
|
-
case
|
|
337
|
+
case "html":
|
|
407
338
|
if (filters && sortable) {
|
|
408
339
|
return Cell.renderSortAndFilterHeader(params);
|
|
409
340
|
} else if (sortable) {
|
|
@@ -413,8 +344,8 @@ function renderHeaderHandle(params) {
|
|
|
413
344
|
}
|
|
414
345
|
break;
|
|
415
346
|
}
|
|
416
|
-
const isEnableEdit = editConfig && (0,
|
|
417
|
-
const editRenderOpts = isEnableEdit && (0,
|
|
347
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
348
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
418
349
|
if (editRenderOpts) {
|
|
419
350
|
return Cell.renderEditHeader(params);
|
|
420
351
|
} else if (filters && sortable) {
|
|
@@ -429,59 +360,45 @@ function renderHeaderHandle(params) {
|
|
|
429
360
|
function renderFooterHandle(params) {
|
|
430
361
|
return Cell.renderDefaultFooter(params);
|
|
431
362
|
}
|
|
432
|
-
const Cell =
|
|
363
|
+
const Cell = {
|
|
433
364
|
createColumn($xeTable, columnOpts) {
|
|
434
|
-
const {
|
|
435
|
-
type
|
|
436
|
-
} = columnOpts;
|
|
365
|
+
const { type } = columnOpts;
|
|
437
366
|
const renConfs = {
|
|
438
367
|
renderHeader: renderHeaderHandle,
|
|
439
368
|
renderCell: renderCellHandle,
|
|
440
369
|
renderFooter: renderFooterHandle
|
|
441
370
|
};
|
|
442
|
-
if (type ===
|
|
371
|
+
if (type === "expand") {
|
|
443
372
|
renConfs.renderData = Cell.renderExpandData;
|
|
444
373
|
}
|
|
445
|
-
return (0,
|
|
374
|
+
return (0, import_util.createColumn)($xeTable, columnOpts, renConfs);
|
|
446
375
|
},
|
|
447
376
|
/**
|
|
448
377
|
* 列头标题
|
|
449
378
|
*/
|
|
450
379
|
renderHeaderTitle(params) {
|
|
451
|
-
const {
|
|
452
|
-
$table,
|
|
453
|
-
column
|
|
454
|
-
} = params;
|
|
380
|
+
const { $table, column } = params;
|
|
455
381
|
const tableProps = $table.props;
|
|
456
|
-
const {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
editRender,
|
|
462
|
-
cellRender
|
|
463
|
-
} = column;
|
|
464
|
-
const isEnableEdit = editConfig && (0, _utils.isEnableConf)(editConfig);
|
|
465
|
-
const editRenderOpts = isEnableEdit && (0, _utils.isEnableConf)(editRender) ? editRender : null;
|
|
466
|
-
const cellRenderOpts = (0, _utils.isEnableConf)(cellRender) ? cellRender : null;
|
|
382
|
+
const { editConfig } = tableProps;
|
|
383
|
+
const { slots, editRender, cellRender } = column;
|
|
384
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
385
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
386
|
+
const cellRenderOpts = (0, import_utils.isEnableConf)(cellRender) ? cellRender : null;
|
|
467
387
|
const renderOpts = editRenderOpts || cellRenderOpts;
|
|
468
|
-
|
|
469
|
-
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
388
|
+
if (getConfig().tableHeadeSlotToTitleSlot === "obsolete") {
|
|
470
389
|
const headerSlot = slots ? slots.header : null;
|
|
471
390
|
if (headerSlot) {
|
|
472
391
|
return renderTitleContent(params, $table.callSlot(headerSlot, params));
|
|
473
392
|
}
|
|
474
393
|
}
|
|
475
394
|
if (renderOpts) {
|
|
476
|
-
const {
|
|
477
|
-
computeRendererOpts
|
|
478
|
-
} = $table.getComputeMaps();
|
|
395
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
479
396
|
const rendererOpts = computeRendererOpts.value;
|
|
480
397
|
const compConf = renderOpts.name ? rendererOpts[renderOpts.name] || renderer.get(renderOpts.name) : null;
|
|
481
398
|
if (compConf) {
|
|
482
399
|
const rtHeader = compConf.renderTableHeader || compConf.renderHeader;
|
|
483
400
|
if (rtHeader) {
|
|
484
|
-
return renderTitleContent(params, (0,
|
|
401
|
+
return renderTitleContent(params, (0, import_vn.getSlotVNs)(rtHeader(renderOpts, params)));
|
|
485
402
|
}
|
|
486
403
|
}
|
|
487
404
|
}
|
|
@@ -491,53 +408,26 @@ const Cell = exports.Cell = {
|
|
|
491
408
|
return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params));
|
|
492
409
|
},
|
|
493
410
|
renderDefaultCell(params) {
|
|
494
|
-
const {
|
|
495
|
-
$table,
|
|
496
|
-
row,
|
|
497
|
-
column
|
|
498
|
-
} = params;
|
|
411
|
+
const { $table, row, column } = params;
|
|
499
412
|
const tableProps = $table.props;
|
|
500
413
|
const tableReactData = $table.reactData;
|
|
501
414
|
const tableInternalData = $table.internalData;
|
|
502
|
-
const {
|
|
503
|
-
|
|
504
|
-
} =
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
const {
|
|
509
|
-
field,
|
|
510
|
-
slots,
|
|
511
|
-
editRender,
|
|
512
|
-
cellRender,
|
|
513
|
-
rowGroupNode,
|
|
514
|
-
aggFunc
|
|
515
|
-
} = column;
|
|
516
|
-
const isEnableEdit = editConfig && (0, _utils.isEnableConf)(editConfig);
|
|
517
|
-
const editRenderOpts = isEnableEdit && (0, _utils.isEnableConf)(editRender) ? editRender : null;
|
|
518
|
-
const cellRenderOpts = (0, _utils.isEnableConf)(cellRender) ? cellRender : null;
|
|
415
|
+
const { isRowGroupStatus } = tableReactData;
|
|
416
|
+
const { editConfig } = tableProps;
|
|
417
|
+
const { field, slots, editRender, cellRender, rowGroupNode, aggFunc } = column;
|
|
418
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
419
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
420
|
+
const cellRenderOpts = (0, import_utils.isEnableConf)(cellRender) ? cellRender : null;
|
|
519
421
|
const defaultSlot = slots ? slots.default : null;
|
|
520
|
-
const gcSlot = slots ? slots.groupContent || slots[
|
|
521
|
-
const gvSlot = slots ? slots.groupValues || slots[
|
|
522
|
-
let cellValue =
|
|
422
|
+
const gcSlot = slots ? slots.groupContent || slots["group-content"] : null;
|
|
423
|
+
const gvSlot = slots ? slots.groupValues || slots["group-values"] : null;
|
|
424
|
+
let cellValue = "";
|
|
523
425
|
if (isRowGroupStatus && field && row.isAggregate) {
|
|
524
426
|
const aggRow = row;
|
|
525
|
-
const {
|
|
526
|
-
|
|
527
|
-
} = tableInternalData;
|
|
528
|
-
const {
|
|
529
|
-
computeAggregateOpts
|
|
530
|
-
} = $table.getComputeMaps();
|
|
427
|
+
const { fullColumnFieldData } = tableInternalData;
|
|
428
|
+
const { computeAggregateOpts } = $table.getComputeMaps();
|
|
531
429
|
const aggregateOpts = computeAggregateOpts.value;
|
|
532
|
-
const {
|
|
533
|
-
mode,
|
|
534
|
-
showTotal,
|
|
535
|
-
totalMethod,
|
|
536
|
-
countFields,
|
|
537
|
-
contentMethod,
|
|
538
|
-
formatValuesMethod,
|
|
539
|
-
mapChildrenField
|
|
540
|
-
} = aggregateOpts;
|
|
430
|
+
const { mode, showTotal, totalMethod, countFields, contentMethod, formatValuesMethod, mapChildrenField } = aggregateOpts;
|
|
541
431
|
const aggData = aggRow.aggData;
|
|
542
432
|
const currAggData = aggData ? aggData[field] : null;
|
|
543
433
|
const groupField = aggRow.groupField;
|
|
@@ -565,32 +455,22 @@ const Cell = exports.Cell = {
|
|
|
565
455
|
*/
|
|
566
456
|
totalValue: childCount
|
|
567
457
|
};
|
|
568
|
-
if (mode ===
|
|
458
|
+
if (mode === "column" ? field === aggRow.groupField : rowGroupNode) {
|
|
569
459
|
cellValue = groupContent;
|
|
570
460
|
if (contentMethod) {
|
|
571
461
|
cellValue = `${contentMethod(ctParams)}`;
|
|
572
462
|
}
|
|
573
463
|
if (showTotal) {
|
|
574
|
-
cellValue = getI18n(
|
|
464
|
+
cellValue = getI18n("vxe.table.rowGroupContentTotal", [cellValue, totalMethod ? totalMethod(ctParams) : childCount, childCount]);
|
|
575
465
|
}
|
|
576
466
|
if (gcSlot) {
|
|
577
|
-
return renderCellBaseVNs(params, $table.callSlot(gcSlot, Object.assign({
|
|
578
|
-
groupField,
|
|
579
|
-
groupContent,
|
|
580
|
-
childList,
|
|
581
|
-
childCount
|
|
582
|
-
}, params)));
|
|
467
|
+
return renderCellBaseVNs(params, $table.callSlot(gcSlot, Object.assign({ groupField, groupContent, childList, childCount }, params)));
|
|
583
468
|
}
|
|
584
469
|
} else if ($table.getPivotTableAggregateCellAggValue) {
|
|
585
470
|
cellValue = $table.getPivotTableAggregateCellAggValue(params);
|
|
586
471
|
ctParams.aggValue = cellValue;
|
|
587
472
|
if (gvSlot) {
|
|
588
|
-
return renderCellBaseVNs(params, $table.callSlot(gvSlot, Object.assign({
|
|
589
|
-
groupField,
|
|
590
|
-
groupContent,
|
|
591
|
-
childList,
|
|
592
|
-
childCount
|
|
593
|
-
}, params, ctParams)));
|
|
473
|
+
return renderCellBaseVNs(params, $table.callSlot(gvSlot, Object.assign({ groupField, groupContent, childList, childCount }, params, ctParams)));
|
|
594
474
|
}
|
|
595
475
|
} else if (aggFunc === true || countFields && countFields.includes(field)) {
|
|
596
476
|
cellValue = currAggData ? currAggData.value : childCount;
|
|
@@ -599,54 +479,46 @@ const Cell = exports.Cell = {
|
|
|
599
479
|
cellValue = formatValuesMethod(ctParams);
|
|
600
480
|
}
|
|
601
481
|
if (gvSlot) {
|
|
602
|
-
return renderCellBaseVNs(params, $table.callSlot(gvSlot, Object.assign({
|
|
603
|
-
groupField,
|
|
604
|
-
groupContent,
|
|
605
|
-
childList,
|
|
606
|
-
childCount
|
|
607
|
-
}, params, ctParams)));
|
|
482
|
+
return renderCellBaseVNs(params, $table.callSlot(gvSlot, Object.assign({ groupField, groupContent, childList, childCount }, params, ctParams)));
|
|
608
483
|
}
|
|
609
484
|
}
|
|
610
485
|
} else {
|
|
611
486
|
if (defaultSlot) {
|
|
612
487
|
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
|
|
613
488
|
}
|
|
614
|
-
const {
|
|
615
|
-
computeRendererOpts
|
|
616
|
-
} = $table.getComputeMaps();
|
|
489
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
617
490
|
const rendererOpts = computeRendererOpts.value;
|
|
618
|
-
// 如果是编辑模式-查看:slot default > formatter > cellRender.renderTableDefault > editRender.renderTableCell > editRender.renderTableDefault > cellRender.tableCellFormatter > editRender.tableCellFormatter > field
|
|
619
|
-
// 如果是查看表格:slot default > formatter > cellRender.renderTableDefault > cellRender.tableCellFormatter > field
|
|
620
491
|
const cellCompConf = cellRenderOpts && cellRenderOpts.name ? rendererOpts[cellRenderOpts.name] || renderer.get(cellRenderOpts.name) : null;
|
|
621
492
|
if (cellRenderOpts) {
|
|
622
493
|
const cellDefaultRenderFn = cellCompConf ? cellCompConf.renderTableDefault || cellCompConf.renderDefault : null;
|
|
623
494
|
if (cellDefaultRenderFn && cellRenderOpts) {
|
|
624
|
-
return renderCellBaseVNs(params, (0,
|
|
625
|
-
$type: editRenderOpts ? 'edit' : 'cell'
|
|
626
|
-
}, params))));
|
|
495
|
+
return renderCellBaseVNs(params, (0, import_vn.getSlotVNs)(cellDefaultRenderFn(cellRenderOpts, Object.assign({ $type: editRenderOpts ? "edit" : "cell" }, params))));
|
|
627
496
|
}
|
|
628
497
|
}
|
|
629
498
|
if (editRenderOpts) {
|
|
630
499
|
const editCompConf = editRenderOpts && editRenderOpts.name ? rendererOpts[editRenderOpts.name] || renderer.get(editRenderOpts.name) : null;
|
|
631
|
-
const editCellRenderFn = editCompConf ? editCompConf.renderTableCell || editCompConf.renderCell || editCompConf.renderTableDefault || editCompConf.renderDefault : null;
|
|
500
|
+
const editCellRenderFn = editCompConf ? editCompConf.renderTableCell || editCompConf.renderCell || (editCompConf.renderTableDefault || editCompConf.renderDefault) : null;
|
|
632
501
|
if (editCellRenderFn) {
|
|
633
|
-
return renderCellBaseVNs(params, (0,
|
|
634
|
-
$type: editRenderOpts ? 'edit' : 'cell'
|
|
635
|
-
}, params))));
|
|
502
|
+
return renderCellBaseVNs(params, (0, import_vn.getSlotVNs)(editCellRenderFn(editRenderOpts, Object.assign({ $type: editRenderOpts ? "edit" : "cell" }, params))));
|
|
636
503
|
}
|
|
637
504
|
}
|
|
638
|
-
// 如果是编辑模式-查看:cellRender.tableCellFormatter > editRender.tableCellFormatter > field
|
|
639
|
-
// 如果是查看表格:cellRender.tableCellFormatter > field
|
|
640
505
|
cellValue = $table.getCellLabel(row, column);
|
|
641
506
|
}
|
|
642
|
-
const cellPlaceholder = editRenderOpts ? editRenderOpts.placeholder :
|
|
643
|
-
return renderCellBaseVNs(params, [
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
507
|
+
const cellPlaceholder = editRenderOpts ? editRenderOpts.placeholder : "";
|
|
508
|
+
return renderCellBaseVNs(params, [
|
|
509
|
+
(0, import_vue.h)(
|
|
510
|
+
"span",
|
|
511
|
+
{
|
|
512
|
+
class: "vxe-cell--label"
|
|
513
|
+
},
|
|
514
|
+
[
|
|
515
|
+
// 如果设置占位符
|
|
516
|
+
editRenderOpts && (0, import_utils.eqEmptyValue)(cellValue) ? (0, import_vue.h)("span", {
|
|
517
|
+
class: "vxe-cell--placeholder"
|
|
518
|
+
}, (0, import_utils.formatText)((0, import_utils.getFuncText)(cellPlaceholder), 1)) : (0, import_vue.h)("span", (0, import_utils.formatText)(cellValue, 1))
|
|
519
|
+
]
|
|
520
|
+
)
|
|
521
|
+
]);
|
|
650
522
|
},
|
|
651
523
|
renderDeepCell(params) {
|
|
652
524
|
return Cell.renderDeepNodeBtn(params, Cell.renderDefaultCell(params));
|
|
@@ -658,98 +530,58 @@ const Cell = exports.Cell = {
|
|
|
658
530
|
* 行分组
|
|
659
531
|
*/
|
|
660
532
|
renderRowGroupBtn(params, cellVNodes) {
|
|
661
|
-
const {
|
|
662
|
-
$table
|
|
663
|
-
} = params;
|
|
533
|
+
const { $table } = params;
|
|
664
534
|
const tableReactData = $table.reactData;
|
|
665
535
|
const tableInternalData = $table.internalData;
|
|
666
|
-
const {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
} =
|
|
670
|
-
const {
|
|
671
|
-
computeAggregateOpts
|
|
672
|
-
} = $table.getComputeMaps();
|
|
673
|
-
const {
|
|
674
|
-
rowGroupExpandedFlag
|
|
675
|
-
} = tableReactData;
|
|
676
|
-
const {
|
|
677
|
-
rowGroupExpandedMaps
|
|
678
|
-
} = tableInternalData;
|
|
536
|
+
const { row, level } = params;
|
|
537
|
+
const { computeAggregateOpts } = $table.getComputeMaps();
|
|
538
|
+
const { rowGroupExpandedFlag } = tableReactData;
|
|
539
|
+
const { rowGroupExpandedMaps } = tableInternalData;
|
|
679
540
|
const aggregateOpts = computeAggregateOpts.value;
|
|
680
|
-
const {
|
|
681
|
-
|
|
682
|
-
padding,
|
|
683
|
-
indent,
|
|
684
|
-
showIcon,
|
|
685
|
-
iconOpen,
|
|
686
|
-
iconClose
|
|
687
|
-
} = aggregateOpts;
|
|
688
|
-
const rowid = (0, _util.getRowid)($table, row);
|
|
541
|
+
const { mode, padding, indent, showIcon, iconOpen, iconClose } = aggregateOpts;
|
|
542
|
+
const rowid = (0, import_util.getRowid)($table, row);
|
|
689
543
|
const isExpand = !!rowGroupExpandedFlag && !!rowGroupExpandedMaps[rowid];
|
|
690
|
-
return (0,
|
|
691
|
-
class: [
|
|
692
|
-
|
|
544
|
+
return (0, import_vue.h)("div", {
|
|
545
|
+
class: ["vxe-row-group--tree-node", {
|
|
546
|
+
"is--expanded": isExpand
|
|
693
547
|
}],
|
|
694
|
-
style: mode !==
|
|
548
|
+
style: mode !== "column" && padding && indent ? {
|
|
695
549
|
paddingLeft: `${level * indent}px`
|
|
696
|
-
} :
|
|
697
|
-
}, [
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
550
|
+
} : void 0
|
|
551
|
+
}, [
|
|
552
|
+
showIcon && row.isAggregate ? (0, import_vue.h)("span", {
|
|
553
|
+
class: "vxe-row-group--node-btn",
|
|
554
|
+
onClick(evnt) {
|
|
555
|
+
$table.triggerRowGroupExpandEvent(evnt, params);
|
|
556
|
+
}
|
|
557
|
+
}, [
|
|
558
|
+
(0, import_vue.h)("i", {
|
|
559
|
+
class: isExpand ? iconOpen || getIcon().TABLE_ROW_GROUP_OPEN : iconClose || getIcon().TABLE_ROW_GROUP_CLOSE
|
|
560
|
+
})
|
|
561
|
+
]) : renderEmptyElement($table),
|
|
562
|
+
(0, import_vue.h)("div", {
|
|
563
|
+
class: "vxe-row-group-cell"
|
|
564
|
+
}, cellVNodes)
|
|
565
|
+
]);
|
|
707
566
|
},
|
|
708
567
|
/**
|
|
709
568
|
* 树
|
|
710
569
|
*/
|
|
711
570
|
renderTreeNodeBtn(params, cellVNodes) {
|
|
712
|
-
const {
|
|
713
|
-
$table,
|
|
714
|
-
isHidden
|
|
715
|
-
} = params;
|
|
571
|
+
const { $table, isHidden } = params;
|
|
716
572
|
const tableReactData = $table.reactData;
|
|
717
573
|
const tableInternalData = $table.internalData;
|
|
718
|
-
const {
|
|
719
|
-
|
|
720
|
-
column,
|
|
721
|
-
level
|
|
722
|
-
} = params;
|
|
723
|
-
const {
|
|
724
|
-
slots
|
|
725
|
-
} = column;
|
|
574
|
+
const { row, column, level } = params;
|
|
575
|
+
const { slots } = column;
|
|
726
576
|
const iconSlot = slots ? slots.icon : null;
|
|
727
577
|
if (iconSlot) {
|
|
728
578
|
return $table.callSlot(iconSlot, params);
|
|
729
579
|
}
|
|
730
|
-
const {
|
|
731
|
-
|
|
732
|
-
} =
|
|
733
|
-
const {
|
|
734
|
-
treeExpandedFlag
|
|
735
|
-
} = tableReactData;
|
|
736
|
-
const {
|
|
737
|
-
fullAllDataRowIdData,
|
|
738
|
-
treeExpandedMaps,
|
|
739
|
-
treeExpandLazyLoadedMaps
|
|
740
|
-
} = tableInternalData;
|
|
580
|
+
const { computeTreeOpts } = $table.getComputeMaps();
|
|
581
|
+
const { treeExpandedFlag } = tableReactData;
|
|
582
|
+
const { fullAllDataRowIdData, treeExpandedMaps, treeExpandLazyLoadedMaps } = tableInternalData;
|
|
741
583
|
const treeOpts = computeTreeOpts.value;
|
|
742
|
-
const {
|
|
743
|
-
padding,
|
|
744
|
-
indent,
|
|
745
|
-
lazy,
|
|
746
|
-
trigger,
|
|
747
|
-
visibleMethod,
|
|
748
|
-
iconLoaded,
|
|
749
|
-
showIcon,
|
|
750
|
-
iconOpen,
|
|
751
|
-
iconClose
|
|
752
|
-
} = treeOpts;
|
|
584
|
+
const { padding, indent, lazy, trigger, visibleMethod, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
753
585
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
754
586
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
755
587
|
const rowChilds = row[childrenField];
|
|
@@ -760,7 +592,7 @@ const Cell = exports.Cell = {
|
|
|
760
592
|
let isLazyLoaded = false;
|
|
761
593
|
const ons = {};
|
|
762
594
|
if (!isHidden) {
|
|
763
|
-
const rowid = (0,
|
|
595
|
+
const rowid = (0, import_util.getRowid)($table, row);
|
|
764
596
|
isActive = !!treeExpandedFlag && !!treeExpandedMaps[rowid];
|
|
765
597
|
if (lazy) {
|
|
766
598
|
const rest = fullAllDataRowIdData[rowid];
|
|
@@ -769,52 +601,48 @@ const Cell = exports.Cell = {
|
|
|
769
601
|
isLazyLoaded = !!rest.treeLoaded;
|
|
770
602
|
}
|
|
771
603
|
}
|
|
772
|
-
if (!trigger || trigger ===
|
|
773
|
-
ons.onClick = evnt => {
|
|
604
|
+
if (!trigger || trigger === "default") {
|
|
605
|
+
ons.onClick = (evnt) => {
|
|
774
606
|
$table.triggerTreeExpandEvent(evnt, params);
|
|
775
607
|
};
|
|
776
608
|
}
|
|
777
|
-
return (0,
|
|
778
|
-
class: [
|
|
779
|
-
|
|
609
|
+
return (0, import_vue.h)("div", {
|
|
610
|
+
class: ["vxe-cell--tree-node", {
|
|
611
|
+
"is--active": isActive
|
|
780
612
|
}],
|
|
781
613
|
style: padding && indent ? {
|
|
782
614
|
paddingLeft: `${level * indent}px`
|
|
783
|
-
} :
|
|
784
|
-
}, [
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
615
|
+
} : void 0
|
|
616
|
+
}, [
|
|
617
|
+
showIcon && (lazy ? isLazyLoaded ? hasChild : hasChild || hasLazyChilds : hasChild) && (!visibleMethod || visibleMethod(params)) ? [
|
|
618
|
+
(0, import_vue.h)("div", {
|
|
619
|
+
class: "vxe-cell--tree-btn",
|
|
620
|
+
...ons
|
|
621
|
+
}, [
|
|
622
|
+
(0, import_vue.h)("i", {
|
|
623
|
+
class: isLazyLoading ? iconLoaded || getIcon().TABLE_TREE_LOADED : isActive ? iconOpen || getIcon().TABLE_TREE_OPEN : iconClose || getIcon().TABLE_TREE_CLOSE
|
|
624
|
+
})
|
|
625
|
+
])
|
|
626
|
+
] : null,
|
|
627
|
+
(0, import_vue.h)("div", {
|
|
628
|
+
class: "vxe-tree-cell"
|
|
629
|
+
}, cellVNodes)
|
|
630
|
+
]);
|
|
791
631
|
},
|
|
792
632
|
/**
|
|
793
633
|
* 层级节点。
|
|
794
634
|
* 行分组、树结构
|
|
795
635
|
*/
|
|
796
636
|
renderDeepNodeBtn(params, cellVNodes) {
|
|
797
|
-
const {
|
|
798
|
-
|
|
799
|
-
row,
|
|
800
|
-
column
|
|
801
|
-
} = params;
|
|
802
|
-
const {
|
|
803
|
-
rowGroupNode
|
|
804
|
-
} = column;
|
|
637
|
+
const { $table, row, column } = params;
|
|
638
|
+
const { rowGroupNode } = column;
|
|
805
639
|
const tableReactData = $table.reactData;
|
|
806
|
-
const {
|
|
807
|
-
rowGroupList
|
|
808
|
-
} = tableReactData;
|
|
640
|
+
const { rowGroupList } = tableReactData;
|
|
809
641
|
if (rowGroupList.length) {
|
|
810
|
-
const {
|
|
811
|
-
computeAggregateOpts
|
|
812
|
-
} = $table.getComputeMaps();
|
|
642
|
+
const { computeAggregateOpts } = $table.getComputeMaps();
|
|
813
643
|
const aggregateOpts = computeAggregateOpts.value;
|
|
814
|
-
const {
|
|
815
|
-
|
|
816
|
-
} = aggregateOpts;
|
|
817
|
-
if (mode === 'column') {
|
|
644
|
+
const { mode } = aggregateOpts;
|
|
645
|
+
if (mode === "column") {
|
|
818
646
|
if (row.groupField && column.field === row.groupField) {
|
|
819
647
|
return [Cell.renderRowGroupBtn(params, cellVNodes)];
|
|
820
648
|
}
|
|
@@ -829,45 +657,30 @@ const Cell = exports.Cell = {
|
|
|
829
657
|
* 序号
|
|
830
658
|
*/
|
|
831
659
|
renderSeqHeader(params) {
|
|
832
|
-
const {
|
|
833
|
-
|
|
834
|
-
column
|
|
835
|
-
} = params;
|
|
836
|
-
// 兼容已废弃方式
|
|
837
|
-
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
838
|
-
const {
|
|
839
|
-
slots
|
|
840
|
-
} = column;
|
|
660
|
+
const { $table, column } = params;
|
|
661
|
+
if (getConfig().tableHeadeSlotToTitleSlot === "obsolete") {
|
|
662
|
+
const { slots } = column;
|
|
841
663
|
const headerSlot = slots ? slots.header : null;
|
|
842
664
|
return renderHeaderCellBaseVNs(params, renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : $table.getHeaderCellLabel(column)));
|
|
843
665
|
}
|
|
844
666
|
return renderHeaderCellBaseVNs(params, renderTitleContent(params, $table.getHeaderCellLabel(column)));
|
|
845
667
|
},
|
|
846
668
|
renderSeqCell(params) {
|
|
847
|
-
const {
|
|
848
|
-
$table,
|
|
849
|
-
column
|
|
850
|
-
} = params;
|
|
669
|
+
const { $table, column } = params;
|
|
851
670
|
const tableProps = $table.props;
|
|
852
|
-
const {
|
|
853
|
-
|
|
854
|
-
} = tableProps;
|
|
855
|
-
const {
|
|
856
|
-
computeSeqOpts
|
|
857
|
-
} = $table.getComputeMaps();
|
|
671
|
+
const { treeConfig } = tableProps;
|
|
672
|
+
const { computeSeqOpts } = $table.getComputeMaps();
|
|
858
673
|
const seqOpts = computeSeqOpts.value;
|
|
859
|
-
const {
|
|
860
|
-
slots
|
|
861
|
-
} = column;
|
|
674
|
+
const { slots } = column;
|
|
862
675
|
const defaultSlot = slots ? slots.default : null;
|
|
863
676
|
if (defaultSlot) {
|
|
864
677
|
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
|
|
865
678
|
}
|
|
866
|
-
const {
|
|
867
|
-
seq
|
|
868
|
-
} = params;
|
|
679
|
+
const { seq } = params;
|
|
869
680
|
const seqMd = seqOpts.seqMethod;
|
|
870
|
-
return renderCellBaseVNs(params, [
|
|
681
|
+
return renderCellBaseVNs(params, [
|
|
682
|
+
(0, import_vue.h)("span", `${(0, import_utils.formatText)(seqMd ? seqMd(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)
|
|
683
|
+
]);
|
|
871
684
|
},
|
|
872
685
|
renderDeepIndexCell(params) {
|
|
873
686
|
return Cell.renderDeepNodeBtn(params, Cell.renderSeqCell(params));
|
|
@@ -876,57 +689,42 @@ const Cell = exports.Cell = {
|
|
|
876
689
|
* 单选
|
|
877
690
|
*/
|
|
878
691
|
renderRadioHeader(params) {
|
|
879
|
-
const {
|
|
880
|
-
|
|
881
|
-
column
|
|
882
|
-
} = params;
|
|
883
|
-
const {
|
|
884
|
-
slots
|
|
885
|
-
} = column;
|
|
692
|
+
const { $table, column } = params;
|
|
693
|
+
const { slots } = column;
|
|
886
694
|
const titleSlot = slots ? slots.title : null;
|
|
887
|
-
|
|
888
|
-
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
695
|
+
if (getConfig().tableHeadeSlotToTitleSlot === "obsolete") {
|
|
889
696
|
const headerSlot = slots ? slots.header : null;
|
|
890
|
-
return renderHeaderCellBaseVNs(
|
|
891
|
-
|
|
892
|
-
|
|
697
|
+
return renderHeaderCellBaseVNs(
|
|
698
|
+
params,
|
|
699
|
+
renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : [
|
|
700
|
+
(0, import_vue.h)("span", {
|
|
701
|
+
class: "vxe-radio--label"
|
|
702
|
+
}, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))
|
|
703
|
+
])
|
|
704
|
+
);
|
|
893
705
|
}
|
|
894
|
-
return renderHeaderCellBaseVNs(
|
|
895
|
-
|
|
896
|
-
|
|
706
|
+
return renderHeaderCellBaseVNs(
|
|
707
|
+
params,
|
|
708
|
+
renderTitleContent(params, [
|
|
709
|
+
(0, import_vue.h)("span", {
|
|
710
|
+
class: "vxe-radio--label"
|
|
711
|
+
}, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))
|
|
712
|
+
])
|
|
713
|
+
);
|
|
897
714
|
},
|
|
898
715
|
renderRadioCell(params) {
|
|
899
|
-
const {
|
|
900
|
-
$table,
|
|
901
|
-
column,
|
|
902
|
-
isHidden
|
|
903
|
-
} = params;
|
|
716
|
+
const { $table, column, isHidden } = params;
|
|
904
717
|
const tableReactData = $table.reactData;
|
|
905
|
-
const {
|
|
906
|
-
|
|
907
|
-
} = $table.getComputeMaps();
|
|
908
|
-
const {
|
|
909
|
-
selectRadioRow
|
|
910
|
-
} = tableReactData;
|
|
718
|
+
const { computeRadioOpts } = $table.getComputeMaps();
|
|
719
|
+
const { selectRadioRow } = tableReactData;
|
|
911
720
|
const radioOpts = computeRadioOpts.value;
|
|
912
|
-
const {
|
|
913
|
-
|
|
914
|
-
} =
|
|
915
|
-
const {
|
|
916
|
-
labelField,
|
|
917
|
-
checkMethod,
|
|
918
|
-
visibleMethod
|
|
919
|
-
} = radioOpts;
|
|
920
|
-
const {
|
|
921
|
-
row
|
|
922
|
-
} = params;
|
|
721
|
+
const { slots } = column;
|
|
722
|
+
const { labelField, checkMethod, visibleMethod } = radioOpts;
|
|
723
|
+
const { row } = params;
|
|
923
724
|
const defaultSlot = slots ? slots.default : null;
|
|
924
725
|
const radioSlot = slots ? slots.radio : null;
|
|
925
726
|
const isChecked = $table.eqRow(row, selectRadioRow);
|
|
926
|
-
const isVisible = !visibleMethod || visibleMethod({
|
|
927
|
-
$table,
|
|
928
|
-
row
|
|
929
|
-
});
|
|
727
|
+
const isVisible = !visibleMethod || visibleMethod({ $table, row });
|
|
930
728
|
let isDisabled = !!checkMethod;
|
|
931
729
|
let ons;
|
|
932
730
|
if (!isHidden) {
|
|
@@ -938,37 +736,37 @@ const Cell = exports.Cell = {
|
|
|
938
736
|
}
|
|
939
737
|
};
|
|
940
738
|
if (checkMethod) {
|
|
941
|
-
isDisabled = !checkMethod({
|
|
942
|
-
$table,
|
|
943
|
-
row
|
|
944
|
-
});
|
|
739
|
+
isDisabled = !checkMethod({ $table, row });
|
|
945
740
|
}
|
|
946
741
|
}
|
|
947
|
-
const radioParams =
|
|
948
|
-
checked: isChecked,
|
|
949
|
-
disabled: isDisabled,
|
|
950
|
-
visible: isVisible
|
|
951
|
-
});
|
|
742
|
+
const radioParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible };
|
|
952
743
|
if (radioSlot) {
|
|
953
744
|
return renderCellBaseVNs(params, $table.callSlot(radioSlot, radioParams));
|
|
954
745
|
}
|
|
955
746
|
const radioVNs = [];
|
|
956
747
|
if (isVisible) {
|
|
957
|
-
radioVNs.push(
|
|
958
|
-
|
|
959
|
-
|
|
748
|
+
radioVNs.push(
|
|
749
|
+
(0, import_vue.h)("span", {
|
|
750
|
+
class: ["vxe-radio--icon", isChecked ? getIcon().TABLE_RADIO_CHECKED : isDisabled ? getIcon().TABLE_RADIO_DISABLED_UNCHECKED : getIcon().TABLE_RADIO_UNCHECKED]
|
|
751
|
+
})
|
|
752
|
+
);
|
|
960
753
|
}
|
|
961
754
|
if (defaultSlot || labelField) {
|
|
962
|
-
radioVNs.push(
|
|
963
|
-
|
|
964
|
-
|
|
755
|
+
radioVNs.push(
|
|
756
|
+
(0, import_vue.h)("span", {
|
|
757
|
+
class: "vxe-radio--label"
|
|
758
|
+
}, defaultSlot ? $table.callSlot(defaultSlot, radioParams) : import_xe_utils.default.get(row, labelField))
|
|
759
|
+
);
|
|
965
760
|
}
|
|
966
|
-
return renderCellBaseVNs(params, [
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
761
|
+
return renderCellBaseVNs(params, [
|
|
762
|
+
(0, import_vue.h)("span", {
|
|
763
|
+
class: ["vxe-cell--radio", {
|
|
764
|
+
"is--checked": isChecked,
|
|
765
|
+
"is--disabled": isDisabled
|
|
766
|
+
}],
|
|
767
|
+
...ons
|
|
768
|
+
}, radioVNs)
|
|
769
|
+
]);
|
|
972
770
|
},
|
|
973
771
|
renderDeepRadioCell(params) {
|
|
974
772
|
return Cell.renderDeepNodeBtn(params, Cell.renderRadioCell(params));
|
|
@@ -977,108 +775,75 @@ const Cell = exports.Cell = {
|
|
|
977
775
|
* 多选
|
|
978
776
|
*/
|
|
979
777
|
renderCheckboxHeader(params) {
|
|
980
|
-
const {
|
|
981
|
-
$table,
|
|
982
|
-
column,
|
|
983
|
-
isHidden
|
|
984
|
-
} = params;
|
|
778
|
+
const { $table, column, isHidden } = params;
|
|
985
779
|
const tableReactData = $table.reactData;
|
|
986
|
-
const {
|
|
987
|
-
|
|
988
|
-
computeCheckboxOpts
|
|
989
|
-
} = $table.getComputeMaps();
|
|
990
|
-
const {
|
|
991
|
-
isAllSelected: isAllCheckboxSelected,
|
|
992
|
-
isIndeterminate: isAllCheckboxIndeterminate
|
|
993
|
-
} = tableReactData;
|
|
780
|
+
const { computeIsAllCheckboxDisabled, computeCheckboxOpts } = $table.getComputeMaps();
|
|
781
|
+
const { isAllSelected: isAllCheckboxSelected, isIndeterminate: isAllCheckboxIndeterminate } = tableReactData;
|
|
994
782
|
const isAllCheckboxDisabled = computeIsAllCheckboxDisabled.value;
|
|
995
|
-
const {
|
|
996
|
-
slots
|
|
997
|
-
} = column;
|
|
783
|
+
const { slots } = column;
|
|
998
784
|
const titleSlot = slots ? slots.title : null;
|
|
999
785
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
1000
|
-
const {
|
|
1001
|
-
checkStrictly,
|
|
1002
|
-
showHeader,
|
|
1003
|
-
headerTitle
|
|
1004
|
-
} = checkboxOpts;
|
|
786
|
+
const { checkStrictly, showHeader, headerTitle } = checkboxOpts;
|
|
1005
787
|
const colTitle = $table.getHeaderCellLabel(column);
|
|
1006
788
|
const ons = {};
|
|
1007
789
|
if (!isHidden) {
|
|
1008
|
-
ons.onClick = evnt => {
|
|
790
|
+
ons.onClick = (evnt) => {
|
|
1009
791
|
if (!isAllCheckboxDisabled) {
|
|
1010
792
|
$table.triggerCheckAllEvent(evnt, !isAllCheckboxSelected);
|
|
1011
793
|
}
|
|
1012
794
|
};
|
|
1013
795
|
}
|
|
1014
|
-
const checkboxParams =
|
|
1015
|
-
|
|
1016
|
-
disabled: isAllCheckboxDisabled,
|
|
1017
|
-
indeterminate: isAllCheckboxIndeterminate
|
|
1018
|
-
});
|
|
1019
|
-
// 兼容已废弃方式
|
|
1020
|
-
if (getConfig().tableHeadeSlotToTitleSlot === 'obsolete') {
|
|
796
|
+
const checkboxParams = { ...params, checked: isAllCheckboxSelected, disabled: isAllCheckboxDisabled, indeterminate: isAllCheckboxIndeterminate };
|
|
797
|
+
if (getConfig().tableHeadeSlotToTitleSlot === "obsolete") {
|
|
1021
798
|
const headerSlot = slots ? slots.header : null;
|
|
1022
799
|
if (headerSlot) {
|
|
1023
800
|
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, $table.callSlot(headerSlot, checkboxParams)));
|
|
1024
801
|
}
|
|
1025
802
|
}
|
|
1026
803
|
if (checkStrictly ? !showHeader : showHeader === false) {
|
|
1027
|
-
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
|
|
1028
|
-
|
|
1029
|
-
|
|
804
|
+
return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
|
|
805
|
+
(0, import_vue.h)("span", {
|
|
806
|
+
class: "vxe-checkbox--label"
|
|
807
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)
|
|
808
|
+
]));
|
|
1030
809
|
}
|
|
1031
|
-
return renderHeaderCellBaseVNs(
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
810
|
+
return renderHeaderCellBaseVNs(
|
|
811
|
+
params,
|
|
812
|
+
renderTitleContent(checkboxParams, [
|
|
813
|
+
(0, import_vue.h)("span", {
|
|
814
|
+
class: ["vxe-cell--checkbox", {
|
|
815
|
+
"is--checked": isAllCheckboxSelected,
|
|
816
|
+
"is--disabled": isAllCheckboxDisabled,
|
|
817
|
+
"is--indeterminate": isAllCheckboxIndeterminate
|
|
818
|
+
}],
|
|
819
|
+
title: import_xe_utils.default.eqNull(headerTitle) ? getI18n("vxe.table.allTitle") : `${headerTitle || ""}`,
|
|
820
|
+
...ons
|
|
821
|
+
}, [
|
|
822
|
+
(0, import_vue.h)("span", {
|
|
823
|
+
class: ["vxe-checkbox--icon", isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : isAllCheckboxDisabled ? getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
824
|
+
})
|
|
825
|
+
].concat(titleSlot || colTitle ? [
|
|
826
|
+
(0, import_vue.h)("span", {
|
|
827
|
+
class: "vxe-checkbox--label"
|
|
828
|
+
}, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)
|
|
829
|
+
] : []))
|
|
830
|
+
])
|
|
831
|
+
);
|
|
1043
832
|
},
|
|
1044
833
|
renderCheckboxCell(params) {
|
|
1045
|
-
const {
|
|
1046
|
-
$table,
|
|
1047
|
-
row,
|
|
1048
|
-
column,
|
|
1049
|
-
isHidden
|
|
1050
|
-
} = params;
|
|
834
|
+
const { $table, row, column, isHidden } = params;
|
|
1051
835
|
const tableProps = $table.props;
|
|
1052
836
|
const tableReactData = $table.reactData;
|
|
1053
837
|
const tableInternalData = $table.internalData;
|
|
1054
|
-
const {
|
|
1055
|
-
|
|
1056
|
-
} =
|
|
1057
|
-
const {
|
|
1058
|
-
updateCheckboxFlag,
|
|
1059
|
-
isRowGroupStatus
|
|
1060
|
-
} = tableReactData;
|
|
1061
|
-
const {
|
|
1062
|
-
selectCheckboxMaps,
|
|
1063
|
-
treeIndeterminateRowMaps
|
|
1064
|
-
} = tableInternalData;
|
|
1065
|
-
const {
|
|
1066
|
-
computeCheckboxOpts,
|
|
1067
|
-
computeAggregateOpts
|
|
1068
|
-
} = $table.getComputeMaps();
|
|
838
|
+
const { treeConfig } = tableProps;
|
|
839
|
+
const { updateCheckboxFlag, isRowGroupStatus } = tableReactData;
|
|
840
|
+
const { selectCheckboxMaps, treeIndeterminateRowMaps } = tableInternalData;
|
|
841
|
+
const { computeCheckboxOpts, computeAggregateOpts } = $table.getComputeMaps();
|
|
1069
842
|
const aggregateOpts = computeAggregateOpts.value;
|
|
1070
|
-
const {
|
|
1071
|
-
mapChildrenField
|
|
1072
|
-
} = aggregateOpts;
|
|
843
|
+
const { mapChildrenField } = aggregateOpts;
|
|
1073
844
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
1074
|
-
const {
|
|
1075
|
-
|
|
1076
|
-
checkMethod,
|
|
1077
|
-
visibleMethod
|
|
1078
|
-
} = checkboxOpts;
|
|
1079
|
-
const {
|
|
1080
|
-
slots
|
|
1081
|
-
} = column;
|
|
845
|
+
const { labelField, checkMethod, visibleMethod } = checkboxOpts;
|
|
846
|
+
const { slots } = column;
|
|
1082
847
|
const defaultSlot = slots ? slots.default : null;
|
|
1083
848
|
const checkboxSlot = slots ? slots.checkbox : null;
|
|
1084
849
|
let indeterminate = false;
|
|
@@ -1087,106 +852,75 @@ const Cell = exports.Cell = {
|
|
|
1087
852
|
let isDisabled = false;
|
|
1088
853
|
const ons = {};
|
|
1089
854
|
if (!isHidden) {
|
|
1090
|
-
const rowid = (0,
|
|
855
|
+
const rowid = (0, import_util.getRowid)($table, row);
|
|
1091
856
|
isChecked = !!updateCheckboxFlag && !!selectCheckboxMaps[rowid];
|
|
1092
857
|
if (checkMethod && isRowGroupStatus && $table.isAggregateRecord(row)) {
|
|
1093
|
-
const childList = row[mapChildrenField ||
|
|
1094
|
-
if (!childList || !childList.length || childList.every(item => !checkMethod({
|
|
1095
|
-
$table,
|
|
1096
|
-
row: item
|
|
1097
|
-
}))) {
|
|
858
|
+
const childList = row[mapChildrenField || ""];
|
|
859
|
+
if (!childList || !childList.length || childList.every((item) => !checkMethod({ $table, row: item }))) {
|
|
1098
860
|
isDisabled = true;
|
|
1099
861
|
}
|
|
1100
862
|
} else {
|
|
1101
|
-
isVisible = !visibleMethod || visibleMethod({
|
|
1102
|
-
|
|
1103
|
-
row
|
|
1104
|
-
});
|
|
1105
|
-
isDisabled = checkMethod ? !checkMethod({
|
|
1106
|
-
$table,
|
|
1107
|
-
row
|
|
1108
|
-
}) : !!checkMethod;
|
|
863
|
+
isVisible = !visibleMethod || visibleMethod({ $table, row });
|
|
864
|
+
isDisabled = checkMethod ? !checkMethod({ $table, row }) : !!checkMethod;
|
|
1109
865
|
}
|
|
1110
866
|
if (treeConfig || isRowGroupStatus) {
|
|
1111
867
|
indeterminate = !!treeIndeterminateRowMaps[rowid];
|
|
1112
868
|
}
|
|
1113
|
-
ons.onClick = evnt => {
|
|
869
|
+
ons.onClick = (evnt) => {
|
|
1114
870
|
if (!isDisabled && isVisible) {
|
|
1115
871
|
$table.triggerCheckRowEvent(evnt, params, !isChecked);
|
|
1116
872
|
}
|
|
1117
873
|
};
|
|
1118
874
|
}
|
|
1119
|
-
const checkboxParams =
|
|
1120
|
-
checked: isChecked,
|
|
1121
|
-
disabled: isDisabled,
|
|
1122
|
-
visible: isVisible,
|
|
1123
|
-
indeterminate
|
|
1124
|
-
});
|
|
875
|
+
const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate };
|
|
1125
876
|
if (checkboxSlot) {
|
|
1126
877
|
return renderCellBaseVNs(params, $table.callSlot(checkboxSlot, checkboxParams));
|
|
1127
878
|
}
|
|
1128
879
|
const checkVNs = [];
|
|
1129
880
|
if (isVisible) {
|
|
1130
|
-
checkVNs.push(
|
|
1131
|
-
|
|
1132
|
-
|
|
881
|
+
checkVNs.push(
|
|
882
|
+
(0, import_vue.h)("span", {
|
|
883
|
+
class: ["vxe-checkbox--icon", indeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : isDisabled ? getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
884
|
+
})
|
|
885
|
+
);
|
|
1133
886
|
}
|
|
1134
887
|
if (defaultSlot || labelField) {
|
|
1135
|
-
checkVNs.push(
|
|
1136
|
-
|
|
1137
|
-
|
|
888
|
+
checkVNs.push(
|
|
889
|
+
(0, import_vue.h)("span", {
|
|
890
|
+
class: "vxe-checkbox--label"
|
|
891
|
+
}, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : import_xe_utils.default.get(row, labelField))
|
|
892
|
+
);
|
|
1138
893
|
}
|
|
1139
|
-
return renderCellBaseVNs(params, [
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
894
|
+
return renderCellBaseVNs(params, [
|
|
895
|
+
(0, import_vue.h)("span", {
|
|
896
|
+
class: ["vxe-cell--checkbox", {
|
|
897
|
+
"is--checked": isChecked,
|
|
898
|
+
"is--disabled": isDisabled,
|
|
899
|
+
"is--indeterminate": indeterminate,
|
|
900
|
+
"is--hidden": !isVisible
|
|
901
|
+
}],
|
|
902
|
+
...ons
|
|
903
|
+
}, checkVNs)
|
|
904
|
+
]);
|
|
1147
905
|
},
|
|
1148
906
|
renderDeepSelectionCell(params) {
|
|
1149
907
|
return Cell.renderDeepNodeBtn(params, Cell.renderCheckboxCell(params));
|
|
1150
908
|
},
|
|
1151
909
|
renderCheckboxCellByProp(params) {
|
|
1152
|
-
const {
|
|
1153
|
-
$table,
|
|
1154
|
-
row,
|
|
1155
|
-
column,
|
|
1156
|
-
isHidden
|
|
1157
|
-
} = params;
|
|
910
|
+
const { $table, row, column, isHidden } = params;
|
|
1158
911
|
const tableProps = $table.props;
|
|
1159
912
|
const tableReactData = $table.reactData;
|
|
1160
913
|
const tableInternalData = $table.internalData;
|
|
1161
|
-
const {
|
|
1162
|
-
|
|
1163
|
-
} =
|
|
1164
|
-
const {
|
|
1165
|
-
updateCheckboxFlag,
|
|
1166
|
-
isRowGroupStatus
|
|
1167
|
-
} = tableReactData;
|
|
1168
|
-
const {
|
|
1169
|
-
treeIndeterminateRowMaps
|
|
1170
|
-
} = tableInternalData;
|
|
1171
|
-
const {
|
|
1172
|
-
computeCheckboxOpts,
|
|
1173
|
-
computeAggregateOpts
|
|
1174
|
-
} = $table.getComputeMaps();
|
|
914
|
+
const { treeConfig } = tableProps;
|
|
915
|
+
const { updateCheckboxFlag, isRowGroupStatus } = tableReactData;
|
|
916
|
+
const { treeIndeterminateRowMaps } = tableInternalData;
|
|
917
|
+
const { computeCheckboxOpts, computeAggregateOpts } = $table.getComputeMaps();
|
|
1175
918
|
const aggregateOpts = computeAggregateOpts.value;
|
|
1176
|
-
const {
|
|
1177
|
-
mapChildrenField
|
|
1178
|
-
} = aggregateOpts;
|
|
919
|
+
const { mapChildrenField } = aggregateOpts;
|
|
1179
920
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
1180
|
-
const {
|
|
1181
|
-
labelField,
|
|
1182
|
-
checkField,
|
|
1183
|
-
checkMethod,
|
|
1184
|
-
visibleMethod
|
|
1185
|
-
} = checkboxOpts;
|
|
921
|
+
const { labelField, checkField, checkMethod, visibleMethod } = checkboxOpts;
|
|
1186
922
|
const indeterminateField = checkboxOpts.indeterminateField || checkboxOpts.halfField;
|
|
1187
|
-
const {
|
|
1188
|
-
slots
|
|
1189
|
-
} = column;
|
|
923
|
+
const { slots } = column;
|
|
1190
924
|
const defaultSlot = slots ? slots.default : null;
|
|
1191
925
|
const checkboxSlot = slots ? slots.checkbox : null;
|
|
1192
926
|
let indeterminate = false;
|
|
@@ -1195,63 +929,56 @@ const Cell = exports.Cell = {
|
|
|
1195
929
|
let isDisabled = false;
|
|
1196
930
|
const ons = {};
|
|
1197
931
|
if (!isHidden) {
|
|
1198
|
-
const rowid = (0,
|
|
1199
|
-
isChecked = !!updateCheckboxFlag &&
|
|
932
|
+
const rowid = (0, import_util.getRowid)($table, row);
|
|
933
|
+
isChecked = !!updateCheckboxFlag && import_xe_utils.default.get(row, checkField);
|
|
1200
934
|
if (checkMethod && isRowGroupStatus && $table.isAggregateRecord(row)) {
|
|
1201
|
-
const childList = row[mapChildrenField ||
|
|
1202
|
-
if (!childList || !childList.length || childList.every(item => !checkMethod({
|
|
1203
|
-
$table,
|
|
1204
|
-
row: item
|
|
1205
|
-
}))) {
|
|
935
|
+
const childList = row[mapChildrenField || ""];
|
|
936
|
+
if (!childList || !childList.length || childList.every((item) => !checkMethod({ $table, row: item }))) {
|
|
1206
937
|
isDisabled = true;
|
|
1207
938
|
}
|
|
1208
939
|
} else {
|
|
1209
|
-
isVisible = !visibleMethod || visibleMethod({
|
|
1210
|
-
|
|
1211
|
-
row
|
|
1212
|
-
});
|
|
1213
|
-
isDisabled = checkMethod ? !checkMethod({
|
|
1214
|
-
$table,
|
|
1215
|
-
row
|
|
1216
|
-
}) : !!checkMethod;
|
|
940
|
+
isVisible = !visibleMethod || visibleMethod({ $table, row });
|
|
941
|
+
isDisabled = checkMethod ? !checkMethod({ $table, row }) : !!checkMethod;
|
|
1217
942
|
}
|
|
1218
943
|
if (treeConfig || isRowGroupStatus) {
|
|
1219
944
|
indeterminate = !!treeIndeterminateRowMaps[rowid];
|
|
1220
945
|
}
|
|
1221
|
-
ons.onClick = evnt => {
|
|
946
|
+
ons.onClick = (evnt) => {
|
|
1222
947
|
if (!isDisabled && isVisible) {
|
|
1223
948
|
$table.triggerCheckRowEvent(evnt, params, !isChecked);
|
|
1224
949
|
}
|
|
1225
950
|
};
|
|
1226
951
|
}
|
|
1227
|
-
const checkboxParams =
|
|
1228
|
-
checked: isChecked,
|
|
1229
|
-
disabled: isDisabled,
|
|
1230
|
-
visible: isVisible,
|
|
1231
|
-
indeterminate
|
|
1232
|
-
});
|
|
952
|
+
const checkboxParams = { ...params, checked: isChecked, disabled: isDisabled, visible: isVisible, indeterminate };
|
|
1233
953
|
if (checkboxSlot) {
|
|
1234
954
|
return renderCellBaseVNs(params, $table.callSlot(checkboxSlot, checkboxParams));
|
|
1235
955
|
}
|
|
1236
956
|
const checkVNs = [];
|
|
1237
957
|
if (isVisible) {
|
|
1238
|
-
checkVNs.push(
|
|
1239
|
-
|
|
1240
|
-
|
|
958
|
+
checkVNs.push(
|
|
959
|
+
(0, import_vue.h)("span", {
|
|
960
|
+
class: ["vxe-checkbox--icon", indeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : isDisabled ? getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
961
|
+
})
|
|
962
|
+
);
|
|
1241
963
|
if (defaultSlot || labelField) {
|
|
1242
|
-
checkVNs.push(
|
|
1243
|
-
|
|
1244
|
-
|
|
964
|
+
checkVNs.push(
|
|
965
|
+
(0, import_vue.h)("span", {
|
|
966
|
+
class: "vxe-checkbox--label"
|
|
967
|
+
}, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : import_xe_utils.default.get(row, labelField))
|
|
968
|
+
);
|
|
1245
969
|
}
|
|
1246
970
|
}
|
|
1247
|
-
return renderCellBaseVNs(params, [
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
971
|
+
return renderCellBaseVNs(params, [
|
|
972
|
+
(0, import_vue.h)("span", {
|
|
973
|
+
class: ["vxe-cell--checkbox", {
|
|
974
|
+
"is--checked": isChecked,
|
|
975
|
+
"is--disabled": isDisabled,
|
|
976
|
+
"is--indeterminate": indeterminateField && !isChecked ? row[indeterminateField] : indeterminate,
|
|
977
|
+
"is--hidden": !isVisible
|
|
978
|
+
}],
|
|
979
|
+
...ons
|
|
980
|
+
}, checkVNs)
|
|
981
|
+
]);
|
|
1255
982
|
},
|
|
1256
983
|
renderDeepSelectionCellByProp(params) {
|
|
1257
984
|
return Cell.renderDeepNodeBtn(params, Cell.renderCheckboxCellByProp(params));
|
|
@@ -1260,37 +987,15 @@ const Cell = exports.Cell = {
|
|
|
1260
987
|
* 展开行
|
|
1261
988
|
*/
|
|
1262
989
|
renderExpandCell(params) {
|
|
1263
|
-
const {
|
|
1264
|
-
$table,
|
|
1265
|
-
isHidden,
|
|
1266
|
-
row,
|
|
1267
|
-
column
|
|
1268
|
-
} = params;
|
|
990
|
+
const { $table, isHidden, row, column } = params;
|
|
1269
991
|
const tableReactData = $table.reactData;
|
|
1270
992
|
const tableInternalData = $table.internalData;
|
|
1271
|
-
const {
|
|
1272
|
-
|
|
1273
|
-
} =
|
|
1274
|
-
const {
|
|
1275
|
-
rowExpandedMaps,
|
|
1276
|
-
rowExpandLazyLoadedMaps
|
|
1277
|
-
} = tableInternalData;
|
|
1278
|
-
const {
|
|
1279
|
-
computeExpandOpts
|
|
1280
|
-
} = $table.getComputeMaps();
|
|
993
|
+
const { isRowGroupStatus } = tableReactData;
|
|
994
|
+
const { rowExpandedMaps, rowExpandLazyLoadedMaps } = tableInternalData;
|
|
995
|
+
const { computeExpandOpts } = $table.getComputeMaps();
|
|
1281
996
|
const expandOpts = computeExpandOpts.value;
|
|
1282
|
-
const {
|
|
1283
|
-
|
|
1284
|
-
labelField,
|
|
1285
|
-
iconLoaded,
|
|
1286
|
-
showIcon,
|
|
1287
|
-
iconOpen,
|
|
1288
|
-
iconClose,
|
|
1289
|
-
visibleMethod
|
|
1290
|
-
} = expandOpts;
|
|
1291
|
-
const {
|
|
1292
|
-
slots
|
|
1293
|
-
} = column;
|
|
997
|
+
const { lazy, labelField, iconLoaded, showIcon, iconOpen, iconClose, visibleMethod } = expandOpts;
|
|
998
|
+
const { slots } = column;
|
|
1294
999
|
const defaultSlot = slots ? slots.default : null;
|
|
1295
1000
|
const iconSlot = slots ? slots.icon : null;
|
|
1296
1001
|
let isActive = false;
|
|
@@ -1302,53 +1007,52 @@ const Cell = exports.Cell = {
|
|
|
1302
1007
|
return renderCellBaseVNs(params, $table.callSlot(iconSlot, params));
|
|
1303
1008
|
}
|
|
1304
1009
|
if (!isHidden) {
|
|
1305
|
-
const rowid = (0,
|
|
1010
|
+
const rowid = (0, import_util.getRowid)($table, row);
|
|
1306
1011
|
isActive = !!rowExpandedMaps[rowid];
|
|
1307
1012
|
if (lazy) {
|
|
1308
1013
|
isLazyLoading = !!rowExpandLazyLoadedMaps[rowid];
|
|
1309
1014
|
}
|
|
1310
1015
|
}
|
|
1311
|
-
return renderCellBaseVNs(params, [
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1016
|
+
return renderCellBaseVNs(params, [
|
|
1017
|
+
showIcon && (!visibleMethod || visibleMethod(params)) ? (0, import_vue.h)("div", {
|
|
1018
|
+
class: ["vxe-table--expanded", {
|
|
1019
|
+
"is--active": isActive
|
|
1020
|
+
}]
|
|
1021
|
+
}, [
|
|
1022
|
+
(0, import_vue.h)("span", {
|
|
1023
|
+
class: "vxe-table--expand-btn",
|
|
1024
|
+
onMousedown(evnt) {
|
|
1025
|
+
evnt.stopPropagation();
|
|
1026
|
+
},
|
|
1027
|
+
onClick(evnt) {
|
|
1028
|
+
$table.triggerRowExpandEvent(evnt, params);
|
|
1029
|
+
}
|
|
1030
|
+
}, [
|
|
1031
|
+
(0, import_vue.h)("i", {
|
|
1032
|
+
class: isLazyLoading ? iconLoaded || getIcon().TABLE_EXPAND_LOADED : isActive ? iconOpen || getIcon().TABLE_EXPAND_OPEN : iconClose || getIcon().TABLE_EXPAND_CLOSE
|
|
1033
|
+
})
|
|
1034
|
+
])
|
|
1035
|
+
]) : renderEmptyElement($table),
|
|
1036
|
+
defaultSlot || labelField ? (0, import_vue.h)("div", {
|
|
1037
|
+
class: "vxe-table--expand-label"
|
|
1038
|
+
}, defaultSlot ? $table.callSlot(defaultSlot, params) : import_xe_utils.default.get(row, labelField)) : renderEmptyElement($table)
|
|
1039
|
+
]);
|
|
1328
1040
|
},
|
|
1329
1041
|
renderExpandData(params) {
|
|
1330
|
-
const {
|
|
1331
|
-
|
|
1332
|
-
column
|
|
1333
|
-
} = params;
|
|
1334
|
-
const {
|
|
1335
|
-
slots,
|
|
1336
|
-
contentRender
|
|
1337
|
-
} = column;
|
|
1042
|
+
const { $table, column } = params;
|
|
1043
|
+
const { slots, contentRender } = column;
|
|
1338
1044
|
const contentSlot = slots ? slots.content : null;
|
|
1339
1045
|
if (contentSlot) {
|
|
1340
1046
|
return $table.callSlot(contentSlot, params);
|
|
1341
1047
|
}
|
|
1342
1048
|
if (contentRender) {
|
|
1343
|
-
const {
|
|
1344
|
-
computeRendererOpts
|
|
1345
|
-
} = $table.getComputeMaps();
|
|
1049
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
1346
1050
|
const rendererOpts = computeRendererOpts.value;
|
|
1347
1051
|
const compConf = contentRender.name ? rendererOpts[contentRender.name] || renderer.get(contentRender.name) : null;
|
|
1348
1052
|
if (compConf) {
|
|
1349
1053
|
const rtExpand = compConf.renderTableExpand || compConf.renderExpand;
|
|
1350
1054
|
if (rtExpand) {
|
|
1351
|
-
return (0,
|
|
1055
|
+
return (0, import_vn.getSlotVNs)(rtExpand(contentRender, params));
|
|
1352
1056
|
}
|
|
1353
1057
|
}
|
|
1354
1058
|
}
|
|
@@ -1358,21 +1062,18 @@ const Cell = exports.Cell = {
|
|
|
1358
1062
|
* HTML 标签
|
|
1359
1063
|
*/
|
|
1360
1064
|
renderHTMLCell(params) {
|
|
1361
|
-
const {
|
|
1362
|
-
|
|
1363
|
-
column
|
|
1364
|
-
} = params;
|
|
1365
|
-
const {
|
|
1366
|
-
slots
|
|
1367
|
-
} = column;
|
|
1065
|
+
const { $table, column } = params;
|
|
1066
|
+
const { slots } = column;
|
|
1368
1067
|
const defaultSlot = slots ? slots.default : null;
|
|
1369
1068
|
if (defaultSlot) {
|
|
1370
1069
|
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, params));
|
|
1371
1070
|
}
|
|
1372
|
-
return renderCellBaseVNs(params, [
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1071
|
+
return renderCellBaseVNs(params, [
|
|
1072
|
+
(0, import_vue.h)("span", {
|
|
1073
|
+
class: "vxe-cell--html",
|
|
1074
|
+
innerHTML: getDefaultCellLabel(params)
|
|
1075
|
+
})
|
|
1076
|
+
]);
|
|
1376
1077
|
},
|
|
1377
1078
|
renderDeepHTMLCell(params) {
|
|
1378
1079
|
return Cell.renderDeepNodeBtn(params, Cell.renderHTMLCell(params));
|
|
@@ -1381,60 +1082,54 @@ const Cell = exports.Cell = {
|
|
|
1381
1082
|
* 排序和筛选
|
|
1382
1083
|
*/
|
|
1383
1084
|
renderSortAndFilterHeader(params) {
|
|
1384
|
-
return renderHeaderCellBaseVNs(
|
|
1085
|
+
return renderHeaderCellBaseVNs(
|
|
1086
|
+
params,
|
|
1087
|
+
Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params).concat(Cell.renderFilterIcon(params)))
|
|
1088
|
+
);
|
|
1385
1089
|
},
|
|
1386
1090
|
/**
|
|
1387
1091
|
* 排序
|
|
1388
1092
|
*/
|
|
1389
1093
|
renderSortHeader(params) {
|
|
1390
|
-
return renderHeaderCellBaseVNs(
|
|
1094
|
+
return renderHeaderCellBaseVNs(
|
|
1095
|
+
params,
|
|
1096
|
+
Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params))
|
|
1097
|
+
);
|
|
1391
1098
|
},
|
|
1392
1099
|
renderSortIcon(params) {
|
|
1393
|
-
const {
|
|
1394
|
-
|
|
1395
|
-
column
|
|
1396
|
-
} = params;
|
|
1397
|
-
const {
|
|
1398
|
-
computeSortOpts
|
|
1399
|
-
} = $table.getComputeMaps();
|
|
1100
|
+
const { $table, column } = params;
|
|
1101
|
+
const { computeSortOpts } = $table.getComputeMaps();
|
|
1400
1102
|
const sortOpts = computeSortOpts.value;
|
|
1401
|
-
const {
|
|
1402
|
-
|
|
1403
|
-
allowBtn,
|
|
1404
|
-
ascTitle,
|
|
1405
|
-
descTitle,
|
|
1406
|
-
iconLayout,
|
|
1407
|
-
iconAsc,
|
|
1408
|
-
iconDesc,
|
|
1409
|
-
iconVisibleMethod
|
|
1410
|
-
} = sortOpts;
|
|
1411
|
-
const {
|
|
1412
|
-
order,
|
|
1413
|
-
slots
|
|
1414
|
-
} = column;
|
|
1103
|
+
const { showIcon, allowBtn, ascTitle, descTitle, iconLayout, iconAsc, iconDesc, iconVisibleMethod } = sortOpts;
|
|
1104
|
+
const { order, slots } = column;
|
|
1415
1105
|
if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
|
|
1416
1106
|
const sortSlot = slots ? slots.sort : null;
|
|
1417
|
-
return sortSlot ? (0,
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1107
|
+
return sortSlot ? (0, import_vn.getSlotVNs)($table.callSlot(sortSlot, params)) : [
|
|
1108
|
+
(0, import_vue.h)("span", {
|
|
1109
|
+
class: ["vxe-cell--sort", `vxe-cell--sort-${iconLayout}-layout`]
|
|
1110
|
+
}, [
|
|
1111
|
+
(0, import_vue.h)("i", {
|
|
1112
|
+
class: ["vxe-sort--asc-btn", iconAsc || getIcon().TABLE_SORT_ASC, {
|
|
1113
|
+
"sort--active": order === "asc"
|
|
1114
|
+
}],
|
|
1115
|
+
title: import_xe_utils.default.eqNull(ascTitle) ? getI18n("vxe.table.sortAsc") : `${ascTitle || ""}`,
|
|
1116
|
+
onClick: allowBtn ? (evnt) => {
|
|
1117
|
+
evnt.stopPropagation();
|
|
1118
|
+
$table.triggerSortEvent(evnt, column, "asc");
|
|
1119
|
+
} : void 0
|
|
1120
|
+
}),
|
|
1121
|
+
(0, import_vue.h)("i", {
|
|
1122
|
+
class: ["vxe-sort--desc-btn", iconDesc || getIcon().TABLE_SORT_DESC, {
|
|
1123
|
+
"sort--active": order === "desc"
|
|
1124
|
+
}],
|
|
1125
|
+
title: import_xe_utils.default.eqNull(descTitle) ? getI18n("vxe.table.sortDesc") : `${descTitle || ""}`,
|
|
1126
|
+
onClick: allowBtn ? (evnt) => {
|
|
1127
|
+
evnt.stopPropagation();
|
|
1128
|
+
$table.triggerSortEvent(evnt, column, "desc");
|
|
1129
|
+
} : void 0
|
|
1130
|
+
})
|
|
1131
|
+
])
|
|
1132
|
+
];
|
|
1438
1133
|
}
|
|
1439
1134
|
return [];
|
|
1440
1135
|
},
|
|
@@ -1445,39 +1140,30 @@ const Cell = exports.Cell = {
|
|
|
1445
1140
|
return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderFilterIcon(params)));
|
|
1446
1141
|
},
|
|
1447
1142
|
renderFilterIcon(params) {
|
|
1448
|
-
const {
|
|
1449
|
-
$table,
|
|
1450
|
-
column,
|
|
1451
|
-
hasFilter
|
|
1452
|
-
} = params;
|
|
1143
|
+
const { $table, column, hasFilter } = params;
|
|
1453
1144
|
const tableReactData = $table.reactData;
|
|
1454
|
-
const {
|
|
1455
|
-
|
|
1456
|
-
} = tableReactData;
|
|
1457
|
-
const {
|
|
1458
|
-
computeFilterOpts
|
|
1459
|
-
} = $table.getComputeMaps();
|
|
1145
|
+
const { filterStore } = tableReactData;
|
|
1146
|
+
const { computeFilterOpts } = $table.getComputeMaps();
|
|
1460
1147
|
const filterOpts = computeFilterOpts.value;
|
|
1461
|
-
const {
|
|
1462
|
-
showIcon,
|
|
1463
|
-
iconNone,
|
|
1464
|
-
iconMatch,
|
|
1465
|
-
iconVisibleMethod
|
|
1466
|
-
} = filterOpts;
|
|
1148
|
+
const { showIcon, iconNone, iconMatch, iconVisibleMethod } = filterOpts;
|
|
1467
1149
|
if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
|
|
1468
|
-
return [
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
$table.triggerFilterEvent
|
|
1150
|
+
return [
|
|
1151
|
+
(0, import_vue.h)("span", {
|
|
1152
|
+
class: ["vxe-cell--filter", {
|
|
1153
|
+
"is--active": filterStore.visible && filterStore.column === column
|
|
1154
|
+
}],
|
|
1155
|
+
onClick(evnt) {
|
|
1156
|
+
if ($table.triggerFilterEvent) {
|
|
1157
|
+
$table.triggerFilterEvent(evnt, params.column, params);
|
|
1158
|
+
}
|
|
1475
1159
|
}
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1160
|
+
}, [
|
|
1161
|
+
(0, import_vue.h)("i", {
|
|
1162
|
+
class: ["vxe-filter--btn", hasFilter ? iconMatch || getIcon().TABLE_FILTER_MATCH : iconNone || getIcon().TABLE_FILTER_NONE],
|
|
1163
|
+
title: getI18n("vxe.table.filter")
|
|
1164
|
+
})
|
|
1165
|
+
])
|
|
1166
|
+
];
|
|
1481
1167
|
}
|
|
1482
1168
|
return [];
|
|
1483
1169
|
},
|
|
@@ -1485,72 +1171,55 @@ const Cell = exports.Cell = {
|
|
|
1485
1171
|
* 可编辑
|
|
1486
1172
|
*/
|
|
1487
1173
|
renderEditHeader(params) {
|
|
1488
|
-
const {
|
|
1489
|
-
$table,
|
|
1490
|
-
column
|
|
1491
|
-
} = params;
|
|
1174
|
+
const { $table, column } = params;
|
|
1492
1175
|
const tableProps = $table.props;
|
|
1493
|
-
const {
|
|
1494
|
-
|
|
1495
|
-
} = $table.getComputeMaps();
|
|
1496
|
-
const {
|
|
1497
|
-
editConfig,
|
|
1498
|
-
editRules
|
|
1499
|
-
} = tableProps;
|
|
1176
|
+
const { computeEditOpts } = $table.getComputeMaps();
|
|
1177
|
+
const { editConfig, editRules } = tableProps;
|
|
1500
1178
|
const editOpts = computeEditOpts.value;
|
|
1501
|
-
const {
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
editRender
|
|
1505
|
-
} = column;
|
|
1506
|
-
const isEnableEdit = editConfig && (0, _utils.isEnableConf)(editConfig);
|
|
1507
|
-
const editRenderOpts = isEnableEdit && (0, _utils.isEnableConf)(editRender) ? editRender : null;
|
|
1179
|
+
const { sortable, filters, editRender } = column;
|
|
1180
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
1181
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
1508
1182
|
let isRequired = false;
|
|
1509
1183
|
if (editRules) {
|
|
1510
|
-
const columnRules = column.rules ? column.rules :
|
|
1184
|
+
const columnRules = column.rules ? column.rules : import_xe_utils.default.get(editRules, column.field);
|
|
1511
1185
|
if (columnRules) {
|
|
1512
|
-
isRequired = columnRules.some(rule => rule.required);
|
|
1186
|
+
isRequired = columnRules.some((rule) => rule.required);
|
|
1513
1187
|
}
|
|
1514
1188
|
}
|
|
1515
1189
|
let editIconVNs = [];
|
|
1516
1190
|
if (isEnableEdit) {
|
|
1517
|
-
const {
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1191
|
+
const { showAsterisk, showIcon, icon } = editOpts;
|
|
1192
|
+
editIconVNs = [
|
|
1193
|
+
isRequired && showAsterisk ? (0, import_vue.h)("span", {
|
|
1194
|
+
class: "vxe-cell--required-icon"
|
|
1195
|
+
}, [
|
|
1196
|
+
(0, import_vue.h)("i")
|
|
1197
|
+
]) : renderEmptyElement($table),
|
|
1198
|
+
editRenderOpts && showIcon ? (0, import_vue.h)("span", {
|
|
1199
|
+
class: "vxe-cell--edit-icon"
|
|
1200
|
+
}, import_xe_utils.default.isFunction(icon) ? (0, import_vn.getSlotVNs)(icon({})) : [
|
|
1201
|
+
(0, import_vue.h)("i", {
|
|
1202
|
+
class: icon || getIcon().TABLE_EDIT
|
|
1203
|
+
})
|
|
1204
|
+
]) : renderEmptyElement($table)
|
|
1205
|
+
];
|
|
1529
1206
|
}
|
|
1530
|
-
return renderHeaderCellBaseVNs(
|
|
1207
|
+
return renderHeaderCellBaseVNs(
|
|
1208
|
+
params,
|
|
1209
|
+
editIconVNs.concat(Cell.renderHeaderTitle(params)).concat(sortable ? Cell.renderSortIcon(params) : []).concat(filters ? Cell.renderFilterIcon(params) : [])
|
|
1210
|
+
);
|
|
1531
1211
|
},
|
|
1532
1212
|
// 行格编辑模式
|
|
1533
1213
|
renderRowEdit(params) {
|
|
1534
|
-
const {
|
|
1535
|
-
$table,
|
|
1536
|
-
column
|
|
1537
|
-
} = params;
|
|
1214
|
+
const { $table, column } = params;
|
|
1538
1215
|
const tableProps = $table.props;
|
|
1539
|
-
const {
|
|
1540
|
-
editConfig
|
|
1541
|
-
} = tableProps;
|
|
1216
|
+
const { editConfig } = tableProps;
|
|
1542
1217
|
const tableReactData = $table.reactData;
|
|
1543
|
-
const {
|
|
1544
|
-
|
|
1545
|
-
} =
|
|
1546
|
-
const
|
|
1547
|
-
|
|
1548
|
-
} = editStore;
|
|
1549
|
-
const {
|
|
1550
|
-
editRender
|
|
1551
|
-
} = column;
|
|
1552
|
-
const isEnableEdit = editConfig && (0, _utils.isEnableConf)(editConfig);
|
|
1553
|
-
const editRenderOpts = isEnableEdit && (0, _utils.isEnableConf)(editRender) ? editRender : null;
|
|
1218
|
+
const { editStore } = tableReactData;
|
|
1219
|
+
const { actived } = editStore;
|
|
1220
|
+
const { editRender } = column;
|
|
1221
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
1222
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
1554
1223
|
return Cell.runRenderer(params, !!(editRenderOpts && actived && actived.row === params.row));
|
|
1555
1224
|
},
|
|
1556
1225
|
renderDeepRowEdit(params) {
|
|
@@ -1558,109 +1227,72 @@ const Cell = exports.Cell = {
|
|
|
1558
1227
|
},
|
|
1559
1228
|
// 单元格编辑模式
|
|
1560
1229
|
renderCellEdit(params) {
|
|
1561
|
-
const {
|
|
1562
|
-
$table,
|
|
1563
|
-
column
|
|
1564
|
-
} = params;
|
|
1230
|
+
const { $table, column } = params;
|
|
1565
1231
|
const tableProps = $table.props;
|
|
1566
|
-
const {
|
|
1567
|
-
editConfig
|
|
1568
|
-
} = tableProps;
|
|
1232
|
+
const { editConfig } = tableProps;
|
|
1569
1233
|
const tableReactData = $table.reactData;
|
|
1570
|
-
const {
|
|
1571
|
-
|
|
1572
|
-
} =
|
|
1573
|
-
const
|
|
1574
|
-
|
|
1575
|
-
} = editStore;
|
|
1576
|
-
const {
|
|
1577
|
-
editRender
|
|
1578
|
-
} = column;
|
|
1579
|
-
const isEnableEdit = editConfig && (0, _utils.isEnableConf)(editConfig);
|
|
1580
|
-
const editRenderOpts = isEnableEdit && (0, _utils.isEnableConf)(editRender) ? editRender : null;
|
|
1234
|
+
const { editStore } = tableReactData;
|
|
1235
|
+
const { actived } = editStore;
|
|
1236
|
+
const { editRender } = column;
|
|
1237
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
1238
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
1581
1239
|
return Cell.runRenderer(params, !!(editRenderOpts && actived && actived.row === params.row && actived.column === params.column));
|
|
1582
1240
|
},
|
|
1583
1241
|
renderDeepCellEdit(params) {
|
|
1584
1242
|
return Cell.renderDeepNodeBtn(params, Cell.renderCellEdit(params));
|
|
1585
1243
|
},
|
|
1586
1244
|
runRenderer(params, isEdit) {
|
|
1587
|
-
const {
|
|
1588
|
-
$table,
|
|
1589
|
-
row,
|
|
1590
|
-
column
|
|
1591
|
-
} = params;
|
|
1245
|
+
const { $table, row, column } = params;
|
|
1592
1246
|
const tableProps = $table.props;
|
|
1593
|
-
const {
|
|
1594
|
-
editConfig
|
|
1595
|
-
} = tableProps;
|
|
1247
|
+
const { editConfig } = tableProps;
|
|
1596
1248
|
const tableReactData = $table.reactData;
|
|
1597
|
-
const {
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
const
|
|
1601
|
-
slots,
|
|
1602
|
-
field,
|
|
1603
|
-
editRender,
|
|
1604
|
-
formatter
|
|
1605
|
-
} = column;
|
|
1606
|
-
const isEnableEdit = editConfig && (0, _utils.isEnableConf)(editConfig);
|
|
1607
|
-
const editRenderOpts = isEnableEdit && (0, _utils.isEnableConf)(editRender) ? editRender : null;
|
|
1249
|
+
const { isRowGroupStatus } = tableReactData;
|
|
1250
|
+
const { slots, field, editRender, formatter } = column;
|
|
1251
|
+
const isEnableEdit = editConfig && (0, import_utils.isEnableConf)(editConfig);
|
|
1252
|
+
const editRenderOpts = isEnableEdit && (0, import_utils.isEnableConf)(editRender) ? editRender : null;
|
|
1608
1253
|
const defaultSlot = slots ? slots.default : null;
|
|
1609
|
-
const gcSlot = slots ? slots.groupContent || slots[
|
|
1254
|
+
const gcSlot = slots ? slots.groupContent || slots["group-content"] : null;
|
|
1610
1255
|
const editSlot = slots ? slots.edit : null;
|
|
1611
|
-
const cellParams = Object.assign({
|
|
1612
|
-
$type: '',
|
|
1613
|
-
isEdit
|
|
1614
|
-
}, params);
|
|
1256
|
+
const cellParams = Object.assign({ $type: "", isEdit }, params);
|
|
1615
1257
|
if (isEdit && editRenderOpts) {
|
|
1616
|
-
cellParams.$type =
|
|
1258
|
+
cellParams.$type = "edit";
|
|
1617
1259
|
if (editSlot) {
|
|
1618
1260
|
return $table.callSlot(editSlot, cellParams);
|
|
1619
1261
|
}
|
|
1620
|
-
const {
|
|
1621
|
-
computeRendererOpts
|
|
1622
|
-
} = $table.getComputeMaps();
|
|
1262
|
+
const { computeRendererOpts } = $table.getComputeMaps();
|
|
1623
1263
|
const rendererOpts = computeRendererOpts.value;
|
|
1624
1264
|
const compConf = editRenderOpts.name ? rendererOpts[editRenderOpts.name] || renderer.get(editRenderOpts.name) : null;
|
|
1625
1265
|
const rtEdit = compConf ? compConf.renderTableEdit || compConf.renderEdit : null;
|
|
1626
1266
|
if (rtEdit) {
|
|
1627
|
-
return (0,
|
|
1267
|
+
return (0, import_vn.getSlotVNs)(rtEdit(editRenderOpts, cellParams));
|
|
1628
1268
|
}
|
|
1629
1269
|
return [];
|
|
1630
1270
|
}
|
|
1631
1271
|
if (isRowGroupStatus && field && row.isAggregate) {
|
|
1632
1272
|
const aggRow = row;
|
|
1633
|
-
const {
|
|
1634
|
-
computeAggregateOpts
|
|
1635
|
-
} = $table.getComputeMaps();
|
|
1273
|
+
const { computeAggregateOpts } = $table.getComputeMaps();
|
|
1636
1274
|
const aggregateOpts = computeAggregateOpts.value;
|
|
1637
|
-
const {
|
|
1638
|
-
mapChildrenField
|
|
1639
|
-
} = aggregateOpts;
|
|
1275
|
+
const { mapChildrenField } = aggregateOpts;
|
|
1640
1276
|
const groupField = aggRow.groupField;
|
|
1641
1277
|
const groupContent = aggRow.groupContent;
|
|
1642
1278
|
const childList = mapChildrenField ? aggRow[mapChildrenField] || [] : [];
|
|
1643
1279
|
const childCount = aggRow.childCount;
|
|
1644
1280
|
if (gcSlot) {
|
|
1645
|
-
return renderCellBaseVNs(params, $table.callSlot(gcSlot, Object.assign({
|
|
1646
|
-
groupField,
|
|
1647
|
-
groupContent,
|
|
1648
|
-
childList,
|
|
1649
|
-
childCount
|
|
1650
|
-
}, params)));
|
|
1281
|
+
return renderCellBaseVNs(params, $table.callSlot(gcSlot, Object.assign({ groupField, groupContent, childList, childCount }, params)));
|
|
1651
1282
|
}
|
|
1652
1283
|
} else {
|
|
1653
1284
|
if (defaultSlot) {
|
|
1654
1285
|
return renderCellBaseVNs(params, $table.callSlot(defaultSlot, cellParams));
|
|
1655
1286
|
}
|
|
1656
1287
|
}
|
|
1657
|
-
// slot default > formatter
|
|
1658
1288
|
if (formatter) {
|
|
1659
|
-
return renderCellBaseVNs(params, [
|
|
1660
|
-
|
|
1661
|
-
|
|
1289
|
+
return renderCellBaseVNs(params, [
|
|
1290
|
+
(0, import_vue.h)("span", {
|
|
1291
|
+
class: "vxe-cell--label"
|
|
1292
|
+
}, getDefaultCellLabel(cellParams))
|
|
1293
|
+
]);
|
|
1662
1294
|
}
|
|
1663
1295
|
return Cell.renderDefaultCell(cellParams);
|
|
1664
1296
|
}
|
|
1665
1297
|
};
|
|
1666
|
-
var
|
|
1298
|
+
var cell_default = Cell;
|