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/util.js
CHANGED
|
@@ -1,57 +1,83 @@
|
|
|
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 util_exports = {};
|
|
30
|
+
__export(util_exports, {
|
|
31
|
+
assembleColumn: () => assembleColumn,
|
|
32
|
+
clearTableAllStatus: () => clearTableAllStatus,
|
|
33
|
+
clearTableDefaultStatus: () => clearTableDefaultStatus,
|
|
34
|
+
colToVisible: () => colToVisible,
|
|
35
|
+
convertHeaderColumnToRows: () => convertHeaderColumnToRows,
|
|
36
|
+
convertHeaderToGridRows: () => convertHeaderToGridRows,
|
|
37
|
+
createColumn: () => createColumn,
|
|
38
|
+
createHandleGetRowId: () => createHandleGetRowId,
|
|
39
|
+
createHandleUpdateRowId: () => createHandleUpdateRowId,
|
|
40
|
+
createInternalData: () => createInternalData,
|
|
41
|
+
createReactData: () => createReactData,
|
|
42
|
+
createRowId: () => createRowId,
|
|
43
|
+
destroyColumn: () => destroyColumn,
|
|
44
|
+
encodeRowid: () => encodeRowid,
|
|
45
|
+
getCalcHeight: () => getCalcHeight,
|
|
46
|
+
getCellRestHeight: () => getCellRestHeight,
|
|
47
|
+
getCellValue: () => getCellValue,
|
|
48
|
+
getColReMaxWidth: () => getColReMaxWidth,
|
|
49
|
+
getColReMinWidth: () => getColReMinWidth,
|
|
50
|
+
getColumnList: () => getColumnList,
|
|
51
|
+
getFirstChildColumn: () => getFirstChildColumn,
|
|
52
|
+
getLastChildColumn: () => getLastChildColumn,
|
|
53
|
+
getRefElem: () => getRefElem,
|
|
54
|
+
getRootColumn: () => getRootColumn,
|
|
55
|
+
getRowMaxHeight: () => getRowMaxHeight,
|
|
56
|
+
getRowUniqueId: () => getRowUniqueId,
|
|
57
|
+
getRowid: () => getRowid,
|
|
58
|
+
getRowkey: () => getRowkey,
|
|
59
|
+
handleCustomStoreConfig: () => handleCustomStoreConfig,
|
|
60
|
+
handleFieldOrColumn: () => handleFieldOrColumn,
|
|
61
|
+
handleRowidOrRow: () => handleRowidOrRow,
|
|
62
|
+
hasDeepKey: () => hasDeepKey,
|
|
63
|
+
isColumnInfo: () => isColumnInfo,
|
|
64
|
+
restoreScrollLocation: () => restoreScrollLocation,
|
|
65
|
+
rowToVisible: () => rowToVisible,
|
|
66
|
+
setCellValue: () => setCellValue,
|
|
67
|
+
toFilters: () => toFilters,
|
|
68
|
+
toTreePathSeq: () => toTreePathSeq,
|
|
69
|
+
watchColumn: () => watchColumn
|
|
5
70
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.createColumn = createColumn;
|
|
13
|
-
exports.createHandleGetRowId = createHandleGetRowId;
|
|
14
|
-
exports.createHandleUpdateRowId = createHandleUpdateRowId;
|
|
15
|
-
exports.createInternalData = createInternalData;
|
|
16
|
-
exports.createReactData = createReactData;
|
|
17
|
-
exports.createRowId = createRowId;
|
|
18
|
-
exports.destroyColumn = destroyColumn;
|
|
19
|
-
exports.encodeRowid = encodeRowid;
|
|
20
|
-
exports.getCalcHeight = getCalcHeight;
|
|
21
|
-
exports.getCellRestHeight = getCellRestHeight;
|
|
22
|
-
exports.getCellValue = getCellValue;
|
|
23
|
-
exports.getColReMaxWidth = getColReMaxWidth;
|
|
24
|
-
exports.getColReMinWidth = getColReMinWidth;
|
|
25
|
-
exports.getColumnList = getColumnList;
|
|
26
|
-
exports.getFirstChildColumn = getFirstChildColumn;
|
|
27
|
-
exports.getLastChildColumn = getLastChildColumn;
|
|
28
|
-
exports.getRefElem = getRefElem;
|
|
29
|
-
exports.getRootColumn = getRootColumn;
|
|
30
|
-
exports.getRowMaxHeight = getRowMaxHeight;
|
|
31
|
-
exports.getRowUniqueId = getRowUniqueId;
|
|
32
|
-
exports.getRowid = getRowid;
|
|
33
|
-
exports.getRowkey = getRowkey;
|
|
34
|
-
exports.handleCustomStoreConfig = handleCustomStoreConfig;
|
|
35
|
-
exports.handleFieldOrColumn = handleFieldOrColumn;
|
|
36
|
-
exports.handleRowidOrRow = handleRowidOrRow;
|
|
37
|
-
exports.hasDeepKey = hasDeepKey;
|
|
38
|
-
exports.isColumnInfo = isColumnInfo;
|
|
39
|
-
exports.restoreScrollLocation = restoreScrollLocation;
|
|
40
|
-
exports.rowToVisible = rowToVisible;
|
|
41
|
-
exports.setCellValue = setCellValue;
|
|
42
|
-
exports.toFilters = toFilters;
|
|
43
|
-
exports.toTreePathSeq = toTreePathSeq;
|
|
44
|
-
exports.watchColumn = watchColumn;
|
|
45
|
-
var _vue = require("vue");
|
|
46
|
-
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
47
|
-
var _columnInfo = require("./columnInfo");
|
|
48
|
-
var _dom = require("../../ui/src/dom");
|
|
49
|
-
var _utils = require("../../ui/src/utils");
|
|
50
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
71
|
+
module.exports = __toCommonJS(util_exports);
|
|
72
|
+
var import_vue = require("vue");
|
|
73
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
74
|
+
var import_columnInfo = require("./columnInfo");
|
|
75
|
+
var import_dom = require("../../ui/src/dom");
|
|
76
|
+
var import_utils = require("../../ui/src/utils");
|
|
51
77
|
function createInternalData() {
|
|
52
78
|
return {
|
|
53
79
|
tZindex: 0,
|
|
54
|
-
currKeyField:
|
|
80
|
+
currKeyField: "",
|
|
55
81
|
isCurrDeepKey: false,
|
|
56
82
|
elemStore: {},
|
|
57
83
|
// 存放横向 X 虚拟滚动相关的信息
|
|
@@ -373,7 +399,7 @@ function createReactData() {
|
|
|
373
399
|
tooltipStore: {
|
|
374
400
|
row: null,
|
|
375
401
|
column: null,
|
|
376
|
-
content:
|
|
402
|
+
content: "",
|
|
377
403
|
visible: false,
|
|
378
404
|
type: null,
|
|
379
405
|
currOpts: {}
|
|
@@ -387,21 +413,21 @@ function createReactData() {
|
|
|
387
413
|
importStore: {
|
|
388
414
|
inited: false,
|
|
389
415
|
file: null,
|
|
390
|
-
type:
|
|
416
|
+
type: "",
|
|
391
417
|
modeList: [],
|
|
392
418
|
typeList: [],
|
|
393
|
-
filename:
|
|
419
|
+
filename: "",
|
|
394
420
|
visible: false
|
|
395
421
|
},
|
|
396
422
|
importParams: {
|
|
397
|
-
mode:
|
|
423
|
+
mode: "",
|
|
398
424
|
types: null,
|
|
399
425
|
message: true
|
|
400
426
|
},
|
|
401
427
|
// 导出相关信息
|
|
402
428
|
exportStore: {
|
|
403
429
|
inited: false,
|
|
404
|
-
name:
|
|
430
|
+
name: "",
|
|
405
431
|
modeList: [],
|
|
406
432
|
typeList: [],
|
|
407
433
|
columns: [],
|
|
@@ -414,10 +440,10 @@ function createReactData() {
|
|
|
414
440
|
visible: false
|
|
415
441
|
},
|
|
416
442
|
exportParams: {
|
|
417
|
-
filename:
|
|
418
|
-
sheetName:
|
|
419
|
-
mode:
|
|
420
|
-
type:
|
|
443
|
+
filename: "",
|
|
444
|
+
sheetName: "",
|
|
445
|
+
mode: "",
|
|
446
|
+
type: "",
|
|
421
447
|
isColgroup: false,
|
|
422
448
|
isMerge: false,
|
|
423
449
|
isTreeAllExpanded: false,
|
|
@@ -471,20 +497,20 @@ function createReactData() {
|
|
|
471
497
|
dragRow: null,
|
|
472
498
|
isCrossDragCol: false,
|
|
473
499
|
dragCol: null,
|
|
474
|
-
dragTipText:
|
|
500
|
+
dragTipText: "",
|
|
475
501
|
isDragResize: false,
|
|
476
502
|
isRowLoading: false,
|
|
477
503
|
isColLoading: false,
|
|
478
504
|
currColFlag: 1
|
|
479
505
|
};
|
|
480
506
|
}
|
|
481
|
-
const maxKey =
|
|
507
|
+
const maxKey = "__max";
|
|
482
508
|
function getRowMaxHeight(chRest, isForce) {
|
|
483
509
|
if (isForce || !chRest[maxKey]) {
|
|
484
510
|
let max = 0;
|
|
485
511
|
for (const key in chRest) {
|
|
486
512
|
const val = chRest[key];
|
|
487
|
-
if (key !== maxKey &&
|
|
513
|
+
if (key !== maxKey && import_xe_utils.default.isNumber(val) && val > max) {
|
|
488
514
|
max = val;
|
|
489
515
|
}
|
|
490
516
|
}
|
|
@@ -495,10 +521,10 @@ function getRowMaxHeight(chRest, isForce) {
|
|
|
495
521
|
}
|
|
496
522
|
const getAllConvertColumns = (columns, parentColumn) => {
|
|
497
523
|
const result = [];
|
|
498
|
-
columns.forEach(column => {
|
|
524
|
+
columns.forEach((column) => {
|
|
499
525
|
column.parentId = parentColumn ? parentColumn.id : null;
|
|
500
526
|
if (column.visible) {
|
|
501
|
-
if (column.children && column.children.length && column.children.some(
|
|
527
|
+
if (column.children && column.children.length && column.children.some((column2) => column2.visible)) {
|
|
502
528
|
result.push(column);
|
|
503
529
|
result.push(...getAllConvertColumns(column.children, column));
|
|
504
530
|
} else {
|
|
@@ -508,7 +534,7 @@ const getAllConvertColumns = (columns, parentColumn) => {
|
|
|
508
534
|
});
|
|
509
535
|
return result;
|
|
510
536
|
};
|
|
511
|
-
const convertHeaderColumnToRows = originColumns => {
|
|
537
|
+
const convertHeaderColumnToRows = (originColumns) => {
|
|
512
538
|
let maxLevel = 1;
|
|
513
539
|
const traverse = (column, parent) => {
|
|
514
540
|
if (parent) {
|
|
@@ -517,9 +543,9 @@ const convertHeaderColumnToRows = originColumns => {
|
|
|
517
543
|
maxLevel = column.level;
|
|
518
544
|
}
|
|
519
545
|
}
|
|
520
|
-
if (column.children && column.children.length && column.children.some(
|
|
546
|
+
if (column.children && column.children.length && column.children.some((column2) => column2.visible)) {
|
|
521
547
|
let colSpan = 0;
|
|
522
|
-
column.children.forEach(subColumn => {
|
|
548
|
+
column.children.forEach((subColumn) => {
|
|
523
549
|
if (subColumn.visible) {
|
|
524
550
|
traverse(subColumn, column);
|
|
525
551
|
colSpan += subColumn.colSpan;
|
|
@@ -530,7 +556,7 @@ const convertHeaderColumnToRows = originColumns => {
|
|
|
530
556
|
column.colSpan = 1;
|
|
531
557
|
}
|
|
532
558
|
};
|
|
533
|
-
originColumns.forEach(column => {
|
|
559
|
+
originColumns.forEach((column) => {
|
|
534
560
|
column.level = 1;
|
|
535
561
|
traverse(column);
|
|
536
562
|
});
|
|
@@ -539,8 +565,8 @@ const convertHeaderColumnToRows = originColumns => {
|
|
|
539
565
|
rows.push([]);
|
|
540
566
|
}
|
|
541
567
|
const allColumns = getAllConvertColumns(originColumns);
|
|
542
|
-
allColumns.forEach(column => {
|
|
543
|
-
if (column.children && column.children.length && column.children.some(
|
|
568
|
+
allColumns.forEach((column) => {
|
|
569
|
+
if (column.children && column.children.length && column.children.some((column2) => column2.visible)) {
|
|
544
570
|
column.rowSpan = 1;
|
|
545
571
|
} else {
|
|
546
572
|
column.rowSpan = maxLevel - column.level + 1;
|
|
@@ -549,7 +575,6 @@ const convertHeaderColumnToRows = originColumns => {
|
|
|
549
575
|
});
|
|
550
576
|
return rows;
|
|
551
577
|
};
|
|
552
|
-
exports.convertHeaderColumnToRows = convertHeaderColumnToRows;
|
|
553
578
|
function convertHeaderToGridRows(spanColumns) {
|
|
554
579
|
const rSize = spanColumns.length;
|
|
555
580
|
const cSize = spanColumns[0].reduce((sum, cell) => sum + cell.colSpan, 0);
|
|
@@ -560,7 +585,7 @@ function convertHeaderToGridRows(spanColumns) {
|
|
|
560
585
|
const dCols = [];
|
|
561
586
|
for (let cIndex = 0; cIndex < cSize; cIndex++) {
|
|
562
587
|
oCols.push(false);
|
|
563
|
-
dCols.push(
|
|
588
|
+
dCols.push("");
|
|
564
589
|
}
|
|
565
590
|
occupiedRows.push(oCols);
|
|
566
591
|
fullRows.push(dCols);
|
|
@@ -568,10 +593,7 @@ function convertHeaderToGridRows(spanColumns) {
|
|
|
568
593
|
for (let rIndex = 0; rIndex < rSize; rIndex++) {
|
|
569
594
|
let currColIndex = 0;
|
|
570
595
|
for (const column of spanColumns[rIndex]) {
|
|
571
|
-
const {
|
|
572
|
-
colSpan,
|
|
573
|
-
rowSpan
|
|
574
|
-
} = column;
|
|
596
|
+
const { colSpan, rowSpan } = column;
|
|
575
597
|
let startColIndex = -1;
|
|
576
598
|
for (let ccIndex = currColIndex; ccIndex <= cSize - colSpan; ccIndex++) {
|
|
577
599
|
let oFlag = true;
|
|
@@ -601,7 +623,6 @@ function convertHeaderToGridRows(spanColumns) {
|
|
|
601
623
|
}
|
|
602
624
|
}
|
|
603
625
|
if (startColIndex === -1) {
|
|
604
|
-
// error
|
|
605
626
|
break;
|
|
606
627
|
}
|
|
607
628
|
}
|
|
@@ -625,94 +646,69 @@ function restoreScrollLocation($xeTable, scrollLeft, scrollTop) {
|
|
|
625
646
|
internalData.inHeaderScroll = false;
|
|
626
647
|
internalData.inBodyScroll = false;
|
|
627
648
|
internalData.inFooterScroll = false;
|
|
628
|
-
internalData.scrollRenderType =
|
|
629
|
-
// 还原滚动状态
|
|
649
|
+
internalData.scrollRenderType = "";
|
|
630
650
|
return $xeTable.scrollTo(scrollLeft, scrollTop);
|
|
631
651
|
}
|
|
632
652
|
return $xeTable.clearScroll();
|
|
633
653
|
}
|
|
634
654
|
function getRowUniqueId() {
|
|
635
|
-
return
|
|
655
|
+
return import_xe_utils.default.uniqueId("row_");
|
|
636
656
|
}
|
|
637
|
-
/**
|
|
638
|
-
* 生成行的唯一主键
|
|
639
|
-
*/
|
|
640
657
|
function createRowId(rowOpts, row, keyField) {
|
|
641
|
-
const {
|
|
642
|
-
createKeyMethod
|
|
643
|
-
} = rowOpts;
|
|
658
|
+
const { createKeyMethod } = rowOpts;
|
|
644
659
|
if (createKeyMethod) {
|
|
645
|
-
return createKeyMethod({
|
|
646
|
-
row,
|
|
647
|
-
keyField
|
|
648
|
-
});
|
|
660
|
+
return createKeyMethod({ row, keyField });
|
|
649
661
|
}
|
|
650
662
|
return getRowUniqueId();
|
|
651
663
|
}
|
|
652
664
|
function hasDeepKey(rowKey) {
|
|
653
|
-
return rowKey.indexOf(
|
|
665
|
+
return rowKey.indexOf(".") > -1;
|
|
654
666
|
}
|
|
655
|
-
// 行主键 key
|
|
656
667
|
function getRowkey($xeTable) {
|
|
657
|
-
const {
|
|
658
|
-
currKeyField
|
|
659
|
-
} = $xeTable.internalData;
|
|
668
|
+
const { currKeyField } = $xeTable.internalData;
|
|
660
669
|
return currKeyField;
|
|
661
670
|
}
|
|
662
|
-
// 行主键 value
|
|
663
671
|
function getRowid($xeTable, row) {
|
|
664
672
|
const internalData = $xeTable.internalData;
|
|
665
|
-
const {
|
|
666
|
-
|
|
667
|
-
currKeyField
|
|
668
|
-
} = internalData;
|
|
669
|
-
return row ? encodeRowid((isCurrDeepKey ? getDeepRowIdByKey : getFastRowIdByKey)(row, currKeyField)) : '';
|
|
673
|
+
const { isCurrDeepKey, currKeyField } = internalData;
|
|
674
|
+
return row ? encodeRowid((isCurrDeepKey ? getDeepRowIdByKey : getFastRowIdByKey)(row, currKeyField)) : "";
|
|
670
675
|
}
|
|
671
676
|
function createHandleUpdateRowId($xeTable) {
|
|
672
677
|
const internalData = $xeTable.internalData;
|
|
673
|
-
const {
|
|
674
|
-
|
|
675
|
-
currKeyField
|
|
676
|
-
} = internalData;
|
|
677
|
-
const {
|
|
678
|
-
computeRowOpts
|
|
679
|
-
} = $xeTable.getComputeMaps();
|
|
678
|
+
const { isCurrDeepKey, currKeyField } = internalData;
|
|
679
|
+
const { computeRowOpts } = $xeTable.getComputeMaps();
|
|
680
680
|
const rowOpts = computeRowOpts.value;
|
|
681
681
|
const updateRId = isCurrDeepKey ? updateDeepRowKey : updateFastRowKey;
|
|
682
682
|
return {
|
|
683
683
|
rowKey: currKeyField,
|
|
684
684
|
handleUpdateRowId(row) {
|
|
685
|
-
return row ? updateRId(rowOpts, row, currKeyField) :
|
|
685
|
+
return row ? updateRId(rowOpts, row, currKeyField) : "";
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
689
|
function createHandleGetRowId($xeTable) {
|
|
690
690
|
const internalData = $xeTable.internalData;
|
|
691
|
-
const {
|
|
692
|
-
isCurrDeepKey,
|
|
693
|
-
currKeyField
|
|
694
|
-
} = internalData;
|
|
691
|
+
const { isCurrDeepKey, currKeyField } = internalData;
|
|
695
692
|
const getRId = isCurrDeepKey ? getDeepRowIdByKey : getFastRowIdByKey;
|
|
696
693
|
return {
|
|
697
694
|
rowKey: currKeyField,
|
|
698
695
|
handleGetRowId(row) {
|
|
699
|
-
return row ? encodeRowid(getRId(row, currKeyField)) :
|
|
696
|
+
return row ? encodeRowid(getRId(row, currKeyField)) : "";
|
|
700
697
|
}
|
|
701
698
|
};
|
|
702
699
|
}
|
|
703
|
-
// 编码行主键
|
|
704
700
|
function encodeRowid(rowVal) {
|
|
705
|
-
return
|
|
701
|
+
return import_xe_utils.default.eqNull(rowVal) ? "" : encodeURIComponent(rowVal);
|
|
706
702
|
}
|
|
707
703
|
function getDeepRowIdByKey(row, rowKey) {
|
|
708
|
-
return
|
|
704
|
+
return import_xe_utils.default.get(row, rowKey);
|
|
709
705
|
}
|
|
710
706
|
function updateDeepRowKey(rowOpts, row, rowKey) {
|
|
711
707
|
let rowid = encodeRowid(getDeepRowIdByKey(row, rowKey));
|
|
712
|
-
if ((0,
|
|
708
|
+
if ((0, import_utils.eqEmptyValue)(rowid)) {
|
|
713
709
|
const newRowid = createRowId(rowOpts, row, rowKey);
|
|
714
|
-
rowid =
|
|
715
|
-
|
|
710
|
+
rowid = "" + newRowid;
|
|
711
|
+
import_xe_utils.default.set(row, rowKey, rowid);
|
|
716
712
|
}
|
|
717
713
|
return rowid;
|
|
718
714
|
}
|
|
@@ -721,32 +717,28 @@ function getFastRowIdByKey(row, rowKey) {
|
|
|
721
717
|
}
|
|
722
718
|
function updateFastRowKey(rowOpts, row, rowKey) {
|
|
723
719
|
let rowid = encodeRowid(getFastRowIdByKey(row, rowKey));
|
|
724
|
-
if ((0,
|
|
720
|
+
if ((0, import_utils.eqEmptyValue)(rowid)) {
|
|
725
721
|
const newRowid = createRowId(rowOpts, row, rowKey);
|
|
726
|
-
rowid =
|
|
722
|
+
rowid = "" + newRowid;
|
|
727
723
|
row[rowKey] = newRowid;
|
|
728
724
|
}
|
|
729
725
|
return rowid;
|
|
730
726
|
}
|
|
731
727
|
function handleFieldOrColumn($xeTable, fieldOrColumn) {
|
|
732
728
|
if (fieldOrColumn) {
|
|
733
|
-
return
|
|
729
|
+
return import_xe_utils.default.isString(fieldOrColumn) || import_xe_utils.default.isNumber(fieldOrColumn) ? $xeTable.getColumnByField(`${fieldOrColumn}`) : fieldOrColumn;
|
|
734
730
|
}
|
|
735
731
|
return null;
|
|
736
732
|
}
|
|
737
733
|
function handleRowidOrRow($xeTable, rowidOrRow) {
|
|
738
734
|
if (rowidOrRow) {
|
|
739
|
-
const rowid =
|
|
735
|
+
const rowid = import_xe_utils.default.isString(rowidOrRow) || import_xe_utils.default.isNumber(rowidOrRow) ? rowidOrRow : getRowid($xeTable, rowidOrRow);
|
|
740
736
|
return $xeTable.getRowById(rowid);
|
|
741
737
|
}
|
|
742
738
|
return null;
|
|
743
739
|
}
|
|
744
740
|
function getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) {
|
|
745
|
-
const {
|
|
746
|
-
height,
|
|
747
|
-
minHeight,
|
|
748
|
-
maxHeight
|
|
749
|
-
} = cellOpts;
|
|
741
|
+
const { height, minHeight, maxHeight } = cellOpts;
|
|
750
742
|
let cellHeight = rowRest.resizeHeight || height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
751
743
|
if (maxHeight && maxHeight <= cellHeight) {
|
|
752
744
|
cellHeight = maxHeight;
|
|
@@ -759,8 +751,8 @@ function getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) {
|
|
|
759
751
|
function getPaddingLeftRightSize(elem) {
|
|
760
752
|
if (elem) {
|
|
761
753
|
const computedStyle = getComputedStyle(elem);
|
|
762
|
-
const paddingLeft =
|
|
763
|
-
const paddingRight =
|
|
754
|
+
const paddingLeft = import_xe_utils.default.toNumber(computedStyle.paddingLeft);
|
|
755
|
+
const paddingRight = import_xe_utils.default.toNumber(computedStyle.paddingRight);
|
|
764
756
|
return paddingLeft + paddingRight;
|
|
765
757
|
}
|
|
766
758
|
return 0;
|
|
@@ -768,31 +760,17 @@ function getPaddingLeftRightSize(elem) {
|
|
|
768
760
|
function getElementMarginAndWidth(elem) {
|
|
769
761
|
if (elem) {
|
|
770
762
|
const computedStyle = getComputedStyle(elem);
|
|
771
|
-
const marginLeft =
|
|
772
|
-
const marginRight =
|
|
763
|
+
const marginLeft = import_xe_utils.default.toNumber(computedStyle.marginLeft);
|
|
764
|
+
const marginRight = import_xe_utils.default.toNumber(computedStyle.marginRight);
|
|
773
765
|
return elem.offsetWidth + marginLeft + marginRight;
|
|
774
766
|
}
|
|
775
767
|
return 0;
|
|
776
768
|
}
|
|
777
769
|
function toFilters(filters, colid) {
|
|
778
770
|
if (filters) {
|
|
779
|
-
if (
|
|
780
|
-
return filters.map(({
|
|
781
|
-
label,
|
|
782
|
-
value,
|
|
783
|
-
data,
|
|
784
|
-
resetValue,
|
|
785
|
-
checked
|
|
786
|
-
}) => {
|
|
787
|
-
return {
|
|
788
|
-
label,
|
|
789
|
-
value,
|
|
790
|
-
data,
|
|
791
|
-
resetValue,
|
|
792
|
-
checked: !!checked,
|
|
793
|
-
_checked: !!checked,
|
|
794
|
-
_colId: colid
|
|
795
|
-
};
|
|
771
|
+
if (import_xe_utils.default.isArray(filters)) {
|
|
772
|
+
return filters.map(({ label, value, data, resetValue, checked }) => {
|
|
773
|
+
return { label, value, data, resetValue, checked: !!checked, _checked: !!checked, _colId: colid };
|
|
796
774
|
});
|
|
797
775
|
}
|
|
798
776
|
return [];
|
|
@@ -800,17 +778,17 @@ function toFilters(filters, colid) {
|
|
|
800
778
|
return filters;
|
|
801
779
|
}
|
|
802
780
|
function toTreePathSeq(path) {
|
|
803
|
-
return path.map((num, i) => i % 2 === 0 ? Number(num) + 1 :
|
|
781
|
+
return path.map((num, i) => i % 2 === 0 ? Number(num) + 1 : ".").join("");
|
|
804
782
|
}
|
|
805
783
|
function getCellValue(row, column) {
|
|
806
784
|
if (column) {
|
|
807
|
-
return
|
|
785
|
+
return import_xe_utils.default.get(row, column.field);
|
|
808
786
|
}
|
|
809
787
|
return null;
|
|
810
788
|
}
|
|
811
789
|
function setCellValue(row, column, value) {
|
|
812
790
|
if (column) {
|
|
813
|
-
|
|
791
|
+
import_xe_utils.default.set(row, column.field, value);
|
|
814
792
|
}
|
|
815
793
|
}
|
|
816
794
|
function getRefElem(refEl) {
|
|
@@ -823,154 +801,116 @@ function getRefElem(refEl) {
|
|
|
823
801
|
return null;
|
|
824
802
|
}
|
|
825
803
|
function getCalcHeight(height) {
|
|
826
|
-
if (height ===
|
|
804
|
+
if (height === "unset") {
|
|
827
805
|
return 0;
|
|
828
806
|
}
|
|
829
807
|
return height || 0;
|
|
830
808
|
}
|
|
831
|
-
/**
|
|
832
|
-
* 列宽拖动最大宽度
|
|
833
|
-
*/
|
|
834
809
|
function getColReMaxWidth(params) {
|
|
835
|
-
const {
|
|
836
|
-
$table,
|
|
837
|
-
column,
|
|
838
|
-
cell
|
|
839
|
-
} = params;
|
|
810
|
+
const { $table, column, cell } = params;
|
|
840
811
|
const internalData = $table.internalData;
|
|
841
|
-
const {
|
|
842
|
-
|
|
843
|
-
} = internalData;
|
|
844
|
-
const {
|
|
845
|
-
computeColumnOpts,
|
|
846
|
-
computeResizableOpts
|
|
847
|
-
} = $table.getComputeMaps();
|
|
812
|
+
const { elemStore } = internalData;
|
|
813
|
+
const { computeColumnOpts, computeResizableOpts } = $table.getComputeMaps();
|
|
848
814
|
const resizableOpts = computeResizableOpts.value;
|
|
849
815
|
const columnOpts = computeColumnOpts.value;
|
|
850
|
-
const {
|
|
851
|
-
maxWidth: reMaxWidth
|
|
852
|
-
} = resizableOpts;
|
|
816
|
+
const { maxWidth: reMaxWidth } = resizableOpts;
|
|
853
817
|
const colMaxWidth = column.maxWidth || columnOpts.maxWidth;
|
|
854
|
-
// 如果自定义调整宽度逻辑
|
|
855
818
|
if (reMaxWidth) {
|
|
856
|
-
const customMaxWidth =
|
|
857
|
-
if (customMaxWidth !==
|
|
858
|
-
return Math.max(1,
|
|
819
|
+
const customMaxWidth = import_xe_utils.default.isFunction(reMaxWidth) ? reMaxWidth(params) : reMaxWidth;
|
|
820
|
+
if (customMaxWidth !== "auto") {
|
|
821
|
+
return Math.max(1, import_xe_utils.default.toNumber(customMaxWidth));
|
|
859
822
|
}
|
|
860
823
|
}
|
|
861
|
-
const minTitleWidth =
|
|
862
|
-
const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize((0,
|
|
824
|
+
const minTitleWidth = import_xe_utils.default.floor((import_xe_utils.default.toNumber(getComputedStyle(cell).fontSize) || 14) * 1.8);
|
|
825
|
+
const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize((0, import_dom.queryElement)(cell, ".vxe-cell"));
|
|
863
826
|
const mWidth = minTitleWidth + paddingLeftRight;
|
|
864
|
-
// 如果设置最小宽
|
|
865
827
|
if (colMaxWidth) {
|
|
866
|
-
const bodyScrollElem = getRefElem(elemStore[
|
|
828
|
+
const bodyScrollElem = getRefElem(elemStore["main-body-scroll"]);
|
|
867
829
|
if (bodyScrollElem) {
|
|
868
|
-
if ((0,
|
|
830
|
+
if ((0, import_dom.isScale)(colMaxWidth)) {
|
|
869
831
|
const bodyWidth = bodyScrollElem.clientWidth - 1;
|
|
870
832
|
const meanWidth = bodyWidth / 100;
|
|
871
|
-
return Math.max(mWidth, Math.floor(
|
|
872
|
-
} else if ((0,
|
|
873
|
-
return Math.max(mWidth,
|
|
833
|
+
return Math.max(mWidth, Math.floor(import_xe_utils.default.toInteger(colMaxWidth) * meanWidth));
|
|
834
|
+
} else if ((0, import_dom.isPx)(colMaxWidth)) {
|
|
835
|
+
return Math.max(mWidth, import_xe_utils.default.toInteger(colMaxWidth));
|
|
874
836
|
}
|
|
875
837
|
}
|
|
876
838
|
}
|
|
877
839
|
return -1;
|
|
878
840
|
}
|
|
879
|
-
/**
|
|
880
|
-
* 列宽拖动最小宽度
|
|
881
|
-
*/
|
|
882
841
|
function getColReMinWidth(params) {
|
|
883
|
-
const {
|
|
884
|
-
$table,
|
|
885
|
-
column,
|
|
886
|
-
cell
|
|
887
|
-
} = params;
|
|
842
|
+
const { $table, column, cell } = params;
|
|
888
843
|
const tableProps = $table.props;
|
|
889
844
|
const internalData = $table.internalData;
|
|
890
|
-
const {
|
|
891
|
-
computeColumnOpts,
|
|
892
|
-
computeResizableOpts
|
|
893
|
-
} = $table.getComputeMaps();
|
|
845
|
+
const { computeColumnOpts, computeResizableOpts } = $table.getComputeMaps();
|
|
894
846
|
const resizableOpts = computeResizableOpts.value;
|
|
895
847
|
const columnOpts = computeColumnOpts.value;
|
|
896
|
-
const {
|
|
897
|
-
minWidth: reMinWidth
|
|
898
|
-
} = resizableOpts;
|
|
899
|
-
// 如果自定义调整宽度逻辑
|
|
848
|
+
const { minWidth: reMinWidth } = resizableOpts;
|
|
900
849
|
if (reMinWidth) {
|
|
901
|
-
const customMinWidth =
|
|
902
|
-
if (customMinWidth !==
|
|
903
|
-
return Math.max(1,
|
|
850
|
+
const customMinWidth = import_xe_utils.default.isFunction(reMinWidth) ? reMinWidth(params) : reMinWidth;
|
|
851
|
+
if (customMinWidth !== "auto") {
|
|
852
|
+
return Math.max(1, import_xe_utils.default.toNumber(customMinWidth));
|
|
904
853
|
}
|
|
905
854
|
}
|
|
906
|
-
const {
|
|
907
|
-
|
|
908
|
-
} =
|
|
909
|
-
const {
|
|
910
|
-
showHeaderOverflow: allColumnHeaderOverflow
|
|
911
|
-
} = tableProps;
|
|
912
|
-
const {
|
|
913
|
-
showHeaderOverflow
|
|
914
|
-
} = column;
|
|
855
|
+
const { elemStore } = internalData;
|
|
856
|
+
const { showHeaderOverflow: allColumnHeaderOverflow } = tableProps;
|
|
857
|
+
const { showHeaderOverflow } = column;
|
|
915
858
|
const colMinWidth = column.minWidth || columnOpts.minWidth;
|
|
916
|
-
const headOverflow =
|
|
917
|
-
const showEllipsis = headOverflow ===
|
|
918
|
-
const showTitle = headOverflow ===
|
|
919
|
-
const showTooltip = headOverflow === true || headOverflow ===
|
|
859
|
+
const headOverflow = import_xe_utils.default.isUndefined(showHeaderOverflow) || import_xe_utils.default.isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
|
|
860
|
+
const showEllipsis = headOverflow === "ellipsis";
|
|
861
|
+
const showTitle = headOverflow === "title";
|
|
862
|
+
const showTooltip = headOverflow === true || headOverflow === "tooltip";
|
|
920
863
|
const hasEllipsis = showTitle || showTooltip || showEllipsis;
|
|
921
|
-
const minTitleWidth =
|
|
922
|
-
const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize((0,
|
|
864
|
+
const minTitleWidth = import_xe_utils.default.floor((import_xe_utils.default.toNumber(getComputedStyle(cell).fontSize) || 14) * 1.8);
|
|
865
|
+
const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize((0, import_dom.queryElement)(cell, ".vxe-cell"));
|
|
923
866
|
let mWidth = minTitleWidth + paddingLeftRight;
|
|
924
|
-
// 默认最小宽处理
|
|
925
867
|
if (hasEllipsis) {
|
|
926
|
-
const dragIconWidth = getElementMarginAndWidth((0,
|
|
927
|
-
const checkboxIconWidth = getElementMarginAndWidth((0,
|
|
928
|
-
const requiredIconWidth = getElementMarginAndWidth((0,
|
|
929
|
-
const editIconWidth = getElementMarginAndWidth((0,
|
|
930
|
-
const prefixIconWidth = getElementMarginAndWidth((0,
|
|
931
|
-
const suffixIconWidth = getElementMarginAndWidth((0,
|
|
932
|
-
const sortIconWidth = getElementMarginAndWidth((0,
|
|
933
|
-
const filterIconWidth = getElementMarginAndWidth((0,
|
|
868
|
+
const dragIconWidth = getElementMarginAndWidth((0, import_dom.queryElement)(cell, ".vxe-cell--drag-handle"));
|
|
869
|
+
const checkboxIconWidth = getElementMarginAndWidth((0, import_dom.queryElement)(cell, ".vxe-cell--checkbox"));
|
|
870
|
+
const requiredIconWidth = getElementMarginAndWidth((0, import_dom.queryElement)(cell, ".vxe-cell--required-icon"));
|
|
871
|
+
const editIconWidth = getElementMarginAndWidth((0, import_dom.queryElement)(cell, ".vxe-cell--edit-icon"));
|
|
872
|
+
const prefixIconWidth = getElementMarginAndWidth((0, import_dom.queryElement)(cell, ".vxe-cell-title-prefix-icon"));
|
|
873
|
+
const suffixIconWidth = getElementMarginAndWidth((0, import_dom.queryElement)(cell, ".vxe-cell-title-suffix-icon"));
|
|
874
|
+
const sortIconWidth = getElementMarginAndWidth((0, import_dom.queryElement)(cell, ".vxe-cell--sort"));
|
|
875
|
+
const filterIconWidth = getElementMarginAndWidth((0, import_dom.queryElement)(cell, ".vxe-cell--filter"));
|
|
934
876
|
mWidth += dragIconWidth + checkboxIconWidth + requiredIconWidth + editIconWidth + prefixIconWidth + suffixIconWidth + filterIconWidth + sortIconWidth;
|
|
935
877
|
}
|
|
936
|
-
// 如果设置最小宽
|
|
937
878
|
if (colMinWidth) {
|
|
938
|
-
const bodyScrollElem = getRefElem(elemStore[
|
|
879
|
+
const bodyScrollElem = getRefElem(elemStore["main-body-scroll"]);
|
|
939
880
|
if (bodyScrollElem) {
|
|
940
|
-
if ((0,
|
|
881
|
+
if ((0, import_dom.isScale)(colMinWidth)) {
|
|
941
882
|
const bodyWidth = bodyScrollElem.clientWidth - 1;
|
|
942
883
|
const meanWidth = bodyWidth / 100;
|
|
943
|
-
return Math.max(mWidth, Math.floor(
|
|
944
|
-
} else if ((0,
|
|
945
|
-
return Math.max(mWidth,
|
|
884
|
+
return Math.max(mWidth, Math.floor(import_xe_utils.default.toInteger(colMinWidth) * meanWidth));
|
|
885
|
+
} else if ((0, import_dom.isPx)(colMinWidth)) {
|
|
886
|
+
return Math.max(mWidth, import_xe_utils.default.toInteger(colMinWidth));
|
|
946
887
|
}
|
|
947
888
|
}
|
|
948
889
|
}
|
|
949
890
|
return mWidth;
|
|
950
891
|
}
|
|
951
892
|
function isColumnInfo(column) {
|
|
952
|
-
return column && (column.constructor ===
|
|
893
|
+
return column && (column.constructor === import_columnInfo.ColumnInfo || column instanceof import_columnInfo.ColumnInfo);
|
|
953
894
|
}
|
|
954
|
-
// 获取所有的列,排除分组
|
|
955
895
|
function getColumnList(columns) {
|
|
956
896
|
const result = [];
|
|
957
|
-
columns.forEach(column => {
|
|
958
|
-
result.push(...
|
|
897
|
+
columns.forEach((column) => {
|
|
898
|
+
result.push(...column.children && column.children.length ? getColumnList(column.children) : [column]);
|
|
959
899
|
});
|
|
960
900
|
return result;
|
|
961
901
|
}
|
|
962
902
|
function createColumn($xeTable, options, renderOptions) {
|
|
963
|
-
return isColumnInfo(options) ? options : (0,
|
|
903
|
+
return isColumnInfo(options) ? options : (0, import_vue.reactive)(new import_columnInfo.ColumnInfo($xeTable, options, renderOptions));
|
|
964
904
|
}
|
|
965
905
|
function watchColumn($xeTable, props, column) {
|
|
966
|
-
Object.keys(props).forEach(name => {
|
|
967
|
-
(0,
|
|
906
|
+
Object.keys(props).forEach((name) => {
|
|
907
|
+
(0, import_vue.watch)(() => props[name], (value) => {
|
|
968
908
|
column.update(name, value);
|
|
969
909
|
if ($xeTable) {
|
|
970
|
-
if (name ===
|
|
910
|
+
if (name === "filters") {
|
|
971
911
|
$xeTable.setFilter(column, value);
|
|
972
912
|
$xeTable.handleUpdateDataQueue();
|
|
973
|
-
} else if ([
|
|
913
|
+
} else if (["visible", "fixed", "width", "minWidth", "maxWidth"].includes(name)) {
|
|
974
914
|
$xeTable.handleRefreshColumnQueue();
|
|
975
915
|
}
|
|
976
916
|
}
|
|
@@ -978,99 +918,91 @@ function watchColumn($xeTable, props, column) {
|
|
|
978
918
|
});
|
|
979
919
|
}
|
|
980
920
|
function assembleColumn($xeTable, elem, column, colgroup) {
|
|
981
|
-
const {
|
|
982
|
-
|
|
983
|
-
} = $xeTable;
|
|
984
|
-
const {
|
|
985
|
-
staticColumns
|
|
986
|
-
} = reactData;
|
|
921
|
+
const { reactData } = $xeTable;
|
|
922
|
+
const { staticColumns } = reactData;
|
|
987
923
|
const parentElem = elem.parentNode;
|
|
988
924
|
const parentColumn = colgroup ? colgroup.columnConfig : null;
|
|
989
925
|
const parentCols = parentColumn ? parentColumn.children : staticColumns;
|
|
990
926
|
if (parentElem && parentCols) {
|
|
991
927
|
column.defaultParentId = parentColumn ? parentColumn.id : null;
|
|
992
|
-
parentCols.splice(
|
|
928
|
+
parentCols.splice(import_xe_utils.default.arrayIndexOf(parentElem.children, elem), 0, column);
|
|
993
929
|
reactData.staticColumns = staticColumns.slice(0);
|
|
994
930
|
}
|
|
995
931
|
}
|
|
996
932
|
function destroyColumn($xeTable, column) {
|
|
997
|
-
const {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
const {
|
|
1001
|
-
staticColumns
|
|
1002
|
-
} = reactData;
|
|
1003
|
-
const matchObj = _xeUtils.default.findTree(staticColumns, item => item.id === column.id, {
|
|
1004
|
-
children: 'children'
|
|
1005
|
-
});
|
|
933
|
+
const { reactData } = $xeTable;
|
|
934
|
+
const { staticColumns } = reactData;
|
|
935
|
+
const matchObj = import_xe_utils.default.findTree(staticColumns, (item) => item.id === column.id, { children: "children" });
|
|
1006
936
|
if (matchObj) {
|
|
1007
937
|
matchObj.items.splice(matchObj.index, 1);
|
|
1008
938
|
}
|
|
1009
939
|
reactData.staticColumns = staticColumns.slice(0);
|
|
1010
940
|
}
|
|
1011
941
|
function getRootColumn($xeTable, column) {
|
|
1012
|
-
const {
|
|
1013
|
-
|
|
1014
|
-
} = $xeTable;
|
|
1015
|
-
const {
|
|
1016
|
-
fullColumnIdData
|
|
1017
|
-
} = internalData;
|
|
942
|
+
const { internalData } = $xeTable;
|
|
943
|
+
const { fullColumnIdData } = internalData;
|
|
1018
944
|
if (!column) {
|
|
1019
945
|
return null;
|
|
1020
946
|
}
|
|
1021
947
|
let parentColId = column.parentId;
|
|
1022
948
|
while (fullColumnIdData[parentColId]) {
|
|
1023
|
-
const
|
|
1024
|
-
parentColId =
|
|
949
|
+
const column2 = fullColumnIdData[parentColId].column;
|
|
950
|
+
parentColId = column2.parentId;
|
|
1025
951
|
if (!parentColId) {
|
|
1026
|
-
return
|
|
952
|
+
return column2;
|
|
1027
953
|
}
|
|
1028
954
|
}
|
|
1029
955
|
return column;
|
|
1030
956
|
}
|
|
1031
957
|
function getFirstChildColumn(column) {
|
|
1032
|
-
const {
|
|
1033
|
-
children
|
|
1034
|
-
} = column;
|
|
958
|
+
const { children } = column;
|
|
1035
959
|
if (children && children.length) {
|
|
1036
|
-
return getFirstChildColumn(
|
|
960
|
+
return getFirstChildColumn(import_xe_utils.default.first(children));
|
|
1037
961
|
}
|
|
1038
962
|
return column;
|
|
1039
963
|
}
|
|
1040
964
|
function getLastChildColumn(column) {
|
|
1041
|
-
const {
|
|
1042
|
-
children
|
|
1043
|
-
} = column;
|
|
965
|
+
const { children } = column;
|
|
1044
966
|
if (children && children.length) {
|
|
1045
|
-
return getFirstChildColumn(
|
|
967
|
+
return getFirstChildColumn(import_xe_utils.default.last(children));
|
|
1046
968
|
}
|
|
1047
969
|
return column;
|
|
1048
970
|
}
|
|
1049
971
|
function clearTableDefaultStatus($xeTable) {
|
|
1050
|
-
const {
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
} = $xeTable;
|
|
1054
|
-
const {
|
|
1055
|
-
keyboardConfig,
|
|
1056
|
-
mouseConfig
|
|
1057
|
-
} = props;
|
|
1058
|
-
const {
|
|
1059
|
-
computeMouseOpts,
|
|
1060
|
-
computeKeyboardOpts
|
|
1061
|
-
} = $xeTable.getComputeMaps();
|
|
972
|
+
const { props, internalData } = $xeTable;
|
|
973
|
+
const { keyboardConfig, mouseConfig } = props;
|
|
974
|
+
const { computeMouseOpts, computeKeyboardOpts } = $xeTable.getComputeMaps();
|
|
1062
975
|
const mouseOpts = computeMouseOpts.value;
|
|
1063
976
|
const keyboardOpts = computeKeyboardOpts.value;
|
|
1064
977
|
internalData.initStatus = false;
|
|
1065
|
-
const actionList = [
|
|
978
|
+
const actionList = [
|
|
979
|
+
$xeTable.clearSort(),
|
|
980
|
+
$xeTable.clearCurrentRow(),
|
|
981
|
+
$xeTable.clearCurrentColumn(),
|
|
982
|
+
$xeTable.clearRadioRow(),
|
|
983
|
+
$xeTable.clearRadioReserve(),
|
|
984
|
+
$xeTable.clearCheckboxRow(),
|
|
985
|
+
$xeTable.clearCheckboxReserve(),
|
|
986
|
+
$xeTable.clearRowExpand(),
|
|
987
|
+
$xeTable.clearTreeExpand(),
|
|
988
|
+
$xeTable.clearTreeExpandReserve(),
|
|
989
|
+
$xeTable.clearPendingRow()
|
|
990
|
+
];
|
|
1066
991
|
if ($xeTable.clearFilter) {
|
|
1067
|
-
actionList.push(
|
|
992
|
+
actionList.push(
|
|
993
|
+
$xeTable.clearFilter()
|
|
994
|
+
);
|
|
1068
995
|
}
|
|
1069
|
-
if ($xeTable.clearSelected && ((0,
|
|
1070
|
-
actionList.push(
|
|
996
|
+
if ($xeTable.clearSelected && ((0, import_utils.hasEnableConf)(keyboardConfig, keyboardOpts) || (0, import_utils.hasEnableConf)(mouseConfig, mouseOpts))) {
|
|
997
|
+
actionList.push(
|
|
998
|
+
$xeTable.clearSelected()
|
|
999
|
+
);
|
|
1071
1000
|
}
|
|
1072
|
-
if ($xeTable.clearCellAreas && (0,
|
|
1073
|
-
actionList.push(
|
|
1001
|
+
if ($xeTable.clearCellAreas && (0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
|
|
1002
|
+
actionList.push(
|
|
1003
|
+
$xeTable.clearCellAreas(),
|
|
1004
|
+
$xeTable.clearCopyCellArea()
|
|
1005
|
+
);
|
|
1074
1006
|
}
|
|
1075
1007
|
return Promise.all(actionList).then(() => {
|
|
1076
1008
|
return $xeTable.clearScroll();
|
|
@@ -1085,30 +1017,15 @@ function clearTableAllStatus($xeTable) {
|
|
|
1085
1017
|
function rowToVisible($xeTable, row) {
|
|
1086
1018
|
const reactData = $xeTable.reactData;
|
|
1087
1019
|
const internalData = $xeTable.internalData;
|
|
1088
|
-
const {
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
computeRowOpts,
|
|
1092
|
-
computeCellOpts,
|
|
1093
|
-
computeDefaultRowHeight
|
|
1094
|
-
} = $xeTable.getComputeMaps();
|
|
1095
|
-
const {
|
|
1096
|
-
scrollYLoad,
|
|
1097
|
-
scrollYTop,
|
|
1098
|
-
isAllOverflow
|
|
1099
|
-
} = reactData;
|
|
1100
|
-
const {
|
|
1101
|
-
elemStore,
|
|
1102
|
-
afterFullData,
|
|
1103
|
-
fullAllDataRowIdData,
|
|
1104
|
-
isResizeCellHeight
|
|
1105
|
-
} = internalData;
|
|
1020
|
+
const { computeLeftFixedWidth, computeRightFixedWidth, computeRowOpts, computeCellOpts, computeDefaultRowHeight } = $xeTable.getComputeMaps();
|
|
1021
|
+
const { scrollYLoad, scrollYTop, isAllOverflow } = reactData;
|
|
1022
|
+
const { elemStore, afterFullData, fullAllDataRowIdData, isResizeCellHeight } = internalData;
|
|
1106
1023
|
const rowOpts = computeRowOpts.value;
|
|
1107
1024
|
const cellOpts = computeCellOpts.value;
|
|
1108
1025
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
1109
1026
|
const leftFixedWidth = computeLeftFixedWidth.value;
|
|
1110
1027
|
const rightFixedWidth = computeRightFixedWidth.value;
|
|
1111
|
-
const bodyScrollElem = getRefElem(elemStore[
|
|
1028
|
+
const bodyScrollElem = getRefElem(elemStore["main-body-scroll"]);
|
|
1112
1029
|
const rowid = getRowid($xeTable, row);
|
|
1113
1030
|
if (bodyScrollElem) {
|
|
1114
1031
|
const bodyHeight = bodyScrollElem.clientHeight;
|
|
@@ -1117,14 +1034,12 @@ function rowToVisible($xeTable, row) {
|
|
|
1117
1034
|
if (trElem) {
|
|
1118
1035
|
const trOffsetTop = trElem.offsetTop + (scrollYLoad ? scrollYTop : 0);
|
|
1119
1036
|
const trHeight = trElem.clientHeight;
|
|
1120
|
-
// 检测行是否在可视区中
|
|
1121
1037
|
if (trOffsetTop < bodyScrollTop || trOffsetTop > bodyScrollTop + bodyHeight) {
|
|
1122
1038
|
return $xeTable.scrollTo(null, trOffsetTop);
|
|
1123
1039
|
} else if (trOffsetTop + trHeight >= bodyHeight + bodyScrollTop) {
|
|
1124
1040
|
return $xeTable.scrollTo(null, bodyScrollTop + trHeight);
|
|
1125
1041
|
}
|
|
1126
1042
|
} else {
|
|
1127
|
-
// 如果是虚拟渲染滚动
|
|
1128
1043
|
if (scrollYLoad) {
|
|
1129
1044
|
const isCustomCellHeight = isResizeCellHeight || cellOpts.height || rowOpts.height;
|
|
1130
1045
|
if (!isCustomCellHeight && isAllOverflow) {
|
|
@@ -1145,21 +1060,12 @@ function rowToVisible($xeTable, row) {
|
|
|
1145
1060
|
function colToVisible($xeTable, isForce, column, row) {
|
|
1146
1061
|
const reactData = $xeTable.reactData;
|
|
1147
1062
|
const internalData = $xeTable.internalData;
|
|
1148
|
-
const {
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
} = $xeTable.getComputeMaps();
|
|
1152
|
-
const {
|
|
1153
|
-
scrollXLoad,
|
|
1154
|
-
scrollXLeft
|
|
1155
|
-
} = reactData;
|
|
1156
|
-
const {
|
|
1157
|
-
elemStore,
|
|
1158
|
-
visibleColumn
|
|
1159
|
-
} = internalData;
|
|
1063
|
+
const { computeLeftFixedWidth, computeRightFixedWidth } = $xeTable.getComputeMaps();
|
|
1064
|
+
const { scrollXLoad, scrollXLeft } = reactData;
|
|
1065
|
+
const { elemStore, visibleColumn } = internalData;
|
|
1160
1066
|
const leftFixedWidth = computeLeftFixedWidth.value;
|
|
1161
1067
|
const rightFixedWidth = computeRightFixedWidth.value;
|
|
1162
|
-
const bodyScrollElem = getRefElem(elemStore[
|
|
1068
|
+
const bodyScrollElem = getRefElem(elemStore["main-body-scroll"]);
|
|
1163
1069
|
if (column.fixed) {
|
|
1164
1070
|
return Promise.resolve();
|
|
1165
1071
|
}
|
|
@@ -1177,7 +1083,6 @@ function colToVisible($xeTable, isForce, column, row) {
|
|
|
1177
1083
|
if (tdElem) {
|
|
1178
1084
|
const tdOffsetLeft = tdElem.offsetLeft + (scrollXLoad ? scrollXLeft : 0);
|
|
1179
1085
|
const cellWidth = tdElem.clientWidth;
|
|
1180
|
-
// 检测是否在可视区中
|
|
1181
1086
|
if (isForce || !(tdOffsetLeft <= bodyScrollLeft + leftFixedWidth && tdOffsetLeft + cellWidth > bodyScrollLeft + leftFixedWidth) && !(tdOffsetLeft >= bodyScrollLeft + leftFixedWidth && tdOffsetLeft < bodyScrollLeft + bodyWidth - rightFixedWidth)) {
|
|
1182
1087
|
if (tdOffsetLeft < bodyScrollLeft + leftFixedWidth) {
|
|
1183
1088
|
return $xeTable.scrollTo(tdOffsetLeft - leftFixedWidth - 1);
|
|
@@ -1196,7 +1101,6 @@ function colToVisible($xeTable, isForce, column, row) {
|
|
|
1196
1101
|
}
|
|
1197
1102
|
tdOffsetLeft += currCol.renderWidth;
|
|
1198
1103
|
}
|
|
1199
|
-
// 检测是否在可视区中
|
|
1200
1104
|
if (isForce || !(tdOffsetLeft <= bodyScrollLeft + leftFixedWidth && tdOffsetLeft + cellWidth > bodyScrollLeft + leftFixedWidth) && !(tdOffsetLeft >= bodyScrollLeft + leftFixedWidth && tdOffsetLeft < bodyScrollLeft + bodyWidth - rightFixedWidth)) {
|
|
1201
1105
|
if (tdOffsetLeft < bodyScrollLeft) {
|
|
1202
1106
|
return $xeTable.scrollTo(tdOffsetLeft - leftFixedWidth - 1);
|
|
@@ -1209,17 +1113,12 @@ function colToVisible($xeTable, isForce, column, row) {
|
|
|
1209
1113
|
return Promise.resolve();
|
|
1210
1114
|
}
|
|
1211
1115
|
function hangleBolleanDefaultValue(currVal, defVal) {
|
|
1212
|
-
return
|
|
1116
|
+
return import_xe_utils.default.isBoolean(currVal) ? currVal : defVal;
|
|
1213
1117
|
}
|
|
1214
1118
|
function handleCustomStoreConfig($xeTable) {
|
|
1215
|
-
const {
|
|
1216
|
-
computeCustomOpts
|
|
1217
|
-
} = $xeTable.getComputeMaps();
|
|
1119
|
+
const { computeCustomOpts } = $xeTable.getComputeMaps();
|
|
1218
1120
|
const customOpts = computeCustomOpts.value;
|
|
1219
|
-
const {
|
|
1220
|
-
storage,
|
|
1221
|
-
storeOptions
|
|
1222
|
-
} = customOpts;
|
|
1121
|
+
const { storage, storeOptions } = customOpts;
|
|
1223
1122
|
const isAllCustom = storage === true;
|
|
1224
1123
|
const storageOpts = Object.assign({}, isAllCustom ? {} : storage || {}, storeOptions);
|
|
1225
1124
|
const isCustomAlign = hangleBolleanDefaultValue(storageOpts.align, isAllCustom);
|
|
@@ -1244,4 +1143,4 @@ function handleCustomStoreConfig($xeTable) {
|
|
|
1244
1143
|
isCustomAggFunc,
|
|
1245
1144
|
isCustomPager
|
|
1246
1145
|
};
|
|
1247
|
-
}
|
|
1146
|
+
}
|