vxe-table 4.23.5 → 4.23.7
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/style.css +4501 -1
- package/es/style.mini.css +1 -0
- 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.1792979665397.ttf +0 -0
- package/lib/iconfont.1792979665397.woff +0 -0
- package/lib/iconfont.1792979665397.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.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.1792979665397.ttf} +0 -0
- /package/{es/iconfont.1792838769925.woff → dist/iconfont.1792979665397.woff} +0 -0
- /package/{es/iconfont.1792838769925.woff2 → dist/iconfont.1792979665397.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.1792979665397.ttf} +0 -0
- /package/{lib/iconfont.1792838769925.woff → es/iconfont.1792979665397.woff} +0 -0
- /package/{lib/iconfont.1792838769925.woff2 → es/iconfont.1792979665397.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,29 +1,44 @@
|
|
|
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 toolbar_exports = {};
|
|
30
|
+
__export(toolbar_exports, {
|
|
31
|
+
default: () => toolbar_default
|
|
5
32
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
warnLog,
|
|
16
|
-
errLog
|
|
17
|
-
} = (0, _log.createComponentLog)('toolbar');
|
|
18
|
-
const {
|
|
19
|
-
getConfig,
|
|
20
|
-
getIcon,
|
|
21
|
-
getI18n,
|
|
22
|
-
renderer,
|
|
23
|
-
commands,
|
|
24
|
-
createEvent,
|
|
25
|
-
useFns
|
|
26
|
-
} = _ui.VxeUI;
|
|
33
|
+
module.exports = __toCommonJS(toolbar_exports);
|
|
34
|
+
var import_vue = require("vue");
|
|
35
|
+
var import_comp = require("../../ui/src/comp");
|
|
36
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
37
|
+
var import_ui = require("../../ui");
|
|
38
|
+
var import_vn = require("../../ui/src/vn");
|
|
39
|
+
var import_log = require("../../ui/src/log");
|
|
40
|
+
const { warnLog, errLog } = (0, import_log.createComponentLog)("toolbar");
|
|
41
|
+
const { getConfig, getIcon, getI18n, renderer, commands, createEvent, useFns } = import_ui.VxeUI;
|
|
27
42
|
function createReactData() {
|
|
28
43
|
return {
|
|
29
44
|
isRefresh: false,
|
|
@@ -36,8 +51,8 @@ function createInternalData() {
|
|
|
36
51
|
connectTable: null
|
|
37
52
|
};
|
|
38
53
|
}
|
|
39
|
-
var
|
|
40
|
-
name:
|
|
54
|
+
var toolbar_default = (0, import_comp.defineVxeComponent)({
|
|
55
|
+
name: "VxeToolbar",
|
|
41
56
|
props: {
|
|
42
57
|
loading: Boolean,
|
|
43
58
|
refresh: [Boolean, Object],
|
|
@@ -70,24 +85,21 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
70
85
|
},
|
|
71
86
|
className: [String, Function]
|
|
72
87
|
},
|
|
73
|
-
emits: [
|
|
88
|
+
emits: [
|
|
89
|
+
"button-click",
|
|
90
|
+
"tool-click"
|
|
91
|
+
],
|
|
74
92
|
setup(props, context) {
|
|
75
|
-
const {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
// 使用已安装的组件,如果未安装则不渲染
|
|
81
|
-
const VxeUIButtonComponent = _ui.VxeUI.getComponent('VxeButton');
|
|
82
|
-
const $xeGrid = (0, _vue.inject)('$xeGrid', null);
|
|
83
|
-
const $xeGantt = (0, _vue.inject)('$xeGantt', null);
|
|
93
|
+
const { slots, emit } = context;
|
|
94
|
+
const xID = import_xe_utils.default.uniqueId();
|
|
95
|
+
const VxeUIButtonComponent = import_ui.VxeUI.getComponent("VxeButton");
|
|
96
|
+
const $xeGrid = (0, import_vue.inject)("$xeGrid", null);
|
|
97
|
+
const $xeGantt = (0, import_vue.inject)("$xeGantt", null);
|
|
84
98
|
const $xeGGWrapper = $xeGrid || $xeGantt;
|
|
85
|
-
const {
|
|
86
|
-
|
|
87
|
-
} = useFns.useSize(props);
|
|
88
|
-
const reactData = (0, _vue.reactive)(createReactData());
|
|
99
|
+
const { computeSize } = useFns.useSize(props);
|
|
100
|
+
const reactData = (0, import_vue.reactive)(createReactData());
|
|
89
101
|
const internalData = createInternalData();
|
|
90
|
-
const refElem = (0,
|
|
102
|
+
const refElem = (0, import_vue.ref)();
|
|
91
103
|
const refMaps = {
|
|
92
104
|
refElem
|
|
93
105
|
};
|
|
@@ -100,61 +112,49 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
100
112
|
getRefMaps: () => refMaps
|
|
101
113
|
};
|
|
102
114
|
let toolbarMethods = {};
|
|
103
|
-
const computeRefreshOpts = (0,
|
|
104
|
-
return Object.assign({},
|
|
115
|
+
const computeRefreshOpts = (0, import_vue.computed)(() => {
|
|
116
|
+
return Object.assign({}, import_xe_utils.default.clone(getConfig().toolbar.refresh, true), props.refreshOptions, props.refresh);
|
|
105
117
|
});
|
|
106
|
-
const computeImportOpts = (0,
|
|
107
|
-
return Object.assign({},
|
|
118
|
+
const computeImportOpts = (0, import_vue.computed)(() => {
|
|
119
|
+
return Object.assign({}, import_xe_utils.default.clone(getConfig().toolbar.import, true), props.importOptions, props.import);
|
|
108
120
|
});
|
|
109
|
-
const computeExportOpts = (0,
|
|
110
|
-
return Object.assign({},
|
|
121
|
+
const computeExportOpts = (0, import_vue.computed)(() => {
|
|
122
|
+
return Object.assign({}, import_xe_utils.default.clone(getConfig().toolbar.export, true), props.exportOptions, props.export);
|
|
111
123
|
});
|
|
112
|
-
const computePrintOpts = (0,
|
|
113
|
-
return Object.assign({},
|
|
124
|
+
const computePrintOpts = (0, import_vue.computed)(() => {
|
|
125
|
+
return Object.assign({}, import_xe_utils.default.clone(getConfig().toolbar.print, true), props.printOptions, props.print);
|
|
114
126
|
});
|
|
115
|
-
const computeZoomOpts = (0,
|
|
116
|
-
return Object.assign({},
|
|
127
|
+
const computeZoomOpts = (0, import_vue.computed)(() => {
|
|
128
|
+
return Object.assign({}, import_xe_utils.default.clone(getConfig().toolbar.zoom, true), props.zoomOptions, props.zoom);
|
|
117
129
|
});
|
|
118
|
-
const computeCustomOpts = (0,
|
|
119
|
-
return Object.assign({},
|
|
130
|
+
const computeCustomOpts = (0, import_vue.computed)(() => {
|
|
131
|
+
return Object.assign({}, import_xe_utils.default.clone(getConfig().toolbar.custom, true), props.customOptions, props.custom);
|
|
120
132
|
});
|
|
121
|
-
const computeTableCustomOpts = (0,
|
|
122
|
-
const {
|
|
123
|
-
connectTable
|
|
124
|
-
} = internalData;
|
|
133
|
+
const computeTableCustomOpts = (0, import_vue.computed)(() => {
|
|
134
|
+
const { connectTable } = internalData;
|
|
125
135
|
const $table = connectTable;
|
|
126
136
|
if (reactData.connectFlag || $table) {
|
|
127
137
|
if ($table) {
|
|
128
|
-
const {
|
|
129
|
-
|
|
130
|
-
} = $table.getComputeMaps();
|
|
131
|
-
return computeCustomOpts.value;
|
|
138
|
+
const { computeCustomOpts: computeCustomOpts2 } = $table.getComputeMaps();
|
|
139
|
+
return computeCustomOpts2.value;
|
|
132
140
|
}
|
|
133
141
|
}
|
|
134
|
-
return {
|
|
135
|
-
trigger: ''
|
|
136
|
-
};
|
|
142
|
+
return { trigger: "" };
|
|
137
143
|
});
|
|
138
|
-
const computeTrigger = (0,
|
|
144
|
+
const computeTrigger = (0, import_vue.computed)(() => {
|
|
139
145
|
const tableCustomOpts = computeTableCustomOpts.value;
|
|
140
146
|
return tableCustomOpts.trigger;
|
|
141
147
|
});
|
|
142
148
|
const checkTable = () => {
|
|
143
|
-
const {
|
|
144
|
-
connectTable
|
|
145
|
-
} = internalData;
|
|
149
|
+
const { connectTable } = internalData;
|
|
146
150
|
const $table = connectTable;
|
|
147
151
|
if ($table) {
|
|
148
152
|
return true;
|
|
149
153
|
}
|
|
150
|
-
errLog(
|
|
154
|
+
errLog("vxe.error.barUnableLink");
|
|
151
155
|
};
|
|
152
|
-
const handleClickSettingEvent = ({
|
|
153
|
-
|
|
154
|
-
}) => {
|
|
155
|
-
const {
|
|
156
|
-
connectTable
|
|
157
|
-
} = internalData;
|
|
156
|
+
const handleClickSettingEvent = ({ $event }) => {
|
|
157
|
+
const { connectTable } = internalData;
|
|
158
158
|
const $table = connectTable;
|
|
159
159
|
if ($table) {
|
|
160
160
|
if ($table.triggerCustomEvent) {
|
|
@@ -162,28 +162,18 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
-
const handleMouseenterSettingEvent = ({
|
|
166
|
-
|
|
167
|
-
}) => {
|
|
168
|
-
const {
|
|
169
|
-
connectTable
|
|
170
|
-
} = internalData;
|
|
165
|
+
const handleMouseenterSettingEvent = ({ $event }) => {
|
|
166
|
+
const { connectTable } = internalData;
|
|
171
167
|
const $table = connectTable;
|
|
172
168
|
if ($table) {
|
|
173
169
|
$table.customOpenEvent($event);
|
|
174
170
|
}
|
|
175
171
|
};
|
|
176
|
-
const handleMouseleaveSettingEvent = ({
|
|
177
|
-
|
|
178
|
-
}) => {
|
|
179
|
-
const {
|
|
180
|
-
connectTable
|
|
181
|
-
} = internalData;
|
|
172
|
+
const handleMouseleaveSettingEvent = ({ $event }) => {
|
|
173
|
+
const { connectTable } = internalData;
|
|
182
174
|
const $table = connectTable;
|
|
183
175
|
if ($table) {
|
|
184
|
-
const {
|
|
185
|
-
customStore
|
|
186
|
-
} = $table.reactData;
|
|
176
|
+
const { customStore } = $table.reactData;
|
|
187
177
|
customStore.activeBtn = false;
|
|
188
178
|
setTimeout(() => {
|
|
189
179
|
if (!customStore.activeBtn && !customStore.activeWrapper) {
|
|
@@ -192,19 +182,15 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
192
182
|
}, 350);
|
|
193
183
|
}
|
|
194
184
|
};
|
|
195
|
-
const refreshEvent = ({
|
|
196
|
-
|
|
197
|
-
}) => {
|
|
198
|
-
const {
|
|
199
|
-
isRefresh
|
|
200
|
-
} = reactData;
|
|
185
|
+
const refreshEvent = ({ $event }) => {
|
|
186
|
+
const { isRefresh } = reactData;
|
|
201
187
|
const refreshOpts = computeRefreshOpts.value;
|
|
202
188
|
if (!isRefresh) {
|
|
203
189
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
|
|
204
190
|
if (queryMethod) {
|
|
205
191
|
reactData.isRefresh = true;
|
|
206
192
|
try {
|
|
207
|
-
Promise.resolve(queryMethod({})).catch(e => e).then(() => {
|
|
193
|
+
Promise.resolve(queryMethod({})).catch((e) => e).then(() => {
|
|
208
194
|
reactData.isRefresh = false;
|
|
209
195
|
});
|
|
210
196
|
} catch (e) {
|
|
@@ -212,28 +198,23 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
212
198
|
}
|
|
213
199
|
} else if ($xeGGWrapper) {
|
|
214
200
|
reactData.isRefresh = true;
|
|
215
|
-
$xeGGWrapper.triggerToolbarCommitEvent({
|
|
216
|
-
|
|
217
|
-
}, $event).catch(() => {}).then(() => {
|
|
201
|
+
$xeGGWrapper.triggerToolbarCommitEvent({ code: refreshOpts.code || "reload" }, $event).catch(() => {
|
|
202
|
+
}).then(() => {
|
|
218
203
|
reactData.isRefresh = false;
|
|
219
204
|
});
|
|
220
205
|
}
|
|
221
206
|
}
|
|
222
207
|
};
|
|
223
|
-
const zoomEvent = ({
|
|
224
|
-
$event
|
|
225
|
-
}) => {
|
|
208
|
+
const zoomEvent = ({ $event }) => {
|
|
226
209
|
if ($xeGGWrapper) {
|
|
227
210
|
$xeGGWrapper.triggerZoomEvent($event);
|
|
228
211
|
} else {
|
|
229
|
-
warnLog(
|
|
212
|
+
warnLog("vxe.error.notProp", ["zoom"]);
|
|
230
213
|
}
|
|
231
214
|
};
|
|
232
215
|
const importEvent = () => {
|
|
233
216
|
if (checkTable()) {
|
|
234
|
-
const {
|
|
235
|
-
connectTable
|
|
236
|
-
} = internalData;
|
|
217
|
+
const { connectTable } = internalData;
|
|
237
218
|
const $table = connectTable;
|
|
238
219
|
if ($table) {
|
|
239
220
|
$table.importData();
|
|
@@ -242,9 +223,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
242
223
|
};
|
|
243
224
|
const openImportEvent = () => {
|
|
244
225
|
if (checkTable()) {
|
|
245
|
-
const {
|
|
246
|
-
connectTable
|
|
247
|
-
} = internalData;
|
|
226
|
+
const { connectTable } = internalData;
|
|
248
227
|
const $table = connectTable;
|
|
249
228
|
if ($table) {
|
|
250
229
|
$table.openImport();
|
|
@@ -253,9 +232,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
253
232
|
};
|
|
254
233
|
const exportEvent = () => {
|
|
255
234
|
if (checkTable()) {
|
|
256
|
-
const {
|
|
257
|
-
connectTable
|
|
258
|
-
} = internalData;
|
|
235
|
+
const { connectTable } = internalData;
|
|
259
236
|
const $table = connectTable;
|
|
260
237
|
if ($table) {
|
|
261
238
|
$table.exportData();
|
|
@@ -264,9 +241,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
264
241
|
};
|
|
265
242
|
const openExportEvent = () => {
|
|
266
243
|
if (checkTable()) {
|
|
267
|
-
const {
|
|
268
|
-
connectTable
|
|
269
|
-
} = internalData;
|
|
244
|
+
const { connectTable } = internalData;
|
|
270
245
|
const $table = connectTable;
|
|
271
246
|
if ($table) {
|
|
272
247
|
$table.openExport();
|
|
@@ -275,9 +250,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
275
250
|
};
|
|
276
251
|
const printEvent = () => {
|
|
277
252
|
if (checkTable()) {
|
|
278
|
-
const {
|
|
279
|
-
connectTable
|
|
280
|
-
} = internalData;
|
|
253
|
+
const { connectTable } = internalData;
|
|
281
254
|
const $table = connectTable;
|
|
282
255
|
if ($table) {
|
|
283
256
|
$table.print();
|
|
@@ -286,9 +259,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
286
259
|
};
|
|
287
260
|
const openPrintEvent = () => {
|
|
288
261
|
if (checkTable()) {
|
|
289
|
-
const {
|
|
290
|
-
connectTable
|
|
291
|
-
} = internalData;
|
|
262
|
+
const { connectTable } = internalData;
|
|
292
263
|
const $table = connectTable;
|
|
293
264
|
if ($table) {
|
|
294
265
|
$table.openPrint();
|
|
@@ -297,31 +268,31 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
297
268
|
};
|
|
298
269
|
const handleDefaultCodeEvent = (eventParams, item, cb) => {
|
|
299
270
|
switch (item.code) {
|
|
300
|
-
case
|
|
271
|
+
case "print":
|
|
301
272
|
printEvent();
|
|
302
273
|
break;
|
|
303
|
-
case
|
|
274
|
+
case "open_print":
|
|
304
275
|
openPrintEvent();
|
|
305
276
|
break;
|
|
306
|
-
case
|
|
277
|
+
case "custom":
|
|
307
278
|
handleClickSettingEvent(eventParams);
|
|
308
279
|
break;
|
|
309
|
-
case
|
|
280
|
+
case "export":
|
|
310
281
|
exportEvent();
|
|
311
282
|
break;
|
|
312
|
-
case
|
|
283
|
+
case "open_export":
|
|
313
284
|
openExportEvent();
|
|
314
285
|
break;
|
|
315
|
-
case
|
|
286
|
+
case "import":
|
|
316
287
|
importEvent();
|
|
317
288
|
break;
|
|
318
|
-
case
|
|
289
|
+
case "open_import":
|
|
319
290
|
openImportEvent();
|
|
320
291
|
break;
|
|
321
|
-
case
|
|
292
|
+
case "zoom":
|
|
322
293
|
zoomEvent(eventParams);
|
|
323
294
|
break;
|
|
324
|
-
case
|
|
295
|
+
case "refresh":
|
|
325
296
|
refreshEvent(eventParams);
|
|
326
297
|
break;
|
|
327
298
|
default:
|
|
@@ -330,86 +301,57 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
330
301
|
}
|
|
331
302
|
};
|
|
332
303
|
const btnEvent = (eventParams, item) => {
|
|
333
|
-
const {
|
|
334
|
-
|
|
335
|
-
} = eventParams;
|
|
336
|
-
const {
|
|
337
|
-
connectTable
|
|
338
|
-
} = internalData;
|
|
304
|
+
const { $event } = eventParams;
|
|
305
|
+
const { connectTable } = internalData;
|
|
339
306
|
const $table = connectTable;
|
|
340
|
-
const {
|
|
341
|
-
code
|
|
342
|
-
} = item;
|
|
307
|
+
const { code } = item;
|
|
343
308
|
if (code) {
|
|
344
309
|
handleDefaultCodeEvent(eventParams, item, () => {
|
|
345
310
|
if ($xeGGWrapper) {
|
|
346
311
|
$xeGGWrapper.triggerToolbarBtnEvent(item, $event);
|
|
347
312
|
} else {
|
|
348
313
|
const gCommandOpts = commands.get(code);
|
|
349
|
-
const params = {
|
|
350
|
-
code,
|
|
351
|
-
button: item,
|
|
352
|
-
$table: $table,
|
|
353
|
-
$grid: $xeGrid,
|
|
354
|
-
$gantt: $xeGantt,
|
|
355
|
-
$event
|
|
356
|
-
};
|
|
314
|
+
const params = { code, button: item, $table, $grid: $xeGrid, $gantt: $xeGantt, $event };
|
|
357
315
|
if (gCommandOpts) {
|
|
358
316
|
const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod;
|
|
359
317
|
if (tCommandMethod) {
|
|
360
318
|
tCommandMethod(params);
|
|
361
319
|
} else {
|
|
362
|
-
errLog(
|
|
320
|
+
errLog("vxe.error.notCommands", [code]);
|
|
363
321
|
}
|
|
364
322
|
}
|
|
365
|
-
$xeToolbar.dispatchEvent(
|
|
323
|
+
$xeToolbar.dispatchEvent("button-click", params, $event);
|
|
366
324
|
}
|
|
367
325
|
});
|
|
368
326
|
}
|
|
369
327
|
};
|
|
370
328
|
const tolEvent = (eventParams, item) => {
|
|
371
|
-
const {
|
|
372
|
-
|
|
373
|
-
} = eventParams;
|
|
374
|
-
const {
|
|
375
|
-
connectTable
|
|
376
|
-
} = internalData;
|
|
329
|
+
const { $event } = eventParams;
|
|
330
|
+
const { connectTable } = internalData;
|
|
377
331
|
const $table = connectTable;
|
|
378
|
-
const {
|
|
379
|
-
code
|
|
380
|
-
} = item;
|
|
332
|
+
const { code } = item;
|
|
381
333
|
if (code) {
|
|
382
334
|
handleDefaultCodeEvent(eventParams, item, () => {
|
|
383
335
|
if ($xeGGWrapper) {
|
|
384
336
|
$xeGGWrapper.triggerToolbarTolEvent(item, $event);
|
|
385
337
|
} else {
|
|
386
338
|
const gCommandOpts = commands.get(code);
|
|
387
|
-
const params = {
|
|
388
|
-
code,
|
|
389
|
-
button: null,
|
|
390
|
-
tool: item,
|
|
391
|
-
$table: $table,
|
|
392
|
-
$grid: $xeGrid,
|
|
393
|
-
$gantt: $xeGantt,
|
|
394
|
-
$event
|
|
395
|
-
};
|
|
339
|
+
const params = { code, button: null, tool: item, $table, $grid: $xeGrid, $gantt: $xeGantt, $event };
|
|
396
340
|
if (gCommandOpts) {
|
|
397
341
|
const tCommandMethod = gCommandOpts.tableCommandMethod || gCommandOpts.commandMethod;
|
|
398
342
|
if (tCommandMethod) {
|
|
399
343
|
tCommandMethod(params);
|
|
400
344
|
} else {
|
|
401
|
-
errLog(
|
|
345
|
+
errLog("vxe.error.notCommands", [code]);
|
|
402
346
|
}
|
|
403
347
|
}
|
|
404
|
-
$xeToolbar.dispatchEvent(
|
|
348
|
+
$xeToolbar.dispatchEvent("tool-click", params, $event);
|
|
405
349
|
}
|
|
406
350
|
});
|
|
407
351
|
}
|
|
408
352
|
};
|
|
409
353
|
const dispatchEvent = (type, params, evnt) => {
|
|
410
|
-
emit(type, createEvent(evnt, {
|
|
411
|
-
$toolbar: $xeToolbar
|
|
412
|
-
}, params));
|
|
354
|
+
emit(type, createEvent(evnt, { $toolbar: $xeToolbar }, params));
|
|
413
355
|
};
|
|
414
356
|
toolbarMethods = {
|
|
415
357
|
dispatchEvent,
|
|
@@ -421,335 +363,285 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
421
363
|
};
|
|
422
364
|
Object.assign($xeToolbar, toolbarMethods);
|
|
423
365
|
const renderDropdowns = (item, isBtn) => {
|
|
424
|
-
const {
|
|
425
|
-
dropdowns
|
|
426
|
-
} = item;
|
|
366
|
+
const { dropdowns } = item;
|
|
427
367
|
const downVNs = [];
|
|
428
368
|
if (dropdowns) {
|
|
429
369
|
return dropdowns.map((child, index) => {
|
|
430
370
|
if (child.visible === false) {
|
|
431
|
-
return (0,
|
|
371
|
+
return (0, import_vue.createCommentVNode)();
|
|
432
372
|
}
|
|
433
|
-
return VxeUIButtonComponent ? (0,
|
|
434
|
-
key: index
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
onClick: eventParams => isBtn ? btnEvent(eventParams, child) : tolEvent(eventParams, child)
|
|
440
|
-
})
|
|
373
|
+
return VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
374
|
+
key: index,
|
|
375
|
+
...Object.assign({}, child, {
|
|
376
|
+
content: child.content || child.name,
|
|
377
|
+
options: void 0
|
|
378
|
+
}),
|
|
379
|
+
onClick: (eventParams) => isBtn ? btnEvent(eventParams, child) : tolEvent(eventParams, child)
|
|
380
|
+
}) : (0, import_vue.createCommentVNode)();
|
|
441
381
|
});
|
|
442
382
|
}
|
|
443
383
|
return downVNs;
|
|
444
384
|
};
|
|
445
|
-
/**
|
|
446
|
-
* 渲染按钮
|
|
447
|
-
*/
|
|
448
385
|
const renderLeftBtns = () => {
|
|
449
|
-
const {
|
|
450
|
-
|
|
451
|
-
} = props;
|
|
452
|
-
const {
|
|
453
|
-
connectTable
|
|
454
|
-
} = internalData;
|
|
386
|
+
const { buttons } = props;
|
|
387
|
+
const { connectTable } = internalData;
|
|
455
388
|
const $table = connectTable;
|
|
456
389
|
const buttonsSlot = slots.buttons;
|
|
457
|
-
const buttonPrefixSlot = slots.buttonPrefix || slots[
|
|
458
|
-
const buttonSuffixSlot = slots.buttonSuffix || slots[
|
|
390
|
+
const buttonPrefixSlot = slots.buttonPrefix || slots["button-prefix"];
|
|
391
|
+
const buttonSuffixSlot = slots.buttonSuffix || slots["button-suffix"];
|
|
459
392
|
const btnVNs = [];
|
|
460
393
|
if (buttons) {
|
|
461
|
-
const {
|
|
462
|
-
computeRendererOpts
|
|
463
|
-
} = $table ? $table.getComputeMaps() : {};
|
|
394
|
+
const { computeRendererOpts } = $table ? $table.getComputeMaps() : {};
|
|
464
395
|
const rendererOpts = (computeRendererOpts ? computeRendererOpts.value : null) || {};
|
|
465
396
|
buttons.forEach((item, index) => {
|
|
466
|
-
const {
|
|
467
|
-
dropdowns,
|
|
468
|
-
buttonRender
|
|
469
|
-
} = item;
|
|
397
|
+
const { dropdowns, buttonRender } = item;
|
|
470
398
|
if (item.visible !== false) {
|
|
471
399
|
const compConf = buttonRender && buttonRender.name ? rendererOpts[buttonRender.name] || renderer.get(buttonRender.name) : null;
|
|
472
400
|
if (buttonRender && compConf && compConf.renderToolbarButton) {
|
|
473
401
|
const toolbarButtonClassName = compConf.toolbarButtonClassName;
|
|
474
|
-
const params = {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
key: `br${item.code || index}`,
|
|
482
|
-
class: ['vxe-button--item', toolbarButtonClassName ? _xeUtils.default.isFunction(toolbarButtonClassName) ? toolbarButtonClassName(params) : toolbarButtonClassName : '']
|
|
483
|
-
}, (0, _vn.getSlotVNs)(compConf.renderToolbarButton(buttonRender, params))));
|
|
402
|
+
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table, button: item };
|
|
403
|
+
btnVNs.push(
|
|
404
|
+
(0, import_vue.h)("span", {
|
|
405
|
+
key: `br${item.code || index}`,
|
|
406
|
+
class: ["vxe-button--item", toolbarButtonClassName ? import_xe_utils.default.isFunction(toolbarButtonClassName) ? toolbarButtonClassName(params) : toolbarButtonClassName : ""]
|
|
407
|
+
}, (0, import_vn.getSlotVNs)(compConf.renderToolbarButton(buttonRender, params)))
|
|
408
|
+
);
|
|
484
409
|
} else {
|
|
485
410
|
if (VxeUIButtonComponent) {
|
|
486
|
-
btnVNs.push(
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
dropdowns
|
|
495
|
-
|
|
411
|
+
btnVNs.push(
|
|
412
|
+
(0, import_vue.h)(VxeUIButtonComponent, {
|
|
413
|
+
key: `bd${item.code || index}`,
|
|
414
|
+
...Object.assign({}, item, {
|
|
415
|
+
content: item.content || item.name,
|
|
416
|
+
options: void 0
|
|
417
|
+
}),
|
|
418
|
+
onClick: (eventParams) => btnEvent(eventParams, item)
|
|
419
|
+
}, dropdowns && dropdowns.length ? {
|
|
420
|
+
dropdowns: () => renderDropdowns(item, true)
|
|
421
|
+
} : {})
|
|
422
|
+
);
|
|
496
423
|
}
|
|
497
424
|
}
|
|
498
425
|
}
|
|
499
426
|
});
|
|
500
427
|
}
|
|
501
|
-
return [
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
buttons: buttons || [],
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
$
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
$grid: $xeGrid,
|
|
513
|
-
$gantt: $xeGantt,
|
|
514
|
-
$table: $table
|
|
515
|
-
})) : btnVNs), (0, _vue.h)('div', {
|
|
516
|
-
class: 'vxe-button--suffix-wrapper'
|
|
517
|
-
}, buttonSuffixSlot ? (0, _vn.getSlotVNs)(buttonSuffixSlot({
|
|
518
|
-
buttons: buttons || [],
|
|
519
|
-
$grid: $xeGrid,
|
|
520
|
-
$gantt: $xeGantt,
|
|
521
|
-
$table: $table
|
|
522
|
-
})) : [])];
|
|
428
|
+
return [
|
|
429
|
+
(0, import_vue.h)("div", {
|
|
430
|
+
class: "vxe-button--prefix-wrapper"
|
|
431
|
+
}, buttonPrefixSlot ? (0, import_vn.getSlotVNs)(buttonPrefixSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table })) : []),
|
|
432
|
+
(0, import_vue.h)("div", {
|
|
433
|
+
class: "vxe-button--item-wrapper"
|
|
434
|
+
}, buttonsSlot ? (0, import_vn.getSlotVNs)(buttonsSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table })) : btnVNs),
|
|
435
|
+
(0, import_vue.h)("div", {
|
|
436
|
+
class: "vxe-button--suffix-wrapper"
|
|
437
|
+
}, buttonSuffixSlot ? (0, import_vn.getSlotVNs)(buttonSuffixSlot({ buttons: buttons || [], $grid: $xeGrid, $gantt: $xeGantt, $table })) : [])
|
|
438
|
+
];
|
|
523
439
|
};
|
|
524
|
-
/**
|
|
525
|
-
* 渲染右侧工具
|
|
526
|
-
*/
|
|
527
440
|
const renderRightTools = () => {
|
|
528
|
-
const {
|
|
529
|
-
|
|
530
|
-
} = props;
|
|
531
|
-
const {
|
|
532
|
-
connectTable
|
|
533
|
-
} = internalData;
|
|
441
|
+
const { tools } = props;
|
|
442
|
+
const { connectTable } = internalData;
|
|
534
443
|
const $table = connectTable;
|
|
535
444
|
const toolsSlot = slots.tools;
|
|
536
|
-
const toolPrefixSlot = slots.toolPrefix || slots[
|
|
537
|
-
const toolSuffixSlot = slots.toolSuffix || slots[
|
|
445
|
+
const toolPrefixSlot = slots.toolPrefix || slots["tool-prefix"];
|
|
446
|
+
const toolSuffixSlot = slots.toolSuffix || slots["tool-suffix"];
|
|
538
447
|
const btnVNs = [];
|
|
539
448
|
if (tools) {
|
|
540
|
-
const {
|
|
541
|
-
computeRendererOpts
|
|
542
|
-
} = $table ? $table.getComputeMaps() : {};
|
|
449
|
+
const { computeRendererOpts } = $table ? $table.getComputeMaps() : {};
|
|
543
450
|
const rendererOpts = (computeRendererOpts ? computeRendererOpts.value : null) || {};
|
|
544
451
|
tools.forEach((item, tIndex) => {
|
|
545
|
-
const {
|
|
546
|
-
dropdowns,
|
|
547
|
-
toolRender
|
|
548
|
-
} = item;
|
|
452
|
+
const { dropdowns, toolRender } = item;
|
|
549
453
|
if (item.visible !== false) {
|
|
550
454
|
const compConf = toolRender && toolRender.name ? rendererOpts[toolRender.name] || renderer.get(toolRender.name) : null;
|
|
551
455
|
if (toolRender && compConf && compConf.renderToolbarTool) {
|
|
552
456
|
const toolbarToolClassName = compConf.toolbarToolClassName;
|
|
553
|
-
const params = {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
key: tIndex,
|
|
561
|
-
class: ['vxe-tool--item', toolbarToolClassName ? _xeUtils.default.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName : '']
|
|
562
|
-
}, (0, _vn.getSlotVNs)(compConf.renderToolbarTool(toolRender, params))));
|
|
457
|
+
const params = { $grid: $xeGrid, $gantt: $xeGantt, $table, tool: item };
|
|
458
|
+
btnVNs.push(
|
|
459
|
+
(0, import_vue.h)("span", {
|
|
460
|
+
key: tIndex,
|
|
461
|
+
class: ["vxe-tool--item", toolbarToolClassName ? import_xe_utils.default.isFunction(toolbarToolClassName) ? toolbarToolClassName(params) : toolbarToolClassName : ""]
|
|
462
|
+
}, (0, import_vn.getSlotVNs)(compConf.renderToolbarTool(toolRender, params)))
|
|
463
|
+
);
|
|
563
464
|
} else {
|
|
564
465
|
if (VxeUIButtonComponent) {
|
|
565
|
-
btnVNs.push(
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
dropdowns
|
|
574
|
-
|
|
466
|
+
btnVNs.push(
|
|
467
|
+
(0, import_vue.h)(VxeUIButtonComponent, {
|
|
468
|
+
key: tIndex,
|
|
469
|
+
...Object.assign({}, item, {
|
|
470
|
+
content: item.content || item.name,
|
|
471
|
+
options: void 0
|
|
472
|
+
}),
|
|
473
|
+
onClick: (eventParams) => tolEvent(eventParams, item)
|
|
474
|
+
}, dropdowns && dropdowns.length ? {
|
|
475
|
+
dropdowns: () => renderDropdowns(item, false)
|
|
476
|
+
} : {})
|
|
477
|
+
);
|
|
575
478
|
}
|
|
576
479
|
}
|
|
577
480
|
}
|
|
578
481
|
});
|
|
579
482
|
}
|
|
580
|
-
return [
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
tools: tools || [],
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
$
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
$grid: $xeGrid,
|
|
592
|
-
$gantt: $xeGantt,
|
|
593
|
-
$table: $table
|
|
594
|
-
})) : btnVNs), (0, _vue.h)('div', {
|
|
595
|
-
class: 'vxe-tool--suffix-wrapper'
|
|
596
|
-
}, toolSuffixSlot ? (0, _vn.getSlotVNs)(toolSuffixSlot({
|
|
597
|
-
tools: tools || [],
|
|
598
|
-
$grid: $xeGrid,
|
|
599
|
-
$gantt: $xeGantt,
|
|
600
|
-
$table: $table
|
|
601
|
-
})) : [])];
|
|
483
|
+
return [
|
|
484
|
+
(0, import_vue.h)("div", {
|
|
485
|
+
class: "vxe-tool--prefix-wrapper"
|
|
486
|
+
}, toolPrefixSlot ? (0, import_vn.getSlotVNs)(toolPrefixSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table })) : []),
|
|
487
|
+
(0, import_vue.h)("div", {
|
|
488
|
+
class: "vxe-tool--item-wrapper"
|
|
489
|
+
}, toolsSlot ? (0, import_vn.getSlotVNs)(toolsSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table })) : btnVNs),
|
|
490
|
+
(0, import_vue.h)("div", {
|
|
491
|
+
class: "vxe-tool--suffix-wrapper"
|
|
492
|
+
}, toolSuffixSlot ? (0, import_vn.getSlotVNs)(toolSuffixSlot({ tools: tools || [], $grid: $xeGrid, $gantt: $xeGantt, $table })) : [])
|
|
493
|
+
];
|
|
602
494
|
};
|
|
603
495
|
const renderToolImport = () => {
|
|
604
496
|
const importOpts = computeImportOpts.value;
|
|
605
|
-
return VxeUIButtonComponent ? (0,
|
|
606
|
-
key:
|
|
497
|
+
return VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
498
|
+
key: "import",
|
|
607
499
|
circle: true,
|
|
608
500
|
icon: importOpts.icon || getIcon().TOOLBAR_TOOLS_IMPORT,
|
|
609
|
-
title: getI18n(
|
|
501
|
+
title: getI18n("vxe.toolbar.import"),
|
|
610
502
|
onClick: openImportEvent
|
|
611
|
-
}) : (0,
|
|
503
|
+
}) : (0, import_vue.createCommentVNode)();
|
|
612
504
|
};
|
|
613
505
|
const renderToolExport = () => {
|
|
614
506
|
const exportOpts = computeExportOpts.value;
|
|
615
|
-
return VxeUIButtonComponent ? (0,
|
|
616
|
-
key:
|
|
507
|
+
return VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
508
|
+
key: "export",
|
|
617
509
|
circle: true,
|
|
618
510
|
icon: exportOpts.icon || getIcon().TOOLBAR_TOOLS_EXPORT,
|
|
619
|
-
title: getI18n(
|
|
511
|
+
title: getI18n("vxe.toolbar.export"),
|
|
620
512
|
onClick: openExportEvent
|
|
621
|
-
}) : (0,
|
|
513
|
+
}) : (0, import_vue.createCommentVNode)();
|
|
622
514
|
};
|
|
623
515
|
const renderToolPrint = () => {
|
|
624
516
|
const printOpts = computePrintOpts.value;
|
|
625
|
-
return VxeUIButtonComponent ? (0,
|
|
626
|
-
key:
|
|
517
|
+
return VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
518
|
+
key: "print",
|
|
627
519
|
circle: true,
|
|
628
520
|
icon: printOpts.icon || getIcon().TOOLBAR_TOOLS_PRINT,
|
|
629
|
-
title: getI18n(
|
|
521
|
+
title: getI18n("vxe.toolbar.print"),
|
|
630
522
|
onClick: openPrintEvent
|
|
631
|
-
}) : (0,
|
|
523
|
+
}) : (0, import_vue.createCommentVNode)();
|
|
632
524
|
};
|
|
633
525
|
const renderToolRefresh = () => {
|
|
634
526
|
const refreshOpts = computeRefreshOpts.value;
|
|
635
|
-
return VxeUIButtonComponent ? (0,
|
|
636
|
-
key:
|
|
527
|
+
return VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
528
|
+
key: "refresh",
|
|
637
529
|
circle: true,
|
|
638
530
|
icon: reactData.isRefresh ? refreshOpts.iconLoading || getIcon().TOOLBAR_TOOLS_REFRESH_LOADING : refreshOpts.icon || getIcon().TOOLBAR_TOOLS_REFRESH,
|
|
639
|
-
title: getI18n(
|
|
531
|
+
title: getI18n("vxe.toolbar.refresh"),
|
|
640
532
|
onClick: refreshEvent
|
|
641
|
-
}) : (0,
|
|
533
|
+
}) : (0, import_vue.createCommentVNode)();
|
|
642
534
|
};
|
|
643
535
|
const renderToolZoom = () => {
|
|
644
536
|
const zoomOpts = computeZoomOpts.value;
|
|
645
|
-
return $xeGGWrapper && VxeUIButtonComponent ? (0,
|
|
646
|
-
key:
|
|
537
|
+
return $xeGGWrapper && VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
538
|
+
key: "zoom",
|
|
647
539
|
circle: true,
|
|
648
540
|
icon: $xeGGWrapper.isMaximized() ? zoomOpts.iconOut || getIcon().TOOLBAR_TOOLS_MINIMIZE : zoomOpts.iconIn || getIcon().TOOLBAR_TOOLS_FULLSCREEN,
|
|
649
|
-
title: getI18n(`vxe.toolbar.zoom${$xeGGWrapper.isMaximized() ?
|
|
541
|
+
title: getI18n(`vxe.toolbar.zoom${$xeGGWrapper.isMaximized() ? "Out" : "In"}`),
|
|
650
542
|
onClick: zoomEvent
|
|
651
|
-
}) : (0,
|
|
543
|
+
}) : (0, import_vue.createCommentVNode)();
|
|
652
544
|
};
|
|
653
545
|
const renderToolCustom = () => {
|
|
654
546
|
const customOpts = computeCustomOpts.value;
|
|
655
547
|
const btnTrigger = computeTrigger.value;
|
|
656
548
|
const customBtnOns = {};
|
|
657
|
-
if (btnTrigger ===
|
|
658
|
-
|
|
659
|
-
} else if (btnTrigger === 'hover') {
|
|
660
|
-
// hover 触发
|
|
549
|
+
if (btnTrigger === "manual") {
|
|
550
|
+
} else if (btnTrigger === "hover") {
|
|
661
551
|
customBtnOns.onMouseenter = handleMouseenterSettingEvent;
|
|
662
552
|
customBtnOns.onMouseleave = handleMouseleaveSettingEvent;
|
|
663
553
|
} else {
|
|
664
|
-
// 点击触发
|
|
665
554
|
customBtnOns.onClick = handleClickSettingEvent;
|
|
666
555
|
}
|
|
667
|
-
return VxeUIButtonComponent ? (0,
|
|
668
|
-
key:
|
|
556
|
+
return VxeUIButtonComponent ? (0, import_vue.h)(VxeUIButtonComponent, {
|
|
557
|
+
key: "custom",
|
|
669
558
|
circle: true,
|
|
670
559
|
icon: customOpts.icon || getIcon().TOOLBAR_TOOLS_CUSTOM,
|
|
671
|
-
title: getI18n(
|
|
672
|
-
className:
|
|
673
|
-
|
|
560
|
+
title: getI18n("vxe.toolbar.custom"),
|
|
561
|
+
className: "vxe-toolbar-custom-target",
|
|
562
|
+
...customBtnOns
|
|
563
|
+
}) : (0, import_vue.createCommentVNode)();
|
|
674
564
|
};
|
|
675
565
|
const renderVN = () => {
|
|
676
|
-
const {
|
|
677
|
-
perfect,
|
|
678
|
-
loading,
|
|
679
|
-
refresh,
|
|
680
|
-
zoom,
|
|
681
|
-
custom,
|
|
682
|
-
className
|
|
683
|
-
} = props;
|
|
566
|
+
const { perfect, loading, refresh, zoom, custom, className } = props;
|
|
684
567
|
const vSize = computeSize.value;
|
|
685
|
-
return (0,
|
|
568
|
+
return (0, import_vue.h)("div", {
|
|
686
569
|
ref: refElem,
|
|
687
|
-
class: [
|
|
688
|
-
$toolbar: $xeToolbar
|
|
689
|
-
}) : className : '', {
|
|
570
|
+
class: ["vxe-toolbar", className ? import_xe_utils.default.isFunction(className) ? className({ $toolbar: $xeToolbar }) : className : "", {
|
|
690
571
|
[`size--${vSize}`]: vSize,
|
|
691
|
-
|
|
692
|
-
|
|
572
|
+
"is--perfect": perfect,
|
|
573
|
+
"is--loading": loading
|
|
693
574
|
}]
|
|
694
|
-
}, [
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
575
|
+
}, [
|
|
576
|
+
(0, import_vue.h)("div", {
|
|
577
|
+
class: "vxe-buttons--wrapper"
|
|
578
|
+
}, renderLeftBtns()),
|
|
579
|
+
(0, import_vue.h)("div", {
|
|
580
|
+
class: "vxe-tools--wrapper"
|
|
581
|
+
}, renderRightTools()),
|
|
582
|
+
(0, import_vue.h)("div", {
|
|
583
|
+
class: "vxe-tools--operate"
|
|
584
|
+
}, [
|
|
585
|
+
props.import ? renderToolImport() : (0, import_vue.createCommentVNode)(),
|
|
586
|
+
props.export ? renderToolExport() : (0, import_vue.createCommentVNode)(),
|
|
587
|
+
props.print ? renderToolPrint() : (0, import_vue.createCommentVNode)(),
|
|
588
|
+
refresh ? renderToolRefresh() : (0, import_vue.createCommentVNode)(),
|
|
589
|
+
zoom && $xeGGWrapper ? renderToolZoom() : (0, import_vue.createCommentVNode)(),
|
|
590
|
+
custom ? renderToolCustom() : (0, import_vue.createCommentVNode)()
|
|
591
|
+
])
|
|
592
|
+
]);
|
|
701
593
|
};
|
|
702
594
|
$xeToolbar.renderVN = renderVN;
|
|
703
|
-
(0,
|
|
595
|
+
(0, import_vue.nextTick)(() => {
|
|
704
596
|
const refreshOpts = computeRefreshOpts.value;
|
|
705
597
|
const queryMethod = refreshOpts.queryMethod || refreshOpts.query;
|
|
706
598
|
if (props.refresh && !$xeGGWrapper && !queryMethod) {
|
|
707
|
-
warnLog(
|
|
599
|
+
warnLog("vxe.error.notFunc", ["queryMethod"]);
|
|
708
600
|
}
|
|
709
|
-
if (
|
|
710
|
-
warnLog(
|
|
601
|
+
if (import_xe_utils.default.isPlainObject(props.custom)) {
|
|
602
|
+
warnLog("vxe.error.delProp", ["custom={...}", "custom=boolean & custom-options={...}"]);
|
|
711
603
|
}
|
|
712
|
-
if (
|
|
713
|
-
warnLog(
|
|
604
|
+
if (import_xe_utils.default.isPlainObject(props.print)) {
|
|
605
|
+
warnLog("vxe.error.delProp", ["print={...}", "print=boolean & print-options={...}"]);
|
|
714
606
|
}
|
|
715
|
-
if (
|
|
716
|
-
warnLog(
|
|
607
|
+
if (import_xe_utils.default.isPlainObject(props.export)) {
|
|
608
|
+
warnLog("vxe.error.delProp", ["export={...}", "export=boolean & export-options={...}"]);
|
|
717
609
|
}
|
|
718
|
-
if (
|
|
719
|
-
warnLog(
|
|
610
|
+
if (import_xe_utils.default.isPlainObject(props.import)) {
|
|
611
|
+
warnLog("vxe.error.delProp", ["import={...}", "import=boolean & import-options={...}"]);
|
|
720
612
|
}
|
|
721
|
-
if (
|
|
722
|
-
warnLog(
|
|
613
|
+
if (import_xe_utils.default.isPlainObject(props.refresh)) {
|
|
614
|
+
warnLog("vxe.error.delProp", ["refresh={...}", "refresh=boolean & refresh-options={...}"]);
|
|
723
615
|
}
|
|
724
|
-
if (
|
|
725
|
-
warnLog(
|
|
616
|
+
if (import_xe_utils.default.isPlainObject(props.refresh)) {
|
|
617
|
+
warnLog("vxe.error.delProp", ["zoom={...}", "zoom=boolean & zoom-options={...}"]);
|
|
726
618
|
}
|
|
727
619
|
const customOpts = computeCustomOpts.value;
|
|
728
620
|
if (customOpts.isFooter) {
|
|
729
|
-
warnLog(
|
|
621
|
+
warnLog("vxe.error.delProp", ["toolbar.custom.isFooter", "table.custom-config.showFooter"]);
|
|
730
622
|
}
|
|
731
623
|
if (customOpts.showFooter) {
|
|
732
|
-
warnLog(
|
|
624
|
+
warnLog("vxe.error.delProp", ["toolbar.custom.showFooter", "table.custom-config.showFooter"]);
|
|
733
625
|
}
|
|
734
626
|
if (customOpts.immediate) {
|
|
735
|
-
warnLog(
|
|
627
|
+
warnLog("vxe.error.delProp", ["toolbar.custom.immediate", "table.custom-config.immediate"]);
|
|
736
628
|
}
|
|
737
629
|
if (customOpts.trigger) {
|
|
738
|
-
warnLog(
|
|
630
|
+
warnLog("vxe.error.delProp", ["toolbar.custom.trigger", "table.custom-config.trigger"]);
|
|
739
631
|
}
|
|
740
632
|
if (props.refresh || props.import || props.export || props.print || props.zoom) {
|
|
741
633
|
if (!VxeUIButtonComponent) {
|
|
742
|
-
errLog(
|
|
634
|
+
errLog("vxe.error.reqComp", ["vxe-button"]);
|
|
743
635
|
}
|
|
744
636
|
}
|
|
745
637
|
});
|
|
746
|
-
(0,
|
|
747
|
-
|
|
748
|
-
|
|
638
|
+
(0, import_vue.onBeforeUnmount)(() => {
|
|
639
|
+
import_xe_utils.default.assign(reactData, createReactData());
|
|
640
|
+
import_xe_utils.default.assign(internalData, createInternalData());
|
|
749
641
|
});
|
|
750
642
|
return $xeToolbar;
|
|
751
643
|
},
|
|
752
644
|
render() {
|
|
753
645
|
return this.renderVN();
|
|
754
646
|
}
|
|
755
|
-
});
|
|
647
|
+
});
|