vxe-table 4.23.4 → 4.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +32459 -33908
- package/dist/style.css +4501 -1
- package/dist/style.mini.css +1 -0
- package/es/colgroup/index.d.ts +760 -0
- package/es/colgroup/index.js +16 -13
- package/es/column/index.d.ts +760 -0
- package/es/column/index.js +16 -13
- package/es/components.d.ts +9 -0
- package/es/components.js +29 -29
- package/es/grid/index.d.ts +2824 -0
- package/es/grid/index.js +14 -9
- package/es/grid/src/emits.d.ts +2 -0
- package/es/grid/src/emits.js +18 -15
- package/es/grid/src/grid.d.ts +556 -0
- package/es/grid/src/grid.js +1695 -1758
- package/es/grid/src/props.d.ts +200 -0
- package/es/grid/src/props.js +19 -6
- package/es/{vxe-grid/style.min.css → grid/style.mini.css} +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.esm.js +6 -3
- package/es/index.js +6 -0
- package/es/locale/lang/ar-EG.d.ts +908 -2
- package/es/locale/lang/ar-EG.js +906 -903
- package/es/locale/lang/de-DE.d.ts +908 -2
- package/es/locale/lang/de-DE.js +906 -903
- package/es/locale/lang/en-US.d.ts +908 -2
- package/es/locale/lang/en-US.js +906 -903
- package/es/locale/lang/es-ES.d.ts +908 -2
- package/es/locale/lang/es-ES.js +906 -903
- package/es/locale/lang/fr-FR.d.ts +908 -2
- package/es/locale/lang/fr-FR.js +906 -903
- package/es/locale/lang/hu-HU.d.ts +908 -2
- package/es/locale/lang/hu-HU.js +906 -903
- package/es/locale/lang/hy-AM.d.ts +908 -2
- package/es/locale/lang/hy-AM.js +906 -903
- package/es/locale/lang/id-ID.d.ts +908 -2
- package/es/locale/lang/id-ID.js +906 -903
- package/es/locale/lang/it-IT.d.ts +908 -2
- package/es/locale/lang/it-IT.js +906 -903
- package/es/locale/lang/ja-JP.d.ts +908 -2
- package/es/locale/lang/ja-JP.js +906 -903
- package/es/locale/lang/ko-KR.d.ts +908 -2
- package/es/locale/lang/ko-KR.js +906 -903
- package/es/locale/lang/ms-MY.d.ts +908 -2
- package/es/locale/lang/ms-MY.js +906 -903
- package/es/locale/lang/nb-NO.d.ts +908 -2
- package/es/locale/lang/nb-NO.js +906 -903
- package/es/locale/lang/pt-BR.d.ts +908 -2
- package/es/locale/lang/pt-BR.js +906 -903
- package/es/locale/lang/ru-RU.d.ts +908 -2
- package/es/locale/lang/ru-RU.js +906 -903
- package/es/locale/lang/th-TH.d.ts +908 -2
- package/es/locale/lang/th-TH.js +906 -903
- package/es/locale/lang/ug-CN.d.ts +908 -2
- package/es/locale/lang/ug-CN.js +906 -903
- package/es/locale/lang/uk-UA.d.ts +908 -2
- package/es/locale/lang/uk-UA.js +906 -903
- package/es/locale/lang/uz-UZ.d.ts +908 -2
- package/es/locale/lang/uz-UZ.js +906 -903
- package/es/locale/lang/vi-VN.d.ts +908 -2
- package/es/locale/lang/vi-VN.js +906 -903
- package/es/locale/lang/zh-CHT.d.ts +908 -2
- package/es/locale/lang/zh-CHT.js +906 -903
- package/es/locale/lang/zh-CN.d.ts +908 -2
- package/es/locale/lang/zh-CN.js +906 -903
- package/es/locale/lang/zh-HK.d.ts +908 -2
- package/es/locale/lang/zh-HK.js +910 -2
- package/es/locale/lang/zh-MO.d.ts +908 -2
- package/es/locale/lang/zh-MO.js +910 -2
- package/es/locale/lang/zh-TC.d.ts +908 -0
- package/es/locale/lang/zh-TC.js +910 -2
- package/es/locale/lang/zh-TW.d.ts +908 -2
- package/es/locale/lang/zh-TW.js +910 -2
- package/es/table/index.d.ts +2672 -0
- package/es/table/index.js +16 -11
- package/es/table/module/custom/hook.d.ts +1 -0
- package/es/table/module/custom/hook.js +462 -483
- package/es/table/module/custom/panel.d.ts +17 -0
- package/es/table/module/custom/panel.js +1482 -1559
- package/es/table/module/edit/hook.d.ts +1 -0
- package/es/table/module/edit/hook.js +1008 -1078
- package/es/table/module/export/export-panel.d.ts +27 -0
- package/es/table/module/export/export-panel.js +523 -575
- package/es/table/module/export/hook.d.ts +1 -0
- package/es/table/module/export/hook.js +1805 -1884
- package/es/table/module/export/import-panel.d.ts +27 -0
- package/es/table/module/export/import-panel.js +244 -252
- package/es/table/module/export/util.d.ts +5 -0
- package/es/table/module/export/util.js +20 -17
- package/es/table/module/filter/hook.d.ts +1 -0
- package/es/table/module/filter/hook.js +472 -487
- package/es/table/module/filter/panel.d.ts +16 -0
- package/es/table/module/filter/panel.js +251 -275
- package/es/table/module/keyboard/hook.d.ts +1 -0
- package/es/table/module/keyboard/hook.js +445 -497
- package/es/table/module/menu/hook.d.ts +1 -0
- package/es/table/module/menu/hook.js +295 -315
- package/es/table/module/menu/panel.d.ts +2 -0
- package/es/table/module/menu/panel.js +164 -183
- package/es/table/module/validator/hook.d.ts +1 -0
- package/es/table/module/validator/hook.js +522 -571
- package/es/table/render/index.d.ts +1 -0
- package/es/table/render/index.js +1402 -1362
- package/es/table/src/body.d.ts +24 -0
- package/es/table/src/body.js +850 -865
- package/es/table/src/cell.d.ts +192 -0
- package/es/table/src/cell.js +1209 -1207
- package/es/table/src/column.d.ts +263 -0
- package/es/table/src/column.js +178 -174
- package/es/table/src/columnInfo.d.ts +13 -0
- package/es/table/src/columnInfo.js +202 -196
- package/es/table/src/emits.d.ts +2 -0
- package/es/table/src/emits.js +126 -119
- package/es/table/src/footer.d.ts +45 -0
- package/es/table/src/footer.js +336 -340
- package/es/table/src/group.d.ts +178 -0
- package/es/table/src/group.js +49 -46
- package/es/table/src/header.d.ts +26 -0
- package/es/table/src/header.js +517 -519
- package/es/table/src/props.d.ts +238 -0
- package/es/table/src/props.js +331 -328
- package/es/table/src/store.d.ts +6 -0
- package/es/table/src/store.js +9 -6
- package/es/table/src/table.d.ts +539 -0
- package/es/table/src/table.js +14064 -15041
- package/es/table/src/use/cell-view.d.ts +10 -0
- package/es/table/src/use/cell-view.js +36 -33
- package/es/table/src/use/index.d.ts +1 -0
- package/es/table/src/use/index.js +1 -1
- package/es/table/src/util.d.ts +74 -0
- package/es/table/src/util.js +1038 -1026
- package/es/table/style.css +1 -1
- package/es/table/style.mini.css +1 -0
- package/es/toolbar/index.d.ts +340 -0
- package/es/toolbar/index.js +14 -9
- package/es/toolbar/src/toolbar.d.ts +75 -0
- package/es/toolbar/src/toolbar.js +605 -613
- package/es/toolbar/{style.min.css → style.mini.css} +1 -1
- package/es/ui/index.d.ts +86 -0
- package/es/ui/index.js +457 -501
- package/es/ui/src/anime.d.ts +10 -0
- package/es/ui/src/anime.js +40 -40
- package/es/ui/src/comp.d.ts +2 -0
- package/es/ui/src/comp.js +5 -2
- package/es/ui/src/dom.d.ts +80 -0
- package/es/ui/src/dom.js +377 -380
- package/es/ui/src/log.d.ts +6 -0
- package/es/ui/src/log.js +18 -13
- package/es/ui/src/utils.d.ts +23 -0
- package/es/ui/src/utils.js +57 -53
- package/es/ui/src/vn.d.ts +7 -0
- package/es/ui/src/vn.js +49 -42
- package/es/v-x-e-table/index.d.ts +3 -0
- package/es/v-x-e-table/index.js +6 -3
- package/es/vxe-colgroup/index.d.ts +3 -0
- package/es/vxe-colgroup/index.js +6 -3
- package/es/vxe-column/index.d.ts +3 -0
- package/es/vxe-column/index.js +6 -3
- package/es/vxe-grid/index.d.ts +3 -0
- package/es/vxe-grid/index.js +6 -3
- package/{lib/grid/style/style.min.css → es/vxe-grid/style.mini.css} +1 -1
- package/es/vxe-table/index.d.ts +3 -0
- package/es/vxe-table/index.js +6 -3
- package/es/vxe-table/style.css +1 -1
- package/es/vxe-table/style.mini.css +1 -0
- package/es/vxe-toolbar/index.d.ts +3 -0
- package/es/vxe-toolbar/index.js +6 -3
- package/es/vxe-toolbar/{style.min.css → style.mini.css} +1 -1
- package/es/vxe-ui/index.d.ts +3 -0
- package/es/vxe-ui/index.js +6 -3
- package/lib/colgroup/index.js +44 -18
- package/lib/colgroup/style/index.js +1 -1
- package/lib/column/index.js +44 -18
- package/lib/column/style/index.js +1 -1
- package/lib/components.js +58 -92
- package/lib/grid/index.js +42 -14
- package/lib/grid/src/emits.js +37 -6
- package/lib/grid/src/grid.js +850 -1195
- package/lib/grid/src/props.js +27 -11
- package/lib/grid/style/index.js +1 -1
- package/lib/{vxe-grid/style/style.min.css → grid/style/style.mini.css} +1 -1
- package/lib/iconfont.1792977622800.ttf +0 -0
- package/lib/iconfont.1792977622800.woff +0 -0
- package/lib/iconfont.1792977622800.woff2 +0 -0
- package/lib/index.common.js +35 -19
- package/lib/index.js +37 -0
- package/lib/index.umd.js +30586 -24322
- package/lib/index.umd.min.js +3 -1
- package/lib/locale/ar-EG.umd.js +948 -0
- package/lib/locale/de-DE.umd.js +948 -0
- package/lib/locale/en-US.umd.js +948 -0
- package/lib/locale/es-ES.umd.js +948 -0
- package/lib/locale/fr-FR.umd.js +948 -0
- package/lib/locale/hu-HU.umd.js +948 -0
- package/lib/locale/hy-AM.umd.js +948 -0
- package/lib/locale/id-ID.umd.js +948 -0
- package/lib/locale/it-IT.umd.js +948 -0
- package/lib/locale/ja-JP.umd.js +948 -0
- package/lib/locale/ko-KR.umd.js +948 -0
- package/lib/locale/lang/ar-EG.js +681 -664
- package/lib/locale/lang/ar-EG.umd.js +913 -892
- package/lib/locale/lang/de-DE.js +681 -664
- package/lib/locale/lang/de-DE.umd.js +913 -892
- package/lib/locale/lang/en-US.js +678 -661
- package/lib/locale/lang/en-US.umd.js +913 -892
- package/lib/locale/lang/es-ES.js +681 -664
- package/lib/locale/lang/es-ES.umd.js +913 -892
- package/lib/locale/lang/fr-FR.js +654 -637
- package/lib/locale/lang/fr-FR.umd.js +913 -892
- package/lib/locale/lang/hu-HU.js +681 -664
- package/lib/locale/lang/hu-HU.umd.js +913 -892
- package/lib/locale/lang/hy-AM.js +681 -664
- package/lib/locale/lang/hy-AM.umd.js +913 -892
- package/lib/locale/lang/id-ID.js +681 -664
- package/lib/locale/lang/id-ID.umd.js +913 -892
- package/lib/locale/lang/it-IT.js +661 -644
- package/lib/locale/lang/it-IT.umd.js +912 -891
- package/lib/locale/lang/ja-JP.js +710 -693
- package/lib/locale/lang/ja-JP.umd.js +913 -892
- package/lib/locale/lang/ko-KR.js +681 -664
- package/lib/locale/lang/ko-KR.umd.js +913 -892
- package/lib/locale/lang/ms-MY.js +681 -664
- package/lib/locale/lang/ms-MY.umd.js +913 -892
- package/lib/locale/lang/nb-NO.js +681 -664
- package/lib/locale/lang/nb-NO.umd.js +913 -892
- package/lib/locale/lang/pt-BR.js +681 -664
- package/lib/locale/lang/pt-BR.umd.js +913 -892
- package/lib/locale/lang/ru-RU.js +690 -673
- package/lib/locale/lang/ru-RU.umd.js +913 -892
- package/lib/locale/lang/th-TH.js +681 -664
- package/lib/locale/lang/th-TH.umd.js +913 -892
- package/lib/locale/lang/ug-CN.js +681 -664
- package/lib/locale/lang/ug-CN.umd.js +913 -892
- package/lib/locale/lang/uk-UA.js +674 -657
- package/lib/locale/lang/uk-UA.umd.js +913 -892
- package/lib/locale/lang/uz-UZ.js +583 -566
- package/lib/locale/lang/uz-UZ.umd.js +908 -887
- package/lib/locale/lang/vi-VN.js +681 -664
- package/lib/locale/lang/vi-VN.umd.js +913 -892
- package/lib/locale/lang/zh-CHT.js +681 -664
- package/lib/locale/lang/zh-CHT.umd.js +913 -892
- package/lib/locale/lang/zh-CN.js +681 -664
- package/lib/locale/lang/zh-CN.umd.js +913 -892
- package/lib/locale/lang/zh-HK.js +928 -7
- package/lib/locale/lang/zh-HK.umd.js +945 -20
- package/lib/locale/lang/zh-MO.js +928 -7
- package/lib/locale/lang/zh-MO.umd.js +945 -20
- package/lib/locale/lang/zh-TC.js +928 -7
- package/lib/locale/lang/zh-TC.umd.js +948 -0
- package/lib/locale/lang/zh-TW.js +928 -7
- package/lib/locale/lang/zh-TW.umd.js +945 -20
- package/lib/locale/ms-MY.umd.js +948 -0
- package/lib/locale/nb-NO.umd.js +948 -0
- package/lib/locale/pt-BR.umd.js +948 -0
- package/lib/locale/ru-RU.umd.js +948 -0
- package/lib/locale/th-TH.umd.js +948 -0
- package/lib/locale/ug-CN.umd.js +948 -0
- package/lib/locale/uk-UA.umd.js +948 -0
- package/lib/locale/uz-UZ.umd.js +948 -0
- package/lib/locale/vi-VN.umd.js +948 -0
- package/lib/locale/zh-CHT.umd.js +948 -0
- package/lib/locale/zh-CN.umd.js +948 -0
- package/lib/locale/zh-HK.umd.js +948 -0
- package/lib/locale/zh-MO.umd.js +948 -0
- package/lib/locale/zh-TC.umd.js +948 -0
- package/lib/locale/zh-TW.umd.js +948 -0
- package/lib/style.css +4501 -1
- package/lib/style.mini.css +1 -0
- package/lib/table/index.js +45 -17
- package/lib/table/module/custom/hook.js +132 -252
- package/lib/table/module/custom/panel.js +919 -970
- package/lib/table/module/edit/hook.js +250 -620
- package/lib/table/module/export/export-panel.js +390 -347
- package/lib/table/module/export/hook.js +745 -1179
- package/lib/table/module/export/import-panel.js +170 -136
- package/lib/table/module/export/util.js +37 -14
- package/lib/table/module/filter/hook.js +127 -227
- package/lib/table/module/filter/panel.js +177 -208
- package/lib/table/module/keyboard/hook.js +93 -172
- package/lib/table/module/menu/hook.js +86 -165
- package/lib/table/module/menu/panel.js +176 -141
- package/lib/table/module/validator/hook.js +164 -271
- package/lib/table/render/index.js +700 -1147
- package/lib/table/src/body.js +426 -559
- package/lib/table/src/cell.js +619 -987
- package/lib/table/src/column.js +55 -30
- package/lib/table/src/columnInfo.js +88 -110
- package/lib/table/src/emits.js +145 -13
- package/lib/table/src/footer.js +181 -240
- package/lib/table/src/group.js +56 -34
- package/lib/table/src/header.js +292 -367
- package/lib/table/src/props.js +27 -12
- package/lib/table/src/store.js +25 -9
- package/lib/table/src/table.js +14179 -1019
- package/lib/table/src/use/cell-view.js +47 -37
- package/lib/table/src/use/index.js +17 -15
- package/lib/table/src/util.js +236 -337
- package/lib/table/style/index.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.mini.css +1 -0
- package/lib/toolbar/index.js +42 -14
- package/lib/toolbar/src/toolbar.js +271 -379
- package/lib/toolbar/style/index.js +1 -1
- package/lib/toolbar/style/{style.min.css → style.mini.css} +1 -1
- package/lib/ui/index.js +153 -195
- package/lib/ui/src/anime.js +49 -29
- package/lib/ui/src/comp.js +23 -6
- package/lib/ui/src/dom.js +114 -147
- package/lib/ui/src/log.js +34 -18
- package/lib/ui/src/utils.js +57 -45
- package/lib/ui/src/vn.js +60 -34
- package/lib/ui/style/index.js +1 -1
- package/lib/v-x-e-table/index.js +35 -19
- package/lib/vxe-colgroup/index.js +35 -19
- package/lib/vxe-colgroup/style/index.js +1 -1
- package/lib/vxe-column/index.js +35 -19
- package/lib/vxe-column/style/index.js +1 -1
- package/lib/vxe-grid/index.js +35 -19
- package/lib/vxe-grid/style/index.js +1 -1
- package/{es/grid/style.min.css → lib/vxe-grid/style/style.mini.css} +1 -1
- package/lib/vxe-table/index.js +35 -19
- package/lib/vxe-table/style/index.js +1 -1
- package/lib/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.mini.css +1 -0
- package/lib/vxe-toolbar/index.js +35 -19
- package/lib/vxe-toolbar/style/index.js +1 -1
- package/lib/vxe-toolbar/style/{style.min.css → style.mini.css} +1 -1
- package/lib/vxe-ui/index.js +35 -19
- package/lib/vxe-ui/style/index.js +1 -1
- package/package.json +8 -4
- package/packages/locale/lang/zh-HK.ts +907 -3
- package/packages/locale/lang/zh-MO.ts +907 -3
- package/packages/locale/lang/zh-TC.ts +907 -3
- package/packages/locale/lang/zh-TW.ts +907 -3
- package/packages/table/module/edit/hook.ts +2 -2
- package/packages/table/src/table.ts +64 -28
- package/packages/ui/index.ts +1 -28
- package/dist/style.min.css +0 -1
- package/es/index.css +0 -1
- package/es/index.min.css +0 -1
- package/es/style.css +0 -1
- package/es/style.min.css +0 -1
- package/es/table/style.min.css +0 -1
- package/es/vxe-table/style.min.css +0 -1
- package/es/vxe-v-x-e-table/index.js +0 -3
- package/lib/colgroup/index.min.js +0 -1
- package/lib/column/index.min.js +0 -1
- package/lib/components.min.js +0 -1
- package/lib/grid/index.min.js +0 -1
- package/lib/grid/src/emits.min.js +0 -1
- package/lib/grid/src/grid.min.js +0 -1
- package/lib/grid/src/props.min.js +0 -1
- package/lib/index.css +0 -1
- package/lib/index.min.css +0 -1
- package/lib/locale/lang/ar-EG.d.ts +0 -2
- package/lib/locale/lang/ar-EG.min.js +0 -1
- package/lib/locale/lang/de-DE.d.ts +0 -2
- package/lib/locale/lang/de-DE.min.js +0 -1
- package/lib/locale/lang/en-US.d.ts +0 -2
- package/lib/locale/lang/en-US.min.js +0 -1
- package/lib/locale/lang/es-ES.d.ts +0 -2
- package/lib/locale/lang/es-ES.min.js +0 -1
- package/lib/locale/lang/fr-FR.d.ts +0 -2
- package/lib/locale/lang/fr-FR.min.js +0 -1
- package/lib/locale/lang/hu-HU.d.ts +0 -2
- package/lib/locale/lang/hu-HU.min.js +0 -1
- package/lib/locale/lang/hy-AM.d.ts +0 -2
- package/lib/locale/lang/hy-AM.min.js +0 -1
- package/lib/locale/lang/id-ID.d.ts +0 -2
- package/lib/locale/lang/id-ID.min.js +0 -1
- package/lib/locale/lang/it-IT.d.ts +0 -2
- package/lib/locale/lang/it-IT.min.js +0 -1
- package/lib/locale/lang/ja-JP.d.ts +0 -2
- package/lib/locale/lang/ja-JP.min.js +0 -1
- package/lib/locale/lang/ko-KR.d.ts +0 -2
- package/lib/locale/lang/ko-KR.min.js +0 -1
- package/lib/locale/lang/ms-MY.d.ts +0 -2
- package/lib/locale/lang/ms-MY.min.js +0 -1
- package/lib/locale/lang/nb-NO.d.ts +0 -2
- package/lib/locale/lang/nb-NO.min.js +0 -1
- package/lib/locale/lang/pt-BR.d.ts +0 -2
- package/lib/locale/lang/pt-BR.min.js +0 -1
- package/lib/locale/lang/ru-RU.d.ts +0 -2
- package/lib/locale/lang/ru-RU.min.js +0 -1
- package/lib/locale/lang/th-TH.d.ts +0 -2
- package/lib/locale/lang/th-TH.min.js +0 -1
- package/lib/locale/lang/ug-CN.d.ts +0 -2
- package/lib/locale/lang/ug-CN.min.js +0 -1
- package/lib/locale/lang/uk-UA.d.ts +0 -2
- package/lib/locale/lang/uk-UA.min.js +0 -1
- package/lib/locale/lang/uz-UZ.d.ts +0 -2
- package/lib/locale/lang/uz-UZ.min.js +0 -1
- package/lib/locale/lang/vi-VN.d.ts +0 -2
- package/lib/locale/lang/vi-VN.min.js +0 -1
- package/lib/locale/lang/zh-CHT.d.ts +0 -2
- package/lib/locale/lang/zh-CHT.min.js +0 -1
- package/lib/locale/lang/zh-CN.d.ts +0 -2
- package/lib/locale/lang/zh-CN.min.js +0 -1
- package/lib/locale/lang/zh-HK.d.ts +0 -2
- package/lib/locale/lang/zh-HK.min.js +0 -1
- package/lib/locale/lang/zh-MO.d.ts +0 -2
- package/lib/locale/lang/zh-MO.min.js +0 -1
- package/lib/locale/lang/zh-TC.min.js +0 -1
- package/lib/locale/lang/zh-TW.d.ts +0 -2
- package/lib/locale/lang/zh-TW.min.js +0 -1
- package/lib/style.min.css +0 -1
- package/lib/table/index.min.js +0 -1
- package/lib/table/module/custom/hook.min.js +0 -1
- package/lib/table/module/custom/panel.min.js +0 -1
- package/lib/table/module/edit/hook.min.js +0 -1
- package/lib/table/module/export/export-panel.min.js +0 -1
- package/lib/table/module/export/hook.min.js +0 -1
- package/lib/table/module/export/import-panel.min.js +0 -1
- package/lib/table/module/export/util.min.js +0 -1
- package/lib/table/module/filter/hook.min.js +0 -1
- package/lib/table/module/filter/panel.min.js +0 -1
- package/lib/table/module/keyboard/hook.min.js +0 -1
- package/lib/table/module/menu/hook.min.js +0 -1
- package/lib/table/module/menu/panel.min.js +0 -1
- package/lib/table/module/validator/hook.min.js +0 -1
- package/lib/table/render/index.min.js +0 -1
- package/lib/table/src/body.min.js +0 -1
- package/lib/table/src/cell.min.js +0 -1
- package/lib/table/src/column.min.js +0 -1
- package/lib/table/src/columnInfo.min.js +0 -1
- package/lib/table/src/emits.min.js +0 -1
- package/lib/table/src/footer.min.js +0 -1
- package/lib/table/src/group.min.js +0 -1
- package/lib/table/src/header.min.js +0 -1
- package/lib/table/src/props.min.js +0 -1
- package/lib/table/src/store.min.js +0 -1
- package/lib/table/src/table.min.js +0 -1
- package/lib/table/src/use/cell-view.min.js +0 -1
- package/lib/table/src/use/index.min.js +0 -1
- package/lib/table/src/util.min.js +0 -1
- package/lib/table/style/style.min.css +0 -1
- package/lib/toolbar/index.min.js +0 -1
- package/lib/toolbar/src/toolbar.min.js +0 -1
- package/lib/ui/index.min.js +0 -1
- package/lib/ui/src/anime.min.js +0 -1
- package/lib/ui/src/comp.min.js +0 -1
- package/lib/ui/src/dom.min.js +0 -1
- package/lib/ui/src/log.min.js +0 -1
- package/lib/ui/src/utils.min.js +0 -1
- package/lib/ui/src/vn.min.js +0 -1
- package/lib/ui/style/style.min.css +0 -0
- package/lib/v-x-e-table/index.min.js +0 -1
- package/lib/v-x-e-table/style/index.js +0 -1
- package/lib/v-x-e-table/style/style.css +0 -0
- package/lib/v-x-e-table/style/style.min.css +0 -0
- package/lib/vxe-colgroup/index.min.js +0 -1
- package/lib/vxe-colgroup/style/style.min.css +0 -0
- package/lib/vxe-column/index.min.js +0 -1
- package/lib/vxe-column/style/style.min.css +0 -0
- package/lib/vxe-grid/index.min.js +0 -1
- package/lib/vxe-table/index.min.js +0 -1
- package/lib/vxe-table/style/style.min.css +0 -1
- package/lib/vxe-toolbar/index.min.js +0 -1
- package/lib/vxe-ui/index.min.js +0 -1
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/lib/vxe-v-x-e-table/index.js +0 -21
- package/lib/vxe-v-x-e-table/index.min.js +0 -1
- package/lib/vxe-v-x-e-table/style/index.js +0 -1
- package/lib/vxe-v-x-e-table/style/style.css +0 -0
- package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
- /package/{es/iconfont.1792740941484.ttf → dist/iconfont.1792977622800.ttf} +0 -0
- /package/{es/iconfont.1792740941484.woff → dist/iconfont.1792977622800.woff} +0 -0
- /package/{es/iconfont.1792740941484.woff2 → dist/iconfont.1792977622800.woff2} +0 -0
- /package/es/colgroup/{style.min.css → style.mini.css} +0 -0
- /package/es/column/{style.min.css → style.mini.css} +0 -0
- /package/{lib/iconfont.1792740941484.ttf → es/iconfont.1792977622800.ttf} +0 -0
- /package/{lib/iconfont.1792740941484.woff → es/iconfont.1792977622800.woff} +0 -0
- /package/{lib/iconfont.1792740941484.woff2 → es/iconfont.1792977622800.woff2} +0 -0
- /package/es/ui/{style.min.css → style.mini.css} +0 -0
- /package/es/{v-x-e-table/style.css → vxe-colgroup/style.mini.css} +0 -0
- /package/es/{v-x-e-table/style.min.css → vxe-column/style.mini.css} +0 -0
- /package/es/{vxe-colgroup/style.min.css → vxe-ui/style.mini.css} +0 -0
- /package/{es/vxe-column/style.min.css → lib/colgroup/style/style.mini.css} +0 -0
- /package/{es/vxe-ui/style.min.css → lib/column/style/style.mini.css} +0 -0
- /package/{es/vxe-v-x-e-table/style.css → lib/ui/style/style.mini.css} +0 -0
- /package/{es/vxe-v-x-e-table/style.min.css → lib/vxe-colgroup/style/style.mini.css} +0 -0
- /package/lib/{colgroup/style/style.min.css → vxe-column/style/style.mini.css} +0 -0
- /package/lib/{column/style/style.min.css → vxe-ui/style/style.mini.css} +0 -0
package/lib/ui/src/dom.js
CHANGED
|
@@ -1,49 +1,75 @@
|
|
|
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 dom_exports = {};
|
|
30
|
+
__export(dom_exports, {
|
|
31
|
+
addClass: () => addClass,
|
|
32
|
+
checkTargetElement: () => checkTargetElement,
|
|
33
|
+
getAbsolutePos: () => getAbsolutePos,
|
|
34
|
+
getDomNode: () => getDomNode,
|
|
35
|
+
getEventTargetNode: () => getEventTargetNode,
|
|
36
|
+
getOffsetHeight: () => getOffsetHeight,
|
|
37
|
+
getOffsetPos: () => getOffsetPos,
|
|
38
|
+
getPaddingTopBottomSize: () => getPaddingTopBottomSize,
|
|
39
|
+
getPopupAppendElement: () => getPopupAppendElement,
|
|
40
|
+
getPopupContainer: () => getPopupContainer,
|
|
41
|
+
getPopupWrapperElement: () => getPopupWrapperElement,
|
|
42
|
+
getPropClass: () => getPropClass,
|
|
43
|
+
getTpImg: () => getTpImg,
|
|
44
|
+
hasAxternalInputTarget: () => hasAxternalInputTarget,
|
|
45
|
+
hasClass: () => hasClass,
|
|
46
|
+
hasControlKey: () => hasControlKey,
|
|
47
|
+
hasEventInputTarget: () => hasEventInputTarget,
|
|
48
|
+
initTpImg: () => initTpImg,
|
|
49
|
+
isNodeElement: () => isNodeElement,
|
|
50
|
+
isPx: () => isPx,
|
|
51
|
+
isScale: () => isScale,
|
|
52
|
+
queryElement: () => queryElement,
|
|
53
|
+
removeClass: () => removeClass,
|
|
54
|
+
scrollToView: () => scrollToView,
|
|
55
|
+
scrollTopTo: () => scrollTopTo,
|
|
56
|
+
setScrollLeft: () => setScrollLeft,
|
|
57
|
+
setScrollTop: () => setScrollTop,
|
|
58
|
+
toCssUnit: () => toCssUnit,
|
|
59
|
+
triggerEvent: () => triggerEvent,
|
|
60
|
+
updateCellTitle: () => updateCellTitle,
|
|
61
|
+
updatePanelPlacement: () => updatePanelPlacement,
|
|
62
|
+
wheelScrollLeftTo: () => wheelScrollLeftTo,
|
|
63
|
+
wheelScrollTopTo: () => wheelScrollTopTo
|
|
5
64
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
exports.getAbsolutePos = getAbsolutePos;
|
|
9
|
-
exports.getDomNode = getDomNode;
|
|
10
|
-
exports.getEventTargetNode = getEventTargetNode;
|
|
11
|
-
exports.getOffsetHeight = getOffsetHeight;
|
|
12
|
-
exports.getOffsetPos = getOffsetPos;
|
|
13
|
-
exports.getPaddingTopBottomSize = getPaddingTopBottomSize;
|
|
14
|
-
exports.getPopupAppendElement = getPopupAppendElement;
|
|
15
|
-
exports.getPopupContainer = getPopupContainer;
|
|
16
|
-
exports.getPopupWrapperElement = getPopupWrapperElement;
|
|
17
|
-
exports.getPropClass = getPropClass;
|
|
18
|
-
exports.getTpImg = getTpImg;
|
|
19
|
-
exports.hasAxternalInputTarget = hasAxternalInputTarget;
|
|
20
|
-
exports.hasClass = hasClass;
|
|
21
|
-
exports.hasControlKey = hasControlKey;
|
|
22
|
-
exports.hasEventInputTarget = hasEventInputTarget;
|
|
23
|
-
exports.initTpImg = initTpImg;
|
|
24
|
-
exports.isNodeElement = isNodeElement;
|
|
25
|
-
exports.isPx = isPx;
|
|
26
|
-
exports.isScale = isScale;
|
|
27
|
-
exports.queryElement = queryElement;
|
|
28
|
-
exports.removeClass = removeClass;
|
|
29
|
-
exports.scrollToView = scrollToView;
|
|
30
|
-
exports.scrollTopTo = scrollTopTo;
|
|
31
|
-
exports.setScrollLeft = setScrollLeft;
|
|
32
|
-
exports.setScrollTop = setScrollTop;
|
|
33
|
-
exports.toCssUnit = toCssUnit;
|
|
34
|
-
exports.triggerEvent = triggerEvent;
|
|
35
|
-
exports.updateCellTitle = updateCellTitle;
|
|
36
|
-
exports.updatePanelPlacement = updatePanelPlacement;
|
|
37
|
-
exports.wheelScrollLeftTo = wheelScrollLeftTo;
|
|
38
|
-
exports.wheelScrollTopTo = wheelScrollTopTo;
|
|
39
|
-
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
40
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
65
|
+
module.exports = __toCommonJS(dom_exports);
|
|
66
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
41
67
|
const reClsMap = {};
|
|
42
68
|
let tpImgEl;
|
|
43
69
|
function initTpImg() {
|
|
44
70
|
if (!tpImgEl) {
|
|
45
71
|
tpImgEl = new Image();
|
|
46
|
-
tpImgEl.src =
|
|
72
|
+
tpImgEl.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
|
|
47
73
|
}
|
|
48
74
|
return tpImgEl;
|
|
49
75
|
}
|
|
@@ -54,11 +80,11 @@ function getTpImg() {
|
|
|
54
80
|
return tpImgEl;
|
|
55
81
|
}
|
|
56
82
|
function getPropClass(property, params) {
|
|
57
|
-
return property ? (
|
|
83
|
+
return property ? (import_xe_utils.default.isFunction(property) ? property(params) : property) || "" : "";
|
|
58
84
|
}
|
|
59
85
|
function getClsRE(cls) {
|
|
60
86
|
if (!reClsMap[cls]) {
|
|
61
|
-
reClsMap[cls] = new RegExp(`(?:^|\\s)${cls}(?!\\S)`,
|
|
87
|
+
reClsMap[cls] = new RegExp(`(?:^|\\s)${cls}(?!\\S)`, "g");
|
|
62
88
|
}
|
|
63
89
|
return reClsMap[cls];
|
|
64
90
|
}
|
|
@@ -94,7 +120,7 @@ function hasClass(elem, cls) {
|
|
|
94
120
|
}
|
|
95
121
|
function removeClass(elem, cls) {
|
|
96
122
|
if (elem && hasClass(elem, cls)) {
|
|
97
|
-
elem.className = elem.className.replace(getClsRE(cls),
|
|
123
|
+
elem.className = elem.className.replace(getClsRE(cls), "");
|
|
98
124
|
}
|
|
99
125
|
}
|
|
100
126
|
function addClass(elem, cls) {
|
|
@@ -106,11 +132,11 @@ function addClass(elem, cls) {
|
|
|
106
132
|
function hasControlKey(evnt) {
|
|
107
133
|
return evnt.ctrlKey || evnt.metaKey;
|
|
108
134
|
}
|
|
109
|
-
function toCssUnit(val, unit =
|
|
110
|
-
if (
|
|
135
|
+
function toCssUnit(val, unit = "px") {
|
|
136
|
+
if (import_xe_utils.default.isNumber(val) || /^\d+$/.test(`${val}`)) {
|
|
111
137
|
return `${val}${unit}`;
|
|
112
138
|
}
|
|
113
|
-
return `${val ||
|
|
139
|
+
return `${val || ""}`;
|
|
114
140
|
}
|
|
115
141
|
function queryElement(elem, selector) {
|
|
116
142
|
if (elem) {
|
|
@@ -134,8 +160,8 @@ function getOffsetHeight(elem) {
|
|
|
134
160
|
function getPaddingTopBottomSize(elem) {
|
|
135
161
|
if (elem) {
|
|
136
162
|
const computedStyle = getComputedStyle(elem);
|
|
137
|
-
const paddingTop =
|
|
138
|
-
const paddingBottom =
|
|
163
|
+
const paddingTop = import_xe_utils.default.toNumber(computedStyle.paddingTop);
|
|
164
|
+
const paddingBottom = import_xe_utils.default.toNumber(computedStyle.paddingBottom);
|
|
139
165
|
return paddingTop + paddingBottom;
|
|
140
166
|
}
|
|
141
167
|
return 0;
|
|
@@ -150,16 +176,10 @@ function setScrollLeft(elem, scrollLeft) {
|
|
|
150
176
|
elem.scrollLeft = scrollLeft;
|
|
151
177
|
}
|
|
152
178
|
}
|
|
153
|
-
// export function setScrollLeftAndTop (elem: HTMLElement | null, scrollLeft: number, scrollTop: number) {
|
|
154
|
-
// if (elem) {
|
|
155
|
-
// elem.scrollLeft = scrollLeft
|
|
156
|
-
// elem.scrollTop = scrollTop
|
|
157
|
-
// }
|
|
158
|
-
// }
|
|
159
179
|
function updateCellTitle(overflowElem, column) {
|
|
160
|
-
const content = column.type ===
|
|
161
|
-
if (overflowElem.getAttribute(
|
|
162
|
-
overflowElem.setAttribute(
|
|
180
|
+
const content = column.type === "html" ? overflowElem.innerText : overflowElem.textContent;
|
|
181
|
+
if (overflowElem.getAttribute("title") !== content) {
|
|
182
|
+
overflowElem.setAttribute("title", content);
|
|
163
183
|
}
|
|
164
184
|
}
|
|
165
185
|
function checkTargetElement(target, exEls, endEl) {
|
|
@@ -179,9 +199,6 @@ function checkTargetElement(target, exEls, endEl) {
|
|
|
179
199
|
}
|
|
180
200
|
return false;
|
|
181
201
|
}
|
|
182
|
-
/**
|
|
183
|
-
* 检查触发源是否属于目标节点
|
|
184
|
-
*/
|
|
185
202
|
function getEventTargetNode(evnt, container, queryCls, queryMethod) {
|
|
186
203
|
let targetElem;
|
|
187
204
|
let target = evnt.target.shadowRoot && evnt.composed ? evnt.composedPath()[0] || evnt.target : evnt.target;
|
|
@@ -189,64 +206,37 @@ function getEventTargetNode(evnt, container, queryCls, queryMethod) {
|
|
|
189
206
|
if (queryCls && hasClass(target, queryCls) && (!queryMethod || queryMethod(target))) {
|
|
190
207
|
targetElem = target;
|
|
191
208
|
} else if (target === container) {
|
|
192
|
-
return {
|
|
193
|
-
flag: queryCls ? !!targetElem : true,
|
|
194
|
-
container,
|
|
195
|
-
targetElem: targetElem
|
|
196
|
-
};
|
|
209
|
+
return { flag: queryCls ? !!targetElem : true, container, targetElem };
|
|
197
210
|
}
|
|
198
211
|
target = target.parentNode;
|
|
199
212
|
}
|
|
200
|
-
return {
|
|
201
|
-
flag: false
|
|
202
|
-
};
|
|
213
|
+
return { flag: false };
|
|
203
214
|
}
|
|
204
|
-
/**
|
|
205
|
-
* 获取元素相对于 document 的位置
|
|
206
|
-
*/
|
|
207
215
|
function getOffsetPos(elem, container) {
|
|
208
|
-
return getNodeOffset(elem, container, {
|
|
209
|
-
left: 0,
|
|
210
|
-
top: 0
|
|
211
|
-
});
|
|
216
|
+
return getNodeOffset(elem, container, { left: 0, top: 0 });
|
|
212
217
|
}
|
|
213
218
|
function getAbsolutePos(elem) {
|
|
214
219
|
const bounding = elem.getBoundingClientRect();
|
|
215
220
|
const boundingTop = bounding.top;
|
|
216
221
|
const boundingLeft = bounding.left;
|
|
217
|
-
const {
|
|
218
|
-
|
|
219
|
-
scrollLeft,
|
|
220
|
-
visibleHeight,
|
|
221
|
-
visibleWidth
|
|
222
|
-
} = getDomNode();
|
|
223
|
-
return {
|
|
224
|
-
boundingTop,
|
|
225
|
-
top: scrollTop + boundingTop,
|
|
226
|
-
boundingLeft,
|
|
227
|
-
left: scrollLeft + boundingLeft,
|
|
228
|
-
visibleHeight,
|
|
229
|
-
visibleWidth
|
|
230
|
-
};
|
|
222
|
+
const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode();
|
|
223
|
+
return { boundingTop, top: scrollTop + boundingTop, boundingLeft, left: scrollLeft + boundingLeft, visibleHeight, visibleWidth };
|
|
231
224
|
}
|
|
232
225
|
function hasEventInputTarget(target) {
|
|
233
|
-
const tagName = target ? target.tagName :
|
|
234
|
-
return tagName && [
|
|
226
|
+
const tagName = target ? target.tagName : "";
|
|
227
|
+
return tagName && ["input", "textarea"].includes(tagName.toLowerCase());
|
|
235
228
|
}
|
|
236
|
-
/**
|
|
237
|
-
* 判断是否由内部可复用控件触发,输入框带有 vxe-reusekeep-control
|
|
238
|
-
*/
|
|
239
229
|
function hasReusekeepControl(elem) {
|
|
240
230
|
if (elem) {
|
|
241
|
-
return hasClass(elem,
|
|
231
|
+
return hasClass(elem, "vxe-reusekeep-control");
|
|
242
232
|
}
|
|
243
233
|
return false;
|
|
244
234
|
}
|
|
245
235
|
function hasAxternalInputTarget(target) {
|
|
246
236
|
return hasEventInputTarget(target) ? !hasReusekeepControl(target) : false;
|
|
247
237
|
}
|
|
248
|
-
const scrollIntoViewIfNeeded =
|
|
249
|
-
const scrollIntoView =
|
|
238
|
+
const scrollIntoViewIfNeeded = "scrollIntoViewIfNeeded";
|
|
239
|
+
const scrollIntoView = "scrollIntoView";
|
|
250
240
|
function scrollToView(elem) {
|
|
251
241
|
if (elem) {
|
|
252
242
|
if (elem[scrollIntoViewIfNeeded]) {
|
|
@@ -268,7 +258,7 @@ function scrollTopTo(diffNum, cb) {
|
|
|
268
258
|
const duration = Math.abs(diffNum);
|
|
269
259
|
const startTime = performance.now();
|
|
270
260
|
let countTop = 0;
|
|
271
|
-
const step = timestamp => {
|
|
261
|
+
const step = (timestamp) => {
|
|
272
262
|
let progress = (timestamp - startTime) / duration;
|
|
273
263
|
if (progress < 0) {
|
|
274
264
|
progress = 0;
|
|
@@ -306,31 +296,19 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
306
296
|
wtaFrame = null;
|
|
307
297
|
});
|
|
308
298
|
}
|
|
309
|
-
/**
|
|
310
|
-
* 通用定位计算
|
|
311
|
-
*/
|
|
312
299
|
function updatePanelPlacement(targetElem, panelElem, options) {
|
|
313
|
-
const {
|
|
314
|
-
|
|
315
|
-
defaultLeft,
|
|
316
|
-
placement,
|
|
317
|
-
defaultPlacement,
|
|
318
|
-
appendTo,
|
|
319
|
-
teleportTo,
|
|
320
|
-
marginSize,
|
|
321
|
-
isMinWidth
|
|
322
|
-
} = Object.assign({
|
|
323
|
-
appendTo: '',
|
|
300
|
+
const { defaultTop, defaultLeft, placement, defaultPlacement, appendTo, teleportTo, marginSize, isMinWidth } = Object.assign({
|
|
301
|
+
appendTo: "",
|
|
324
302
|
teleportTo: false,
|
|
325
303
|
marginSize: 18,
|
|
326
304
|
isMinWidth: true
|
|
327
305
|
}, options);
|
|
328
|
-
let panelPlacement =
|
|
329
|
-
let top =
|
|
330
|
-
let bottom =
|
|
306
|
+
let panelPlacement = "bottom";
|
|
307
|
+
let top = "";
|
|
308
|
+
let bottom = "";
|
|
331
309
|
let left = 0;
|
|
332
|
-
let minWidth =
|
|
333
|
-
let arrowLeft =
|
|
310
|
+
let minWidth = "";
|
|
311
|
+
let arrowLeft = "";
|
|
334
312
|
const stys = {};
|
|
335
313
|
if (panelElem && targetElem) {
|
|
336
314
|
const bodyEl = document.body;
|
|
@@ -355,83 +333,72 @@ function updatePanelPlacement(targetElem, panelElem, options) {
|
|
|
355
333
|
if (teleportTo) {
|
|
356
334
|
left = (defaultLeft || targetLeft - (panelWidth - targetWidth) / 2) - parentWrapperScrollLeft;
|
|
357
335
|
top = (defaultTop || targetTop + targetHeight) - parentWrapperScrollTop;
|
|
358
|
-
if (placement ===
|
|
359
|
-
panelPlacement =
|
|
336
|
+
if (placement === "top") {
|
|
337
|
+
panelPlacement = "top";
|
|
360
338
|
top = targetTop - panelHeight;
|
|
361
339
|
} else if (!placement) {
|
|
362
|
-
if (defaultPlacement ===
|
|
363
|
-
panelPlacement =
|
|
340
|
+
if (defaultPlacement === "top") {
|
|
341
|
+
panelPlacement = "top";
|
|
364
342
|
if (!defaultTop) {
|
|
365
343
|
top = targetTop - panelHeight;
|
|
366
344
|
}
|
|
367
|
-
// 如果上面不够放,则向下
|
|
368
345
|
if (top < marginSize) {
|
|
369
|
-
panelPlacement =
|
|
346
|
+
panelPlacement = "bottom";
|
|
370
347
|
top = targetTop + targetHeight;
|
|
371
348
|
}
|
|
372
|
-
// 如果下面不够放,则向上(优先)
|
|
373
349
|
if (top + panelHeight + marginSize > visibleHeight) {
|
|
374
|
-
panelPlacement =
|
|
350
|
+
panelPlacement = "top";
|
|
375
351
|
top = targetTop - panelHeight;
|
|
376
352
|
}
|
|
377
353
|
} else {
|
|
378
|
-
// 如果下面不够放,则向上
|
|
379
354
|
if (top + panelHeight + marginSize > visibleHeight) {
|
|
380
|
-
panelPlacement =
|
|
355
|
+
panelPlacement = "top";
|
|
381
356
|
top = targetTop - panelHeight;
|
|
382
357
|
}
|
|
383
|
-
// 如果上面不够放,则向下(优先)
|
|
384
358
|
if (top < marginSize) {
|
|
385
|
-
panelPlacement =
|
|
359
|
+
panelPlacement = "bottom";
|
|
386
360
|
top = targetTop + targetHeight;
|
|
387
361
|
}
|
|
388
362
|
}
|
|
389
363
|
}
|
|
390
|
-
// 如果溢出右边
|
|
391
364
|
if (left + panelWidth + marginSize > visibleWidth) {
|
|
392
365
|
left -= left + panelWidth + marginSize - visibleWidth;
|
|
393
366
|
}
|
|
394
|
-
// 如果溢出左边
|
|
395
367
|
if (left < marginSize) {
|
|
396
368
|
left = marginSize;
|
|
397
369
|
}
|
|
398
|
-
// 偏移
|
|
399
370
|
top -= parentWrapperOffsetTop;
|
|
400
371
|
left -= parentWrapperOffsetLeft;
|
|
401
372
|
} else {
|
|
402
|
-
if (placement ===
|
|
403
|
-
panelPlacement =
|
|
373
|
+
if (placement === "top") {
|
|
374
|
+
panelPlacement = "top";
|
|
404
375
|
bottom = targetHeight;
|
|
405
376
|
} else if (!placement) {
|
|
406
|
-
// 如果下面不够放,则向上
|
|
407
377
|
top = targetHeight;
|
|
408
378
|
if (targetTop + targetHeight + panelHeight + marginSize > visibleHeight) {
|
|
409
|
-
// 如果上面不够放,则向下(优先)
|
|
410
379
|
if (targetTop - targetHeight - panelHeight > marginSize) {
|
|
411
|
-
panelPlacement =
|
|
412
|
-
top =
|
|
380
|
+
panelPlacement = "top";
|
|
381
|
+
top = "";
|
|
413
382
|
bottom = targetHeight;
|
|
414
383
|
}
|
|
415
384
|
}
|
|
416
385
|
}
|
|
417
|
-
// 是否超出右侧
|
|
418
386
|
if (panelRect.left + panelRect.width + marginSize > visibleWidth) {
|
|
419
387
|
left = -(panelRect.left + panelRect.width + marginSize - visibleWidth);
|
|
420
388
|
}
|
|
421
389
|
}
|
|
422
|
-
if (
|
|
390
|
+
if (import_xe_utils.default.isNumber(top)) {
|
|
423
391
|
stys.top = toCssUnit(top);
|
|
424
392
|
}
|
|
425
|
-
if (
|
|
393
|
+
if (import_xe_utils.default.isNumber(bottom)) {
|
|
426
394
|
stys.bottom = toCssUnit(bottom);
|
|
427
395
|
}
|
|
428
|
-
if (
|
|
396
|
+
if (import_xe_utils.default.isNumber(left)) {
|
|
429
397
|
stys.left = toCssUnit(left);
|
|
430
398
|
}
|
|
431
|
-
if (isMinWidth &&
|
|
399
|
+
if (isMinWidth && import_xe_utils.default.isNumber(minWidth)) {
|
|
432
400
|
stys.minWidth = toCssUnit(minWidth);
|
|
433
401
|
}
|
|
434
|
-
// 箭头
|
|
435
402
|
if (left === targetLeft) {
|
|
436
403
|
if (targetWidth <= panelWidth) {
|
|
437
404
|
arrowLeft = targetWidth / 2;
|
|
@@ -463,13 +430,13 @@ function getPopupWrapperElement(panelElem) {
|
|
|
463
430
|
return (parentEl === bodyEl ? document.documentElement : parentEl) || null;
|
|
464
431
|
}
|
|
465
432
|
function getPopupContainer(appendTo) {
|
|
466
|
-
const selectElem = appendTo &&
|
|
467
|
-
return selectElem ||
|
|
433
|
+
const selectElem = appendTo && import_xe_utils.default.isFunction(appendTo) ? appendTo({}) : appendTo;
|
|
434
|
+
return selectElem || "body";
|
|
468
435
|
}
|
|
469
436
|
function getPopupAppendElement(appendTo) {
|
|
470
437
|
const selectElem = getPopupContainer(appendTo);
|
|
471
|
-
if (
|
|
438
|
+
if (import_xe_utils.default.isString(selectElem)) {
|
|
472
439
|
return document.querySelector(selectElem) || document.body;
|
|
473
440
|
}
|
|
474
441
|
return selectElem;
|
|
475
|
-
}
|
|
442
|
+
}
|
package/lib/ui/src/log.js
CHANGED
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var log_exports = {};
|
|
20
|
+
__export(log_exports, {
|
|
21
|
+
createComponentLog: () => createComponentLog,
|
|
22
|
+
errLog: () => errLog,
|
|
23
|
+
warnLog: () => warnLog
|
|
5
24
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const {
|
|
10
|
-
log
|
|
11
|
-
} = _core.VxeUI;
|
|
12
|
-
const tableVersion = `table v${"4.23.4"}`;
|
|
25
|
+
module.exports = __toCommonJS(log_exports);
|
|
26
|
+
var import_core = require("@vxe-ui/core");
|
|
27
|
+
const { log } = import_core.VxeUI;
|
|
28
|
+
const tableVersion = `table v${"4.23.6"}`;
|
|
13
29
|
function createComponentLog(name) {
|
|
14
|
-
const uiVersion =
|
|
15
|
-
const ganttVersion =
|
|
16
|
-
const designVersion =
|
|
17
|
-
const versionInfo = [uiVersion, tableVersion, ganttVersion, designVersion].filter(v => v).join(
|
|
30
|
+
const uiVersion = import_core.VxeUI.uiVersion ? `ui v${import_core.VxeUI.uiVersion}` : "";
|
|
31
|
+
const ganttVersion = import_core.VxeUI.ganttVersion ? `gantt v${import_core.VxeUI.ganttVersion}` : "";
|
|
32
|
+
const designVersion = import_core.VxeUI.designVersion ? `design v${import_core.VxeUI.designVersion}` : "";
|
|
33
|
+
const versionInfo = [uiVersion, tableVersion, ganttVersion, designVersion].filter((v) => v).join(" ");
|
|
18
34
|
return {
|
|
19
|
-
warnLog: log.create(
|
|
20
|
-
errLog: log.create(
|
|
35
|
+
warnLog: log.create("warn", versionInfo + "] [" + name),
|
|
36
|
+
errLog: log.create("error", versionInfo + "] [" + name)
|
|
21
37
|
};
|
|
22
38
|
}
|
|
23
|
-
const warnLog =
|
|
24
|
-
const errLog =
|
|
39
|
+
const warnLog = log.create("warn", tableVersion);
|
|
40
|
+
const errLog = log.create("error", tableVersion);
|
package/lib/ui/src/utils.js
CHANGED
|
@@ -1,76 +1,88 @@
|
|
|
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 utils_exports = {};
|
|
30
|
+
__export(utils_exports, {
|
|
31
|
+
eqEmptyValue: () => eqEmptyValue,
|
|
32
|
+
formatText: () => formatText,
|
|
33
|
+
getDefaultConfig: () => getDefaultConfig,
|
|
34
|
+
getFuncText: () => getFuncText,
|
|
35
|
+
getLastZIndex: () => getLastZIndex,
|
|
36
|
+
hasChildrenList: () => hasChildrenList,
|
|
37
|
+
hasEnableConf: () => hasEnableConf,
|
|
38
|
+
isEmptyValue: () => isEmptyValue,
|
|
39
|
+
isEnableConf: () => isEnableConf,
|
|
40
|
+
nextZIndex: () => nextZIndex,
|
|
41
|
+
parseFile: () => parseFile
|
|
5
42
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.hasChildrenList = hasChildrenList;
|
|
12
|
-
exports.hasEnableConf = hasEnableConf;
|
|
13
|
-
exports.isEmptyValue = isEmptyValue;
|
|
14
|
-
exports.isEnableConf = isEnableConf;
|
|
15
|
-
exports.nextZIndex = nextZIndex;
|
|
16
|
-
exports.parseFile = parseFile;
|
|
17
|
-
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
18
|
-
var _core = require("@vxe-ui/core");
|
|
19
|
-
var _domZindex = _interopRequireDefault(require("dom-zindex"));
|
|
20
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
-
const {
|
|
22
|
-
getConfig
|
|
23
|
-
} = _core.VxeUI;
|
|
43
|
+
module.exports = __toCommonJS(utils_exports);
|
|
44
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
45
|
+
var import_core = require("@vxe-ui/core");
|
|
46
|
+
var import_dom_zindex = __toESM(require("dom-zindex"));
|
|
47
|
+
const { getConfig } = import_core.VxeUI;
|
|
24
48
|
function isEnableConf(conf) {
|
|
25
49
|
return conf && conf.enabled !== false;
|
|
26
50
|
}
|
|
27
|
-
/**
|
|
28
|
-
* 用于开关类型的配置项
|
|
29
|
-
* 局部启用规则:conf={}
|
|
30
|
-
* 局部禁用规则:conf={enabled:false}
|
|
31
|
-
* 全局默认启用规则:conf.enabled=true
|
|
32
|
-
*/
|
|
33
51
|
function hasEnableConf(conf, opts) {
|
|
34
52
|
return opts && (conf ? opts.enabled !== false : opts.enabled);
|
|
35
53
|
}
|
|
36
54
|
function isEmptyValue(cellValue) {
|
|
37
|
-
return cellValue === null || cellValue ===
|
|
55
|
+
return cellValue === null || cellValue === void 0 || cellValue === "";
|
|
38
56
|
}
|
|
39
57
|
function parseFile(file) {
|
|
40
58
|
const name = file.name;
|
|
41
|
-
const tIndex =
|
|
59
|
+
const tIndex = import_xe_utils.default.lastIndexOf(name, ".");
|
|
42
60
|
const type = name.substring(tIndex + 1, name.length).toLowerCase();
|
|
43
61
|
const filename = name.substring(0, tIndex);
|
|
44
|
-
return {
|
|
45
|
-
filename,
|
|
46
|
-
type
|
|
47
|
-
};
|
|
62
|
+
return { filename, type };
|
|
48
63
|
}
|
|
49
64
|
function nextZIndex() {
|
|
50
|
-
return
|
|
65
|
+
return import_dom_zindex.default.getNext();
|
|
51
66
|
}
|
|
52
67
|
function getLastZIndex() {
|
|
53
|
-
return
|
|
68
|
+
return import_dom_zindex.default.getCurrent();
|
|
54
69
|
}
|
|
55
70
|
function hasChildrenList(item) {
|
|
56
71
|
return item && item.children && item.children.length > 0;
|
|
57
72
|
}
|
|
58
73
|
function getFuncText(content, args) {
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
74
|
+
if (import_xe_utils.default.eqNull(content)) {
|
|
75
|
+
return "";
|
|
61
76
|
}
|
|
62
77
|
const translate = getConfig().translate;
|
|
63
|
-
return `${translate ? translate(
|
|
78
|
+
return `${translate ? translate("" + content, args) : content}`;
|
|
64
79
|
}
|
|
65
80
|
function formatText(value, placeholder) {
|
|
66
|
-
return
|
|
81
|
+
return "" + (isEmptyValue(value) ? placeholder ? getConfig().emptyCell : "" : value);
|
|
67
82
|
}
|
|
68
|
-
/**
|
|
69
|
-
* 判断值为:'' | null | undefined 时都属于空值
|
|
70
|
-
*/
|
|
71
83
|
function eqEmptyValue(cellValue) {
|
|
72
|
-
return cellValue ===
|
|
84
|
+
return cellValue === "" || import_xe_utils.default.eqNull(cellValue);
|
|
73
85
|
}
|
|
74
86
|
function getDefaultConfig(val1, def1) {
|
|
75
|
-
return
|
|
76
|
-
}
|
|
87
|
+
return import_xe_utils.default.eqNull(val1) ? def1 : val1;
|
|
88
|
+
}
|