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
|
@@ -1,490 +1,469 @@
|
|
|
1
|
-
import { nextTick } from
|
|
2
|
-
import { VxeUI } from
|
|
3
|
-
import XEUtils from
|
|
4
|
-
import { getColumnList } from
|
|
5
|
-
import { toCssUnit } from
|
|
6
|
-
const tableCustomMethodKeys = [
|
|
7
|
-
const customColumnCssKeys = [
|
|
8
|
-
VxeUI.hooks.add(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
const { customColumnList, aggHandleFields, rowGroupList } = reactData;
|
|
178
|
-
const customOpts = computeCustomOpts.value;
|
|
179
|
-
const { allowVisible, allowSort, allowFixed, allowResizable, allowAlign, allowHeaderAlign, allowFooterAlign, allowGroup, allowValues } = customOpts;
|
|
180
|
-
if (isDirectly) {
|
|
181
|
-
XEUtils.eachTree(customColumnList, (column) => {
|
|
182
|
-
if (allowResizable) {
|
|
183
|
-
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
184
|
-
column.resizeWidth = Math.max(0, XEUtils.toNumber(column.renderWidth));
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
191
|
-
if (parentColumn) {
|
|
192
|
-
// 更新子列信息
|
|
193
|
-
column.fixed = parentColumn.fixed;
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
if (allowSort) {
|
|
197
|
-
const sortIndex = index + 1;
|
|
198
|
-
column.renderSortNumber = sortIndex;
|
|
199
|
-
}
|
|
200
|
-
if (allowFixed) {
|
|
201
|
-
column.fixed = column.renderFixed;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
if (allowResizable) {
|
|
205
|
-
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
206
|
-
if (column.renderResizeWidth !== column.renderWidth) {
|
|
207
|
-
column.resizeWidth = column.renderResizeWidth;
|
|
208
|
-
column.renderWidth = column.renderResizeWidth;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (allowVisible) {
|
|
213
|
-
column.visible = column.renderVisible;
|
|
214
|
-
}
|
|
215
|
-
if (allowAlign) {
|
|
216
|
-
column.align = column.renderAlign;
|
|
217
|
-
}
|
|
218
|
-
if (allowHeaderAlign) {
|
|
219
|
-
column.headerAlign = column.renderHeaderAlign;
|
|
220
|
-
}
|
|
221
|
-
if (allowFooterAlign) {
|
|
222
|
-
column.footerAlign = column.renderFooterAlign;
|
|
223
|
-
}
|
|
224
|
-
if (allowGroup && allowValues) {
|
|
225
|
-
column.aggFunc = column.renderAggFn;
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
reactData.isCustomStatus = true;
|
|
230
|
-
if (allowGroup && !!$xeTable.handlePivotTableAggData) {
|
|
231
|
-
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
232
|
-
// 更新数据分组
|
|
233
|
-
if (aggHandleFields.length) {
|
|
234
|
-
$xeTable.setRowGroups(aggHandleFields);
|
|
235
|
-
}
|
|
236
|
-
else {
|
|
237
|
-
$xeTable.clearRowGroups();
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
else if (allowValues) {
|
|
241
|
-
// 更新聚合函数
|
|
242
|
-
$xeTable.handleUpdateAggData();
|
|
243
|
-
}
|
|
1
|
+
import { nextTick } from "vue";
|
|
2
|
+
import { VxeUI } from "../../../ui";
|
|
3
|
+
import XEUtils from "xe-utils";
|
|
4
|
+
import { getColumnList } from "../../src/util";
|
|
5
|
+
import { toCssUnit } from "../../../ui/src/dom";
|
|
6
|
+
const tableCustomMethodKeys = ["openCustom", "closeCustom", "getCustomVisible", "toggleCustom", "saveCustom", "cancelCustom", "resetCustom", "toggleCustomAllCheckbox", "setCustomAllCheckbox"];
|
|
7
|
+
const customColumnCssKeys = ["checkbox", "sort", "title", "width", "fixed", "align", "header-align", "footer-align"];
|
|
8
|
+
VxeUI.hooks.add("tableCustomModule", {
|
|
9
|
+
setupTable($xeTable) {
|
|
10
|
+
const { reactData, internalData } = $xeTable;
|
|
11
|
+
const { computeCustomOpts, computeRowGroupFields, computeCustomSimpleMode } = $xeTable.getComputeMaps();
|
|
12
|
+
const { refElem } = $xeTable.getRefMaps();
|
|
13
|
+
const $xeGrid = $xeTable.xeGrid;
|
|
14
|
+
const $xeGantt = $xeTable.xeGantt;
|
|
15
|
+
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
16
|
+
const updatePopupStyle = () => {
|
|
17
|
+
const { customStore } = reactData;
|
|
18
|
+
const customOpts = computeCustomOpts.value;
|
|
19
|
+
const { mode, placement, popupOptions } = customOpts;
|
|
20
|
+
const showSimple = !(mode === "modal" || mode === "drawer");
|
|
21
|
+
const { transfer, minWidth, maxWidth, maxHeight } = popupOptions || {};
|
|
22
|
+
const customSimpleMode = computeCustomSimpleMode.value;
|
|
23
|
+
const showCustomSimpleOutside = customSimpleMode === "outside";
|
|
24
|
+
const bodyEl = document.documentElement;
|
|
25
|
+
let wrapperEl = refElem.value;
|
|
26
|
+
let popupTop = 0;
|
|
27
|
+
let popupMaxHeight = 0;
|
|
28
|
+
const defPupStys = {};
|
|
29
|
+
const panePupStys = {};
|
|
30
|
+
if ($xeGantt) {
|
|
31
|
+
const { refGanttContainerElem } = $xeGantt.getRefMaps();
|
|
32
|
+
const ganttContainerElem = refGanttContainerElem.value;
|
|
33
|
+
if (ganttContainerElem) {
|
|
34
|
+
wrapperEl = ganttContainerElem;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const tableRect = wrapperEl.getBoundingClientRect();
|
|
38
|
+
if (showSimple && transfer) {
|
|
39
|
+
popupTop = tableRect.top + bodyEl.scrollTop;
|
|
40
|
+
popupMaxHeight = XEUtils.eqNull(maxHeight) ? 360 : maxHeight;
|
|
41
|
+
} else if (showCustomSimpleOutside) {
|
|
42
|
+
if ($xeGGWrapper && wrapperEl) {
|
|
43
|
+
popupTop = wrapperEl.offsetTop;
|
|
44
|
+
}
|
|
45
|
+
popupMaxHeight = XEUtils.eqNull(maxHeight) ? 360 : maxHeight;
|
|
46
|
+
} else {
|
|
47
|
+
if (wrapperEl) {
|
|
48
|
+
popupMaxHeight = wrapperEl.clientHeight - 22;
|
|
49
|
+
}
|
|
50
|
+
popupMaxHeight = Math.max(88, popupMaxHeight);
|
|
51
|
+
}
|
|
52
|
+
let popupMxHeight = 0;
|
|
53
|
+
if (!(placement === "left" || placement === "right")) {
|
|
54
|
+
popupMxHeight = XEUtils.eqNull(maxHeight) ? popupMaxHeight : maxHeight;
|
|
55
|
+
}
|
|
56
|
+
if (!placement || !["left", "right", "bottom-left", "bottom-right"].includes(placement)) {
|
|
57
|
+
if (popupTop) {
|
|
58
|
+
defPupStys.top = toCssUnit(popupTop);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (showSimple && transfer) {
|
|
62
|
+
if (placement === "bottom-left" || placement === "bottom-right") {
|
|
63
|
+
defPupStys.bottom = toCssUnit(bodyEl.scrollHeight - tableRect.top - tableRect.height + 1);
|
|
64
|
+
}
|
|
65
|
+
if (placement === "top-left" || placement === "bottom-left") {
|
|
66
|
+
defPupStys.left = toCssUnit(tableRect.left);
|
|
67
|
+
} else if (!placement || placement === "top-right" || placement === "bottom-right") {
|
|
68
|
+
defPupStys.right = toCssUnit(bodyEl.scrollWidth - tableRect.left - tableRect.width + 1);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const bodyComputeStyle = getComputedStyle(bodyEl);
|
|
72
|
+
const tableComputeStyle = getComputedStyle(wrapperEl);
|
|
73
|
+
customColumnCssKeys.forEach((key) => {
|
|
74
|
+
const currCssKey = `--vxe-ui-vxe-table-custom-column-${key}-${key === "title" ? "min-" : ""}width`;
|
|
75
|
+
const currCssVal = tableComputeStyle.getPropertyValue(currCssKey);
|
|
76
|
+
if (currCssVal && currCssVal !== bodyComputeStyle.getPropertyValue(currCssKey)) {
|
|
77
|
+
panePupStys[currCssKey] = currCssVal;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
if (minWidth) {
|
|
81
|
+
defPupStys["--vxe-ui-vxe-table-custom-default-min-width"] = toCssUnit(minWidth);
|
|
82
|
+
}
|
|
83
|
+
if (maxWidth) {
|
|
84
|
+
defPupStys["--vxe-ui-vxe-table-custom-default-max-width"] = toCssUnit(maxWidth);
|
|
85
|
+
}
|
|
86
|
+
if (popupMxHeight) {
|
|
87
|
+
defPupStys.maxHeight = toCssUnit(popupMxHeight);
|
|
88
|
+
}
|
|
89
|
+
customStore.defPopupStyle = defPupStys;
|
|
90
|
+
customStore.panePopupStyle = panePupStys;
|
|
91
|
+
customStore.maxHeight = popupMxHeight;
|
|
92
|
+
return nextTick();
|
|
93
|
+
};
|
|
94
|
+
const openCustom = () => {
|
|
95
|
+
const { initStore, customStore } = reactData;
|
|
96
|
+
const customOpts = computeCustomOpts.value;
|
|
97
|
+
const { mode, popupOptions } = customOpts;
|
|
98
|
+
const showSimple = !(mode === "modal" || mode === "drawer");
|
|
99
|
+
const { transfer } = popupOptions || {};
|
|
100
|
+
const customSimpleMode = computeCustomSimpleMode.value;
|
|
101
|
+
const showCustomSimpleOutside = customSimpleMode === "outside";
|
|
102
|
+
let cpToElem = null;
|
|
103
|
+
if (showSimple && transfer) {
|
|
104
|
+
cpToElem = document.body;
|
|
105
|
+
} else {
|
|
106
|
+
if (showCustomSimpleOutside && $xeGGWrapper) {
|
|
107
|
+
const { refPopupContainerElem } = $xeGGWrapper.getRefMaps();
|
|
108
|
+
const popupContainerElem = refPopupContainerElem.value;
|
|
109
|
+
if (popupContainerElem) {
|
|
110
|
+
cpToElem = popupContainerElem;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (internalData.customPopupToElem !== cpToElem) {
|
|
115
|
+
reactData.ctPopupFlag++;
|
|
116
|
+
}
|
|
117
|
+
internalData.customPopupToElem = cpToElem;
|
|
118
|
+
customStore.visible = true;
|
|
119
|
+
initStore.custom = true;
|
|
120
|
+
handleUpdateCustomColumn();
|
|
121
|
+
checkCustomStatus();
|
|
122
|
+
updatePopupStyle();
|
|
123
|
+
return nextTick().then(() => updatePopupStyle());
|
|
124
|
+
};
|
|
125
|
+
const handleUpdateCustomColumn = () => {
|
|
126
|
+
const { customStore } = reactData;
|
|
127
|
+
const { collectColumn } = internalData;
|
|
128
|
+
if (customStore.visible) {
|
|
129
|
+
const sortMaps = {};
|
|
130
|
+
const fixedMaps = {};
|
|
131
|
+
const visibleMaps = {};
|
|
132
|
+
XEUtils.eachTree(collectColumn, (column) => {
|
|
133
|
+
const colid = column.getKey();
|
|
134
|
+
column.renderFixed = column.fixed;
|
|
135
|
+
column.renderVisible = column.visible;
|
|
136
|
+
column.renderResizeWidth = column.renderWidth;
|
|
137
|
+
column.renderAlign = column.align;
|
|
138
|
+
column.renderHeaderAlign = column.headerAlign;
|
|
139
|
+
column.renderFooterAlign = column.footerAlign;
|
|
140
|
+
sortMaps[colid] = column.renderSortNumber;
|
|
141
|
+
fixedMaps[colid] = column.fixed;
|
|
142
|
+
visibleMaps[colid] = column.visible;
|
|
143
|
+
});
|
|
144
|
+
customStore.oldSortMaps = sortMaps;
|
|
145
|
+
customStore.oldFixedMaps = fixedMaps;
|
|
146
|
+
customStore.oldVisibleMaps = visibleMaps;
|
|
147
|
+
reactData.customColumnList = collectColumn.slice(0);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const closeCustom = () => {
|
|
151
|
+
const { customStore } = reactData;
|
|
152
|
+
const customOpts = computeCustomOpts.value;
|
|
153
|
+
if (customStore.visible) {
|
|
154
|
+
customStore.visible = false;
|
|
155
|
+
if (!customOpts.immediate) {
|
|
156
|
+
$xeTable.handleCustom();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return nextTick();
|
|
160
|
+
};
|
|
161
|
+
const toggleCustom = () => {
|
|
162
|
+
const { customStore } = reactData;
|
|
163
|
+
if (customStore.visible) {
|
|
164
|
+
return closeCustom();
|
|
165
|
+
}
|
|
166
|
+
return openCustom();
|
|
167
|
+
};
|
|
168
|
+
const saveCustom = (isDirectly) => {
|
|
169
|
+
const { customColumnList, aggHandleFields, rowGroupList } = reactData;
|
|
170
|
+
const customOpts = computeCustomOpts.value;
|
|
171
|
+
const { allowVisible, allowSort, allowFixed, allowResizable, allowAlign, allowHeaderAlign, allowFooterAlign, allowGroup, allowValues } = customOpts;
|
|
172
|
+
if (isDirectly) {
|
|
173
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
174
|
+
if (allowResizable) {
|
|
175
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
176
|
+
column.resizeWidth = Math.max(0, XEUtils.toNumber(column.renderWidth));
|
|
244
177
|
}
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
} else {
|
|
181
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parentColumn) => {
|
|
182
|
+
if (parentColumn) {
|
|
183
|
+
column.fixed = parentColumn.fixed;
|
|
184
|
+
} else {
|
|
245
185
|
if (allowSort) {
|
|
246
|
-
|
|
186
|
+
const sortIndex = index + 1;
|
|
187
|
+
column.renderSortNumber = sortIndex;
|
|
247
188
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
const cancelCustom = () => {
|
|
251
|
-
const { customColumnList, customStore } = reactData;
|
|
252
|
-
const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore;
|
|
253
|
-
const customOpts = computeCustomOpts.value;
|
|
254
|
-
const { allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues } = customOpts;
|
|
255
|
-
XEUtils.eachTree(customColumnList, column => {
|
|
256
|
-
const colid = column.getKey();
|
|
257
|
-
const visible = !!oldVisibleMaps[colid];
|
|
258
|
-
const fixed = oldFixedMaps[colid] || '';
|
|
259
|
-
if (allowVisible) {
|
|
260
|
-
column.renderVisible = visible;
|
|
261
|
-
column.visible = visible;
|
|
262
|
-
}
|
|
263
|
-
if (allowFixed) {
|
|
264
|
-
column.renderFixed = fixed;
|
|
265
|
-
column.fixed = fixed;
|
|
266
|
-
}
|
|
267
|
-
if (allowSort) {
|
|
268
|
-
column.renderSortNumber = oldSortMaps[colid] || 0;
|
|
269
|
-
}
|
|
270
|
-
if (allowResizable) {
|
|
271
|
-
column.renderResizeWidth = column.renderWidth;
|
|
272
|
-
}
|
|
273
|
-
if (allowAlign) {
|
|
274
|
-
column.align = column.renderAlign;
|
|
275
|
-
}
|
|
276
|
-
if (allowHeaderAlign) {
|
|
277
|
-
column.headerAlign = column.renderHeaderAlign;
|
|
278
|
-
}
|
|
279
|
-
if (allowFooterAlign) {
|
|
280
|
-
column.footerAlign = column.renderFooterAlign;
|
|
281
|
-
}
|
|
282
|
-
if (allowGroup) {
|
|
283
|
-
// 无
|
|
284
|
-
}
|
|
285
|
-
if (allowValues) {
|
|
286
|
-
// 无
|
|
287
|
-
}
|
|
288
|
-
}, { children: 'children' });
|
|
289
|
-
return nextTick();
|
|
290
|
-
};
|
|
291
|
-
const setCustomAllCheckbox = (checked) => {
|
|
292
|
-
const { customStore } = reactData;
|
|
293
|
-
const { customColumnList } = reactData;
|
|
294
|
-
const customOpts = computeCustomOpts.value;
|
|
295
|
-
const { checkMethod, visibleMethod } = customOpts;
|
|
296
|
-
const isAll = !!checked;
|
|
297
|
-
if (customOpts.immediate) {
|
|
298
|
-
XEUtils.eachTree(customColumnList, (column) => {
|
|
299
|
-
if (visibleMethod && !visibleMethod({ $table: $xeTable, column })) {
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
302
|
-
if (checkMethod && !checkMethod({ $table: $xeTable, column })) {
|
|
303
|
-
return;
|
|
304
|
-
}
|
|
305
|
-
column.visible = isAll;
|
|
306
|
-
column.renderVisible = isAll;
|
|
307
|
-
column.halfVisible = false;
|
|
308
|
-
});
|
|
309
|
-
customStore.isAll = isAll;
|
|
310
|
-
reactData.isCustomStatus = true;
|
|
311
|
-
$xeTable.handleCustom();
|
|
312
|
-
$xeTable.saveCustomStore('update:visible');
|
|
189
|
+
if (allowFixed) {
|
|
190
|
+
column.fixed = column.renderFixed;
|
|
313
191
|
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
column.renderVisible = isAll;
|
|
323
|
-
column.halfVisible = false;
|
|
324
|
-
});
|
|
325
|
-
customStore.isAll = isAll;
|
|
192
|
+
}
|
|
193
|
+
if (allowResizable) {
|
|
194
|
+
if (column.renderVisible && (!column.children || !column.children.length)) {
|
|
195
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
196
|
+
column.resizeWidth = column.renderResizeWidth;
|
|
197
|
+
column.renderWidth = column.renderResizeWidth;
|
|
198
|
+
}
|
|
326
199
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
200
|
+
}
|
|
201
|
+
if (allowVisible) {
|
|
202
|
+
column.visible = column.renderVisible;
|
|
203
|
+
}
|
|
204
|
+
if (allowAlign) {
|
|
205
|
+
column.align = column.renderAlign;
|
|
206
|
+
}
|
|
207
|
+
if (allowHeaderAlign) {
|
|
208
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
209
|
+
}
|
|
210
|
+
if (allowFooterAlign) {
|
|
211
|
+
column.footerAlign = column.renderFooterAlign;
|
|
212
|
+
}
|
|
213
|
+
if (allowGroup && allowValues) {
|
|
214
|
+
column.aggFunc = column.renderAggFn;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
reactData.isCustomStatus = true;
|
|
219
|
+
if (allowGroup && !!$xeTable.handlePivotTableAggData) {
|
|
220
|
+
if (rowGroupList.length !== aggHandleFields.length || rowGroupList.some((conf, i) => conf.field !== aggHandleFields[i])) {
|
|
221
|
+
if (aggHandleFields.length) {
|
|
222
|
+
$xeTable.setRowGroups(aggHandleFields);
|
|
223
|
+
} else {
|
|
224
|
+
$xeTable.clearRowGroups();
|
|
225
|
+
}
|
|
226
|
+
} else if (allowValues) {
|
|
227
|
+
$xeTable.handleUpdateAggData();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (allowSort) {
|
|
231
|
+
internalData.collectColumn = customColumnList;
|
|
232
|
+
}
|
|
233
|
+
return $xeTable.saveCustomStore("confirm");
|
|
234
|
+
};
|
|
235
|
+
const cancelCustom = () => {
|
|
236
|
+
const { customColumnList, customStore } = reactData;
|
|
237
|
+
const { oldSortMaps, oldFixedMaps, oldVisibleMaps } = customStore;
|
|
238
|
+
const customOpts = computeCustomOpts.value;
|
|
239
|
+
const { allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues } = customOpts;
|
|
240
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
241
|
+
const colid = column.getKey();
|
|
242
|
+
const visible = !!oldVisibleMaps[colid];
|
|
243
|
+
const fixed = oldFixedMaps[colid] || "";
|
|
244
|
+
if (allowVisible) {
|
|
245
|
+
column.renderVisible = visible;
|
|
246
|
+
column.visible = visible;
|
|
247
|
+
}
|
|
248
|
+
if (allowFixed) {
|
|
249
|
+
column.renderFixed = fixed;
|
|
250
|
+
column.fixed = fixed;
|
|
251
|
+
}
|
|
252
|
+
if (allowSort) {
|
|
253
|
+
column.renderSortNumber = oldSortMaps[colid] || 0;
|
|
254
|
+
}
|
|
255
|
+
if (allowResizable) {
|
|
256
|
+
column.renderResizeWidth = column.renderWidth;
|
|
257
|
+
}
|
|
258
|
+
if (allowAlign) {
|
|
259
|
+
column.align = column.renderAlign;
|
|
260
|
+
}
|
|
261
|
+
if (allowHeaderAlign) {
|
|
262
|
+
column.headerAlign = column.renderHeaderAlign;
|
|
263
|
+
}
|
|
264
|
+
if (allowFooterAlign) {
|
|
265
|
+
column.footerAlign = column.renderFooterAlign;
|
|
266
|
+
}
|
|
267
|
+
if (allowGroup) {
|
|
268
|
+
}
|
|
269
|
+
if (allowValues) {
|
|
270
|
+
}
|
|
271
|
+
}, { children: "children" });
|
|
272
|
+
return nextTick();
|
|
273
|
+
};
|
|
274
|
+
const setCustomAllCheckbox = (checked) => {
|
|
275
|
+
const { customStore } = reactData;
|
|
276
|
+
const { customColumnList } = reactData;
|
|
277
|
+
const customOpts = computeCustomOpts.value;
|
|
278
|
+
const { checkMethod, visibleMethod } = customOpts;
|
|
279
|
+
const isAll = !!checked;
|
|
280
|
+
if (customOpts.immediate) {
|
|
281
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
282
|
+
if (visibleMethod && !visibleMethod({ $table: $xeTable, column })) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (checkMethod && !checkMethod({ $table: $xeTable, column })) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
column.visible = isAll;
|
|
289
|
+
column.renderVisible = isAll;
|
|
290
|
+
column.halfVisible = false;
|
|
291
|
+
});
|
|
292
|
+
customStore.isAll = isAll;
|
|
293
|
+
reactData.isCustomStatus = true;
|
|
294
|
+
$xeTable.handleCustom();
|
|
295
|
+
$xeTable.saveCustomStore("update:visible");
|
|
296
|
+
} else {
|
|
297
|
+
XEUtils.eachTree(customColumnList, (column) => {
|
|
298
|
+
if (visibleMethod && !visibleMethod({ $table: $xeTable, column })) {
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
if (checkMethod && !checkMethod({ $table: $xeTable, column })) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
column.renderVisible = isAll;
|
|
305
|
+
column.halfVisible = false;
|
|
306
|
+
});
|
|
307
|
+
customStore.isAll = isAll;
|
|
308
|
+
}
|
|
309
|
+
$xeTable.checkCustomStatus();
|
|
310
|
+
return nextTick();
|
|
311
|
+
};
|
|
312
|
+
const customMethods = {
|
|
313
|
+
getCustomVisible() {
|
|
314
|
+
const { customStore } = reactData;
|
|
315
|
+
return customStore.visible;
|
|
316
|
+
},
|
|
317
|
+
openCustom,
|
|
318
|
+
closeCustom,
|
|
319
|
+
toggleCustom,
|
|
320
|
+
saveCustom,
|
|
321
|
+
cancelCustom,
|
|
322
|
+
resetCustom(options) {
|
|
323
|
+
const { rowGroupList } = reactData;
|
|
324
|
+
const { collectColumn } = internalData;
|
|
325
|
+
const customOpts = computeCustomOpts.value;
|
|
326
|
+
const { checkMethod } = customOpts;
|
|
327
|
+
const opts = Object.assign({
|
|
328
|
+
visible: true,
|
|
329
|
+
resizable: options === true,
|
|
330
|
+
fixed: options === true,
|
|
331
|
+
sort: options === true,
|
|
332
|
+
aggFunc: options === true,
|
|
333
|
+
align: options === true,
|
|
334
|
+
headerAlign: options === true,
|
|
335
|
+
footerAlign: options === true
|
|
336
|
+
}, options);
|
|
337
|
+
const allCols = [];
|
|
338
|
+
XEUtils.eachTree(collectColumn, (column) => {
|
|
339
|
+
if (opts.resizable) {
|
|
340
|
+
column.resizeWidth = 0;
|
|
341
|
+
}
|
|
342
|
+
if (opts.fixed) {
|
|
343
|
+
column.fixed = column.defaultFixed;
|
|
344
|
+
column.renderFixed = column.defaultFixed;
|
|
345
|
+
}
|
|
346
|
+
if (opts.sort) {
|
|
347
|
+
column.renderSortNumber = column.sortNumber;
|
|
348
|
+
column.parentId = column.defaultParentId;
|
|
349
|
+
}
|
|
350
|
+
if (!checkMethod || checkMethod({ $table: $xeTable, column })) {
|
|
351
|
+
column.visible = column.defaultVisible;
|
|
352
|
+
}
|
|
353
|
+
if (opts.align) {
|
|
354
|
+
column.align = column.defaultAlign;
|
|
355
|
+
column.renderAlign = column.defaultAlign;
|
|
356
|
+
}
|
|
357
|
+
if (opts.headerAlign) {
|
|
358
|
+
column.headerAlign = column.defaultHeaderAlign;
|
|
359
|
+
column.renderHeaderAlign = column.defaultHeaderAlign;
|
|
360
|
+
}
|
|
361
|
+
if (opts.footerAlign) {
|
|
362
|
+
column.footerAlign = column.defaultFooterAlign;
|
|
363
|
+
column.renderFooterAlign = column.defaultFooterAlign;
|
|
364
|
+
}
|
|
365
|
+
if (opts.aggFunc) {
|
|
366
|
+
column.aggFunc = column.defaultAggFunc;
|
|
367
|
+
column.renderAggFn = column.defaultAggFunc;
|
|
368
|
+
}
|
|
369
|
+
column.renderResizeWidth = column.renderWidth;
|
|
370
|
+
allCols.push(column);
|
|
371
|
+
});
|
|
372
|
+
if (opts.sort) {
|
|
373
|
+
const newCollectCols = XEUtils.toArrayTree(XEUtils.orderBy(allCols, "renderSortNumber"), { key: "id", parentKey: "parentId", children: "children" });
|
|
374
|
+
internalData.collectColumn = newCollectCols;
|
|
375
|
+
internalData.tableFullColumn = getColumnList(newCollectCols);
|
|
376
|
+
}
|
|
377
|
+
reactData.isCustomStatus = false;
|
|
378
|
+
return $xeTable.handleCustom().then(() => {
|
|
379
|
+
if (opts.aggFunc && !!$xeTable.handlePivotTableAggData) {
|
|
380
|
+
const rowGroupFields = computeRowGroupFields.value;
|
|
381
|
+
if (rowGroupFields ? rowGroupFields.length : rowGroupList.length) {
|
|
382
|
+
if (rowGroupFields && rowGroupFields.length) {
|
|
383
|
+
$xeTable.setRowGroups(rowGroupFields);
|
|
384
|
+
} else {
|
|
385
|
+
$xeTable.clearRowGroups();
|
|
386
|
+
}
|
|
387
|
+
} else {
|
|
388
|
+
$xeTable.handleUpdateAggData();
|
|
480
389
|
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
return
|
|
489
|
-
|
|
390
|
+
}
|
|
391
|
+
$xeTable.saveCustomStore("reset");
|
|
392
|
+
});
|
|
393
|
+
},
|
|
394
|
+
toggleCustomAllCheckbox() {
|
|
395
|
+
const { customStore } = reactData;
|
|
396
|
+
const isAll = !customStore.isAll;
|
|
397
|
+
return setCustomAllCheckbox(isAll);
|
|
398
|
+
},
|
|
399
|
+
setCustomAllCheckbox
|
|
400
|
+
};
|
|
401
|
+
const checkCustomStatus = () => {
|
|
402
|
+
const { customStore } = reactData;
|
|
403
|
+
const { collectColumn } = internalData;
|
|
404
|
+
const customOpts = computeCustomOpts.value;
|
|
405
|
+
const { checkMethod } = customOpts;
|
|
406
|
+
customStore.isAll = collectColumn.every((column) => (checkMethod ? !checkMethod({ $table: $xeTable, column }) : false) || column.renderVisible);
|
|
407
|
+
customStore.isIndeterminate = !customStore.isAll && collectColumn.some((column) => (!checkMethod || checkMethod({ $table: $xeTable, column })) && (column.renderVisible || column.halfVisible));
|
|
408
|
+
};
|
|
409
|
+
const emitCustomEvent = (type, evnt) => {
|
|
410
|
+
$xeTable.dispatchEvent("custom", { type }, evnt);
|
|
411
|
+
};
|
|
412
|
+
const customPrivateMethods = {
|
|
413
|
+
checkCustomStatus,
|
|
414
|
+
emitCustomEvent,
|
|
415
|
+
triggerCustomEvent(evnt) {
|
|
416
|
+
const reactData2 = $xeTable.reactData;
|
|
417
|
+
const { customStore } = reactData2;
|
|
418
|
+
if (customStore.visible) {
|
|
419
|
+
closeCustom();
|
|
420
|
+
emitCustomEvent("close", evnt);
|
|
421
|
+
$xeTable.dispatchEvent("custom-close", {}, evnt);
|
|
422
|
+
} else {
|
|
423
|
+
customStore.btnEl = evnt.target;
|
|
424
|
+
openCustom();
|
|
425
|
+
emitCustomEvent("open", evnt);
|
|
426
|
+
$xeTable.dispatchEvent("custom-open", {}, evnt);
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
customOpenEvent(evnt) {
|
|
430
|
+
const reactData2 = $xeTable.reactData;
|
|
431
|
+
const { customStore } = reactData2;
|
|
432
|
+
if (!customStore.visible) {
|
|
433
|
+
customStore.activeBtn = true;
|
|
434
|
+
customStore.btnEl = evnt.target;
|
|
435
|
+
$xeTable.openCustom();
|
|
436
|
+
$xeTable.emitCustomEvent("open", evnt);
|
|
437
|
+
$xeTable.dispatchEvent("custom-open", {}, evnt);
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
customCloseEvent(evnt) {
|
|
441
|
+
const reactData2 = $xeTable.reactData;
|
|
442
|
+
const { customStore } = reactData2;
|
|
443
|
+
if (customStore.visible) {
|
|
444
|
+
customStore.activeBtn = false;
|
|
445
|
+
$xeTable.closeCustom();
|
|
446
|
+
$xeTable.emitCustomEvent("close", evnt);
|
|
447
|
+
$xeTable.dispatchEvent("custom-close", {}, evnt);
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
handleUpdateCustomColumn,
|
|
451
|
+
handleCustomStyle() {
|
|
452
|
+
const reactData2 = $xeTable.reactData;
|
|
453
|
+
const { customStore } = reactData2;
|
|
454
|
+
if (!customStore.visible) {
|
|
455
|
+
return nextTick();
|
|
456
|
+
}
|
|
457
|
+
reactData2.isCustomDragStatus = false;
|
|
458
|
+
return updatePopupStyle();
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
return { ...customMethods, ...customPrivateMethods };
|
|
462
|
+
},
|
|
463
|
+
setupGrid($xeGrid) {
|
|
464
|
+
return $xeGrid.extendTableMethods(tableCustomMethodKeys);
|
|
465
|
+
},
|
|
466
|
+
setupGantt($xeGantt) {
|
|
467
|
+
return $xeGantt.extendTableMethods(tableCustomMethodKeys);
|
|
468
|
+
}
|
|
490
469
|
});
|