vxe-table 4.23.5 → 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 +32456 -33938
- 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 +14061 -15071
- 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 +30584 -24324
- 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 +248 -618
- 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 -1023
- 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/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.1792838769925.ttf → dist/iconfont.1792977622800.ttf} +0 -0
- /package/{es/iconfont.1792838769925.woff → dist/iconfont.1792977622800.woff} +0 -0
- /package/{es/iconfont.1792838769925.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.1792838769925.ttf → es/iconfont.1792977622800.ttf} +0 -0
- /package/{lib/iconfont.1792838769925.woff → es/iconfont.1792977622800.woff} +0 -0
- /package/{lib/iconfont.1792838769925.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,61 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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_xe_utils = __toESM(require("xe-utils"));
|
|
25
|
+
var import_ui = require("../../../ui");
|
|
26
|
+
var import_util = require("../../src/util");
|
|
27
|
+
var import_dom = require("../../../ui/src/dom");
|
|
28
|
+
var import_utils = require("../../../ui/src/utils");
|
|
29
|
+
const { hooks } = import_ui.VxeUI;
|
|
30
|
+
hooks.add("tableKeyboardModule", {
|
|
13
31
|
setupTable($xeTable) {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
internalData
|
|
18
|
-
} = $xeTable;
|
|
19
|
-
const {
|
|
20
|
-
refElem,
|
|
21
|
-
refTableBody
|
|
22
|
-
} = $xeTable.getRefMaps();
|
|
23
|
-
const {
|
|
24
|
-
computeEditOpts,
|
|
25
|
-
computeCheckboxOpts,
|
|
26
|
-
computeMouseOpts,
|
|
27
|
-
computeTreeOpts,
|
|
28
|
-
computeRowOpts,
|
|
29
|
-
computeColumnOpts,
|
|
30
|
-
computeCellOpts,
|
|
31
|
-
computeDefaultRowHeight,
|
|
32
|
-
computeCurrentRowOpts,
|
|
33
|
-
computeCurrentColumnOpts
|
|
34
|
-
} = $xeTable.getComputeMaps();
|
|
32
|
+
const { props, reactData, internalData } = $xeTable;
|
|
33
|
+
const { refElem, refTableBody } = $xeTable.getRefMaps();
|
|
34
|
+
const { computeEditOpts, computeCheckboxOpts, computeMouseOpts, computeTreeOpts, computeRowOpts, computeColumnOpts, computeCellOpts, computeDefaultRowHeight, computeCurrentRowOpts, computeCurrentColumnOpts } = $xeTable.getComputeMaps();
|
|
35
35
|
function getCheckboxRangeRows(evnt, params, targetTrElem, trRect, offsetClientTop, moveRange) {
|
|
36
|
-
const {
|
|
37
|
-
|
|
38
|
-
} = props;
|
|
39
|
-
const {
|
|
40
|
-
fullAllDataRowIdData,
|
|
41
|
-
isResizeCellHeight
|
|
42
|
-
} = internalData;
|
|
36
|
+
const { showOverflow } = props;
|
|
37
|
+
const { fullAllDataRowIdData, isResizeCellHeight } = internalData;
|
|
43
38
|
const rowOpts = computeRowOpts.value;
|
|
44
39
|
const cellOpts = computeCellOpts.value;
|
|
45
40
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
46
|
-
const {
|
|
47
|
-
row
|
|
48
|
-
} = params;
|
|
41
|
+
const { row } = params;
|
|
49
42
|
let countHeight = 0;
|
|
50
43
|
let rangeRows = [];
|
|
51
44
|
let moveSize = 0;
|
|
52
45
|
const isDown = moveRange > 0;
|
|
53
|
-
const {
|
|
54
|
-
|
|
55
|
-
} = reactData;
|
|
56
|
-
const {
|
|
57
|
-
afterFullData
|
|
58
|
-
} = internalData;
|
|
46
|
+
const { scrollYLoad } = reactData;
|
|
47
|
+
const { afterFullData } = internalData;
|
|
59
48
|
if (isDown) {
|
|
60
49
|
moveSize = offsetClientTop + moveRange;
|
|
61
50
|
} else {
|
|
@@ -96,7 +85,7 @@ hooks.add('tableKeyboardModule', {
|
|
|
96
85
|
}
|
|
97
86
|
}
|
|
98
87
|
} else {
|
|
99
|
-
const siblingProp = isDown ?
|
|
88
|
+
const siblingProp = isDown ? "next" : "previous";
|
|
100
89
|
while (targetTrElem && countHeight < moveSize) {
|
|
101
90
|
const rowNodeRest = $xeTable.getRowNode(targetTrElem);
|
|
102
91
|
if (rowNodeRest) {
|
|
@@ -109,21 +98,16 @@ hooks.add('tableKeyboardModule', {
|
|
|
109
98
|
return rangeRows;
|
|
110
99
|
}
|
|
111
100
|
const handleCheckboxRangeEvent = (evnt, params) => {
|
|
112
|
-
const {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
const {
|
|
119
|
-
column,
|
|
120
|
-
cell
|
|
121
|
-
} = params;
|
|
122
|
-
if (column.type === 'checkbox') {
|
|
101
|
+
const { elemStore } = internalData;
|
|
102
|
+
const bodyScrollElem = (0, import_util.getRefElem)(elemStore["main-body-scroll"]);
|
|
103
|
+
const leftScrollElem = (0, import_util.getRefElem)(elemStore["left-body-scroll"]);
|
|
104
|
+
const rightScrollElem = (0, import_util.getRefElem)(elemStore["right-body-scroll"]);
|
|
105
|
+
const { column, cell } = params;
|
|
106
|
+
if (column.type === "checkbox") {
|
|
123
107
|
let bodyWrapperElem = bodyScrollElem;
|
|
124
|
-
if (leftScrollElem && column.fixed ===
|
|
108
|
+
if (leftScrollElem && column.fixed === "left") {
|
|
125
109
|
bodyWrapperElem = leftScrollElem;
|
|
126
|
-
} else if (rightScrollElem && column.fixed ===
|
|
110
|
+
} else if (rightScrollElem && column.fixed === "right") {
|
|
127
111
|
bodyWrapperElem = rightScrollElem;
|
|
128
112
|
}
|
|
129
113
|
if (!bodyWrapperElem) {
|
|
@@ -133,7 +117,7 @@ hooks.add('tableKeyboardModule', {
|
|
|
133
117
|
const el = refElem.value;
|
|
134
118
|
const disX = evnt.clientX;
|
|
135
119
|
const disY = evnt.clientY;
|
|
136
|
-
const checkboxRangeElem = bodyWrapperElem.querySelector(
|
|
120
|
+
const checkboxRangeElem = bodyWrapperElem.querySelector(".vxe-table--checkbox-range");
|
|
137
121
|
const trElem = cell.parentElement;
|
|
138
122
|
const selectRecords = $xeTable.getCheckboxRecords();
|
|
139
123
|
let lastRangeRows = [];
|
|
@@ -147,17 +131,14 @@ hooks.add('tableKeyboardModule', {
|
|
|
147
131
|
let mouseScrollTimeout = null;
|
|
148
132
|
let isMouseScrollDown = false;
|
|
149
133
|
let mouseScrollSpaceSize = 1;
|
|
150
|
-
const triggerEvent = (type,
|
|
134
|
+
const triggerEvent = (type, evnt2) => {
|
|
151
135
|
$xeTable.dispatchEvent(`checkbox-range-${type}`, {
|
|
152
136
|
records: () => $xeTable.getCheckboxRecords(),
|
|
153
137
|
reserves: () => $xeTable.getCheckboxReserveRecords()
|
|
154
|
-
},
|
|
138
|
+
}, evnt2);
|
|
155
139
|
};
|
|
156
|
-
const handleChecked =
|
|
157
|
-
const {
|
|
158
|
-
clientX,
|
|
159
|
-
clientY
|
|
160
|
-
} = evnt;
|
|
140
|
+
const handleChecked = (evnt2) => {
|
|
141
|
+
const { clientX, clientY } = evnt2;
|
|
161
142
|
const offsetLeft = clientX - disX;
|
|
162
143
|
const offsetTop = clientY - disY + (bodyWrapperElem.scrollTop - startScrollTop);
|
|
163
144
|
let rangeHeight = Math.abs(offsetTop);
|
|
@@ -165,78 +146,66 @@ hooks.add('tableKeyboardModule', {
|
|
|
165
146
|
let rangeTop = startTop;
|
|
166
147
|
let rangeLeft = startLeft;
|
|
167
148
|
if (offsetTop < marginSize) {
|
|
168
|
-
// 向上
|
|
169
149
|
rangeTop += offsetTop;
|
|
170
150
|
if (rangeTop < marginSize) {
|
|
171
151
|
rangeTop = marginSize;
|
|
172
152
|
rangeHeight = startTop;
|
|
173
153
|
}
|
|
174
154
|
} else {
|
|
175
|
-
// 向下
|
|
176
155
|
rangeHeight = Math.min(rangeHeight, bodyWrapperElem.scrollHeight - startTop - marginSize);
|
|
177
156
|
}
|
|
178
157
|
if (offsetLeft < marginSize) {
|
|
179
|
-
// 向左
|
|
180
158
|
rangeLeft += offsetLeft;
|
|
181
159
|
if (rangeWidth > startLeft) {
|
|
182
160
|
rangeLeft = marginSize;
|
|
183
161
|
rangeWidth = startLeft;
|
|
184
162
|
}
|
|
185
163
|
} else {
|
|
186
|
-
// 向右
|
|
187
164
|
rangeWidth = Math.min(rangeWidth, bodyWrapperElem.clientWidth - startLeft - marginSize);
|
|
188
165
|
}
|
|
189
166
|
checkboxRangeElem.style.height = `${rangeHeight}px`;
|
|
190
167
|
checkboxRangeElem.style.width = `${rangeWidth}px`;
|
|
191
168
|
checkboxRangeElem.style.left = `${rangeLeft}px`;
|
|
192
169
|
checkboxRangeElem.style.top = `${rangeTop}px`;
|
|
193
|
-
checkboxRangeElem.style.display =
|
|
194
|
-
const rangeRows = getCheckboxRangeRows(
|
|
195
|
-
// 至少滑动 10px 才能有效匹配
|
|
170
|
+
checkboxRangeElem.style.display = "block";
|
|
171
|
+
const rangeRows = getCheckboxRangeRows(evnt2, params, trElem, trRect, offsetClientTop, offsetTop < marginSize ? -rangeHeight : rangeHeight);
|
|
196
172
|
if (rangeHeight > 10 && rangeRows.length !== lastRangeRows.length) {
|
|
197
|
-
const isControlKey = (0,
|
|
173
|
+
const isControlKey = (0, import_dom.hasControlKey)(evnt2);
|
|
198
174
|
lastRangeRows = rangeRows;
|
|
199
175
|
if (isControlKey) {
|
|
200
|
-
rangeRows.forEach(row => {
|
|
176
|
+
rangeRows.forEach((row) => {
|
|
201
177
|
$xeTable.handleBatchSelectRows([row], selectRecords.indexOf(row) === -1);
|
|
202
178
|
});
|
|
203
179
|
} else {
|
|
204
180
|
$xeTable.setAllCheckboxRow(false);
|
|
205
181
|
$xeTable.handleCheckedCheckboxRow(rangeRows, true, false);
|
|
206
182
|
}
|
|
207
|
-
triggerEvent(
|
|
183
|
+
triggerEvent("change", evnt2);
|
|
208
184
|
}
|
|
209
185
|
};
|
|
210
|
-
// 停止鼠标滚动
|
|
211
186
|
const stopMouseScroll = () => {
|
|
212
187
|
clearTimeout(mouseScrollTimeout);
|
|
213
188
|
mouseScrollTimeout = null;
|
|
214
189
|
};
|
|
215
|
-
|
|
216
|
-
const startMouseScroll = evnt => {
|
|
190
|
+
const startMouseScroll = (evnt2) => {
|
|
217
191
|
stopMouseScroll();
|
|
218
192
|
mouseScrollTimeout = setTimeout(() => {
|
|
219
193
|
if (mouseScrollTimeout) {
|
|
220
|
-
const {
|
|
221
|
-
scrollLeft,
|
|
222
|
-
scrollTop,
|
|
223
|
-
clientHeight,
|
|
224
|
-
scrollHeight
|
|
225
|
-
} = bodyWrapperElem;
|
|
194
|
+
const { scrollLeft, scrollTop, clientHeight, scrollHeight } = bodyWrapperElem;
|
|
226
195
|
const topSize = Math.ceil(mouseScrollSpaceSize * 50 / rowHeight);
|
|
227
196
|
if (isMouseScrollDown) {
|
|
228
197
|
if (scrollTop + clientHeight < scrollHeight) {
|
|
229
198
|
$xeTable.scrollTo(scrollLeft, scrollTop + topSize);
|
|
230
|
-
startMouseScroll(
|
|
231
|
-
handleChecked(
|
|
199
|
+
startMouseScroll(evnt2);
|
|
200
|
+
handleChecked(evnt2);
|
|
232
201
|
} else {
|
|
233
202
|
stopMouseScroll();
|
|
234
203
|
}
|
|
235
204
|
} else {
|
|
236
205
|
if (scrollTop) {
|
|
237
206
|
$xeTable.scrollTo(scrollLeft, scrollTop - topSize);
|
|
238
|
-
startMouseScroll(
|
|
239
|
-
handleChecked(
|
|
207
|
+
startMouseScroll(evnt2);
|
|
208
|
+
handleChecked(evnt2);
|
|
240
209
|
} else {
|
|
241
210
|
stopMouseScroll();
|
|
242
211
|
}
|
|
@@ -244,77 +213,62 @@ hooks.add('tableKeyboardModule', {
|
|
|
244
213
|
}
|
|
245
214
|
}, 50);
|
|
246
215
|
};
|
|
247
|
-
(0,
|
|
248
|
-
document.onmousemove =
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
const {
|
|
252
|
-
|
|
253
|
-
} = evnt;
|
|
254
|
-
const {
|
|
255
|
-
boundingTop
|
|
256
|
-
} = (0, _dom.getAbsolutePos)(bodyWrapperElem);
|
|
257
|
-
// 如果超过可视区,触发滚动
|
|
216
|
+
(0, import_dom.addClass)(el, "drag--range");
|
|
217
|
+
document.onmousemove = (evnt2) => {
|
|
218
|
+
evnt2.preventDefault();
|
|
219
|
+
evnt2.stopPropagation();
|
|
220
|
+
const { clientY } = evnt2;
|
|
221
|
+
const { boundingTop } = (0, import_dom.getAbsolutePos)(bodyWrapperElem);
|
|
258
222
|
if (clientY < boundingTop) {
|
|
259
223
|
isMouseScrollDown = false;
|
|
260
224
|
mouseScrollSpaceSize = boundingTop - clientY;
|
|
261
225
|
if (!mouseScrollTimeout) {
|
|
262
|
-
startMouseScroll(
|
|
226
|
+
startMouseScroll(evnt2);
|
|
263
227
|
}
|
|
264
228
|
} else if (clientY > boundingTop + bodyWrapperElem.clientHeight) {
|
|
265
229
|
isMouseScrollDown = true;
|
|
266
230
|
mouseScrollSpaceSize = clientY - boundingTop - bodyWrapperElem.clientHeight;
|
|
267
231
|
if (!mouseScrollTimeout) {
|
|
268
|
-
startMouseScroll(
|
|
232
|
+
startMouseScroll(evnt2);
|
|
269
233
|
}
|
|
270
234
|
} else if (mouseScrollTimeout) {
|
|
271
235
|
stopMouseScroll();
|
|
272
236
|
}
|
|
273
|
-
handleChecked(
|
|
237
|
+
handleChecked(evnt2);
|
|
274
238
|
};
|
|
275
|
-
document.onmouseup =
|
|
239
|
+
document.onmouseup = (evnt2) => {
|
|
276
240
|
stopMouseScroll();
|
|
277
|
-
(0,
|
|
278
|
-
checkboxRangeElem.removeAttribute(
|
|
241
|
+
(0, import_dom.removeClass)(el, "drag--range");
|
|
242
|
+
checkboxRangeElem.removeAttribute("style");
|
|
279
243
|
document.onmousemove = null;
|
|
280
244
|
document.onmouseup = null;
|
|
281
|
-
triggerEvent(
|
|
245
|
+
triggerEvent("end", evnt2);
|
|
282
246
|
};
|
|
283
|
-
triggerEvent(
|
|
247
|
+
triggerEvent("start", evnt);
|
|
284
248
|
}
|
|
285
249
|
};
|
|
286
250
|
const handleCellMousedownEvent = (evnt, params) => {
|
|
287
|
-
const {
|
|
288
|
-
editConfig,
|
|
289
|
-
checkboxConfig,
|
|
290
|
-
mouseConfig
|
|
291
|
-
} = props;
|
|
251
|
+
const { editConfig, checkboxConfig, mouseConfig } = props;
|
|
292
252
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
293
253
|
const mouseOpts = computeMouseOpts.value;
|
|
294
254
|
const editOpts = computeEditOpts.value;
|
|
295
|
-
if ((0,
|
|
255
|
+
if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts) && mouseOpts.area && $xeTable.triggerClAaMnEvent) {
|
|
296
256
|
return $xeTable.triggerClAaMnEvent(evnt, params);
|
|
297
257
|
} else {
|
|
298
258
|
if (checkboxConfig && checkboxOpts.range) {
|
|
299
259
|
handleCheckboxRangeEvent(evnt, params);
|
|
300
260
|
}
|
|
301
|
-
if ((0,
|
|
302
|
-
if (!editConfig || editOpts.mode ===
|
|
261
|
+
if ((0, import_utils.hasEnableConf)(mouseConfig, mouseOpts) && mouseOpts.selected) {
|
|
262
|
+
if (!editConfig || editOpts.mode === "cell") {
|
|
303
263
|
$xeTable.handleSelected(params, evnt);
|
|
304
264
|
}
|
|
305
265
|
}
|
|
306
266
|
}
|
|
307
267
|
};
|
|
308
268
|
const handleMoveSelected = (evnt, args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow) => {
|
|
309
|
-
const {
|
|
310
|
-
afterFullData,
|
|
311
|
-
visibleColumn
|
|
312
|
-
} = internalData;
|
|
269
|
+
const { afterFullData, visibleColumn } = internalData;
|
|
313
270
|
const params = Object.assign({}, args);
|
|
314
|
-
const {
|
|
315
|
-
row,
|
|
316
|
-
column
|
|
317
|
-
} = params;
|
|
271
|
+
const { row, column } = params;
|
|
318
272
|
const _rowIndex = $xeTable.getVTRowIndex(row);
|
|
319
273
|
const _columnIndex = $xeTable.getVTColumnIndex(column);
|
|
320
274
|
const tableBody = refTableBody.value;
|
|
@@ -327,19 +281,15 @@ hooks.add('tableKeyboardModule', {
|
|
|
327
281
|
evnt.preventDefault();
|
|
328
282
|
}
|
|
329
283
|
if (isUpArrow && _rowIndex > 0) {
|
|
330
|
-
// 移动到上一行
|
|
331
284
|
params.rowIndex = _rowIndex - 1;
|
|
332
285
|
params.row = afterFullData[params.rowIndex];
|
|
333
286
|
} else if (isDwArrow && _rowIndex < afterFullData.length - 1) {
|
|
334
|
-
// 移动到下一行
|
|
335
287
|
params.rowIndex = _rowIndex + 1;
|
|
336
288
|
params.row = afterFullData[params.rowIndex];
|
|
337
289
|
} else if (isLeftArrow && _columnIndex) {
|
|
338
|
-
// 移动到左侧单元格
|
|
339
290
|
params.columnIndex = _columnIndex - 1;
|
|
340
291
|
params.column = visibleColumn[params.columnIndex];
|
|
341
292
|
} else if (isRightArrow && _columnIndex < visibleColumn.length - 1) {
|
|
342
|
-
// 移动到右侧单元格
|
|
343
293
|
params.columnIndex = _columnIndex + 1;
|
|
344
294
|
params.column = visibleColumn[params.columnIndex];
|
|
345
295
|
}
|
|
@@ -354,13 +304,8 @@ hooks.add('tableKeyboardModule', {
|
|
|
354
304
|
const keyboardMethods = {
|
|
355
305
|
// 处理 Tab 键移动
|
|
356
306
|
moveTabSelected(args, isLeft, evnt) {
|
|
357
|
-
const {
|
|
358
|
-
|
|
359
|
-
} = props;
|
|
360
|
-
const {
|
|
361
|
-
afterFullData,
|
|
362
|
-
visibleColumn
|
|
363
|
-
} = internalData;
|
|
307
|
+
const { editConfig } = props;
|
|
308
|
+
const { afterFullData, visibleColumn } = internalData;
|
|
364
309
|
const editOpts = computeEditOpts.value;
|
|
365
310
|
const rowOpts = computeRowOpts.value;
|
|
366
311
|
const currentRowOpts = computeCurrentRowOpts.value;
|
|
@@ -374,9 +319,7 @@ hooks.add('tableKeyboardModule', {
|
|
|
374
319
|
const _columnIndex = $xeTable.getVTColumnIndex(params.column);
|
|
375
320
|
evnt.preventDefault();
|
|
376
321
|
if (isLeft) {
|
|
377
|
-
// 向左
|
|
378
322
|
if (_columnIndex <= 0) {
|
|
379
|
-
// 如果已经是第一列,则移动到上一行
|
|
380
323
|
if (_rowIndex > 0) {
|
|
381
324
|
targetRowIndex = _rowIndex - 1;
|
|
382
325
|
targetRow = afterFullData[targetRowIndex];
|
|
@@ -387,7 +330,6 @@ hooks.add('tableKeyboardModule', {
|
|
|
387
330
|
}
|
|
388
331
|
} else {
|
|
389
332
|
if (_columnIndex >= visibleColumn.length - 1) {
|
|
390
|
-
// 如果已经是第一列,则移动到上一行
|
|
391
333
|
if (_rowIndex < afterFullData.length - 1) {
|
|
392
334
|
targetRowIndex = _rowIndex + 1;
|
|
393
335
|
targetRow = afterFullData[targetRowIndex];
|
|
@@ -415,8 +357,8 @@ hooks.add('tableKeyboardModule', {
|
|
|
415
357
|
$xeTable.triggerCurrentColumnEvent(evnt, params);
|
|
416
358
|
}
|
|
417
359
|
if (editConfig) {
|
|
418
|
-
if (editOpts.trigger ===
|
|
419
|
-
if (editOpts.mode ===
|
|
360
|
+
if (editOpts.trigger === "click" || editOpts.trigger === "dblclick") {
|
|
361
|
+
if (editOpts.mode === "row") {
|
|
420
362
|
$xeTable.handleEdit(params, evnt);
|
|
421
363
|
} else {
|
|
422
364
|
$xeTable.scrollToRow(params.row, params.column).then(() => {
|
|
@@ -433,24 +375,14 @@ hooks.add('tableKeyboardModule', {
|
|
|
433
375
|
},
|
|
434
376
|
// 处理当前行方向键移动
|
|
435
377
|
moveCurrentRow(isUpArrow, isDwArrow, evnt) {
|
|
436
|
-
const {
|
|
437
|
-
|
|
438
|
-
} = props;
|
|
439
|
-
const {
|
|
440
|
-
afterFullData,
|
|
441
|
-
currentRow
|
|
442
|
-
} = internalData;
|
|
378
|
+
const { treeConfig } = props;
|
|
379
|
+
const { afterFullData, currentRow } = internalData;
|
|
443
380
|
const treeOpts = computeTreeOpts.value;
|
|
444
381
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
445
382
|
let targetRow;
|
|
446
383
|
if (currentRow) {
|
|
447
384
|
if (treeConfig) {
|
|
448
|
-
const {
|
|
449
|
-
index,
|
|
450
|
-
items
|
|
451
|
-
} = _xeUtils.default.findTree(afterFullData, item => item === currentRow, {
|
|
452
|
-
children: childrenField
|
|
453
|
-
});
|
|
385
|
+
const { index, items } = import_xe_utils.default.findTree(afterFullData, (item) => item === currentRow, { children: childrenField });
|
|
454
386
|
if (isUpArrow && index > 0) {
|
|
455
387
|
targetRow = items[index - 1];
|
|
456
388
|
} else if (isDwArrow && index < items.length - 1) {
|
|
@@ -480,10 +412,7 @@ hooks.add('tableKeyboardModule', {
|
|
|
480
412
|
},
|
|
481
413
|
// 处理当前列方向键移动
|
|
482
414
|
moveCurrentColumn(isLeftArrow, isRightArrow, evnt) {
|
|
483
|
-
const {
|
|
484
|
-
currentCol,
|
|
485
|
-
visibleColumn
|
|
486
|
-
} = internalData;
|
|
415
|
+
const { currentCol, visibleColumn } = internalData;
|
|
487
416
|
let targetCol = null;
|
|
488
417
|
if (currentCol) {
|
|
489
418
|
const _columnIndex = $xeTable.getVTColumnIndex(currentCol);
|
|
@@ -508,10 +437,7 @@ hooks.add('tableKeyboardModule', {
|
|
|
508
437
|
},
|
|
509
438
|
// 处理可编辑方向键移动
|
|
510
439
|
moveArrowSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
|
|
511
|
-
const {
|
|
512
|
-
highlightCurrentRow,
|
|
513
|
-
highlightCurrentColumn
|
|
514
|
-
} = props;
|
|
440
|
+
const { highlightCurrentRow, highlightCurrentColumn } = props;
|
|
515
441
|
const rowOpts = computeRowOpts.value;
|
|
516
442
|
const currentRowOpts = computeCurrentRowOpts.value;
|
|
517
443
|
const columnOpts = computeColumnOpts.value;
|
|
@@ -521,7 +447,6 @@ hooks.add('tableKeyboardModule', {
|
|
|
521
447
|
if (currentRowOpts.isFollowSelected) {
|
|
522
448
|
$xeTable.triggerCurrentRowEvent(evnt, params);
|
|
523
449
|
} else {
|
|
524
|
-
// 当前行按键上下移动
|
|
525
450
|
if ((isUpArrow || isDwArrow) && (rowOpts.isCurrent || highlightCurrentRow)) {
|
|
526
451
|
$xeTable.moveCurrentRow(isUpArrow, isDwArrow, evnt);
|
|
527
452
|
}
|
|
@@ -531,7 +456,6 @@ hooks.add('tableKeyboardModule', {
|
|
|
531
456
|
if (currentColumnOpts.isFollowSelected) {
|
|
532
457
|
$xeTable.triggerCurrentColumnEvent(evnt, params);
|
|
533
458
|
} else {
|
|
534
|
-
// 当前行按键左右移动
|
|
535
459
|
if ((isLeftArrow || isRightArrow) && (columnOpts.isCurrent || highlightCurrentColumn)) {
|
|
536
460
|
$xeTable.moveCurrentColumn(isLeftArrow, isRightArrow, evnt);
|
|
537
461
|
}
|
|
@@ -539,10 +463,7 @@ hooks.add('tableKeyboardModule', {
|
|
|
539
463
|
}
|
|
540
464
|
},
|
|
541
465
|
moveEnterSelected(args, isLeftArrow, isUpArrow, isRightArrow, isDwArrow, evnt) {
|
|
542
|
-
const {
|
|
543
|
-
highlightCurrentRow,
|
|
544
|
-
highlightCurrentColumn
|
|
545
|
-
} = props;
|
|
466
|
+
const { highlightCurrentRow, highlightCurrentColumn } = props;
|
|
546
467
|
const rowOpts = computeRowOpts.value;
|
|
547
468
|
const currentRowOpts = computeCurrentRowOpts.value;
|
|
548
469
|
const columnOpts = computeColumnOpts.value;
|
|
@@ -563,4 +484,4 @@ hooks.add('tableKeyboardModule', {
|
|
|
563
484
|
};
|
|
564
485
|
return keyboardMethods;
|
|
565
486
|
}
|
|
566
|
-
});
|
|
487
|
+
});
|