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,67 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var import_vue = require("vue");
|
|
25
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
26
|
+
var import_ui = require("../../../ui");
|
|
27
|
+
var import_dom = require("../../../ui/src/dom");
|
|
28
|
+
var import_utils = require("../../../ui/src/utils");
|
|
29
|
+
const { menus, hooks, globalEvents, GLOBAL_EVENT_KEYS } = import_ui.VxeUI;
|
|
30
|
+
const tableMenuMethodKeys = ["closeMenu"];
|
|
31
|
+
hooks.add("tableMenuModule", {
|
|
17
32
|
setupTable($xeTable) {
|
|
18
|
-
const {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
reactData,
|
|
22
|
-
internalData
|
|
23
|
-
} = $xeTable;
|
|
24
|
-
const {
|
|
25
|
-
refElem,
|
|
26
|
-
refTableFilter,
|
|
27
|
-
refTableMenu
|
|
28
|
-
} = $xeTable.getRefMaps();
|
|
29
|
-
const {
|
|
30
|
-
computeMouseOpts,
|
|
31
|
-
computeIsContentMenu,
|
|
32
|
-
computeMenuOpts
|
|
33
|
-
} = $xeTable.getComputeMaps();
|
|
33
|
+
const { xID, props, reactData, internalData } = $xeTable;
|
|
34
|
+
const { refElem, refTableFilter, refTableMenu } = $xeTable.getRefMaps();
|
|
35
|
+
const { computeMouseOpts, computeIsContentMenu, computeMenuOpts } = $xeTable.getComputeMaps();
|
|
34
36
|
const $xeGrid = $xeTable.xeGrid;
|
|
35
37
|
const $xeGantt = $xeTable.xeGantt;
|
|
36
38
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
37
39
|
let menuMethods = {};
|
|
38
40
|
let menuPrivateMethods = {};
|
|
39
|
-
/**
|
|
40
|
-
* 显示快捷菜单
|
|
41
|
-
*/
|
|
42
41
|
const handleOpenMenuEvent = (evnt, type, params) => {
|
|
43
|
-
const {
|
|
44
|
-
ctxMenuStore
|
|
45
|
-
} = reactData;
|
|
42
|
+
const { ctxMenuStore } = reactData;
|
|
46
43
|
const isContentMenu = computeIsContentMenu.value;
|
|
47
44
|
const menuOpts = computeMenuOpts.value;
|
|
48
45
|
const config = menuOpts[type];
|
|
49
|
-
const {
|
|
50
|
-
zIndex,
|
|
51
|
-
transfer,
|
|
52
|
-
width,
|
|
53
|
-
visibleMethod
|
|
54
|
-
} = menuOpts;
|
|
46
|
+
const { zIndex, transfer, width, visibleMethod } = menuOpts;
|
|
55
47
|
if (config) {
|
|
56
|
-
const {
|
|
57
|
-
options,
|
|
58
|
-
disabled
|
|
59
|
-
} = config;
|
|
48
|
+
const { options, disabled } = config;
|
|
60
49
|
if (disabled) {
|
|
61
50
|
evnt.preventDefault();
|
|
62
51
|
} else if (isContentMenu && options && options.length) {
|
|
63
52
|
params.options = options;
|
|
64
|
-
$xeTable.preventEvent(evnt,
|
|
53
|
+
$xeTable.preventEvent(evnt, "event.showMenu", params, () => {
|
|
65
54
|
if (!visibleMethod || visibleMethod(params)) {
|
|
66
55
|
evnt.preventDefault();
|
|
67
56
|
$xeTable.updateZindex();
|
|
@@ -70,12 +59,7 @@ hooks.add('tableMenuModule', {
|
|
|
70
59
|
return;
|
|
71
60
|
}
|
|
72
61
|
const tableRect = el.getBoundingClientRect();
|
|
73
|
-
const {
|
|
74
|
-
scrollTop,
|
|
75
|
-
scrollLeft,
|
|
76
|
-
visibleHeight,
|
|
77
|
-
visibleWidth
|
|
78
|
-
} = (0, _dom.getDomNode)();
|
|
62
|
+
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = (0, import_dom.getDomNode)();
|
|
79
63
|
let top = evnt.clientY - tableRect.y;
|
|
80
64
|
let left = evnt.clientX - tableRect.x;
|
|
81
65
|
if (transfer) {
|
|
@@ -90,7 +74,7 @@ hooks.add('tableMenuModule', {
|
|
|
90
74
|
left: `${left}px`
|
|
91
75
|
};
|
|
92
76
|
if (width) {
|
|
93
|
-
ctxStyle[
|
|
77
|
+
ctxStyle["--vxe-ui-table-menu-item-width"] = (0, import_dom.toCssUnit)(width);
|
|
94
78
|
}
|
|
95
79
|
Object.assign(ctxMenuStore, {
|
|
96
80
|
visible: true,
|
|
@@ -100,15 +84,12 @@ hooks.add('tableMenuModule', {
|
|
|
100
84
|
showChild: false,
|
|
101
85
|
style: ctxStyle
|
|
102
86
|
});
|
|
103
|
-
(0,
|
|
87
|
+
(0, import_vue.nextTick)(() => {
|
|
104
88
|
const tableMenu = refTableMenu.value;
|
|
105
89
|
const ctxElem = tableMenu.getRefMaps().refElem.value;
|
|
106
90
|
const clientHeight = ctxElem.clientHeight;
|
|
107
91
|
const clientWidth = ctxElem.clientWidth;
|
|
108
|
-
const {
|
|
109
|
-
boundingTop,
|
|
110
|
-
boundingLeft
|
|
111
|
-
} = (0, _dom.getAbsolutePos)(ctxElem);
|
|
92
|
+
const { boundingTop, boundingLeft } = (0, import_dom.getAbsolutePos)(ctxElem);
|
|
112
93
|
const offsetTop = boundingTop + clientHeight - visibleHeight;
|
|
113
94
|
const offsetLeft = boundingLeft + clientWidth - visibleWidth;
|
|
114
95
|
if (offsetTop > -10) {
|
|
@@ -119,19 +100,12 @@ hooks.add('tableMenuModule', {
|
|
|
119
100
|
}
|
|
120
101
|
});
|
|
121
102
|
};
|
|
122
|
-
const {
|
|
123
|
-
keyboard,
|
|
124
|
-
row,
|
|
125
|
-
column
|
|
126
|
-
} = params;
|
|
103
|
+
const { keyboard, row, column } = params;
|
|
127
104
|
if (keyboard && row && column) {
|
|
128
105
|
$xeTable.scrollToRow(row, column).then(() => {
|
|
129
106
|
const cell = $xeTable.getCellElement(row, column);
|
|
130
107
|
if (cell) {
|
|
131
|
-
const {
|
|
132
|
-
boundingTop,
|
|
133
|
-
boundingLeft
|
|
134
|
-
} = (0, _dom.getAbsolutePos)(cell);
|
|
108
|
+
const { boundingTop, boundingLeft } = (0, import_dom.getAbsolutePos)(cell);
|
|
135
109
|
top = boundingTop + scrollTop + Math.floor(cell.offsetHeight / 2);
|
|
136
110
|
left = boundingLeft + scrollLeft + Math.floor(cell.offsetWidth / 2);
|
|
137
111
|
}
|
|
@@ -159,7 +133,7 @@ hooks.add('tableMenuModule', {
|
|
|
159
133
|
selectChild: null,
|
|
160
134
|
showChild: false
|
|
161
135
|
});
|
|
162
|
-
return (0,
|
|
136
|
+
return (0, import_vue.nextTick)();
|
|
163
137
|
}
|
|
164
138
|
};
|
|
165
139
|
menuPrivateMethods = {
|
|
@@ -168,9 +142,9 @@ hooks.add('tableMenuModule', {
|
|
|
168
142
|
*/
|
|
169
143
|
moveCtxMenu(evnt, ctxMenuStore, property, hasOper, operRest, menuList) {
|
|
170
144
|
let selectItem;
|
|
171
|
-
const selectIndex =
|
|
145
|
+
const selectIndex = import_xe_utils.default.findIndexOf(menuList, (item) => ctxMenuStore[property] === item);
|
|
172
146
|
if (hasOper) {
|
|
173
|
-
if (operRest && (0,
|
|
147
|
+
if (operRest && (0, import_utils.hasChildrenList)(ctxMenuStore.selected)) {
|
|
174
148
|
ctxMenuStore.showChild = true;
|
|
175
149
|
} else {
|
|
176
150
|
ctxMenuStore.showChild = false;
|
|
@@ -201,47 +175,27 @@ hooks.add('tableMenuModule', {
|
|
|
201
175
|
* 快捷菜单事件处理
|
|
202
176
|
*/
|
|
203
177
|
handleGlobalContextmenuEvent(evnt) {
|
|
204
|
-
const $
|
|
205
|
-
const $
|
|
206
|
-
const {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
} = props;
|
|
210
|
-
const {
|
|
211
|
-
editStore,
|
|
212
|
-
ctxMenuStore
|
|
213
|
-
} = reactData;
|
|
214
|
-
const {
|
|
215
|
-
visibleColumn
|
|
216
|
-
} = internalData;
|
|
178
|
+
const $xeGrid2 = $xeTable.xeGrid;
|
|
179
|
+
const $xeGantt2 = $xeTable.xeGantt;
|
|
180
|
+
const { mouseConfig, menuConfig } = props;
|
|
181
|
+
const { editStore, ctxMenuStore } = reactData;
|
|
182
|
+
const { visibleColumn } = internalData;
|
|
217
183
|
const tableFilter = refTableFilter.value;
|
|
218
184
|
const tableMenu = refTableMenu.value;
|
|
219
185
|
const mouseOpts = computeMouseOpts.value;
|
|
220
186
|
const menuOpts = computeMenuOpts.value;
|
|
221
187
|
const el = refElem.value;
|
|
222
|
-
const {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if ((0, _utils.isEnableConf)(menuConfig)) {
|
|
227
|
-
if (ctxMenuStore.visible && tableMenu && (0, _dom.getEventTargetNode)(evnt, tableMenu.getRefMaps().refElem.value).flag) {
|
|
188
|
+
const { selected } = editStore;
|
|
189
|
+
const layoutList = ["header", "body", "footer"];
|
|
190
|
+
if ((0, import_utils.isEnableConf)(menuConfig)) {
|
|
191
|
+
if (ctxMenuStore.visible && tableMenu && (0, import_dom.getEventTargetNode)(evnt, tableMenu.getRefMaps().refElem.value).flag) {
|
|
228
192
|
evnt.preventDefault();
|
|
229
193
|
return;
|
|
230
194
|
}
|
|
231
195
|
if (internalData._keyCtx) {
|
|
232
|
-
const type =
|
|
233
|
-
const params = {
|
|
234
|
-
|
|
235
|
-
type,
|
|
236
|
-
$table: $xeTable,
|
|
237
|
-
$grid: $xeGrid,
|
|
238
|
-
$gantt: $xeGantt,
|
|
239
|
-
keyboard: true,
|
|
240
|
-
columns: visibleColumn.slice(0),
|
|
241
|
-
$event: evnt
|
|
242
|
-
};
|
|
243
|
-
// 如果开启单元格区域
|
|
244
|
-
if ((0, _utils.hasEnableConf)(mouseConfig, mouseOpts) && mouseOpts.area) {
|
|
196
|
+
const type = "body";
|
|
197
|
+
const params = { source: "table", type, $table: $xeTable, $grid: $xeGrid2, $gantt: $xeGantt2, keyboard: true, columns: visibleColumn.slice(0), $event: evnt };
|
|
198
|
+
if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts) && mouseOpts.area) {
|
|
245
199
|
const activeArea = $xeTable.getActiveCellArea();
|
|
246
200
|
if (activeArea && activeArea.row && activeArea.column) {
|
|
247
201
|
params.row = activeArea.row;
|
|
@@ -249,8 +203,7 @@ hooks.add('tableMenuModule', {
|
|
|
249
203
|
handleOpenMenuEvent(evnt, type, params);
|
|
250
204
|
return;
|
|
251
205
|
}
|
|
252
|
-
} else if ((0,
|
|
253
|
-
// 如果启用键盘导航且已选中单元格
|
|
206
|
+
} else if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
254
207
|
if (selected.row && selected.column) {
|
|
255
208
|
params.row = selected.row;
|
|
256
209
|
params.column = selected.column;
|
|
@@ -259,38 +212,24 @@ hooks.add('tableMenuModule', {
|
|
|
259
212
|
}
|
|
260
213
|
}
|
|
261
214
|
}
|
|
262
|
-
// 分别匹配表尾、内容、表尾的快捷菜单
|
|
263
215
|
for (let index = 0; index < layoutList.length; index++) {
|
|
264
216
|
const layout = layoutList[index];
|
|
265
|
-
const columnTargetNode = (0,
|
|
266
|
-
|
|
267
|
-
return target.parentNode.parentNode.parentNode.getAttribute('xid') === xID;
|
|
217
|
+
const columnTargetNode = (0, import_dom.getEventTargetNode)(evnt, el, `vxe-${layout}--column`, (target) => {
|
|
218
|
+
return target.parentNode.parentNode.parentNode.getAttribute("xid") === xID;
|
|
268
219
|
});
|
|
269
|
-
const params = {
|
|
270
|
-
source: 'table',
|
|
271
|
-
type: layout,
|
|
272
|
-
$table: $xeTable,
|
|
273
|
-
$grid: $xeGrid,
|
|
274
|
-
$gantt: $xeGantt,
|
|
275
|
-
columns: visibleColumn.slice(0),
|
|
276
|
-
$event: evnt
|
|
277
|
-
};
|
|
220
|
+
const params = { source: "table", type: layout, $table: $xeTable, $grid: $xeGrid2, $gantt: $xeGantt2, columns: visibleColumn.slice(0), $event: evnt };
|
|
278
221
|
if (columnTargetNode.flag) {
|
|
279
222
|
const cell = columnTargetNode.targetElem;
|
|
280
223
|
const columnNodeRest = $xeTable.getColumnNode(cell);
|
|
281
224
|
const column = columnNodeRest ? columnNodeRest.item : null;
|
|
282
225
|
let typePrefix = `${layout}-`;
|
|
283
226
|
if (column) {
|
|
284
|
-
Object.assign(params, {
|
|
285
|
-
column,
|
|
286
|
-
columnIndex: $xeTable.getColumnIndex(column),
|
|
287
|
-
cell
|
|
288
|
-
});
|
|
227
|
+
Object.assign(params, { column, columnIndex: $xeTable.getColumnIndex(column), cell });
|
|
289
228
|
}
|
|
290
|
-
if (layout ===
|
|
229
|
+
if (layout === "body") {
|
|
291
230
|
const rowNodeRest = $xeTable.getRowNode(cell.parentNode);
|
|
292
231
|
const row = rowNodeRest ? rowNodeRest.item : null;
|
|
293
|
-
typePrefix =
|
|
232
|
+
typePrefix = "";
|
|
294
233
|
if (row) {
|
|
295
234
|
params.row = row;
|
|
296
235
|
params.rowIndex = $xeTable.getRowIndex(row);
|
|
@@ -300,8 +239,8 @@ hooks.add('tableMenuModule', {
|
|
|
300
239
|
handleOpenMenuEvent(evnt, layout, params);
|
|
301
240
|
$xeTable.dispatchEvent(eventType, params, evnt);
|
|
302
241
|
return;
|
|
303
|
-
} else if ((0,
|
|
304
|
-
if (menuOpts.trigger ===
|
|
242
|
+
} else if ((0, import_dom.getEventTargetNode)(evnt, el, `vxe-table--${layout}-wrapper`, (target) => target.getAttribute("xid") === xID).flag || layout === "body" && (0, import_dom.getEventTargetNode)(evnt, el, "vxe-table--empty-place-wrapper", (target) => target.getAttribute("xid") === xID).flag) {
|
|
243
|
+
if (menuOpts.trigger === "cell") {
|
|
305
244
|
evnt.preventDefault();
|
|
306
245
|
} else {
|
|
307
246
|
handleOpenMenuEvent(evnt, layout, params);
|
|
@@ -310,47 +249,38 @@ hooks.add('tableMenuModule', {
|
|
|
310
249
|
}
|
|
311
250
|
}
|
|
312
251
|
}
|
|
313
|
-
if (tableFilter && !(0,
|
|
252
|
+
if (tableFilter && !(0, import_dom.getEventTargetNode)(evnt, tableFilter.getRefMaps().refElem.value).flag) {
|
|
314
253
|
$xeTable.closeFilter();
|
|
315
254
|
}
|
|
316
255
|
menuMethods.closeMenu();
|
|
317
256
|
},
|
|
318
257
|
ctxMenuMouseoverEvent(evnt, item, child) {
|
|
319
258
|
const menuElem = evnt.currentTarget;
|
|
320
|
-
const {
|
|
321
|
-
ctxMenuStore
|
|
322
|
-
} = reactData;
|
|
259
|
+
const { ctxMenuStore } = reactData;
|
|
323
260
|
evnt.preventDefault();
|
|
324
261
|
evnt.stopPropagation();
|
|
325
262
|
ctxMenuStore.selected = item;
|
|
326
263
|
ctxMenuStore.selectChild = child;
|
|
327
264
|
if (!child) {
|
|
328
|
-
ctxMenuStore.showChild = (0,
|
|
265
|
+
ctxMenuStore.showChild = (0, import_utils.hasChildrenList)(item);
|
|
329
266
|
if (ctxMenuStore.showChild) {
|
|
330
|
-
(0,
|
|
267
|
+
(0, import_vue.nextTick)(() => {
|
|
331
268
|
const childWrapperElem = menuElem.nextElementSibling;
|
|
332
269
|
if (childWrapperElem) {
|
|
333
|
-
const {
|
|
334
|
-
boundingTop,
|
|
335
|
-
boundingLeft,
|
|
336
|
-
visibleHeight,
|
|
337
|
-
visibleWidth
|
|
338
|
-
} = (0, _dom.getAbsolutePos)(menuElem);
|
|
270
|
+
const { boundingTop, boundingLeft, visibleHeight, visibleWidth } = (0, import_dom.getAbsolutePos)(menuElem);
|
|
339
271
|
const posTop = boundingTop + menuElem.offsetHeight;
|
|
340
272
|
const posLeft = boundingLeft + menuElem.offsetWidth;
|
|
341
|
-
let left =
|
|
342
|
-
let right =
|
|
343
|
-
// 是否超出右侧
|
|
273
|
+
let left = "";
|
|
274
|
+
let right = "";
|
|
344
275
|
if (posLeft + childWrapperElem.offsetWidth > visibleWidth - 10) {
|
|
345
|
-
left =
|
|
276
|
+
left = "auto";
|
|
346
277
|
right = `${menuElem.offsetWidth}px`;
|
|
347
278
|
}
|
|
348
|
-
|
|
349
|
-
let
|
|
350
|
-
let bottom = '';
|
|
279
|
+
let top = "";
|
|
280
|
+
let bottom = "";
|
|
351
281
|
if (posTop + childWrapperElem.offsetHeight > visibleHeight - 10) {
|
|
352
|
-
top =
|
|
353
|
-
bottom =
|
|
282
|
+
top = "auto";
|
|
283
|
+
bottom = "0";
|
|
354
284
|
}
|
|
355
285
|
childWrapperElem.style.left = left;
|
|
356
286
|
childWrapperElem.style.right = right;
|
|
@@ -362,9 +292,7 @@ hooks.add('tableMenuModule', {
|
|
|
362
292
|
}
|
|
363
293
|
},
|
|
364
294
|
ctxMenuMouseoutEvent(evnt, item) {
|
|
365
|
-
const {
|
|
366
|
-
ctxMenuStore
|
|
367
|
-
} = reactData;
|
|
295
|
+
const { ctxMenuStore } = reactData;
|
|
368
296
|
if (!item.children) {
|
|
369
297
|
ctxMenuStore.selected = null;
|
|
370
298
|
}
|
|
@@ -374,28 +302,21 @@ hooks.add('tableMenuModule', {
|
|
|
374
302
|
* 快捷菜单点击事件
|
|
375
303
|
*/
|
|
376
304
|
ctxMenuLinkEvent(evnt, menu) {
|
|
377
|
-
const $
|
|
378
|
-
const $
|
|
379
|
-
// 如果一级菜单有配置 code 则允许点击,否则不能点击
|
|
305
|
+
const $xeGrid2 = $xeTable.xeGrid;
|
|
306
|
+
const $xeGantt2 = $xeTable.xeGantt;
|
|
380
307
|
if (!menu.loading && !menu.disabled && (menu.code || !menu.children || !menu.children.length)) {
|
|
381
308
|
const gMenuOpts = menus.get(menu.code);
|
|
382
|
-
const params = Object.assign({}, internalData._currMenuParams, {
|
|
383
|
-
menu,
|
|
384
|
-
$table: $xeTable,
|
|
385
|
-
$grid: $xeGrid,
|
|
386
|
-
$gantt: $xeGantt,
|
|
387
|
-
$event: evnt
|
|
388
|
-
});
|
|
309
|
+
const params = Object.assign({}, internalData._currMenuParams, { menu, $table: $xeTable, $grid: $xeGrid2, $gantt: $xeGantt2, $event: evnt });
|
|
389
310
|
const tmMethod = gMenuOpts ? gMenuOpts.tableMenuMethod || gMenuOpts.menuMethod : null;
|
|
390
311
|
if (tmMethod) {
|
|
391
312
|
tmMethod(params, evnt);
|
|
392
313
|
}
|
|
393
|
-
$xeTable.dispatchEvent(
|
|
314
|
+
$xeTable.dispatchEvent("menu-click", params, evnt);
|
|
394
315
|
menuMethods.closeMenu();
|
|
395
316
|
}
|
|
396
317
|
}
|
|
397
318
|
};
|
|
398
|
-
return
|
|
319
|
+
return { ...menuMethods, ...menuPrivateMethods };
|
|
399
320
|
},
|
|
400
321
|
setupGrid($xeGrid) {
|
|
401
322
|
return $xeGrid.extendTableMethods(tableMenuMethodKeys);
|
|
@@ -403,4 +324,4 @@ hooks.add('tableMenuModule', {
|
|
|
403
324
|
setupGantt($xeGantt) {
|
|
404
325
|
return $xeGantt.extendTableMethods(tableMenuMethodKeys);
|
|
405
326
|
}
|
|
406
|
-
});
|
|
327
|
+
});
|