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,26 +1,46 @@
|
|
|
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 panel_exports = {};
|
|
30
|
+
__export(panel_exports, {
|
|
31
|
+
createInternalData: () => createInternalData,
|
|
32
|
+
default: () => panel_default
|
|
5
33
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const {
|
|
17
|
-
errLog
|
|
18
|
-
} = (0, _log.createComponentLog)('table');
|
|
19
|
-
const {
|
|
20
|
-
getI18n,
|
|
21
|
-
getIcon,
|
|
22
|
-
renderEmptyElement
|
|
23
|
-
} = _ui.VxeUI;
|
|
34
|
+
module.exports = __toCommonJS(panel_exports);
|
|
35
|
+
var import_vue = require("vue");
|
|
36
|
+
var import_comp = require("../../../ui/src/comp");
|
|
37
|
+
var import_ui = require("../../../ui");
|
|
38
|
+
var import_utils = require("../../../ui/src/utils");
|
|
39
|
+
var import_dom = require("../../../ui/src/dom");
|
|
40
|
+
var import_log = require("../../../ui/src/log");
|
|
41
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
42
|
+
const { errLog } = (0, import_log.createComponentLog)("table");
|
|
43
|
+
const { getI18n, getIcon, renderEmptyElement } = import_ui.VxeUI;
|
|
24
44
|
function createInternalData() {
|
|
25
45
|
return {
|
|
26
46
|
// teleportTo: undefined,
|
|
@@ -32,8 +52,8 @@ function createInternalData() {
|
|
|
32
52
|
// customDragTime: null
|
|
33
53
|
};
|
|
34
54
|
}
|
|
35
|
-
var
|
|
36
|
-
name:
|
|
55
|
+
var panel_default = (0, import_comp.defineVxeComponent)({
|
|
56
|
+
name: "TableCustomPanel",
|
|
37
57
|
props: {
|
|
38
58
|
customStore: {
|
|
39
59
|
type: Object,
|
|
@@ -41,38 +61,25 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
41
61
|
}
|
|
42
62
|
},
|
|
43
63
|
setup(props, context) {
|
|
44
|
-
const xID =
|
|
45
|
-
const VxeUIModalComponent =
|
|
46
|
-
const VxeUIDrawerComponent =
|
|
47
|
-
const VxeUIButtonComponent =
|
|
48
|
-
const VxeUINumberInputComponent =
|
|
49
|
-
const VxeUIRadioGroupComponent =
|
|
50
|
-
const $xeTable = (0,
|
|
51
|
-
const {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
computeMouseOpts,
|
|
60
|
-
computeColumnDragOpts,
|
|
61
|
-
computeColumnOpts,
|
|
62
|
-
computeIsMaxFixedColumn,
|
|
63
|
-
computeResizableOpts,
|
|
64
|
-
computeAggregateOpts
|
|
65
|
-
} = $xeTable.getComputeMaps();
|
|
66
|
-
const refElem = (0, _vue.ref)();
|
|
67
|
-
const refBodyWrapperElem = (0, _vue.ref)();
|
|
68
|
-
const refCustomBodyElem = (0, _vue.ref)();
|
|
69
|
-
const refDragLineElem = (0, _vue.ref)();
|
|
70
|
-
const refDragTipElem = (0, _vue.ref)();
|
|
71
|
-
const customPanelReactData = (0, _vue.reactive)({
|
|
64
|
+
const xID = import_xe_utils.default.uniqueId();
|
|
65
|
+
const VxeUIModalComponent = import_ui.VxeUI.getComponent("VxeModal");
|
|
66
|
+
const VxeUIDrawerComponent = import_ui.VxeUI.getComponent("VxeDrawer");
|
|
67
|
+
const VxeUIButtonComponent = import_ui.VxeUI.getComponent("VxeButton");
|
|
68
|
+
const VxeUINumberInputComponent = import_ui.VxeUI.getComponent("VxeNumberInput");
|
|
69
|
+
const VxeUIRadioGroupComponent = import_ui.VxeUI.getComponent("VxeRadioGroup");
|
|
70
|
+
const $xeTable = (0, import_vue.inject)("$xeTable", {});
|
|
71
|
+
const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
|
|
72
|
+
const { computeSize, computeCustomOpts, computeMouseOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps();
|
|
73
|
+
const refElem = (0, import_vue.ref)();
|
|
74
|
+
const refBodyWrapperElem = (0, import_vue.ref)();
|
|
75
|
+
const refCustomBodyElem = (0, import_vue.ref)();
|
|
76
|
+
const refDragLineElem = (0, import_vue.ref)();
|
|
77
|
+
const refDragTipElem = (0, import_vue.ref)();
|
|
78
|
+
const customPanelReactData = (0, import_vue.reactive)({
|
|
72
79
|
dragCol: null,
|
|
73
80
|
dragGroupField: null,
|
|
74
81
|
dragAggFnCol: null,
|
|
75
|
-
dragTipText:
|
|
82
|
+
dragTipText: ""
|
|
76
83
|
});
|
|
77
84
|
let customPanelInternalData = createInternalData();
|
|
78
85
|
const refMaps = {
|
|
@@ -83,17 +90,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
83
90
|
refDragTipElem
|
|
84
91
|
};
|
|
85
92
|
const computeMaps = {};
|
|
86
|
-
const handleWrapperMouseenterEvent = evnt => {
|
|
87
|
-
const {
|
|
88
|
-
customStore
|
|
89
|
-
} = props;
|
|
93
|
+
const handleWrapperMouseenterEvent = (evnt) => {
|
|
94
|
+
const { customStore } = props;
|
|
90
95
|
customStore.activeWrapper = true;
|
|
91
96
|
$xeTable.customOpenEvent(evnt);
|
|
92
97
|
};
|
|
93
|
-
const handleWrapperMouseleaveEvent = evnt => {
|
|
94
|
-
const {
|
|
95
|
-
customStore
|
|
96
|
-
} = props;
|
|
98
|
+
const handleWrapperMouseleaveEvent = (evnt) => {
|
|
99
|
+
const { customStore } = props;
|
|
97
100
|
customStore.activeWrapper = false;
|
|
98
101
|
setTimeout(() => {
|
|
99
102
|
if (!customStore.activeBtn && !customStore.activeWrapper) {
|
|
@@ -101,52 +104,44 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
101
104
|
}
|
|
102
105
|
}, 300);
|
|
103
106
|
};
|
|
104
|
-
const confirmCustomEvent = ({
|
|
105
|
-
$event
|
|
106
|
-
}) => {
|
|
107
|
+
const confirmCustomEvent = ({ $event }) => {
|
|
107
108
|
tableReactData.isCustomStatus = true;
|
|
108
109
|
$xeTable.saveCustom();
|
|
109
110
|
$xeTable.closeCustom();
|
|
110
|
-
$xeTable.emitCustomEvent(
|
|
111
|
-
$xeTable.dispatchEvent(
|
|
112
|
-
$xeTable.emitCustomEvent(
|
|
113
|
-
$xeTable.dispatchEvent(
|
|
111
|
+
$xeTable.emitCustomEvent("confirm", $event);
|
|
112
|
+
$xeTable.dispatchEvent("custom-confirm", {}, $event);
|
|
113
|
+
$xeTable.emitCustomEvent("close", $event);
|
|
114
|
+
$xeTable.dispatchEvent("custom-close", {}, $event);
|
|
114
115
|
};
|
|
115
|
-
const cancelCloseEvent = ({
|
|
116
|
-
$event
|
|
117
|
-
}) => {
|
|
116
|
+
const cancelCloseEvent = ({ $event }) => {
|
|
118
117
|
$xeTable.closeCustom();
|
|
119
|
-
$xeTable.emitCustomEvent(
|
|
120
|
-
$xeTable.dispatchEvent(
|
|
118
|
+
$xeTable.emitCustomEvent("close", $event);
|
|
119
|
+
$xeTable.dispatchEvent("custom-close", {}, $event);
|
|
121
120
|
};
|
|
122
|
-
const cancelCustomEvent = ({
|
|
123
|
-
$event
|
|
124
|
-
}) => {
|
|
121
|
+
const cancelCustomEvent = ({ $event }) => {
|
|
125
122
|
$xeTable.cancelCustom();
|
|
126
123
|
$xeTable.closeCustom();
|
|
127
|
-
$xeTable.emitCustomEvent(
|
|
128
|
-
$xeTable.dispatchEvent(
|
|
129
|
-
$xeTable.emitCustomEvent(
|
|
130
|
-
$xeTable.dispatchEvent(
|
|
124
|
+
$xeTable.emitCustomEvent("cancel", $event);
|
|
125
|
+
$xeTable.dispatchEvent("custom-cancel", {}, $event);
|
|
126
|
+
$xeTable.emitCustomEvent("close", $event);
|
|
127
|
+
$xeTable.dispatchEvent("custom-close", {}, $event);
|
|
131
128
|
};
|
|
132
|
-
const handleResetCustomEvent = evnt => {
|
|
129
|
+
const handleResetCustomEvent = (evnt) => {
|
|
133
130
|
$xeTable.resetCustom(true);
|
|
134
131
|
$xeTable.closeCustom();
|
|
135
|
-
$xeTable.emitCustomEvent(
|
|
136
|
-
$xeTable.dispatchEvent(
|
|
137
|
-
$xeTable.emitCustomEvent(
|
|
138
|
-
$xeTable.dispatchEvent(
|
|
132
|
+
$xeTable.emitCustomEvent("reset", evnt);
|
|
133
|
+
$xeTable.dispatchEvent("custom-reset", {}, evnt);
|
|
134
|
+
$xeTable.emitCustomEvent("close", evnt);
|
|
135
|
+
$xeTable.dispatchEvent("custom-close", {}, evnt);
|
|
139
136
|
};
|
|
140
|
-
const resetCustomEvent = ({
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
content: getI18n('vxe.custom.cstmConfirmRestore'),
|
|
146
|
-
className: 'vxe-table--ignore-clear',
|
|
137
|
+
const resetCustomEvent = ({ $event }) => {
|
|
138
|
+
if (import_ui.VxeUI.modal) {
|
|
139
|
+
import_ui.VxeUI.modal.confirm({
|
|
140
|
+
content: getI18n("vxe.custom.cstmConfirmRestore"),
|
|
141
|
+
className: "vxe-table--ignore-clear",
|
|
147
142
|
escClosable: true
|
|
148
|
-
}).then(type => {
|
|
149
|
-
if (type ===
|
|
143
|
+
}).then((type) => {
|
|
144
|
+
if (type === "confirm") {
|
|
150
145
|
handleResetCustomEvent($event);
|
|
151
146
|
}
|
|
152
147
|
});
|
|
@@ -154,18 +149,14 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
154
149
|
handleResetCustomEvent($event);
|
|
155
150
|
}
|
|
156
151
|
};
|
|
157
|
-
const handleOptionCheck = column => {
|
|
158
|
-
const {
|
|
159
|
-
|
|
160
|
-
} = tableReactData;
|
|
161
|
-
const matchObj = _xeUtils.default.findTree(customColumnList, item => item === column);
|
|
152
|
+
const handleOptionCheck = (column) => {
|
|
153
|
+
const { customColumnList } = tableReactData;
|
|
154
|
+
const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
|
|
162
155
|
if (matchObj && matchObj.parent) {
|
|
163
|
-
const {
|
|
164
|
-
parent: parentItem
|
|
165
|
-
} = matchObj;
|
|
156
|
+
const { parent: parentItem } = matchObj;
|
|
166
157
|
if (parentItem.children && parentItem.children.length) {
|
|
167
|
-
parentItem.renderVisible = parentItem.children.every(
|
|
168
|
-
parentItem.halfVisible = !parentItem.renderVisible && parentItem.children.some(
|
|
158
|
+
parentItem.renderVisible = parentItem.children.every((column2) => column2.renderVisible);
|
|
159
|
+
parentItem.halfVisible = !parentItem.renderVisible && parentItem.children.some((column2) => column2.renderVisible || column2.halfVisible);
|
|
169
160
|
handleOptionCheck(parentItem);
|
|
170
161
|
}
|
|
171
162
|
}
|
|
@@ -174,28 +165,25 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
174
165
|
const isChecked = !column.renderVisible;
|
|
175
166
|
const customOpts = computeCustomOpts.value;
|
|
176
167
|
if (customOpts.immediate) {
|
|
177
|
-
|
|
168
|
+
import_xe_utils.default.eachTree([column], (item) => {
|
|
178
169
|
item.visible = isChecked;
|
|
179
170
|
item.renderVisible = isChecked;
|
|
180
171
|
item.halfVisible = false;
|
|
181
172
|
});
|
|
182
173
|
tableReactData.isCustomStatus = true;
|
|
183
174
|
$xeTable.handleCustom();
|
|
184
|
-
$xeTable.saveCustomStore(
|
|
175
|
+
$xeTable.saveCustomStore("update:visible");
|
|
185
176
|
} else {
|
|
186
|
-
|
|
177
|
+
import_xe_utils.default.eachTree([column], (item) => {
|
|
187
178
|
item.renderVisible = isChecked;
|
|
188
179
|
item.halfVisible = false;
|
|
189
180
|
});
|
|
190
181
|
}
|
|
191
182
|
handleOptionCheck(column);
|
|
192
183
|
$xeTable.checkCustomStatus();
|
|
193
|
-
$xeTable.dispatchEvent(
|
|
194
|
-
column,
|
|
195
|
-
checked: isChecked
|
|
196
|
-
}, evnt);
|
|
184
|
+
$xeTable.dispatchEvent("custom-visible-change", { column, checked: isChecked }, evnt);
|
|
197
185
|
};
|
|
198
|
-
const changeColumnWidth = column => {
|
|
186
|
+
const changeColumnWidth = (column) => {
|
|
199
187
|
const customOpts = computeCustomOpts.value;
|
|
200
188
|
if (customOpts.immediate) {
|
|
201
189
|
if (column.renderResizeWidth !== column.renderWidth) {
|
|
@@ -203,7 +191,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
203
191
|
column.renderWidth = column.renderResizeWidth;
|
|
204
192
|
tableReactData.isCustomStatus = true;
|
|
205
193
|
$xeTable.handleCustom();
|
|
206
|
-
$xeTable.saveCustomStore(
|
|
194
|
+
$xeTable.saveCustomStore("update:width");
|
|
207
195
|
}
|
|
208
196
|
}
|
|
209
197
|
};
|
|
@@ -213,15 +201,15 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
213
201
|
let targetFixed = null;
|
|
214
202
|
if (customOpts.immediate) {
|
|
215
203
|
if (column.renderFixed === colFixed) {
|
|
216
|
-
targetFixed =
|
|
217
|
-
|
|
218
|
-
col.fixed =
|
|
219
|
-
col.renderFixed =
|
|
204
|
+
targetFixed = "";
|
|
205
|
+
import_xe_utils.default.eachTree([column], (col) => {
|
|
206
|
+
col.fixed = "";
|
|
207
|
+
col.renderFixed = "";
|
|
220
208
|
});
|
|
221
209
|
} else {
|
|
222
210
|
if (!isMaxFixedColumn || column.renderFixed) {
|
|
223
211
|
targetFixed = colFixed;
|
|
224
|
-
|
|
212
|
+
import_xe_utils.default.eachTree([column], (col) => {
|
|
225
213
|
col.fixed = colFixed;
|
|
226
214
|
col.renderFixed = colFixed;
|
|
227
215
|
});
|
|
@@ -229,27 +217,24 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
229
217
|
}
|
|
230
218
|
tableReactData.isCustomStatus = true;
|
|
231
219
|
$xeTable.handleCustom();
|
|
232
|
-
$xeTable.saveCustomStore(
|
|
220
|
+
$xeTable.saveCustomStore("update:fixed");
|
|
233
221
|
} else {
|
|
234
222
|
if (column.renderFixed === colFixed) {
|
|
235
|
-
targetFixed =
|
|
236
|
-
|
|
237
|
-
col.renderFixed =
|
|
223
|
+
targetFixed = "";
|
|
224
|
+
import_xe_utils.default.eachTree([column], (col) => {
|
|
225
|
+
col.renderFixed = "";
|
|
238
226
|
});
|
|
239
227
|
} else {
|
|
240
228
|
if (!isMaxFixedColumn || column.renderFixed) {
|
|
241
229
|
targetFixed = colFixed;
|
|
242
|
-
|
|
230
|
+
import_xe_utils.default.eachTree([column], (col) => {
|
|
243
231
|
col.renderFixed = colFixed;
|
|
244
232
|
});
|
|
245
233
|
}
|
|
246
234
|
}
|
|
247
235
|
}
|
|
248
236
|
if (targetFixed !== null) {
|
|
249
|
-
$xeTable.dispatchEvent(
|
|
250
|
-
column,
|
|
251
|
-
fixed: targetFixed
|
|
252
|
-
}, evnt);
|
|
237
|
+
$xeTable.dispatchEvent("custom-fixed-change", { column, fixed: targetFixed }, evnt);
|
|
253
238
|
}
|
|
254
239
|
};
|
|
255
240
|
const changeAlignOption = (column, targetAlign, colProperty, renderProperty, eName, evnt) => {
|
|
@@ -263,20 +248,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
263
248
|
} else {
|
|
264
249
|
column[renderProperty] = targetAlign;
|
|
265
250
|
}
|
|
266
|
-
$xeTable.dispatchEvent(eName, {
|
|
267
|
-
column,
|
|
268
|
-
[colProperty]: targetAlign
|
|
269
|
-
}, evnt);
|
|
251
|
+
$xeTable.dispatchEvent(eName, { column, [colProperty]: targetAlign }, evnt);
|
|
270
252
|
};
|
|
271
|
-
const allOptionEvent = evnt => {
|
|
272
|
-
const {
|
|
273
|
-
customStore
|
|
274
|
-
} = tableReactData;
|
|
253
|
+
const allOptionEvent = (evnt) => {
|
|
254
|
+
const { customStore } = tableReactData;
|
|
275
255
|
const isAll = !customStore.isAll;
|
|
276
256
|
$xeTable.toggleCustomAllCheckbox();
|
|
277
|
-
$xeTable.dispatchEvent(
|
|
278
|
-
checked: isAll
|
|
279
|
-
}, evnt);
|
|
257
|
+
$xeTable.dispatchEvent("custom-visible-all", { checked: isAll }, evnt);
|
|
280
258
|
};
|
|
281
259
|
const showDropTip = (evnt, optEl, showLine, dragPos) => {
|
|
282
260
|
const bodyWrapperElem = refBodyWrapperElem.value;
|
|
@@ -287,9 +265,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
287
265
|
if (!customBodyElem) {
|
|
288
266
|
return;
|
|
289
267
|
}
|
|
290
|
-
const {
|
|
291
|
-
prevDragToChild
|
|
292
|
-
} = customPanelInternalData;
|
|
268
|
+
const { prevDragToChild } = customPanelInternalData;
|
|
293
269
|
const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect();
|
|
294
270
|
const customBodyRect = customBodyElem.getBoundingClientRect();
|
|
295
271
|
const dragLineEl = refDragLineElem.value;
|
|
@@ -297,47 +273,43 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
297
273
|
if (dragLineEl) {
|
|
298
274
|
if (showLine) {
|
|
299
275
|
const optRect = optEl.getBoundingClientRect();
|
|
300
|
-
dragLineEl.style.display =
|
|
276
|
+
dragLineEl.style.display = "block";
|
|
301
277
|
dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`;
|
|
302
278
|
dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
|
|
303
279
|
dragLineEl.style.height = `${optRect.height}px`;
|
|
304
280
|
dragLineEl.style.width = `${optRect.width}px`;
|
|
305
|
-
dragLineEl.setAttribute(
|
|
306
|
-
dragLineEl.setAttribute(
|
|
281
|
+
dragLineEl.setAttribute("drag-pos", dragPos);
|
|
282
|
+
dragLineEl.setAttribute("drag-to-child", prevDragToChild ? "y" : "n");
|
|
307
283
|
} else {
|
|
308
|
-
dragLineEl.style.display =
|
|
284
|
+
dragLineEl.style.display = "";
|
|
309
285
|
}
|
|
310
286
|
}
|
|
311
287
|
} else {
|
|
312
288
|
if (dragLineEl) {
|
|
313
|
-
dragLineEl.style.display =
|
|
289
|
+
dragLineEl.style.display = "node";
|
|
314
290
|
}
|
|
315
291
|
}
|
|
316
292
|
const dragTipEl = refDragTipElem.value;
|
|
317
293
|
if (dragTipEl) {
|
|
318
|
-
dragTipEl.style.display =
|
|
294
|
+
dragTipEl.style.display = "block";
|
|
319
295
|
dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`;
|
|
320
296
|
dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`;
|
|
321
|
-
dragTipEl.setAttribute(
|
|
297
|
+
dragTipEl.setAttribute("drag-status", showLine ? prevDragToChild ? "sub" : "normal" : "disabled");
|
|
322
298
|
}
|
|
323
299
|
};
|
|
324
300
|
const updateColDropTipContent = () => {
|
|
325
|
-
const {
|
|
326
|
-
dragCol
|
|
327
|
-
} = customPanelReactData;
|
|
301
|
+
const { dragCol } = customPanelReactData;
|
|
328
302
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
329
|
-
const {
|
|
330
|
-
|
|
331
|
-
} = columnDragOpts;
|
|
332
|
-
let tipContent = '';
|
|
303
|
+
const { tooltipMethod } = columnDragOpts;
|
|
304
|
+
let tipContent = "";
|
|
333
305
|
if (tooltipMethod) {
|
|
334
306
|
const dtParams = {
|
|
335
307
|
$table: $xeTable,
|
|
336
308
|
column: dragCol
|
|
337
309
|
};
|
|
338
|
-
tipContent = `${tooltipMethod(dtParams) ||
|
|
310
|
+
tipContent = `${tooltipMethod(dtParams) || ""}`;
|
|
339
311
|
} else {
|
|
340
|
-
tipContent = getI18n(
|
|
312
|
+
tipContent = getI18n("vxe.custom.cstmDragTarget", [dragCol && dragCol.type !== "html" ? dragCol.getTitle() : ""]);
|
|
341
313
|
}
|
|
342
314
|
customPanelReactData.dragTipText = tipContent;
|
|
343
315
|
};
|
|
@@ -345,27 +317,27 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
345
317
|
const dragTipEl = refDragTipElem.value;
|
|
346
318
|
const dragLineEl = refDragLineElem.value;
|
|
347
319
|
if (dragTipEl) {
|
|
348
|
-
dragTipEl.style.display =
|
|
320
|
+
dragTipEl.style.display = "";
|
|
349
321
|
}
|
|
350
322
|
if (dragLineEl) {
|
|
351
|
-
dragLineEl.style.display =
|
|
323
|
+
dragLineEl.style.display = "";
|
|
352
324
|
}
|
|
353
325
|
};
|
|
354
|
-
const sortMousedownEvent = evnt => {
|
|
326
|
+
const sortMousedownEvent = (evnt) => {
|
|
355
327
|
const btnEl = evnt.currentTarget;
|
|
356
328
|
const cellEl = btnEl.parentElement;
|
|
357
329
|
const tdEl = cellEl.parentElement;
|
|
358
330
|
const trEl = tdEl.parentElement;
|
|
359
|
-
const colid = trEl.getAttribute(
|
|
331
|
+
const colid = trEl.getAttribute("colid");
|
|
360
332
|
const column = $xeTable.getColumnById(colid);
|
|
361
333
|
trEl.draggable = true;
|
|
362
334
|
customPanelReactData.dragCol = column;
|
|
363
335
|
customPanelReactData.dragGroupField = null;
|
|
364
336
|
customPanelReactData.dragAggFnCol = null;
|
|
365
337
|
updateColDropTipContent();
|
|
366
|
-
(0,
|
|
338
|
+
(0, import_dom.addClass)(trEl, "active--drag-origin");
|
|
367
339
|
};
|
|
368
|
-
const sortMouseupEvent = evnt => {
|
|
340
|
+
const sortMouseupEvent = (evnt) => {
|
|
369
341
|
const btnEl = evnt.currentTarget;
|
|
370
342
|
const cellEl = btnEl.parentElement;
|
|
371
343
|
const tdEl = cellEl.parentElement;
|
|
@@ -375,14 +347,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
375
347
|
customPanelReactData.dragCol = null;
|
|
376
348
|
customPanelReactData.dragGroupField = null;
|
|
377
349
|
customPanelReactData.dragAggFnCol = null;
|
|
378
|
-
(0,
|
|
350
|
+
(0, import_dom.removeClass)(trEl, "active--drag-origin");
|
|
379
351
|
};
|
|
380
|
-
const sortDragstartEvent = evnt => {
|
|
381
|
-
const {
|
|
382
|
-
customDragTime
|
|
383
|
-
} = customPanelInternalData;
|
|
352
|
+
const sortDragstartEvent = (evnt) => {
|
|
353
|
+
const { customDragTime } = customPanelInternalData;
|
|
384
354
|
if (evnt.dataTransfer) {
|
|
385
|
-
evnt.dataTransfer.setDragImage((0,
|
|
355
|
+
evnt.dataTransfer.setDragImage((0, import_dom.getTpImg)(), 0, 0);
|
|
386
356
|
}
|
|
387
357
|
if (customDragTime) {
|
|
388
358
|
clearTimeout(customDragTime);
|
|
@@ -391,75 +361,51 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
391
361
|
customPanelInternalData.prevDragGroupField = null;
|
|
392
362
|
customPanelInternalData.prevDragAggFnColid = null;
|
|
393
363
|
};
|
|
394
|
-
const sortDragendEvent = evnt => {
|
|
395
|
-
const {
|
|
396
|
-
|
|
397
|
-
} =
|
|
398
|
-
const {
|
|
399
|
-
customColumnList
|
|
400
|
-
} = tableReactData;
|
|
401
|
-
const {
|
|
402
|
-
collectColumn
|
|
403
|
-
} = tableInternalData;
|
|
364
|
+
const sortDragendEvent = (evnt) => {
|
|
365
|
+
const { mouseConfig } = tableProps;
|
|
366
|
+
const { customColumnList } = tableReactData;
|
|
367
|
+
const { collectColumn } = tableInternalData;
|
|
404
368
|
const customOpts = computeCustomOpts.value;
|
|
405
369
|
const mouseOpts = computeMouseOpts.value;
|
|
406
|
-
const {
|
|
407
|
-
immediate
|
|
408
|
-
} = customOpts;
|
|
370
|
+
const { immediate } = customOpts;
|
|
409
371
|
const trEl = evnt.currentTarget;
|
|
410
372
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
411
|
-
const {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
isToChildDrag,
|
|
416
|
-
dragEndMethod
|
|
417
|
-
} = columnDragOpts;
|
|
418
|
-
const {
|
|
419
|
-
dragCol
|
|
420
|
-
} = customPanelReactData;
|
|
421
|
-
const {
|
|
422
|
-
prevDragCol,
|
|
423
|
-
prevDragGroupField,
|
|
424
|
-
prevDragAggFnColid,
|
|
425
|
-
prevDragPos,
|
|
426
|
-
prevDragToChild
|
|
427
|
-
} = customPanelInternalData;
|
|
428
|
-
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
|
|
373
|
+
const { isCrossDrag, isPeerDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts;
|
|
374
|
+
const { dragCol } = customPanelReactData;
|
|
375
|
+
const { prevDragCol, prevDragGroupField, prevDragAggFnColid, prevDragPos, prevDragToChild } = customPanelInternalData;
|
|
376
|
+
const dragOffsetIndex = prevDragPos === "bottom" ? 1 : 0;
|
|
429
377
|
if (prevDragGroupField || prevDragAggFnColid) {
|
|
430
378
|
if ($xeTable.handlePivotTableAggPanelDragendEvent) {
|
|
431
379
|
$xeTable.handlePivotTableAggPanelDragendEvent(evnt);
|
|
432
380
|
}
|
|
433
381
|
} else if (prevDragCol && dragCol) {
|
|
434
|
-
// 判断是否有拖动
|
|
435
382
|
if (prevDragCol !== dragCol) {
|
|
436
383
|
const dragColumn = dragCol;
|
|
437
384
|
const newColumn = prevDragCol;
|
|
438
|
-
Promise.resolve(
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
385
|
+
Promise.resolve(
|
|
386
|
+
dragEndMethod ? dragEndMethod({
|
|
387
|
+
oldColumn: dragColumn,
|
|
388
|
+
newColumn,
|
|
389
|
+
dragColumn,
|
|
390
|
+
dragPos: prevDragPos,
|
|
391
|
+
dragToChild: !!prevDragToChild,
|
|
392
|
+
offsetIndex: dragOffsetIndex
|
|
393
|
+
}) : true
|
|
394
|
+
).then((status) => {
|
|
446
395
|
if (!status) {
|
|
447
396
|
return;
|
|
448
397
|
}
|
|
449
398
|
let oafIndex = -1;
|
|
450
399
|
let nafIndex = -1;
|
|
451
400
|
const oldAllMaps = {};
|
|
452
|
-
|
|
401
|
+
import_xe_utils.default.eachTree([dragColumn], (column) => {
|
|
453
402
|
oldAllMaps[column.id] = column;
|
|
454
403
|
});
|
|
455
404
|
let isSelfToChildStatus = false;
|
|
456
|
-
// 只有实时拖拽支持跨层级
|
|
457
405
|
if (immediate) {
|
|
458
406
|
if (dragColumn.parentId && newColumn.parentId) {
|
|
459
|
-
// 子到子
|
|
460
407
|
if (isPeerDrag && !isCrossDrag) {
|
|
461
408
|
if (dragColumn.parentId !== newColumn.parentId) {
|
|
462
|
-
// 非同级
|
|
463
409
|
return;
|
|
464
410
|
}
|
|
465
411
|
} else {
|
|
@@ -469,10 +415,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
469
415
|
if (oldAllMaps[newColumn.id]) {
|
|
470
416
|
isSelfToChildStatus = true;
|
|
471
417
|
if (!(isCrossDrag && isSelfToChildDrag)) {
|
|
472
|
-
if (
|
|
473
|
-
|
|
474
|
-
status:
|
|
475
|
-
content: getI18n(
|
|
418
|
+
if (import_ui.VxeUI.modal) {
|
|
419
|
+
import_ui.VxeUI.modal.message({
|
|
420
|
+
status: "error",
|
|
421
|
+
content: getI18n("vxe.error.treeDragChild")
|
|
476
422
|
});
|
|
477
423
|
}
|
|
478
424
|
return;
|
|
@@ -480,40 +426,33 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
480
426
|
}
|
|
481
427
|
}
|
|
482
428
|
} else if (dragColumn.parentId) {
|
|
483
|
-
// 子到根
|
|
484
429
|
if (!isCrossDrag) {
|
|
485
430
|
return;
|
|
486
431
|
}
|
|
487
432
|
} else if (newColumn.parentId) {
|
|
488
|
-
// 根到子
|
|
489
433
|
if (!isCrossDrag) {
|
|
490
434
|
return;
|
|
491
435
|
}
|
|
492
436
|
if (oldAllMaps[newColumn.id]) {
|
|
493
437
|
isSelfToChildStatus = true;
|
|
494
438
|
if (!(isCrossDrag && isSelfToChildDrag)) {
|
|
495
|
-
if (
|
|
496
|
-
|
|
497
|
-
status:
|
|
498
|
-
content: getI18n(
|
|
439
|
+
if (import_ui.VxeUI.modal) {
|
|
440
|
+
import_ui.VxeUI.modal.message({
|
|
441
|
+
status: "error",
|
|
442
|
+
content: getI18n("vxe.error.treeDragChild")
|
|
499
443
|
});
|
|
500
444
|
}
|
|
501
445
|
return;
|
|
502
446
|
}
|
|
503
447
|
}
|
|
504
448
|
} else {
|
|
505
|
-
// 根到根
|
|
506
449
|
}
|
|
507
|
-
const oldewMatchRest =
|
|
508
|
-
|
|
509
|
-
if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
|
|
450
|
+
const oldewMatchRest = import_xe_utils.default.findTree(collectColumn, (item) => item.id === dragColumn.id);
|
|
451
|
+
if (isSelfToChildStatus && (isCrossDrag && isSelfToChildDrag)) {
|
|
510
452
|
if (oldewMatchRest) {
|
|
511
|
-
const {
|
|
512
|
-
items: oCols,
|
|
513
|
-
index: oIndex
|
|
514
|
-
} = oldewMatchRest;
|
|
453
|
+
const { items: oCols, index: oIndex } = oldewMatchRest;
|
|
515
454
|
const childList = dragColumn.children || [];
|
|
516
|
-
childList.forEach(column => {
|
|
455
|
+
childList.forEach((column) => {
|
|
517
456
|
column.parentId = dragColumn.parentId;
|
|
518
457
|
});
|
|
519
458
|
oCols.splice(oIndex, 1, ...childList);
|
|
@@ -521,25 +460,16 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
521
460
|
}
|
|
522
461
|
} else {
|
|
523
462
|
if (oldewMatchRest) {
|
|
524
|
-
const {
|
|
525
|
-
items: oCols,
|
|
526
|
-
index: oIndex,
|
|
527
|
-
parent: oParent
|
|
528
|
-
} = oldewMatchRest;
|
|
463
|
+
const { items: oCols, index: oIndex, parent: oParent } = oldewMatchRest;
|
|
529
464
|
oCols.splice(oIndex, 1);
|
|
530
465
|
if (!oParent) {
|
|
531
466
|
oafIndex = oIndex;
|
|
532
467
|
}
|
|
533
468
|
}
|
|
534
469
|
}
|
|
535
|
-
const newMatchRest =
|
|
470
|
+
const newMatchRest = import_xe_utils.default.findTree(collectColumn, (item) => item.id === newColumn.id);
|
|
536
471
|
if (newMatchRest) {
|
|
537
|
-
const {
|
|
538
|
-
items: nCols,
|
|
539
|
-
index: nIndex,
|
|
540
|
-
parent: nParent
|
|
541
|
-
} = newMatchRest;
|
|
542
|
-
// 转子级
|
|
472
|
+
const { items: nCols, index: nIndex, parent: nParent } = newMatchRest;
|
|
543
473
|
if (isCrossDrag && isToChildDrag && prevDragToChild) {
|
|
544
474
|
dragColumn.parentId = newColumn.id;
|
|
545
475
|
newColumn.children = (newColumn.children || []).concat([dragColumn]);
|
|
@@ -551,19 +481,19 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
551
481
|
nafIndex = nIndex;
|
|
552
482
|
}
|
|
553
483
|
}
|
|
554
|
-
|
|
484
|
+
import_xe_utils.default.eachTree(collectColumn, (column, index, items, path, parentItem) => {
|
|
555
485
|
if (!parentItem) {
|
|
556
486
|
const sortIndex = index + 1;
|
|
557
487
|
column.renderSortNumber = sortIndex;
|
|
558
488
|
}
|
|
559
489
|
});
|
|
560
490
|
} else {
|
|
561
|
-
oafIndex =
|
|
491
|
+
oafIndex = import_xe_utils.default.findIndexOf(customColumnList, (item) => item.id === dragColumn.id);
|
|
562
492
|
customColumnList.splice(oafIndex, 1);
|
|
563
|
-
nafIndex =
|
|
493
|
+
nafIndex = import_xe_utils.default.findIndexOf(customColumnList, (item) => item.id === newColumn.id);
|
|
564
494
|
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn);
|
|
565
495
|
}
|
|
566
|
-
if ((0,
|
|
496
|
+
if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
|
|
567
497
|
if ($xeTable.clearSelected) {
|
|
568
498
|
$xeTable.clearSelected();
|
|
569
499
|
}
|
|
@@ -583,14 +513,15 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
583
513
|
oldIndex: oafIndex
|
|
584
514
|
}
|
|
585
515
|
};
|
|
586
|
-
$xeTable.dispatchEvent(
|
|
587
|
-
$xeTable.dispatchEvent(
|
|
516
|
+
$xeTable.dispatchEvent("custom-sort-change", csParams, evnt);
|
|
517
|
+
$xeTable.dispatchEvent("column-dragend", csParams, evnt);
|
|
588
518
|
if (immediate) {
|
|
589
519
|
tableReactData.customColumnList = collectColumn.slice(0);
|
|
590
520
|
$xeTable.handleColDragSwapColumn();
|
|
591
521
|
}
|
|
592
522
|
clearDragAnimateStatus();
|
|
593
|
-
}).catch(() => {
|
|
523
|
+
}).catch(() => {
|
|
524
|
+
});
|
|
594
525
|
}
|
|
595
526
|
}
|
|
596
527
|
hideDropTip();
|
|
@@ -600,37 +531,26 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
600
531
|
customPanelInternalData.prevDragGroupField = null;
|
|
601
532
|
customPanelInternalData.prevDragAggFnColid = null;
|
|
602
533
|
trEl.draggable = false;
|
|
603
|
-
trEl.removeAttribute(
|
|
604
|
-
(0,
|
|
605
|
-
(0,
|
|
534
|
+
trEl.removeAttribute("drag-pos");
|
|
535
|
+
(0, import_dom.removeClass)(trEl, "active--drag-target");
|
|
536
|
+
(0, import_dom.removeClass)(trEl, "active--drag-origin");
|
|
606
537
|
};
|
|
607
|
-
const sortDragoverEvent = evnt => {
|
|
538
|
+
const sortDragoverEvent = (evnt) => {
|
|
608
539
|
const customOpts = computeCustomOpts.value;
|
|
609
|
-
const {
|
|
610
|
-
showSortDragButton,
|
|
611
|
-
allowSort,
|
|
612
|
-
immediate
|
|
613
|
-
} = customOpts;
|
|
540
|
+
const { showSortDragButton, allowSort, immediate } = customOpts;
|
|
614
541
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
615
|
-
const {
|
|
616
|
-
isCrossDrag,
|
|
617
|
-
isPeerDrag,
|
|
618
|
-
isToChildDrag
|
|
619
|
-
} = columnDragOpts;
|
|
542
|
+
const { isCrossDrag, isPeerDrag, isToChildDrag } = columnDragOpts;
|
|
620
543
|
const optEl = evnt.currentTarget;
|
|
621
|
-
const isControlKey = (0,
|
|
622
|
-
const colid = optEl.getAttribute(
|
|
544
|
+
const isControlKey = (0, import_dom.hasControlKey)(evnt);
|
|
545
|
+
const colid = optEl.getAttribute("colid");
|
|
623
546
|
const column = $xeTable.getColumnById(colid);
|
|
624
|
-
const {
|
|
625
|
-
dragCol
|
|
626
|
-
} = customPanelReactData;
|
|
547
|
+
const { dragCol } = customPanelReactData;
|
|
627
548
|
customPanelInternalData.prevDragGroupField = null;
|
|
628
549
|
customPanelInternalData.prevDragAggFnColid = null;
|
|
629
|
-
// 是否移入有效列
|
|
630
550
|
if (column && (isCrossDrag || isPeerDrag || column.level === 1)) {
|
|
631
551
|
evnt.preventDefault();
|
|
632
552
|
const offsetY = evnt.clientY - optEl.getBoundingClientRect().y;
|
|
633
|
-
const dragPos = offsetY < optEl.clientHeight / 2 ?
|
|
553
|
+
const dragPos = offsetY < optEl.clientHeight / 2 ? "top" : "bottom";
|
|
634
554
|
if (!dragCol || !(showSortDragButton && allowSort) || dragCol && dragCol.id === column.id || !isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : column.level > 1) || !immediate && column.level > 1 || !isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : dragCol.level > 1) || !immediate && dragCol.level > 1) {
|
|
635
555
|
showDropTip(evnt, optEl, false, dragPos);
|
|
636
556
|
return;
|
|
@@ -644,23 +564,17 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
644
564
|
const clearDragAnimateStatus = () => {
|
|
645
565
|
customPanelInternalData.customDragTime = setTimeout(() => {
|
|
646
566
|
tableReactData.isCustomDragStatus = false;
|
|
647
|
-
customPanelInternalData.customDragTime =
|
|
567
|
+
customPanelInternalData.customDragTime = void 0;
|
|
648
568
|
}, 350);
|
|
649
569
|
};
|
|
650
570
|
const sortMoveUpEvent = (evntParame, column) => {
|
|
651
|
-
const {
|
|
652
|
-
|
|
653
|
-
} = tableReactData;
|
|
654
|
-
const matchObj = _xeUtils.default.findTree(customColumnList, item => item === column);
|
|
571
|
+
const { customColumnList } = tableReactData;
|
|
572
|
+
const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
|
|
655
573
|
if (matchObj) {
|
|
656
|
-
const {
|
|
657
|
-
item,
|
|
658
|
-
items,
|
|
659
|
-
index
|
|
660
|
-
} = matchObj;
|
|
574
|
+
const { item, items, index } = matchObj;
|
|
661
575
|
if (index > 0) {
|
|
662
576
|
tableReactData.isCustomDragStatus = true;
|
|
663
|
-
(0,
|
|
577
|
+
(0, import_vue.nextTick)(() => {
|
|
664
578
|
items.splice(index, 1);
|
|
665
579
|
items.splice(index - 1, 0, item);
|
|
666
580
|
clearDragAnimateStatus();
|
|
@@ -669,19 +583,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
669
583
|
}
|
|
670
584
|
};
|
|
671
585
|
const sortMoveDnEvent = (evntParame, column) => {
|
|
672
|
-
const {
|
|
673
|
-
|
|
674
|
-
} = tableReactData;
|
|
675
|
-
const matchObj = _xeUtils.default.findTree(customColumnList, item => item === column);
|
|
586
|
+
const { customColumnList } = tableReactData;
|
|
587
|
+
const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
|
|
676
588
|
if (matchObj) {
|
|
677
|
-
const {
|
|
678
|
-
item,
|
|
679
|
-
items,
|
|
680
|
-
index
|
|
681
|
-
} = matchObj;
|
|
589
|
+
const { item, items, index } = matchObj;
|
|
682
590
|
if (index < items.length - 1) {
|
|
683
591
|
tableReactData.isCustomDragStatus = true;
|
|
684
|
-
(0,
|
|
592
|
+
(0, import_vue.nextTick)(() => {
|
|
685
593
|
items.splice(index, 1);
|
|
686
594
|
items.splice(index + 1, 0, item);
|
|
687
595
|
clearDragAnimateStatus();
|
|
@@ -690,20 +598,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
690
598
|
}
|
|
691
599
|
};
|
|
692
600
|
const sortMoveTopEvent = (evntParame, column) => {
|
|
693
|
-
const {
|
|
694
|
-
|
|
695
|
-
} = tableReactData;
|
|
696
|
-
const matchObj = _xeUtils.default.findTree(customColumnList, item => item === column);
|
|
601
|
+
const { customColumnList } = tableReactData;
|
|
602
|
+
const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
|
|
697
603
|
if (matchObj) {
|
|
698
|
-
const {
|
|
699
|
-
item,
|
|
700
|
-
items,
|
|
701
|
-
index,
|
|
702
|
-
parent: parentItem
|
|
703
|
-
} = matchObj;
|
|
604
|
+
const { item, items, index, parent: parentItem } = matchObj;
|
|
704
605
|
if (parentItem || index > 0) {
|
|
705
606
|
tableReactData.isCustomDragStatus = true;
|
|
706
|
-
(0,
|
|
607
|
+
(0, import_vue.nextTick)(() => {
|
|
707
608
|
item.parentId = null;
|
|
708
609
|
items.splice(index, 1);
|
|
709
610
|
customColumnList.unshift(item);
|
|
@@ -713,20 +614,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
713
614
|
}
|
|
714
615
|
};
|
|
715
616
|
const sortMoveBottomEvent = (evntParame, column) => {
|
|
716
|
-
const {
|
|
717
|
-
|
|
718
|
-
} = tableReactData;
|
|
719
|
-
const matchObj = _xeUtils.default.findTree(customColumnList, item => item === column);
|
|
617
|
+
const { customColumnList } = tableReactData;
|
|
618
|
+
const matchObj = import_xe_utils.default.findTree(customColumnList, (item) => item === column);
|
|
720
619
|
if (matchObj) {
|
|
721
|
-
const {
|
|
722
|
-
item,
|
|
723
|
-
items,
|
|
724
|
-
index,
|
|
725
|
-
parent: parentItem
|
|
726
|
-
} = matchObj;
|
|
620
|
+
const { item, items, index, parent: parentItem } = matchObj;
|
|
727
621
|
if (parentItem || index < items.length - 1) {
|
|
728
622
|
tableReactData.isCustomDragStatus = true;
|
|
729
|
-
(0,
|
|
623
|
+
(0, import_vue.nextTick)(() => {
|
|
730
624
|
item.parentId = null;
|
|
731
625
|
items.splice(index, 1);
|
|
732
626
|
customColumnList.push(item);
|
|
@@ -736,79 +630,62 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
736
630
|
}
|
|
737
631
|
};
|
|
738
632
|
const renderDragTip = () => {
|
|
739
|
-
const {
|
|
740
|
-
dragTipText
|
|
741
|
-
} = customPanelReactData;
|
|
633
|
+
const { dragTipText } = customPanelReactData;
|
|
742
634
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
743
|
-
return (0,
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
635
|
+
return (0, import_vue.h)("div", {}, [
|
|
636
|
+
(0, import_vue.h)("div", {
|
|
637
|
+
ref: refDragLineElem,
|
|
638
|
+
class: ["vxe-table-custom-popup--drag-line", {
|
|
639
|
+
"is--guides": columnDragOpts.showGuidesStatus
|
|
640
|
+
}]
|
|
641
|
+
}),
|
|
642
|
+
(0, import_vue.h)("div", {
|
|
643
|
+
ref: refDragTipElem,
|
|
644
|
+
class: "vxe-table-custom-popup--drag-tip"
|
|
645
|
+
}, [
|
|
646
|
+
(0, import_vue.h)("div", {
|
|
647
|
+
class: "vxe-table-custom-popup--drag-tip-wrapper"
|
|
648
|
+
}, [
|
|
649
|
+
(0, import_vue.h)("div", {
|
|
650
|
+
class: "vxe-table-custom-popup--drag-tip-status"
|
|
651
|
+
}, [
|
|
652
|
+
(0, import_vue.h)("span", {
|
|
653
|
+
class: ["vxe-table-custom-popup--drag-tip-normal-status", getIcon().TABLE_DRAG_STATUS_ROW]
|
|
654
|
+
}),
|
|
655
|
+
(0, import_vue.h)("span", {
|
|
656
|
+
class: ["vxe-table-custom-popup--drag-tip-sub-status", getIcon().TABLE_DRAG_STATUS_SUB_ROW]
|
|
657
|
+
}),
|
|
658
|
+
(0, import_vue.h)("span", {
|
|
659
|
+
class: ["vxe-table-custom-popup--drag-tip-group-status", getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
|
|
660
|
+
}),
|
|
661
|
+
(0, import_vue.h)("span", {
|
|
662
|
+
class: ["vxe-table-custom-popup--drag-tip-values-status", getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
|
|
663
|
+
}),
|
|
664
|
+
(0, import_vue.h)("span", {
|
|
665
|
+
class: ["vxe-table-custom-popup--drag-tip-disabled-status", getIcon().TABLE_DRAG_DISABLED]
|
|
666
|
+
})
|
|
667
|
+
]),
|
|
668
|
+
(0, import_vue.h)("div", {
|
|
669
|
+
class: "vxe-table-custom-popup--drag-tip-content"
|
|
670
|
+
}, `${dragTipText || ""}`)
|
|
671
|
+
])
|
|
672
|
+
])
|
|
673
|
+
]);
|
|
768
674
|
};
|
|
769
675
|
const renderSimplePanel = () => {
|
|
770
676
|
const $xeGrid = $xeTable.xeGrid;
|
|
771
677
|
const $xeGantt = $xeTable.xeGantt;
|
|
772
|
-
const
|
|
773
|
-
const {
|
|
774
|
-
|
|
775
|
-
} =
|
|
776
|
-
const {
|
|
777
|
-
treeConfig,
|
|
778
|
-
rowGroupConfig,
|
|
779
|
-
aggregateConfig
|
|
780
|
-
} = tableProps;
|
|
781
|
-
const {
|
|
782
|
-
isCustomStatus,
|
|
783
|
-
customColumnList,
|
|
784
|
-
isCustomDragStatus
|
|
785
|
-
} = tableReactData;
|
|
678
|
+
const tableProps2 = $xeTable.props;
|
|
679
|
+
const { customStore } = props;
|
|
680
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps2;
|
|
681
|
+
const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData;
|
|
786
682
|
const customOpts = computeCustomOpts.value;
|
|
787
683
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
788
|
-
const {
|
|
789
|
-
|
|
790
|
-
} = customStore;
|
|
791
|
-
const {
|
|
792
|
-
immediate,
|
|
793
|
-
checkMethod,
|
|
794
|
-
visibleMethod,
|
|
795
|
-
allowVisible,
|
|
796
|
-
allowSort,
|
|
797
|
-
allowFixed,
|
|
798
|
-
allowGroup,
|
|
799
|
-
allowValues,
|
|
800
|
-
trigger,
|
|
801
|
-
placement,
|
|
802
|
-
showSortDragButton,
|
|
803
|
-
showSortMoveButton,
|
|
804
|
-
showSortPutButton
|
|
805
|
-
} = customOpts;
|
|
684
|
+
const { defPopupStyle } = customStore;
|
|
685
|
+
const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts;
|
|
806
686
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
807
687
|
const vSize = computeSize.value;
|
|
808
|
-
const {
|
|
809
|
-
isCrossDrag,
|
|
810
|
-
isPeerDrag
|
|
811
|
-
} = columnDragOpts;
|
|
688
|
+
const { isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
812
689
|
const slots = customOpts.slots || {};
|
|
813
690
|
const headerSlot = slots.header;
|
|
814
691
|
const topSlot = slots.top;
|
|
@@ -819,8 +696,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
819
696
|
const customWrapperOns = {};
|
|
820
697
|
const isAllChecked = customStore.isAll;
|
|
821
698
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
822
|
-
|
|
823
|
-
if (trigger === 'hover') {
|
|
699
|
+
if (trigger === "hover") {
|
|
824
700
|
customWrapperOns.onMouseenter = handleWrapperMouseenterEvent;
|
|
825
701
|
customWrapperOns.onMouseleave = handleWrapperMouseleaveEvent;
|
|
826
702
|
}
|
|
@@ -833,246 +709,261 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
833
709
|
isAllIndeterminate,
|
|
834
710
|
isCustomStatus
|
|
835
711
|
};
|
|
836
|
-
|
|
837
|
-
const isVisible = visibleMethod ? visibleMethod({
|
|
838
|
-
$table: $xeTable,
|
|
839
|
-
column
|
|
840
|
-
}) : true;
|
|
712
|
+
import_xe_utils.default.eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
713
|
+
const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
|
|
841
714
|
if (isVisible) {
|
|
842
715
|
const isChecked = column.renderVisible;
|
|
843
716
|
const isIndeterminate = column.halfVisible;
|
|
844
717
|
const isColGroup = column.children && column.children.length;
|
|
845
|
-
const colTitle = (0,
|
|
846
|
-
const isDisabled = checkMethod ? !checkMethod({
|
|
847
|
-
$table: $xeTable,
|
|
848
|
-
column
|
|
849
|
-
}) : false;
|
|
718
|
+
const colTitle = (0, import_utils.formatText)(column.getTitle(), 1);
|
|
719
|
+
const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
|
|
850
720
|
const isHidden = !isChecked;
|
|
851
721
|
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
|
|
852
|
-
colVNs.push(
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
722
|
+
colVNs.push(
|
|
723
|
+
(0, import_vue.h)("li", {
|
|
724
|
+
key: column.id,
|
|
725
|
+
colid: column.id,
|
|
726
|
+
class: ["vxe-table-custom--option", `level--${column.level}`, {
|
|
727
|
+
"is--hidden": isDisabled || isHidden,
|
|
728
|
+
"is--group": isColGroup
|
|
729
|
+
}],
|
|
730
|
+
onDragstart: sortDragstartEvent,
|
|
731
|
+
onDragend: sortDragendEvent,
|
|
732
|
+
onDragover: sortDragoverEvent
|
|
733
|
+
}, [
|
|
734
|
+
allowVisible ? (0, import_vue.h)("div", {
|
|
735
|
+
class: ["vxe-table-custom--checkbox-option", {
|
|
736
|
+
"is--checked": isChecked,
|
|
737
|
+
"is--indeterminate": isIndeterminate,
|
|
738
|
+
"is--disabled": isDisabled
|
|
739
|
+
}],
|
|
740
|
+
title: getI18n("vxe.custom.setting.colVisible"),
|
|
741
|
+
onClick: (evnt) => {
|
|
742
|
+
if (!isDisabled) {
|
|
743
|
+
changeCheckboxOption(column, evnt);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}, [
|
|
747
|
+
(0, import_vue.h)("span", {
|
|
748
|
+
class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
749
|
+
})
|
|
750
|
+
]) : renderEmptyElement($xeTable),
|
|
751
|
+
(0, import_vue.h)("div", {
|
|
752
|
+
class: "vxe-table-custom--name-option"
|
|
753
|
+
}, [
|
|
754
|
+
allowSort && showSortDragButton || (allowGroup || allowValues) ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0, import_vue.h)("div", {
|
|
755
|
+
class: "vxe-table-custom--sort-option"
|
|
756
|
+
}, [
|
|
757
|
+
(0, import_vue.h)("span", {
|
|
758
|
+
class: ["vxe-table-custom--sort-btn", {
|
|
759
|
+
"is--disabled": isHidden
|
|
760
|
+
}],
|
|
761
|
+
title: getI18n("vxe.custom.setting.sortHelpTip"),
|
|
762
|
+
...isHidden ? {} : {
|
|
763
|
+
onMousedown: sortMousedownEvent,
|
|
764
|
+
onMouseup: sortMouseupEvent
|
|
765
|
+
}
|
|
766
|
+
}, [
|
|
767
|
+
(0, import_vue.h)("i", {
|
|
768
|
+
class: getIcon().TABLE_CUSTOM_SORT
|
|
769
|
+
})
|
|
770
|
+
])
|
|
771
|
+
]) : renderEmptyElement($xeTable) : renderEmptyElement($xeTable),
|
|
772
|
+
column.type === "html" ? (0, import_vue.h)("div", {
|
|
773
|
+
key: "1",
|
|
774
|
+
class: "vxe-table-custom--checkbox-label",
|
|
775
|
+
innerHTML: colTitle
|
|
776
|
+
}) : (0, import_vue.h)("div", {
|
|
777
|
+
key: "0",
|
|
778
|
+
class: "vxe-table-custom--checkbox-label"
|
|
779
|
+
}, colTitle)
|
|
780
|
+
]),
|
|
781
|
+
showSortBtn && (showSortMoveButton || showSortPutButton) ? (0, import_vue.h)("div", {
|
|
782
|
+
class: "vxe-table-custom--move-btn-option"
|
|
783
|
+
}, VxeUIButtonComponent ? [
|
|
784
|
+
showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
785
|
+
mode: "text",
|
|
786
|
+
icon: "vxe-icon-arrows-up",
|
|
787
|
+
title: getI18n("vxe.custom.setting.moveUpTitle"),
|
|
788
|
+
disabled: index <= 0,
|
|
789
|
+
onClick(evntParame) {
|
|
790
|
+
sortMoveUpEvent(evntParame, column);
|
|
791
|
+
}
|
|
792
|
+
}) : renderEmptyElement($xeTable),
|
|
793
|
+
showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
794
|
+
mode: "text",
|
|
795
|
+
icon: "vxe-icon-arrows-down",
|
|
796
|
+
title: getI18n("vxe.custom.setting.moveDnTitle"),
|
|
797
|
+
disabled: index >= items.length - 1,
|
|
798
|
+
onClick(evntParame) {
|
|
799
|
+
sortMoveDnEvent(evntParame, column);
|
|
800
|
+
}
|
|
801
|
+
}) : renderEmptyElement($xeTable),
|
|
802
|
+
showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
803
|
+
mode: "text",
|
|
804
|
+
icon: "vxe-icon-top",
|
|
805
|
+
title: getI18n("vxe.custom.setting.putTopTitle"),
|
|
806
|
+
disabled: index <= 0,
|
|
807
|
+
onClick(evntParame) {
|
|
808
|
+
sortMoveTopEvent(evntParame, column);
|
|
809
|
+
}
|
|
810
|
+
}) : renderEmptyElement($xeTable),
|
|
811
|
+
showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
812
|
+
mode: "text",
|
|
813
|
+
icon: "vxe-icon-bottom",
|
|
814
|
+
title: getI18n("vxe.custom.setting.putBottomTitle"),
|
|
815
|
+
disabled: index >= items.length - 1,
|
|
816
|
+
onClick(evntParame) {
|
|
817
|
+
sortMoveBottomEvent(evntParame, column);
|
|
818
|
+
}
|
|
819
|
+
}) : renderEmptyElement($xeTable)
|
|
820
|
+
] : []) : renderEmptyElement($xeTable),
|
|
821
|
+
!parentItem && allowFixed ? (0, import_vue.h)("div", {
|
|
822
|
+
class: "vxe-table-custom--fixed-option"
|
|
823
|
+
}, VxeUIButtonComponent ? [
|
|
824
|
+
(0, import_vue.h)(VxeUIButtonComponent, {
|
|
825
|
+
mode: "text",
|
|
826
|
+
icon: column.renderFixed === "left" ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
827
|
+
status: column.renderFixed === "left" ? "primary" : "",
|
|
828
|
+
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
829
|
+
title: getI18n(column.renderFixed === "left" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedLeft"),
|
|
830
|
+
onClick: ({ $event }) => {
|
|
831
|
+
changeFixedOption(column, "left", $event);
|
|
832
|
+
}
|
|
833
|
+
}),
|
|
834
|
+
(0, import_vue.h)(VxeUIButtonComponent, {
|
|
835
|
+
mode: "text",
|
|
836
|
+
icon: column.renderFixed === "right" ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
837
|
+
status: column.renderFixed === "right" ? "primary" : "",
|
|
838
|
+
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
839
|
+
title: getI18n(column.renderFixed === "right" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedRight"),
|
|
840
|
+
onClick: ({ $event }) => {
|
|
841
|
+
changeFixedOption(column, "right", $event);
|
|
842
|
+
}
|
|
843
|
+
})
|
|
844
|
+
] : []) : renderEmptyElement($xeTable)
|
|
845
|
+
])
|
|
846
|
+
);
|
|
956
847
|
}
|
|
957
848
|
});
|
|
958
|
-
return (0,
|
|
849
|
+
return (0, import_vue.h)("div", {
|
|
959
850
|
ref: refElem,
|
|
960
|
-
key:
|
|
961
|
-
class: [
|
|
851
|
+
key: "simple",
|
|
852
|
+
class: ["vxe-table-custom-wrapper", `placement--${placement}`, {
|
|
962
853
|
[`size--${vSize}`]: vSize,
|
|
963
|
-
|
|
854
|
+
"is--active": customStore.visible
|
|
964
855
|
}],
|
|
965
856
|
style: defPopupStyle
|
|
966
|
-
}, customStore.visible ? [
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
857
|
+
}, customStore.visible ? [
|
|
858
|
+
(0, import_vue.h)("div", {
|
|
859
|
+
ref: refBodyWrapperElem,
|
|
860
|
+
class: "vxe-table-custom-simple--body-wrapper"
|
|
861
|
+
}, [
|
|
862
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel ? (0, import_vue.h)($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
863
|
+
customStore
|
|
864
|
+
}) : renderEmptyElement($xeTable),
|
|
865
|
+
(0, import_vue.h)("div", {
|
|
866
|
+
ref: refCustomBodyElem,
|
|
867
|
+
class: "vxe-table-custom--handle-wrapper"
|
|
868
|
+
}, [
|
|
869
|
+
(0, import_vue.h)("div", {
|
|
870
|
+
class: "vxe-table-custom--header"
|
|
871
|
+
}, headerSlot ? $xeTable.callSlot(headerSlot, params) : [
|
|
872
|
+
(0, import_vue.h)("ul", {
|
|
873
|
+
class: "vxe-table-custom--panel-list"
|
|
874
|
+
}, [
|
|
875
|
+
(0, import_vue.h)("li", {
|
|
876
|
+
class: "vxe-table-custom--option"
|
|
877
|
+
}, [
|
|
878
|
+
allowVisible ? (0, import_vue.h)("div", {
|
|
879
|
+
class: ["vxe-table-custom--checkbox-option", {
|
|
880
|
+
"is--checked": isAllChecked,
|
|
881
|
+
"is--indeterminate": isAllIndeterminate
|
|
882
|
+
}],
|
|
883
|
+
title: getI18n("vxe.table.allTitle"),
|
|
884
|
+
onClick: allOptionEvent
|
|
885
|
+
}, [
|
|
886
|
+
(0, import_vue.h)("span", {
|
|
887
|
+
class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
888
|
+
}),
|
|
889
|
+
(0, import_vue.h)("span", {
|
|
890
|
+
class: "vxe-checkbox--label"
|
|
891
|
+
}, getI18n("vxe.toolbar.customAll"))
|
|
892
|
+
]) : (0, import_vue.h)("span", {
|
|
893
|
+
class: "vxe-checkbox--label"
|
|
894
|
+
}, getI18n("vxe.table.customTitle"))
|
|
895
|
+
])
|
|
896
|
+
])
|
|
897
|
+
]),
|
|
898
|
+
(0, import_vue.h)("div", {
|
|
899
|
+
class: "vxe-table-custom--body"
|
|
900
|
+
}, [
|
|
901
|
+
topSlot ? (0, import_vue.h)("div", {
|
|
902
|
+
class: "vxe-table-custom--panel-top"
|
|
903
|
+
}, $xeTable.callSlot(topSlot, params)) : renderEmptyElement($xeTable),
|
|
904
|
+
defaultSlot ? (0, import_vue.h)("div", {
|
|
905
|
+
class: "vxe-table-custom--panel-body"
|
|
906
|
+
}, $xeTable.callSlot(defaultSlot, params)) : (0, import_vue.h)(import_vue.TransitionGroup, {
|
|
907
|
+
class: "vxe-table-custom--panel-list",
|
|
908
|
+
name: isCustomDragStatus ? "vxe-table-custom--list" : "",
|
|
909
|
+
tag: "ul",
|
|
910
|
+
...customWrapperOns
|
|
911
|
+
}, {
|
|
912
|
+
default: () => colVNs
|
|
913
|
+
}),
|
|
914
|
+
bottomSlot ? (0, import_vue.h)("div", {
|
|
915
|
+
class: "vxe-table-custom--panel-bottom"
|
|
916
|
+
}, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable)
|
|
917
|
+
]),
|
|
918
|
+
customOpts.showFooter ? (0, import_vue.h)("div", {
|
|
919
|
+
class: "vxe-table-custom--footer"
|
|
920
|
+
}, footerSlot ? $xeTable.callSlot(footerSlot, params) : [
|
|
921
|
+
(0, import_vue.h)("div", {
|
|
922
|
+
class: "vxe-table-custom--footer-buttons"
|
|
923
|
+
}, [
|
|
924
|
+
VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
925
|
+
mode: "text",
|
|
926
|
+
content: customOpts.resetButtonText || getI18n("vxe.table.customRestore"),
|
|
927
|
+
disabled: !isCustomStatus,
|
|
928
|
+
onClick: resetCustomEvent
|
|
929
|
+
}) : renderEmptyElement($xeTable),
|
|
930
|
+
immediate ? VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
931
|
+
mode: "text",
|
|
932
|
+
content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
|
|
933
|
+
onClick: cancelCloseEvent
|
|
934
|
+
}) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
935
|
+
mode: "text",
|
|
936
|
+
content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
|
|
937
|
+
onClick: cancelCustomEvent
|
|
938
|
+
}) : renderEmptyElement($xeTable),
|
|
939
|
+
immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
940
|
+
mode: "text",
|
|
941
|
+
status: "primary",
|
|
942
|
+
content: customOpts.confirmButtonText || getI18n("vxe.table.customConfirm"),
|
|
943
|
+
onClick: confirmCustomEvent
|
|
944
|
+
}) : renderEmptyElement($xeTable)
|
|
945
|
+
])
|
|
946
|
+
]) : null
|
|
947
|
+
]),
|
|
948
|
+
renderDragTip()
|
|
949
|
+
])
|
|
950
|
+
] : []);
|
|
1030
951
|
};
|
|
1031
952
|
const renderPopupBodys = () => {
|
|
1032
|
-
const {
|
|
1033
|
-
|
|
1034
|
-
} = tableProps;
|
|
1035
|
-
const {
|
|
1036
|
-
customColumnList
|
|
1037
|
-
} = tableReactData;
|
|
953
|
+
const { resizable: allResizable } = tableProps;
|
|
954
|
+
const { customColumnList } = tableReactData;
|
|
1038
955
|
const customOpts = computeCustomOpts.value;
|
|
1039
956
|
const columnDragOpts = computeColumnDragOpts.value;
|
|
1040
|
-
const {
|
|
1041
|
-
immediate,
|
|
1042
|
-
showSortDragButton,
|
|
1043
|
-
showSortMoveButton,
|
|
1044
|
-
showSortPutButton,
|
|
1045
|
-
allowVisible,
|
|
1046
|
-
allowSort,
|
|
1047
|
-
allowFixed,
|
|
1048
|
-
allowAlign,
|
|
1049
|
-
allowHeaderAlign,
|
|
1050
|
-
allowFooterAlign,
|
|
1051
|
-
allowResizable,
|
|
1052
|
-
allowGroup,
|
|
1053
|
-
allowValues,
|
|
1054
|
-
checkMethod,
|
|
1055
|
-
visibleMethod
|
|
1056
|
-
} = customOpts;
|
|
957
|
+
const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton, allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts;
|
|
1057
958
|
const columnOpts = computeColumnOpts.value;
|
|
1058
959
|
const resizableOpts = computeResizableOpts.value;
|
|
1059
|
-
const {
|
|
1060
|
-
minWidth: reMinWidth,
|
|
1061
|
-
maxWidth: reMaxWidth
|
|
1062
|
-
} = resizableOpts;
|
|
960
|
+
const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts;
|
|
1063
961
|
const isMaxFixedColumn = computeIsMaxFixedColumn.value;
|
|
1064
|
-
const {
|
|
1065
|
-
isCrossDrag,
|
|
1066
|
-
isPeerDrag
|
|
1067
|
-
} = columnDragOpts;
|
|
962
|
+
const { isCrossDrag, isPeerDrag } = columnDragOpts;
|
|
1068
963
|
const trVNs = [];
|
|
1069
|
-
|
|
1070
|
-
const isVisible = visibleMethod ? visibleMethod({
|
|
1071
|
-
$table: $xeTable,
|
|
1072
|
-
column
|
|
1073
|
-
}) : true;
|
|
964
|
+
import_xe_utils.default.eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
965
|
+
const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true;
|
|
1074
966
|
if (isVisible) {
|
|
1075
|
-
// 默认继承调整宽度
|
|
1076
967
|
let customMinWidth = 0;
|
|
1077
968
|
let customMaxWidth = 0;
|
|
1078
969
|
if (allowResizable) {
|
|
@@ -1087,229 +978,263 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1087
978
|
$rowIndex: -1
|
|
1088
979
|
};
|
|
1089
980
|
if (reMinWidth) {
|
|
1090
|
-
customMinWidth =
|
|
981
|
+
customMinWidth = import_xe_utils.default.toNumber(import_xe_utils.default.isFunction(reMinWidth) ? reMinWidth(resizeParams) : reMinWidth);
|
|
1091
982
|
}
|
|
1092
983
|
if (reMaxWidth) {
|
|
1093
|
-
customMaxWidth =
|
|
984
|
+
customMaxWidth = import_xe_utils.default.toNumber(import_xe_utils.default.isFunction(reMaxWidth) ? reMaxWidth(resizeParams) : reMaxWidth);
|
|
1094
985
|
}
|
|
1095
986
|
}
|
|
1096
987
|
const isChecked = column.renderVisible;
|
|
1097
988
|
const isIndeterminate = column.halfVisible;
|
|
1098
|
-
const colTitle = (0,
|
|
989
|
+
const colTitle = (0, import_utils.formatText)(column.getTitle(), 1);
|
|
1099
990
|
const isColGroup = column.children && column.children.length;
|
|
1100
|
-
const isDisabled = checkMethod ? !checkMethod({
|
|
1101
|
-
$table: $xeTable,
|
|
1102
|
-
column
|
|
1103
|
-
}) : false;
|
|
991
|
+
const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false;
|
|
1104
992
|
const isHidden = !isChecked;
|
|
1105
993
|
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1;
|
|
1106
|
-
const alignList = [
|
|
1107
|
-
icon: getIcon().TABLE_CUSTOM_ALIGN_LEFT,
|
|
1108
|
-
value:
|
|
1109
|
-
title: getI18n(
|
|
1110
|
-
|
|
1111
|
-
}, {
|
|
1112
|
-
icon: getIcon().TABLE_CUSTOM_ALIGN_CENTER,
|
|
1113
|
-
value: 'center',
|
|
1114
|
-
title: getI18n('vxe.custom.setting.anCenterTitle'),
|
|
1115
|
-
disabled: isHidden
|
|
1116
|
-
}, {
|
|
1117
|
-
icon: getIcon().TABLE_CUSTOM_ALIGN_RIGHT,
|
|
1118
|
-
value: 'right',
|
|
1119
|
-
title: getI18n('vxe.custom.setting.anRightTitle'),
|
|
1120
|
-
disabled: isHidden
|
|
1121
|
-
}];
|
|
994
|
+
const alignList = [
|
|
995
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_LEFT, value: "left", title: getI18n("vxe.custom.setting.anLeftTitle"), disabled: isHidden },
|
|
996
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_CENTER, value: "center", title: getI18n("vxe.custom.setting.anCenterTitle"), disabled: isHidden },
|
|
997
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_RIGHT, value: "right", title: getI18n("vxe.custom.setting.anRightTitle"), disabled: isHidden }
|
|
998
|
+
];
|
|
1122
999
|
const tdVNs = [];
|
|
1123
1000
|
if (allowVisible) {
|
|
1124
|
-
tdVNs.push(
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1001
|
+
tdVNs.push(
|
|
1002
|
+
(0, import_vue.h)("td", {
|
|
1003
|
+
key: "av",
|
|
1004
|
+
class: "vxe-table-custom-popup--column-td col--visible"
|
|
1005
|
+
}, [
|
|
1006
|
+
(0, import_vue.h)("div", {
|
|
1007
|
+
class: ["vxe-table-custom--checkbox-option", {
|
|
1008
|
+
"is--checked": isChecked,
|
|
1009
|
+
"is--indeterminate": isIndeterminate,
|
|
1010
|
+
"is--disabled": isDisabled
|
|
1011
|
+
}],
|
|
1012
|
+
title: getI18n("vxe.custom.setting.colVisible"),
|
|
1013
|
+
onClick: (evnt) => {
|
|
1014
|
+
if (!isDisabled) {
|
|
1015
|
+
changeCheckboxOption(column, evnt);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}, [
|
|
1019
|
+
(0, import_vue.h)("span", {
|
|
1020
|
+
class: ["vxe-checkbox--icon", isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
1021
|
+
})
|
|
1022
|
+
])
|
|
1023
|
+
])
|
|
1024
|
+
);
|
|
1142
1025
|
}
|
|
1143
|
-
tdVNs.push(
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1026
|
+
tdVNs.push(
|
|
1027
|
+
(0, import_vue.h)("td", {
|
|
1028
|
+
key: "at",
|
|
1029
|
+
class: "vxe-table-custom-popup--column-td col--name"
|
|
1030
|
+
}, [
|
|
1031
|
+
(0, import_vue.h)("div", {
|
|
1032
|
+
class: "vxe-table-custom-popup--name"
|
|
1033
|
+
}, [
|
|
1034
|
+
allowSort && showSortDragButton || (allowGroup || allowValues) ? showSortBtn || (allowGroup || allowValues) && !isColGroup ? (0, import_vue.h)("div", {
|
|
1035
|
+
class: ["vxe-table-custom-popup--column-sort-btn", {
|
|
1036
|
+
"is--disabled": isHidden
|
|
1037
|
+
}],
|
|
1038
|
+
title: getI18n("vxe.custom.setting.sortHelpTip"),
|
|
1039
|
+
...isHidden ? {} : {
|
|
1040
|
+
onMousedown: sortMousedownEvent,
|
|
1041
|
+
onMouseup: sortMouseupEvent
|
|
1042
|
+
}
|
|
1043
|
+
}, [
|
|
1044
|
+
(0, import_vue.h)("i", {
|
|
1045
|
+
class: getIcon().TABLE_CUSTOM_SORT
|
|
1046
|
+
})
|
|
1047
|
+
]) : (0, import_vue.h)("div", {
|
|
1048
|
+
class: "vxe-table-custom-popup--column-sort-placeholder"
|
|
1049
|
+
}) : renderEmptyElement($xeTable),
|
|
1050
|
+
column.type === "html" ? (0, import_vue.h)("div", {
|
|
1051
|
+
key: "1",
|
|
1052
|
+
class: "vxe-table-custom-popup--title",
|
|
1053
|
+
innerHTML: colTitle
|
|
1054
|
+
}) : (0, import_vue.h)("div", {
|
|
1055
|
+
key: "0",
|
|
1056
|
+
class: "vxe-table-custom-popup--title",
|
|
1057
|
+
title: colTitle
|
|
1058
|
+
}, colTitle),
|
|
1059
|
+
showSortBtn && (showSortMoveButton || showSortPutButton) ? (0, import_vue.h)("div", {
|
|
1060
|
+
class: "vxe-table-custom-popup--move-btn"
|
|
1061
|
+
}, VxeUIButtonComponent ? [
|
|
1062
|
+
showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
1063
|
+
mode: "text",
|
|
1064
|
+
icon: "vxe-icon-arrows-up",
|
|
1065
|
+
title: getI18n("vxe.custom.setting.moveUpTitle"),
|
|
1066
|
+
disabled: index <= 0,
|
|
1067
|
+
onClick(evntParame) {
|
|
1068
|
+
sortMoveUpEvent(evntParame, column);
|
|
1069
|
+
}
|
|
1070
|
+
}) : renderEmptyElement($xeTable),
|
|
1071
|
+
showSortMoveButton ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
1072
|
+
mode: "text",
|
|
1073
|
+
icon: "vxe-icon-arrows-down",
|
|
1074
|
+
title: getI18n("vxe.custom.setting.moveDnTitle"),
|
|
1075
|
+
disabled: index >= items.length - 1,
|
|
1076
|
+
onClick(evntParame) {
|
|
1077
|
+
sortMoveDnEvent(evntParame, column);
|
|
1078
|
+
}
|
|
1079
|
+
}) : renderEmptyElement($xeTable),
|
|
1080
|
+
showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
1081
|
+
mode: "text",
|
|
1082
|
+
icon: "vxe-icon-top",
|
|
1083
|
+
title: getI18n("vxe.custom.setting.putTopTitle"),
|
|
1084
|
+
disabled: index <= 0,
|
|
1085
|
+
onClick(evntParame) {
|
|
1086
|
+
sortMoveTopEvent(evntParame, column);
|
|
1087
|
+
}
|
|
1088
|
+
}) : renderEmptyElement($xeTable),
|
|
1089
|
+
showSortPutButton && !parentItem ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
1090
|
+
mode: "text",
|
|
1091
|
+
icon: "vxe-icon-bottom",
|
|
1092
|
+
title: getI18n("vxe.custom.setting.putBottomTitle"),
|
|
1093
|
+
disabled: index >= items.length - 1,
|
|
1094
|
+
onClick(evntParame) {
|
|
1095
|
+
sortMoveBottomEvent(evntParame, column);
|
|
1096
|
+
}
|
|
1097
|
+
}) : renderEmptyElement($xeTable)
|
|
1098
|
+
] : []) : renderEmptyElement($xeTable)
|
|
1099
|
+
])
|
|
1100
|
+
])
|
|
1101
|
+
);
|
|
1203
1102
|
if (allowResizable) {
|
|
1204
|
-
tdVNs.push(
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1103
|
+
tdVNs.push(
|
|
1104
|
+
(0, import_vue.h)("td", {
|
|
1105
|
+
key: "aw",
|
|
1106
|
+
class: "vxe-table-custom-popup--column-td col--resizable"
|
|
1107
|
+
}, [
|
|
1108
|
+
column.children && column.children.length || !(import_xe_utils.default.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable) ? (0, import_vue.h)("span", "-") : VxeUINumberInputComponent ? (0, import_vue.h)(VxeUINumberInputComponent, {
|
|
1109
|
+
type: "integer",
|
|
1110
|
+
immediate: false,
|
|
1111
|
+
disabled: isHidden,
|
|
1112
|
+
modelValue: column.renderResizeWidth,
|
|
1113
|
+
min: customMinWidth || 0,
|
|
1114
|
+
max: customMaxWidth || 9999,
|
|
1115
|
+
"onUpdate:modelValue"(value) {
|
|
1116
|
+
const width = Math.max(0, Number(value));
|
|
1117
|
+
column.renderResizeWidth = width;
|
|
1118
|
+
},
|
|
1119
|
+
onChange() {
|
|
1120
|
+
changeColumnWidth(column);
|
|
1121
|
+
}
|
|
1122
|
+
}) : renderEmptyElement($xeTable)
|
|
1123
|
+
])
|
|
1124
|
+
);
|
|
1222
1125
|
}
|
|
1223
1126
|
if (allowFixed) {
|
|
1224
|
-
tdVNs.push(
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1127
|
+
tdVNs.push(
|
|
1128
|
+
(0, import_vue.h)(
|
|
1129
|
+
"td",
|
|
1130
|
+
{
|
|
1131
|
+
key: "af",
|
|
1132
|
+
class: "vxe-table-custom-popup--column-td col--fixed"
|
|
1133
|
+
},
|
|
1134
|
+
parentItem ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
|
|
1135
|
+
(0, import_vue.h)(VxeUIButtonComponent, {
|
|
1136
|
+
icon: column.renderFixed === "left" ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
1137
|
+
status: column.renderFixed === "left" ? "primary" : "",
|
|
1138
|
+
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
1139
|
+
title: getI18n(column.renderFixed === "left" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedLeft"),
|
|
1140
|
+
onClick: ({ $event }) => {
|
|
1141
|
+
changeFixedOption(column, "left", $event);
|
|
1142
|
+
}
|
|
1143
|
+
}),
|
|
1144
|
+
(0, import_vue.h)(VxeUIButtonComponent, {
|
|
1145
|
+
icon: column.renderFixed === "right" ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
1146
|
+
status: column.renderFixed === "right" ? "primary" : "",
|
|
1147
|
+
disabled: isHidden || isMaxFixedColumn && !column.renderFixed,
|
|
1148
|
+
title: getI18n(column.renderFixed === "right" ? "vxe.toolbar.cancelFixed" : "vxe.toolbar.fixedRight"),
|
|
1149
|
+
onClick: ({ $event }) => {
|
|
1150
|
+
changeFixedOption(column, "right", $event);
|
|
1151
|
+
}
|
|
1152
|
+
})
|
|
1153
|
+
] : []
|
|
1154
|
+
)
|
|
1155
|
+
);
|
|
1248
1156
|
}
|
|
1249
1157
|
if (allowAlign) {
|
|
1250
|
-
tdVNs.push(
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1158
|
+
tdVNs.push(
|
|
1159
|
+
(0, import_vue.h)(
|
|
1160
|
+
"td",
|
|
1161
|
+
{
|
|
1162
|
+
key: "aa",
|
|
1163
|
+
class: "vxe-table-custom-popup--column-td col--align"
|
|
1164
|
+
},
|
|
1165
|
+
VxeUIRadioGroupComponent ? [
|
|
1166
|
+
(0, import_vue.h)(VxeUIRadioGroupComponent, {
|
|
1167
|
+
modelValue: column.renderAlign || "left",
|
|
1168
|
+
type: "button",
|
|
1169
|
+
strict: false,
|
|
1170
|
+
disabled: isHidden,
|
|
1171
|
+
options: alignList,
|
|
1172
|
+
onChange({ value, $event }) {
|
|
1173
|
+
changeAlignOption(column, value, "align", "renderAlign", "custom-align-change", $event);
|
|
1174
|
+
}
|
|
1175
|
+
})
|
|
1176
|
+
] : []
|
|
1177
|
+
)
|
|
1178
|
+
);
|
|
1266
1179
|
}
|
|
1267
1180
|
if (allowHeaderAlign) {
|
|
1268
|
-
tdVNs.push(
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1181
|
+
tdVNs.push(
|
|
1182
|
+
(0, import_vue.h)(
|
|
1183
|
+
"td",
|
|
1184
|
+
{
|
|
1185
|
+
key: "aha",
|
|
1186
|
+
class: "vxe-table-custom-popup--column-td col--header-align"
|
|
1187
|
+
},
|
|
1188
|
+
isColGroup ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
|
|
1189
|
+
(0, import_vue.h)(VxeUIRadioGroupComponent, {
|
|
1190
|
+
modelValue: column.renderHeaderAlign || "left",
|
|
1191
|
+
type: "button",
|
|
1192
|
+
strict: false,
|
|
1193
|
+
disabled: isHidden,
|
|
1194
|
+
options: alignList,
|
|
1195
|
+
onChange({ value, $event }) {
|
|
1196
|
+
changeAlignOption(column, value, "headerAlign", "renderHeaderAlign", "custom-header-align-change", $event);
|
|
1197
|
+
}
|
|
1198
|
+
})
|
|
1199
|
+
] : []
|
|
1200
|
+
)
|
|
1201
|
+
);
|
|
1284
1202
|
}
|
|
1285
1203
|
if (allowFooterAlign) {
|
|
1286
|
-
tdVNs.push(
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1204
|
+
tdVNs.push(
|
|
1205
|
+
(0, import_vue.h)(
|
|
1206
|
+
"td",
|
|
1207
|
+
{
|
|
1208
|
+
key: "afa",
|
|
1209
|
+
class: "vxe-table-custom-popup--column-td col--footer-align"
|
|
1210
|
+
},
|
|
1211
|
+
isColGroup ? [(0, import_vue.h)("span", "-")] : VxeUIRadioGroupComponent ? [
|
|
1212
|
+
(0, import_vue.h)(VxeUIRadioGroupComponent, {
|
|
1213
|
+
modelValue: column.renderFooterAlign || "left",
|
|
1214
|
+
type: "button",
|
|
1215
|
+
strict: false,
|
|
1216
|
+
disabled: isHidden,
|
|
1217
|
+
options: alignList,
|
|
1218
|
+
onChange({ value, $event }) {
|
|
1219
|
+
changeAlignOption(column, value, "footerAlign", "renderFooterAlign", "custom-footer-align-change", $event);
|
|
1220
|
+
}
|
|
1221
|
+
})
|
|
1222
|
+
] : []
|
|
1223
|
+
)
|
|
1224
|
+
);
|
|
1302
1225
|
}
|
|
1303
|
-
trVNs.push(
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1226
|
+
trVNs.push(
|
|
1227
|
+
(0, import_vue.h)("tr", {
|
|
1228
|
+
key: column.id,
|
|
1229
|
+
colid: column.id,
|
|
1230
|
+
class: [`vxe-table-custom-popup--row level--${column.level}`, {
|
|
1231
|
+
"is--group": isColGroup
|
|
1232
|
+
}],
|
|
1233
|
+
onDragstart: sortDragstartEvent,
|
|
1234
|
+
onDragend: sortDragendEvent,
|
|
1235
|
+
onDragover: sortDragoverEvent
|
|
1236
|
+
}, tdVNs)
|
|
1237
|
+
);
|
|
1313
1238
|
}
|
|
1314
1239
|
});
|
|
1315
1240
|
return trVNs;
|
|
@@ -1317,43 +1242,17 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1317
1242
|
const renderPopupPanel = () => {
|
|
1318
1243
|
const $xeGrid = $xeTable.xeGrid;
|
|
1319
1244
|
const $xeGantt = $xeTable.xeGantt;
|
|
1320
|
-
const {
|
|
1321
|
-
|
|
1322
|
-
} =
|
|
1323
|
-
const {
|
|
1324
|
-
treeConfig,
|
|
1325
|
-
rowGroupConfig,
|
|
1326
|
-
aggregateConfig
|
|
1327
|
-
} = tableProps;
|
|
1328
|
-
const {
|
|
1329
|
-
isCustomStatus,
|
|
1330
|
-
customColumnList
|
|
1331
|
-
} = tableReactData;
|
|
1245
|
+
const { customStore } = props;
|
|
1246
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps;
|
|
1247
|
+
const { isCustomStatus, customColumnList } = tableReactData;
|
|
1332
1248
|
const vSize = computeSize.value;
|
|
1333
1249
|
const customOpts = computeCustomOpts.value;
|
|
1334
1250
|
const aggregateOpts = computeAggregateOpts.value;
|
|
1335
|
-
const {
|
|
1336
|
-
|
|
1337
|
-
} =
|
|
1338
|
-
const {
|
|
1339
|
-
placement: aggPlacement
|
|
1340
|
-
} = aggregateOpts;
|
|
1341
|
-
const {
|
|
1342
|
-
mode,
|
|
1343
|
-
immediate,
|
|
1344
|
-
modalOptions,
|
|
1345
|
-
drawerOptions,
|
|
1346
|
-
allowVisible,
|
|
1347
|
-
allowFixed,
|
|
1348
|
-
allowAlign,
|
|
1349
|
-
allowHeaderAlign,
|
|
1350
|
-
allowFooterAlign,
|
|
1351
|
-
allowResizable
|
|
1352
|
-
} = customOpts;
|
|
1251
|
+
const { panePopupStyle } = customStore;
|
|
1252
|
+
const { placement: aggPlacement } = aggregateOpts;
|
|
1253
|
+
const { mode, immediate, modalOptions, drawerOptions, allowVisible, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable } = customOpts;
|
|
1353
1254
|
const columnOpts = computeColumnOpts.value;
|
|
1354
|
-
const {
|
|
1355
|
-
maxFixedSize
|
|
1356
|
-
} = columnOpts;
|
|
1255
|
+
const { maxFixedSize } = columnOpts;
|
|
1357
1256
|
const modalOpts = Object.assign({}, modalOptions);
|
|
1358
1257
|
const drawerOpts = Object.assign({}, drawerOptions);
|
|
1359
1258
|
const slots = customOpts.slots || {};
|
|
@@ -1364,7 +1263,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1364
1263
|
const footerSlot = slots.footer;
|
|
1365
1264
|
const isAllChecked = customStore.isAll;
|
|
1366
1265
|
const isAllIndeterminate = customStore.isIndeterminate;
|
|
1367
|
-
const isAggRtBmLayout = aggPlacement ===
|
|
1266
|
+
const isAggRtBmLayout = aggPlacement === "right" || aggPlacement === "bottom";
|
|
1368
1267
|
const params = {
|
|
1369
1268
|
$table: $xeTable,
|
|
1370
1269
|
$grid: $xeGrid,
|
|
@@ -1377,148 +1276,200 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1377
1276
|
const colVNs = [];
|
|
1378
1277
|
const headVNs = [];
|
|
1379
1278
|
if (allowVisible) {
|
|
1380
|
-
colVNs.push(
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1279
|
+
colVNs.push(
|
|
1280
|
+
(0, import_vue.h)("col", {
|
|
1281
|
+
key: "av",
|
|
1282
|
+
class: "vxe-table-custom-popup--column-col col--checkbox"
|
|
1283
|
+
})
|
|
1284
|
+
);
|
|
1285
|
+
headVNs.push(
|
|
1286
|
+
(0, import_vue.h)("th", {
|
|
1287
|
+
key: "av",
|
|
1288
|
+
class: "vxe-table-custom-popup--column-th col--checkbox"
|
|
1289
|
+
}, [
|
|
1290
|
+
(0, import_vue.h)("div", {
|
|
1291
|
+
class: ["vxe-table-custom--checkbox-option", {
|
|
1292
|
+
"is--checked": isAllChecked,
|
|
1293
|
+
"is--indeterminate": isAllIndeterminate
|
|
1294
|
+
}],
|
|
1295
|
+
title: getI18n("vxe.table.allTitle"),
|
|
1296
|
+
onClick: allOptionEvent
|
|
1297
|
+
}, [
|
|
1298
|
+
(0, import_vue.h)("span", {
|
|
1299
|
+
class: ["vxe-checkbox--icon", isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
1300
|
+
})
|
|
1301
|
+
// h('span', {
|
|
1302
|
+
// class: 'vxe-checkbox--label'
|
|
1303
|
+
// }, getI18n('vxe.toolbar.customAll'))
|
|
1304
|
+
])
|
|
1305
|
+
])
|
|
1306
|
+
);
|
|
1401
1307
|
}
|
|
1402
|
-
colVNs.push(
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1308
|
+
colVNs.push(
|
|
1309
|
+
(0, import_vue.h)("col", {
|
|
1310
|
+
key: "at",
|
|
1311
|
+
class: "vxe-table-custom-popup--column-col col--title"
|
|
1312
|
+
})
|
|
1313
|
+
);
|
|
1314
|
+
headVNs.push(
|
|
1315
|
+
(0, import_vue.h)("th", {
|
|
1316
|
+
key: "at",
|
|
1317
|
+
class: "vxe-table-custom-popup--column-th col--title"
|
|
1318
|
+
}, getI18n("vxe.custom.setting.colTitle"))
|
|
1319
|
+
);
|
|
1410
1320
|
if (allowResizable) {
|
|
1411
|
-
colVNs.push(
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1321
|
+
colVNs.push(
|
|
1322
|
+
(0, import_vue.h)("col", {
|
|
1323
|
+
key: "aw",
|
|
1324
|
+
class: "vxe-table-custom-popup--column-col col--width"
|
|
1325
|
+
})
|
|
1326
|
+
);
|
|
1327
|
+
headVNs.push(
|
|
1328
|
+
(0, import_vue.h)("th", {
|
|
1329
|
+
key: "aw",
|
|
1330
|
+
class: "vxe-table-custom-popup--column-th col--width"
|
|
1331
|
+
}, getI18n("vxe.custom.setting.colResizable"))
|
|
1332
|
+
);
|
|
1419
1333
|
}
|
|
1420
1334
|
if (allowFixed) {
|
|
1421
|
-
colVNs.push(
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1335
|
+
colVNs.push(
|
|
1336
|
+
(0, import_vue.h)("col", {
|
|
1337
|
+
key: "af",
|
|
1338
|
+
class: "vxe-table-custom-popup--column-col col--fixed"
|
|
1339
|
+
})
|
|
1340
|
+
);
|
|
1341
|
+
headVNs.push(
|
|
1342
|
+
(0, import_vue.h)("th", {
|
|
1343
|
+
key: "af",
|
|
1344
|
+
class: "vxe-table-custom-popup--column-th col--fixed"
|
|
1345
|
+
}, getI18n(`vxe.custom.setting.${maxFixedSize ? "colFixedMax" : "colFixed"}`, [maxFixedSize]))
|
|
1346
|
+
);
|
|
1429
1347
|
}
|
|
1430
1348
|
if (allowAlign) {
|
|
1431
|
-
colVNs.push(
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1349
|
+
colVNs.push(
|
|
1350
|
+
(0, import_vue.h)("col", {
|
|
1351
|
+
key: "aa",
|
|
1352
|
+
class: "vxe-table-custom-popup--column-col col--align"
|
|
1353
|
+
})
|
|
1354
|
+
);
|
|
1355
|
+
headVNs.push(
|
|
1356
|
+
(0, import_vue.h)("th", {
|
|
1357
|
+
key: "aa",
|
|
1358
|
+
class: "vxe-table-custom-popup--column-th col--align"
|
|
1359
|
+
}, getI18n("vxe.custom.setting.colAlign"))
|
|
1360
|
+
);
|
|
1439
1361
|
}
|
|
1440
1362
|
if (allowHeaderAlign) {
|
|
1441
|
-
colVNs.push(
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1363
|
+
colVNs.push(
|
|
1364
|
+
(0, import_vue.h)("col", {
|
|
1365
|
+
key: "aha",
|
|
1366
|
+
class: "vxe-table-custom-popup--column-col col--header-align"
|
|
1367
|
+
})
|
|
1368
|
+
);
|
|
1369
|
+
headVNs.push(
|
|
1370
|
+
(0, import_vue.h)("th", {
|
|
1371
|
+
key: "aha",
|
|
1372
|
+
class: "vxe-table-custom-popup--column-th col--header-align"
|
|
1373
|
+
}, getI18n("vxe.custom.setting.colHeadAlign"))
|
|
1374
|
+
);
|
|
1449
1375
|
}
|
|
1450
1376
|
if (allowFooterAlign) {
|
|
1451
|
-
colVNs.push(
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1377
|
+
colVNs.push(
|
|
1378
|
+
(0, import_vue.h)("col", {
|
|
1379
|
+
key: "afa",
|
|
1380
|
+
class: "vxe-table-custom-popup--column-col col--footer-align"
|
|
1381
|
+
})
|
|
1382
|
+
);
|
|
1383
|
+
headVNs.push(
|
|
1384
|
+
(0, import_vue.h)("th", {
|
|
1385
|
+
key: "afa",
|
|
1386
|
+
class: "vxe-table-custom-popup--column-th col--footer-align"
|
|
1387
|
+
}, getI18n("vxe.custom.setting.colFootAlign"))
|
|
1388
|
+
);
|
|
1459
1389
|
}
|
|
1460
1390
|
const scopedSlots = {
|
|
1461
1391
|
default: () => {
|
|
1462
|
-
return (0,
|
|
1392
|
+
return (0, import_vue.h)("div", {
|
|
1463
1393
|
ref: refBodyWrapperElem,
|
|
1464
|
-
class: [
|
|
1394
|
+
class: ["vxe-table-custom-popup--body-wrapper", `agg-layout--${aggPlacement}`, {
|
|
1465
1395
|
[`size--${vSize}`]: vSize
|
|
1466
1396
|
}],
|
|
1467
1397
|
style: panePopupStyle
|
|
1468
|
-
}, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1398
|
+
}, defaultSlot ? $xeTable.callSlot(defaultSlot, params) : [
|
|
1399
|
+
!isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, import_vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
1400
|
+
customStore
|
|
1401
|
+
}) : renderEmptyElement($xeTable),
|
|
1402
|
+
(0, import_vue.h)("div", {
|
|
1403
|
+
ref: refCustomBodyElem,
|
|
1404
|
+
class: "vxe-table-custom-popup--handle-wrapper"
|
|
1405
|
+
}, [
|
|
1406
|
+
topSlot ? (0, import_vue.h)("div", {
|
|
1407
|
+
class: "vxe-table-custom-popup--table-top"
|
|
1408
|
+
}, $xeTable.callSlot(topSlot, params)) : renderEmptyElement($xeTable),
|
|
1409
|
+
(0, import_vue.h)("div", {
|
|
1410
|
+
class: "vxe-table-custom-popup--table-wrapper"
|
|
1411
|
+
}, [
|
|
1412
|
+
(0, import_vue.h)("table", {}, [
|
|
1413
|
+
(0, import_vue.h)("colgroup", {}, colVNs),
|
|
1414
|
+
(0, import_vue.h)("thead", {}, [
|
|
1415
|
+
(0, import_vue.h)("tr", {}, headVNs)
|
|
1416
|
+
]),
|
|
1417
|
+
(0, import_vue.h)(import_vue.TransitionGroup, {
|
|
1418
|
+
class: "vxe-table-custom--panel-list",
|
|
1419
|
+
tag: "tbody",
|
|
1420
|
+
name: "vxe-table-custom--list"
|
|
1421
|
+
}, {
|
|
1422
|
+
default: () => renderPopupBodys()
|
|
1423
|
+
})
|
|
1424
|
+
])
|
|
1425
|
+
]),
|
|
1426
|
+
bottomSlot ? (0, import_vue.h)("div", {
|
|
1427
|
+
class: "vxe-table-custom-popup--table-bottom"
|
|
1428
|
+
}, $xeTable.callSlot(bottomSlot, params)) : renderEmptyElement($xeTable),
|
|
1429
|
+
renderDragTip()
|
|
1430
|
+
]),
|
|
1431
|
+
isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel ? (0, import_vue.h)($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
1432
|
+
customStore
|
|
1433
|
+
}) : renderEmptyElement($xeTable)
|
|
1434
|
+
]);
|
|
1488
1435
|
},
|
|
1489
1436
|
footer: () => {
|
|
1490
1437
|
if (footerSlot) {
|
|
1491
1438
|
return $xeTable.callSlot(footerSlot, params);
|
|
1492
1439
|
}
|
|
1493
|
-
return (0,
|
|
1494
|
-
class:
|
|
1495
|
-
}, [
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1440
|
+
return (0, import_vue.h)("div", {
|
|
1441
|
+
class: "vxe-table-custom-popup--footer"
|
|
1442
|
+
}, [
|
|
1443
|
+
VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
1444
|
+
content: customOpts.resetButtonText || getI18n("vxe.custom.cstmRestore"),
|
|
1445
|
+
disabled: !isCustomStatus,
|
|
1446
|
+
onClick: resetCustomEvent
|
|
1447
|
+
}) : renderEmptyElement($xeTable),
|
|
1448
|
+
immediate ? VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
1449
|
+
status: "primary",
|
|
1450
|
+
content: customOpts.closeButtonText || getI18n("vxe.table.customClose"),
|
|
1451
|
+
onClick: cancelCloseEvent
|
|
1452
|
+
}) : renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
1453
|
+
content: customOpts.cancelButtonText || getI18n("vxe.table.customCancel"),
|
|
1454
|
+
onClick: cancelCustomEvent
|
|
1455
|
+
}) : renderEmptyElement($xeTable),
|
|
1456
|
+
immediate ? renderEmptyElement($xeTable) : VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
1457
|
+
status: "primary",
|
|
1458
|
+
content: customOpts.confirmButtonText || getI18n("vxe.custom.cstmConfirm"),
|
|
1459
|
+
onClick: confirmCustomEvent
|
|
1460
|
+
}) : renderEmptyElement($xeTable)
|
|
1461
|
+
]);
|
|
1511
1462
|
}
|
|
1512
1463
|
};
|
|
1513
1464
|
if (headerSlot) {
|
|
1514
1465
|
scopedSlots.header = () => $xeTable.callSlot(headerSlot, params);
|
|
1515
1466
|
}
|
|
1516
|
-
if (mode ===
|
|
1517
|
-
return VxeUIDrawerComponent ? (0,
|
|
1518
|
-
key:
|
|
1519
|
-
className: [
|
|
1467
|
+
if (mode === "drawer") {
|
|
1468
|
+
return VxeUIDrawerComponent ? (0, import_vue.h)(VxeUIDrawerComponent, {
|
|
1469
|
+
key: "drawer",
|
|
1470
|
+
className: ["vxe-table-custom-drawer-wrapper", "vxe-table--ignore-clear", drawerOpts.className || ""].join(" "),
|
|
1520
1471
|
modelValue: customStore.visible,
|
|
1521
|
-
title: drawerOpts.title || getI18n(
|
|
1472
|
+
title: drawerOpts.title || getI18n("vxe.custom.cstmTitle"),
|
|
1522
1473
|
width: drawerOpts.width || Math.min(880, Math.floor(document.documentElement.clientWidth * 0.6)),
|
|
1523
1474
|
position: drawerOpts.position,
|
|
1524
1475
|
resize: !!drawerOpts.resize,
|
|
@@ -1526,17 +1477,17 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1526
1477
|
maskClosable: !!drawerOpts.maskClosable,
|
|
1527
1478
|
destroyOnClose: true,
|
|
1528
1479
|
showFooter: true,
|
|
1529
|
-
|
|
1480
|
+
"onUpdate:modelValue"(value) {
|
|
1530
1481
|
customStore.visible = value;
|
|
1531
1482
|
}
|
|
1532
1483
|
}, scopedSlots) : renderEmptyElement($xeTable);
|
|
1533
1484
|
}
|
|
1534
|
-
return VxeUIModalComponent ? (0,
|
|
1535
|
-
key:
|
|
1536
|
-
className: [
|
|
1485
|
+
return VxeUIModalComponent ? (0, import_vue.h)(VxeUIModalComponent, {
|
|
1486
|
+
key: "modal",
|
|
1487
|
+
className: ["vxe-table-custom-modal-wrapper", "vxe-table--ignore-clear", modalOpts.className || ""].join(" "),
|
|
1537
1488
|
modelValue: customStore.visible,
|
|
1538
|
-
title: modalOpts.title || getI18n(
|
|
1539
|
-
width: modalOpts.width || Math.min(
|
|
1489
|
+
title: modalOpts.title || getI18n("vxe.custom.cstmTitle"),
|
|
1490
|
+
width: modalOpts.width || Math.min(1e3, document.documentElement.clientWidth),
|
|
1540
1491
|
minWidth: modalOpts.minWidth || 800,
|
|
1541
1492
|
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
1542
1493
|
minHeight: modalOpts.minHeight || 400,
|
|
@@ -1551,37 +1502,35 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1551
1502
|
maskClosable: !!modalOpts.maskClosable,
|
|
1552
1503
|
destroyOnClose: true,
|
|
1553
1504
|
showFooter: true,
|
|
1554
|
-
|
|
1505
|
+
"onUpdate:modelValue"(value) {
|
|
1555
1506
|
customStore.visible = value;
|
|
1556
1507
|
}
|
|
1557
1508
|
}, scopedSlots) : renderEmptyElement($xeTable);
|
|
1558
1509
|
};
|
|
1559
1510
|
const renderVN = () => {
|
|
1560
1511
|
const customOpts = computeCustomOpts.value;
|
|
1561
|
-
if ([
|
|
1512
|
+
if (["modal", "drawer", "popup"].includes(`${customOpts.mode}`)) {
|
|
1562
1513
|
return renderPopupPanel();
|
|
1563
1514
|
}
|
|
1564
1515
|
return renderSimplePanel();
|
|
1565
1516
|
};
|
|
1566
|
-
(0,
|
|
1517
|
+
(0, import_vue.nextTick)(() => {
|
|
1567
1518
|
const customOpts = computeCustomOpts.value;
|
|
1568
|
-
const {
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
if (!VxeUIModalComponent && mode === 'modal') {
|
|
1572
|
-
errLog('vxe.error.reqComp', ['vxe-modal']);
|
|
1519
|
+
const { mode } = customOpts;
|
|
1520
|
+
if (!VxeUIModalComponent && mode === "modal") {
|
|
1521
|
+
errLog("vxe.error.reqComp", ["vxe-modal"]);
|
|
1573
1522
|
}
|
|
1574
|
-
if (!VxeUIDrawerComponent && mode ===
|
|
1575
|
-
errLog(
|
|
1523
|
+
if (!VxeUIDrawerComponent && mode === "drawer") {
|
|
1524
|
+
errLog("vxe.error.reqComp", ["vxe-drawer"]);
|
|
1576
1525
|
}
|
|
1577
1526
|
if (!VxeUIButtonComponent) {
|
|
1578
|
-
errLog(
|
|
1527
|
+
errLog("vxe.error.reqComp", ["vxe-button"]);
|
|
1579
1528
|
}
|
|
1580
1529
|
if (!VxeUINumberInputComponent) {
|
|
1581
|
-
errLog(
|
|
1530
|
+
errLog("vxe.error.reqComp", ["vxe-number-input"]);
|
|
1582
1531
|
}
|
|
1583
1532
|
if (!VxeUIRadioGroupComponent) {
|
|
1584
|
-
errLog(
|
|
1533
|
+
errLog("vxe.error.reqComp", ["vxe-radio-group"]);
|
|
1585
1534
|
}
|
|
1586
1535
|
});
|
|
1587
1536
|
const $xeTableCustomPanel = {
|
|
@@ -1595,13 +1544,13 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
1595
1544
|
getComputeMaps: () => computeMaps,
|
|
1596
1545
|
renderVN
|
|
1597
1546
|
};
|
|
1598
|
-
(0,
|
|
1547
|
+
(0, import_vue.onUnmounted)(() => {
|
|
1599
1548
|
customPanelInternalData = createInternalData();
|
|
1600
1549
|
});
|
|
1601
|
-
(0,
|
|
1550
|
+
(0, import_vue.provide)("$xeTableCustomPanel", $xeTableCustomPanel);
|
|
1602
1551
|
return $xeTableCustomPanel;
|
|
1603
1552
|
},
|
|
1604
1553
|
render() {
|
|
1605
1554
|
return this.renderVN();
|
|
1606
1555
|
}
|
|
1607
|
-
});
|
|
1556
|
+
});
|