vxe-table 4.23.4 → 4.23.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +32459 -33908
- package/dist/style.css +4501 -1
- package/dist/style.mini.css +1 -0
- package/es/colgroup/index.d.ts +760 -0
- package/es/colgroup/index.js +16 -13
- package/es/column/index.d.ts +760 -0
- package/es/column/index.js +16 -13
- package/es/components.d.ts +9 -0
- package/es/components.js +29 -29
- package/es/grid/index.d.ts +2824 -0
- package/es/grid/index.js +14 -9
- package/es/grid/src/emits.d.ts +2 -0
- package/es/grid/src/emits.js +18 -15
- package/es/grid/src/grid.d.ts +556 -0
- package/es/grid/src/grid.js +1695 -1758
- package/es/grid/src/props.d.ts +200 -0
- package/es/grid/src/props.js +19 -6
- package/es/{vxe-grid/style.min.css → grid/style.mini.css} +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.esm.js +6 -3
- package/es/index.js +6 -0
- package/es/locale/lang/ar-EG.d.ts +908 -2
- package/es/locale/lang/ar-EG.js +906 -903
- package/es/locale/lang/de-DE.d.ts +908 -2
- package/es/locale/lang/de-DE.js +906 -903
- package/es/locale/lang/en-US.d.ts +908 -2
- package/es/locale/lang/en-US.js +906 -903
- package/es/locale/lang/es-ES.d.ts +908 -2
- package/es/locale/lang/es-ES.js +906 -903
- package/es/locale/lang/fr-FR.d.ts +908 -2
- package/es/locale/lang/fr-FR.js +906 -903
- package/es/locale/lang/hu-HU.d.ts +908 -2
- package/es/locale/lang/hu-HU.js +906 -903
- package/es/locale/lang/hy-AM.d.ts +908 -2
- package/es/locale/lang/hy-AM.js +906 -903
- package/es/locale/lang/id-ID.d.ts +908 -2
- package/es/locale/lang/id-ID.js +906 -903
- package/es/locale/lang/it-IT.d.ts +908 -2
- package/es/locale/lang/it-IT.js +906 -903
- package/es/locale/lang/ja-JP.d.ts +908 -2
- package/es/locale/lang/ja-JP.js +906 -903
- package/es/locale/lang/ko-KR.d.ts +908 -2
- package/es/locale/lang/ko-KR.js +906 -903
- package/es/locale/lang/ms-MY.d.ts +908 -2
- package/es/locale/lang/ms-MY.js +906 -903
- package/es/locale/lang/nb-NO.d.ts +908 -2
- package/es/locale/lang/nb-NO.js +906 -903
- package/es/locale/lang/pt-BR.d.ts +908 -2
- package/es/locale/lang/pt-BR.js +906 -903
- package/es/locale/lang/ru-RU.d.ts +908 -2
- package/es/locale/lang/ru-RU.js +906 -903
- package/es/locale/lang/th-TH.d.ts +908 -2
- package/es/locale/lang/th-TH.js +906 -903
- package/es/locale/lang/ug-CN.d.ts +908 -2
- package/es/locale/lang/ug-CN.js +906 -903
- package/es/locale/lang/uk-UA.d.ts +908 -2
- package/es/locale/lang/uk-UA.js +906 -903
- package/es/locale/lang/uz-UZ.d.ts +908 -2
- package/es/locale/lang/uz-UZ.js +906 -903
- package/es/locale/lang/vi-VN.d.ts +908 -2
- package/es/locale/lang/vi-VN.js +906 -903
- package/es/locale/lang/zh-CHT.d.ts +908 -2
- package/es/locale/lang/zh-CHT.js +906 -903
- package/es/locale/lang/zh-CN.d.ts +908 -2
- package/es/locale/lang/zh-CN.js +906 -903
- package/es/locale/lang/zh-HK.d.ts +908 -2
- package/es/locale/lang/zh-HK.js +910 -2
- package/es/locale/lang/zh-MO.d.ts +908 -2
- package/es/locale/lang/zh-MO.js +910 -2
- package/es/locale/lang/zh-TC.d.ts +908 -0
- package/es/locale/lang/zh-TC.js +910 -2
- package/es/locale/lang/zh-TW.d.ts +908 -2
- package/es/locale/lang/zh-TW.js +910 -2
- package/es/table/index.d.ts +2672 -0
- package/es/table/index.js +16 -11
- package/es/table/module/custom/hook.d.ts +1 -0
- package/es/table/module/custom/hook.js +462 -483
- package/es/table/module/custom/panel.d.ts +17 -0
- package/es/table/module/custom/panel.js +1482 -1559
- package/es/table/module/edit/hook.d.ts +1 -0
- package/es/table/module/edit/hook.js +1008 -1078
- package/es/table/module/export/export-panel.d.ts +27 -0
- package/es/table/module/export/export-panel.js +523 -575
- package/es/table/module/export/hook.d.ts +1 -0
- package/es/table/module/export/hook.js +1805 -1884
- package/es/table/module/export/import-panel.d.ts +27 -0
- package/es/table/module/export/import-panel.js +244 -252
- package/es/table/module/export/util.d.ts +5 -0
- package/es/table/module/export/util.js +20 -17
- package/es/table/module/filter/hook.d.ts +1 -0
- package/es/table/module/filter/hook.js +472 -487
- package/es/table/module/filter/panel.d.ts +16 -0
- package/es/table/module/filter/panel.js +251 -275
- package/es/table/module/keyboard/hook.d.ts +1 -0
- package/es/table/module/keyboard/hook.js +445 -497
- package/es/table/module/menu/hook.d.ts +1 -0
- package/es/table/module/menu/hook.js +295 -315
- package/es/table/module/menu/panel.d.ts +2 -0
- package/es/table/module/menu/panel.js +164 -183
- package/es/table/module/validator/hook.d.ts +1 -0
- package/es/table/module/validator/hook.js +522 -571
- package/es/table/render/index.d.ts +1 -0
- package/es/table/render/index.js +1402 -1362
- package/es/table/src/body.d.ts +24 -0
- package/es/table/src/body.js +850 -865
- package/es/table/src/cell.d.ts +192 -0
- package/es/table/src/cell.js +1209 -1207
- package/es/table/src/column.d.ts +263 -0
- package/es/table/src/column.js +178 -174
- package/es/table/src/columnInfo.d.ts +13 -0
- package/es/table/src/columnInfo.js +202 -196
- package/es/table/src/emits.d.ts +2 -0
- package/es/table/src/emits.js +126 -119
- package/es/table/src/footer.d.ts +45 -0
- package/es/table/src/footer.js +336 -340
- package/es/table/src/group.d.ts +178 -0
- package/es/table/src/group.js +49 -46
- package/es/table/src/header.d.ts +26 -0
- package/es/table/src/header.js +517 -519
- package/es/table/src/props.d.ts +238 -0
- package/es/table/src/props.js +331 -328
- package/es/table/src/store.d.ts +6 -0
- package/es/table/src/store.js +9 -6
- package/es/table/src/table.d.ts +539 -0
- package/es/table/src/table.js +14064 -15041
- package/es/table/src/use/cell-view.d.ts +10 -0
- package/es/table/src/use/cell-view.js +36 -33
- package/es/table/src/use/index.d.ts +1 -0
- package/es/table/src/use/index.js +1 -1
- package/es/table/src/util.d.ts +74 -0
- package/es/table/src/util.js +1038 -1026
- package/es/table/style.css +1 -1
- package/es/table/style.mini.css +1 -0
- package/es/toolbar/index.d.ts +340 -0
- package/es/toolbar/index.js +14 -9
- package/es/toolbar/src/toolbar.d.ts +75 -0
- package/es/toolbar/src/toolbar.js +605 -613
- package/es/toolbar/{style.min.css → style.mini.css} +1 -1
- package/es/ui/index.d.ts +86 -0
- package/es/ui/index.js +457 -501
- package/es/ui/src/anime.d.ts +10 -0
- package/es/ui/src/anime.js +40 -40
- package/es/ui/src/comp.d.ts +2 -0
- package/es/ui/src/comp.js +5 -2
- package/es/ui/src/dom.d.ts +80 -0
- package/es/ui/src/dom.js +377 -380
- package/es/ui/src/log.d.ts +6 -0
- package/es/ui/src/log.js +18 -13
- package/es/ui/src/utils.d.ts +23 -0
- package/es/ui/src/utils.js +57 -53
- package/es/ui/src/vn.d.ts +7 -0
- package/es/ui/src/vn.js +49 -42
- package/es/v-x-e-table/index.d.ts +3 -0
- package/es/v-x-e-table/index.js +6 -3
- package/es/vxe-colgroup/index.d.ts +3 -0
- package/es/vxe-colgroup/index.js +6 -3
- package/es/vxe-column/index.d.ts +3 -0
- package/es/vxe-column/index.js +6 -3
- package/es/vxe-grid/index.d.ts +3 -0
- package/es/vxe-grid/index.js +6 -3
- package/{lib/grid/style/style.min.css → es/vxe-grid/style.mini.css} +1 -1
- package/es/vxe-table/index.d.ts +3 -0
- package/es/vxe-table/index.js +6 -3
- package/es/vxe-table/style.css +1 -1
- package/es/vxe-table/style.mini.css +1 -0
- package/es/vxe-toolbar/index.d.ts +3 -0
- package/es/vxe-toolbar/index.js +6 -3
- package/es/vxe-toolbar/{style.min.css → style.mini.css} +1 -1
- package/es/vxe-ui/index.d.ts +3 -0
- package/es/vxe-ui/index.js +6 -3
- package/lib/colgroup/index.js +44 -18
- package/lib/colgroup/style/index.js +1 -1
- package/lib/column/index.js +44 -18
- package/lib/column/style/index.js +1 -1
- package/lib/components.js +58 -92
- package/lib/grid/index.js +42 -14
- package/lib/grid/src/emits.js +37 -6
- package/lib/grid/src/grid.js +850 -1195
- package/lib/grid/src/props.js +27 -11
- package/lib/grid/style/index.js +1 -1
- package/lib/{vxe-grid/style/style.min.css → grid/style/style.mini.css} +1 -1
- package/lib/iconfont.1792977622800.ttf +0 -0
- package/lib/iconfont.1792977622800.woff +0 -0
- package/lib/iconfont.1792977622800.woff2 +0 -0
- package/lib/index.common.js +35 -19
- package/lib/index.js +37 -0
- package/lib/index.umd.js +30586 -24322
- package/lib/index.umd.min.js +3 -1
- package/lib/locale/ar-EG.umd.js +948 -0
- package/lib/locale/de-DE.umd.js +948 -0
- package/lib/locale/en-US.umd.js +948 -0
- package/lib/locale/es-ES.umd.js +948 -0
- package/lib/locale/fr-FR.umd.js +948 -0
- package/lib/locale/hu-HU.umd.js +948 -0
- package/lib/locale/hy-AM.umd.js +948 -0
- package/lib/locale/id-ID.umd.js +948 -0
- package/lib/locale/it-IT.umd.js +948 -0
- package/lib/locale/ja-JP.umd.js +948 -0
- package/lib/locale/ko-KR.umd.js +948 -0
- package/lib/locale/lang/ar-EG.js +681 -664
- package/lib/locale/lang/ar-EG.umd.js +913 -892
- package/lib/locale/lang/de-DE.js +681 -664
- package/lib/locale/lang/de-DE.umd.js +913 -892
- package/lib/locale/lang/en-US.js +678 -661
- package/lib/locale/lang/en-US.umd.js +913 -892
- package/lib/locale/lang/es-ES.js +681 -664
- package/lib/locale/lang/es-ES.umd.js +913 -892
- package/lib/locale/lang/fr-FR.js +654 -637
- package/lib/locale/lang/fr-FR.umd.js +913 -892
- package/lib/locale/lang/hu-HU.js +681 -664
- package/lib/locale/lang/hu-HU.umd.js +913 -892
- package/lib/locale/lang/hy-AM.js +681 -664
- package/lib/locale/lang/hy-AM.umd.js +913 -892
- package/lib/locale/lang/id-ID.js +681 -664
- package/lib/locale/lang/id-ID.umd.js +913 -892
- package/lib/locale/lang/it-IT.js +661 -644
- package/lib/locale/lang/it-IT.umd.js +912 -891
- package/lib/locale/lang/ja-JP.js +710 -693
- package/lib/locale/lang/ja-JP.umd.js +913 -892
- package/lib/locale/lang/ko-KR.js +681 -664
- package/lib/locale/lang/ko-KR.umd.js +913 -892
- package/lib/locale/lang/ms-MY.js +681 -664
- package/lib/locale/lang/ms-MY.umd.js +913 -892
- package/lib/locale/lang/nb-NO.js +681 -664
- package/lib/locale/lang/nb-NO.umd.js +913 -892
- package/lib/locale/lang/pt-BR.js +681 -664
- package/lib/locale/lang/pt-BR.umd.js +913 -892
- package/lib/locale/lang/ru-RU.js +690 -673
- package/lib/locale/lang/ru-RU.umd.js +913 -892
- package/lib/locale/lang/th-TH.js +681 -664
- package/lib/locale/lang/th-TH.umd.js +913 -892
- package/lib/locale/lang/ug-CN.js +681 -664
- package/lib/locale/lang/ug-CN.umd.js +913 -892
- package/lib/locale/lang/uk-UA.js +674 -657
- package/lib/locale/lang/uk-UA.umd.js +913 -892
- package/lib/locale/lang/uz-UZ.js +583 -566
- package/lib/locale/lang/uz-UZ.umd.js +908 -887
- package/lib/locale/lang/vi-VN.js +681 -664
- package/lib/locale/lang/vi-VN.umd.js +913 -892
- package/lib/locale/lang/zh-CHT.js +681 -664
- package/lib/locale/lang/zh-CHT.umd.js +913 -892
- package/lib/locale/lang/zh-CN.js +681 -664
- package/lib/locale/lang/zh-CN.umd.js +913 -892
- package/lib/locale/lang/zh-HK.js +928 -7
- package/lib/locale/lang/zh-HK.umd.js +945 -20
- package/lib/locale/lang/zh-MO.js +928 -7
- package/lib/locale/lang/zh-MO.umd.js +945 -20
- package/lib/locale/lang/zh-TC.js +928 -7
- package/lib/locale/lang/zh-TC.umd.js +948 -0
- package/lib/locale/lang/zh-TW.js +928 -7
- package/lib/locale/lang/zh-TW.umd.js +945 -20
- package/lib/locale/ms-MY.umd.js +948 -0
- package/lib/locale/nb-NO.umd.js +948 -0
- package/lib/locale/pt-BR.umd.js +948 -0
- package/lib/locale/ru-RU.umd.js +948 -0
- package/lib/locale/th-TH.umd.js +948 -0
- package/lib/locale/ug-CN.umd.js +948 -0
- package/lib/locale/uk-UA.umd.js +948 -0
- package/lib/locale/uz-UZ.umd.js +948 -0
- package/lib/locale/vi-VN.umd.js +948 -0
- package/lib/locale/zh-CHT.umd.js +948 -0
- package/lib/locale/zh-CN.umd.js +948 -0
- package/lib/locale/zh-HK.umd.js +948 -0
- package/lib/locale/zh-MO.umd.js +948 -0
- package/lib/locale/zh-TC.umd.js +948 -0
- package/lib/locale/zh-TW.umd.js +948 -0
- package/lib/style.css +4501 -1
- package/lib/style.mini.css +1 -0
- package/lib/table/index.js +45 -17
- package/lib/table/module/custom/hook.js +132 -252
- package/lib/table/module/custom/panel.js +919 -970
- package/lib/table/module/edit/hook.js +250 -620
- package/lib/table/module/export/export-panel.js +390 -347
- package/lib/table/module/export/hook.js +745 -1179
- package/lib/table/module/export/import-panel.js +170 -136
- package/lib/table/module/export/util.js +37 -14
- package/lib/table/module/filter/hook.js +127 -227
- package/lib/table/module/filter/panel.js +177 -208
- package/lib/table/module/keyboard/hook.js +93 -172
- package/lib/table/module/menu/hook.js +86 -165
- package/lib/table/module/menu/panel.js +176 -141
- package/lib/table/module/validator/hook.js +164 -271
- package/lib/table/render/index.js +700 -1147
- package/lib/table/src/body.js +426 -559
- package/lib/table/src/cell.js +619 -987
- package/lib/table/src/column.js +55 -30
- package/lib/table/src/columnInfo.js +88 -110
- package/lib/table/src/emits.js +145 -13
- package/lib/table/src/footer.js +181 -240
- package/lib/table/src/group.js +56 -34
- package/lib/table/src/header.js +292 -367
- package/lib/table/src/props.js +27 -12
- package/lib/table/src/store.js +25 -9
- package/lib/table/src/table.js +14179 -1019
- package/lib/table/src/use/cell-view.js +47 -37
- package/lib/table/src/use/index.js +17 -15
- package/lib/table/src/util.js +236 -337
- package/lib/table/style/index.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.mini.css +1 -0
- package/lib/toolbar/index.js +42 -14
- package/lib/toolbar/src/toolbar.js +271 -379
- package/lib/toolbar/style/index.js +1 -1
- package/lib/toolbar/style/{style.min.css → style.mini.css} +1 -1
- package/lib/ui/index.js +153 -195
- package/lib/ui/src/anime.js +49 -29
- package/lib/ui/src/comp.js +23 -6
- package/lib/ui/src/dom.js +114 -147
- package/lib/ui/src/log.js +34 -18
- package/lib/ui/src/utils.js +57 -45
- package/lib/ui/src/vn.js +60 -34
- package/lib/ui/style/index.js +1 -1
- package/lib/v-x-e-table/index.js +35 -19
- package/lib/vxe-colgroup/index.js +35 -19
- package/lib/vxe-colgroup/style/index.js +1 -1
- package/lib/vxe-column/index.js +35 -19
- package/lib/vxe-column/style/index.js +1 -1
- package/lib/vxe-grid/index.js +35 -19
- package/lib/vxe-grid/style/index.js +1 -1
- package/{es/grid/style.min.css → lib/vxe-grid/style/style.mini.css} +1 -1
- package/lib/vxe-table/index.js +35 -19
- package/lib/vxe-table/style/index.js +1 -1
- package/lib/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.mini.css +1 -0
- package/lib/vxe-toolbar/index.js +35 -19
- package/lib/vxe-toolbar/style/index.js +1 -1
- package/lib/vxe-toolbar/style/{style.min.css → style.mini.css} +1 -1
- package/lib/vxe-ui/index.js +35 -19
- package/lib/vxe-ui/style/index.js +1 -1
- package/package.json +8 -4
- package/packages/locale/lang/zh-HK.ts +907 -3
- package/packages/locale/lang/zh-MO.ts +907 -3
- package/packages/locale/lang/zh-TC.ts +907 -3
- package/packages/locale/lang/zh-TW.ts +907 -3
- package/packages/table/module/edit/hook.ts +2 -2
- package/packages/table/src/table.ts +64 -28
- package/packages/ui/index.ts +1 -28
- package/dist/style.min.css +0 -1
- package/es/index.css +0 -1
- package/es/index.min.css +0 -1
- package/es/style.css +0 -1
- package/es/style.min.css +0 -1
- package/es/table/style.min.css +0 -1
- package/es/vxe-table/style.min.css +0 -1
- package/es/vxe-v-x-e-table/index.js +0 -3
- package/lib/colgroup/index.min.js +0 -1
- package/lib/column/index.min.js +0 -1
- package/lib/components.min.js +0 -1
- package/lib/grid/index.min.js +0 -1
- package/lib/grid/src/emits.min.js +0 -1
- package/lib/grid/src/grid.min.js +0 -1
- package/lib/grid/src/props.min.js +0 -1
- package/lib/index.css +0 -1
- package/lib/index.min.css +0 -1
- package/lib/locale/lang/ar-EG.d.ts +0 -2
- package/lib/locale/lang/ar-EG.min.js +0 -1
- package/lib/locale/lang/de-DE.d.ts +0 -2
- package/lib/locale/lang/de-DE.min.js +0 -1
- package/lib/locale/lang/en-US.d.ts +0 -2
- package/lib/locale/lang/en-US.min.js +0 -1
- package/lib/locale/lang/es-ES.d.ts +0 -2
- package/lib/locale/lang/es-ES.min.js +0 -1
- package/lib/locale/lang/fr-FR.d.ts +0 -2
- package/lib/locale/lang/fr-FR.min.js +0 -1
- package/lib/locale/lang/hu-HU.d.ts +0 -2
- package/lib/locale/lang/hu-HU.min.js +0 -1
- package/lib/locale/lang/hy-AM.d.ts +0 -2
- package/lib/locale/lang/hy-AM.min.js +0 -1
- package/lib/locale/lang/id-ID.d.ts +0 -2
- package/lib/locale/lang/id-ID.min.js +0 -1
- package/lib/locale/lang/it-IT.d.ts +0 -2
- package/lib/locale/lang/it-IT.min.js +0 -1
- package/lib/locale/lang/ja-JP.d.ts +0 -2
- package/lib/locale/lang/ja-JP.min.js +0 -1
- package/lib/locale/lang/ko-KR.d.ts +0 -2
- package/lib/locale/lang/ko-KR.min.js +0 -1
- package/lib/locale/lang/ms-MY.d.ts +0 -2
- package/lib/locale/lang/ms-MY.min.js +0 -1
- package/lib/locale/lang/nb-NO.d.ts +0 -2
- package/lib/locale/lang/nb-NO.min.js +0 -1
- package/lib/locale/lang/pt-BR.d.ts +0 -2
- package/lib/locale/lang/pt-BR.min.js +0 -1
- package/lib/locale/lang/ru-RU.d.ts +0 -2
- package/lib/locale/lang/ru-RU.min.js +0 -1
- package/lib/locale/lang/th-TH.d.ts +0 -2
- package/lib/locale/lang/th-TH.min.js +0 -1
- package/lib/locale/lang/ug-CN.d.ts +0 -2
- package/lib/locale/lang/ug-CN.min.js +0 -1
- package/lib/locale/lang/uk-UA.d.ts +0 -2
- package/lib/locale/lang/uk-UA.min.js +0 -1
- package/lib/locale/lang/uz-UZ.d.ts +0 -2
- package/lib/locale/lang/uz-UZ.min.js +0 -1
- package/lib/locale/lang/vi-VN.d.ts +0 -2
- package/lib/locale/lang/vi-VN.min.js +0 -1
- package/lib/locale/lang/zh-CHT.d.ts +0 -2
- package/lib/locale/lang/zh-CHT.min.js +0 -1
- package/lib/locale/lang/zh-CN.d.ts +0 -2
- package/lib/locale/lang/zh-CN.min.js +0 -1
- package/lib/locale/lang/zh-HK.d.ts +0 -2
- package/lib/locale/lang/zh-HK.min.js +0 -1
- package/lib/locale/lang/zh-MO.d.ts +0 -2
- package/lib/locale/lang/zh-MO.min.js +0 -1
- package/lib/locale/lang/zh-TC.min.js +0 -1
- package/lib/locale/lang/zh-TW.d.ts +0 -2
- package/lib/locale/lang/zh-TW.min.js +0 -1
- package/lib/style.min.css +0 -1
- package/lib/table/index.min.js +0 -1
- package/lib/table/module/custom/hook.min.js +0 -1
- package/lib/table/module/custom/panel.min.js +0 -1
- package/lib/table/module/edit/hook.min.js +0 -1
- package/lib/table/module/export/export-panel.min.js +0 -1
- package/lib/table/module/export/hook.min.js +0 -1
- package/lib/table/module/export/import-panel.min.js +0 -1
- package/lib/table/module/export/util.min.js +0 -1
- package/lib/table/module/filter/hook.min.js +0 -1
- package/lib/table/module/filter/panel.min.js +0 -1
- package/lib/table/module/keyboard/hook.min.js +0 -1
- package/lib/table/module/menu/hook.min.js +0 -1
- package/lib/table/module/menu/panel.min.js +0 -1
- package/lib/table/module/validator/hook.min.js +0 -1
- package/lib/table/render/index.min.js +0 -1
- package/lib/table/src/body.min.js +0 -1
- package/lib/table/src/cell.min.js +0 -1
- package/lib/table/src/column.min.js +0 -1
- package/lib/table/src/columnInfo.min.js +0 -1
- package/lib/table/src/emits.min.js +0 -1
- package/lib/table/src/footer.min.js +0 -1
- package/lib/table/src/group.min.js +0 -1
- package/lib/table/src/header.min.js +0 -1
- package/lib/table/src/props.min.js +0 -1
- package/lib/table/src/store.min.js +0 -1
- package/lib/table/src/table.min.js +0 -1
- package/lib/table/src/use/cell-view.min.js +0 -1
- package/lib/table/src/use/index.min.js +0 -1
- package/lib/table/src/util.min.js +0 -1
- package/lib/table/style/style.min.css +0 -1
- package/lib/toolbar/index.min.js +0 -1
- package/lib/toolbar/src/toolbar.min.js +0 -1
- package/lib/ui/index.min.js +0 -1
- package/lib/ui/src/anime.min.js +0 -1
- package/lib/ui/src/comp.min.js +0 -1
- package/lib/ui/src/dom.min.js +0 -1
- package/lib/ui/src/log.min.js +0 -1
- package/lib/ui/src/utils.min.js +0 -1
- package/lib/ui/src/vn.min.js +0 -1
- package/lib/ui/style/style.min.css +0 -0
- package/lib/v-x-e-table/index.min.js +0 -1
- package/lib/v-x-e-table/style/index.js +0 -1
- package/lib/v-x-e-table/style/style.css +0 -0
- package/lib/v-x-e-table/style/style.min.css +0 -0
- package/lib/vxe-colgroup/index.min.js +0 -1
- package/lib/vxe-colgroup/style/style.min.css +0 -0
- package/lib/vxe-column/index.min.js +0 -1
- package/lib/vxe-column/style/style.min.css +0 -0
- package/lib/vxe-grid/index.min.js +0 -1
- package/lib/vxe-table/index.min.js +0 -1
- package/lib/vxe-table/style/style.min.css +0 -1
- package/lib/vxe-toolbar/index.min.js +0 -1
- package/lib/vxe-ui/index.min.js +0 -1
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/lib/vxe-v-x-e-table/index.js +0 -21
- package/lib/vxe-v-x-e-table/index.min.js +0 -1
- package/lib/vxe-v-x-e-table/style/index.js +0 -1
- package/lib/vxe-v-x-e-table/style/style.css +0 -0
- package/lib/vxe-v-x-e-table/style/style.min.css +0 -0
- /package/{es/iconfont.1792740941484.ttf → dist/iconfont.1792977622800.ttf} +0 -0
- /package/{es/iconfont.1792740941484.woff → dist/iconfont.1792977622800.woff} +0 -0
- /package/{es/iconfont.1792740941484.woff2 → dist/iconfont.1792977622800.woff2} +0 -0
- /package/es/colgroup/{style.min.css → style.mini.css} +0 -0
- /package/es/column/{style.min.css → style.mini.css} +0 -0
- /package/{lib/iconfont.1792740941484.ttf → es/iconfont.1792977622800.ttf} +0 -0
- /package/{lib/iconfont.1792740941484.woff → es/iconfont.1792977622800.woff} +0 -0
- /package/{lib/iconfont.1792740941484.woff2 → es/iconfont.1792977622800.woff2} +0 -0
- /package/es/ui/{style.min.css → style.mini.css} +0 -0
- /package/es/{v-x-e-table/style.css → vxe-colgroup/style.mini.css} +0 -0
- /package/es/{v-x-e-table/style.min.css → vxe-column/style.mini.css} +0 -0
- /package/es/{vxe-colgroup/style.min.css → vxe-ui/style.mini.css} +0 -0
- /package/{es/vxe-column/style.min.css → lib/colgroup/style/style.mini.css} +0 -0
- /package/{es/vxe-ui/style.min.css → lib/column/style/style.mini.css} +0 -0
- /package/{es/vxe-v-x-e-table/style.css → lib/ui/style/style.mini.css} +0 -0
- /package/{es/vxe-v-x-e-table/style.min.css → lib/vxe-colgroup/style/style.mini.css} +0 -0
- /package/lib/{colgroup/style/style.min.css → vxe-column/style/style.mini.css} +0 -0
- /package/lib/{column/style/style.min.css → vxe-ui/style/style.mini.css} +0 -0
|
@@ -1,99 +1,82 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var import_vue = require("vue");
|
|
25
|
+
var import_xe_utils = __toESM(require("xe-utils"));
|
|
26
|
+
var import_ui = require("../../ui");
|
|
27
|
+
var import_util = require("../../table/src/util");
|
|
28
|
+
var import_utils = require("../../ui/src/utils");
|
|
29
|
+
var import_vn = require("../../ui/src/vn");
|
|
30
|
+
var import_log = require("../../ui/src/log");
|
|
31
|
+
const { errLog } = (0, import_log.createComponentLog)("table");
|
|
32
|
+
const { getConfig, renderer, getI18n, getComponent } = import_ui.VxeUI;
|
|
33
|
+
const componentDefaultModelProp = "modelValue";
|
|
21
34
|
const defaultCompProps = {};
|
|
22
35
|
function handleDefaultValue(value, defaultVal, initVal) {
|
|
23
|
-
return
|
|
36
|
+
return import_xe_utils.default.eqNull(value) ? import_xe_utils.default.eqNull(defaultVal) ? initVal : defaultVal : value;
|
|
24
37
|
}
|
|
25
38
|
function parseDate(value, props) {
|
|
26
|
-
return value && props.valueFormat ?
|
|
39
|
+
return value && props.valueFormat ? import_xe_utils.default.toStringDate(value, props.valueFormat) : value;
|
|
27
40
|
}
|
|
28
41
|
function getFormatDate(value, props, defaultFormat) {
|
|
29
|
-
const {
|
|
30
|
-
|
|
31
|
-
} = props;
|
|
32
|
-
return _xeUtils.default.toDateString(parseDate(value, props), dateConfig.labelFormat || defaultFormat);
|
|
42
|
+
const { dateConfig = {} } = props;
|
|
43
|
+
return import_xe_utils.default.toDateString(parseDate(value, props), dateConfig.labelFormat || defaultFormat);
|
|
33
44
|
}
|
|
34
45
|
function getLabelFormatDate(value, props) {
|
|
35
|
-
return getFormatDate(value, props, getI18n(`vxe.input.date.labelFormat.${props.type ||
|
|
46
|
+
return getFormatDate(value, props, getI18n(`vxe.input.date.labelFormat.${props.type || "date"}`));
|
|
36
47
|
}
|
|
37
|
-
/**
|
|
38
|
-
* 已废弃
|
|
39
|
-
* @deprecated
|
|
40
|
-
*/
|
|
41
48
|
function getOldComponentName(name) {
|
|
42
|
-
return `vxe-${name.replace(
|
|
49
|
+
return `vxe-${name.replace("$", "")}`;
|
|
43
50
|
}
|
|
44
|
-
function getDefaultComponent({
|
|
45
|
-
name
|
|
46
|
-
}) {
|
|
51
|
+
function getDefaultComponent({ name }) {
|
|
47
52
|
return getComponent(name);
|
|
48
53
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @deprecated
|
|
52
|
-
*/
|
|
53
|
-
function getOldComponent({
|
|
54
|
-
name
|
|
55
|
-
}) {
|
|
56
|
-
return (0, _vue.resolveComponent)(getOldComponentName(name));
|
|
54
|
+
function getOldComponent({ name }) {
|
|
55
|
+
return (0, import_vue.resolveComponent)(getOldComponentName(name));
|
|
57
56
|
}
|
|
58
57
|
function updateFilterChangeOption(params, checked, option) {
|
|
59
|
-
const {
|
|
60
|
-
$table
|
|
61
|
-
} = params;
|
|
58
|
+
const { $table } = params;
|
|
62
59
|
$table.updateFilterOptionStatus(option, checked);
|
|
63
60
|
}
|
|
64
61
|
function saveFilterEvent(params) {
|
|
65
|
-
const {
|
|
66
|
-
|
|
67
|
-
column
|
|
68
|
-
} = params;
|
|
69
|
-
$table.saveFilterByEvent(new Event('change'), column);
|
|
62
|
+
const { $table, column } = params;
|
|
63
|
+
$table.saveFilterByEvent(new Event("change"), column);
|
|
70
64
|
}
|
|
71
65
|
function getNativeAttrs(renderOpts) {
|
|
72
|
-
let {
|
|
73
|
-
|
|
74
|
-
attrs
|
|
75
|
-
} = renderOpts;
|
|
76
|
-
if (name === 'input') {
|
|
77
|
-
attrs = Object.assign({
|
|
78
|
-
type: 'text'
|
|
79
|
-
}, attrs);
|
|
66
|
+
let { name, attrs } = renderOpts;
|
|
67
|
+
if (name === "input") {
|
|
68
|
+
attrs = Object.assign({ type: "text" }, attrs);
|
|
80
69
|
}
|
|
81
70
|
return attrs;
|
|
82
71
|
}
|
|
83
72
|
function getInputImmediateModel(renderOpts) {
|
|
84
|
-
const {
|
|
85
|
-
name,
|
|
86
|
-
immediate,
|
|
87
|
-
props
|
|
88
|
-
} = renderOpts;
|
|
73
|
+
const { name, immediate, props } = renderOpts;
|
|
89
74
|
if (!immediate) {
|
|
90
|
-
if (name ===
|
|
91
|
-
const {
|
|
92
|
-
|
|
93
|
-
} = props || {};
|
|
94
|
-
return !(!type || type === 'text' || type === 'number' || type === 'integer' || type === 'float');
|
|
75
|
+
if (name === "VxeInput" || name === "$input") {
|
|
76
|
+
const { type } = props || {};
|
|
77
|
+
return !(!type || type === "text" || type === "number" || type === "integer" || type === "float");
|
|
95
78
|
}
|
|
96
|
-
if (name ===
|
|
79
|
+
if (name === "input" || name === "textarea" || name === "$textarea") {
|
|
97
80
|
return false;
|
|
98
81
|
}
|
|
99
82
|
return true;
|
|
@@ -101,60 +84,43 @@ function getInputImmediateModel(renderOpts) {
|
|
|
101
84
|
return immediate;
|
|
102
85
|
}
|
|
103
86
|
function getCellEditProps(renderOpts, params, value, defaultProps) {
|
|
104
|
-
return
|
|
105
|
-
immediate: getInputImmediateModel(renderOpts)
|
|
106
|
-
}, defaultCompProps, defaultProps, renderOpts.props, {
|
|
107
|
-
[componentDefaultModelProp]: value
|
|
108
|
-
});
|
|
87
|
+
return import_xe_utils.default.assign({ immediate: getInputImmediateModel(renderOpts) }, defaultCompProps, defaultProps, renderOpts.props, { [componentDefaultModelProp]: value });
|
|
109
88
|
}
|
|
110
89
|
function getCellEditFilterProps(renderOpts, params, value, defaultProps) {
|
|
111
|
-
return
|
|
112
|
-
[componentDefaultModelProp]: value
|
|
113
|
-
});
|
|
90
|
+
return import_xe_utils.default.assign({}, defaultCompProps, defaultProps, renderOpts.props, { [componentDefaultModelProp]: value });
|
|
114
91
|
}
|
|
115
92
|
function isImmediateCell(renderOpts, params) {
|
|
116
|
-
return params.$type ===
|
|
93
|
+
return params.$type === "cell" || getInputImmediateModel(renderOpts);
|
|
117
94
|
}
|
|
118
95
|
function getCellLabelVNs(renderOpts, params, cellLabel, opts) {
|
|
119
|
-
const {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
96
|
+
const { placeholder } = renderOpts;
|
|
97
|
+
return [
|
|
98
|
+
(0, import_vue.h)("span", {
|
|
99
|
+
key: 1,
|
|
100
|
+
class: ["vxe-cell--label", opts ? opts.class : ""]
|
|
101
|
+
}, placeholder && (0, import_utils.isEmptyValue)(cellLabel) ? [
|
|
102
|
+
(0, import_vue.h)("span", {
|
|
103
|
+
class: "vxe-cell--placeholder"
|
|
104
|
+
}, (0, import_utils.formatText)((0, import_utils.getFuncText)(placeholder), 1))
|
|
105
|
+
] : (0, import_utils.formatText)(cellLabel, 1))
|
|
106
|
+
];
|
|
128
107
|
}
|
|
129
|
-
/**
|
|
130
|
-
* 原生事件处理
|
|
131
|
-
* @param renderOpts
|
|
132
|
-
* @param params
|
|
133
|
-
* @param modelFunc
|
|
134
|
-
* @param changeFunc
|
|
135
|
-
*/
|
|
136
108
|
function getNativeElementOns(renderOpts, params, eFns) {
|
|
137
|
-
const {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
const changeEvent = (0, _vn.getChangeEvent)(renderOpts);
|
|
142
|
-
const {
|
|
143
|
-
model: modelFunc,
|
|
144
|
-
change: changeFunc,
|
|
145
|
-
blur: blurFunc
|
|
146
|
-
} = eFns || {};
|
|
109
|
+
const { events } = renderOpts;
|
|
110
|
+
const modelEvent = (0, import_vn.getModelEvent)(renderOpts);
|
|
111
|
+
const changeEvent = (0, import_vn.getChangeEvent)(renderOpts);
|
|
112
|
+
const { model: modelFunc, change: changeFunc, blur: blurFunc } = eFns || {};
|
|
147
113
|
const isSameEvent = changeEvent === modelEvent;
|
|
148
114
|
const ons = {};
|
|
149
115
|
if (events) {
|
|
150
|
-
|
|
151
|
-
ons[(0,
|
|
116
|
+
import_xe_utils.default.objectEach(events, (func, key) => {
|
|
117
|
+
ons[(0, import_vn.getOnName)(key)] = function(...args) {
|
|
152
118
|
func(params, ...args);
|
|
153
119
|
};
|
|
154
120
|
});
|
|
155
121
|
}
|
|
156
122
|
if (modelFunc) {
|
|
157
|
-
ons[(0,
|
|
123
|
+
ons[(0, import_vn.getOnName)(modelEvent)] = function(targetEvnt) {
|
|
158
124
|
modelFunc(targetEvnt);
|
|
159
125
|
if (isSameEvent && changeFunc) {
|
|
160
126
|
changeFunc(targetEvnt);
|
|
@@ -165,7 +131,7 @@ function getNativeElementOns(renderOpts, params, eFns) {
|
|
|
165
131
|
};
|
|
166
132
|
}
|
|
167
133
|
if (!isSameEvent && changeFunc) {
|
|
168
|
-
ons[(0,
|
|
134
|
+
ons[(0, import_vn.getOnName)(changeEvent)] = function(evnt) {
|
|
169
135
|
changeFunc(evnt);
|
|
170
136
|
if (events && events[changeEvent]) {
|
|
171
137
|
events[changeEvent](params, evnt);
|
|
@@ -173,7 +139,7 @@ function getNativeElementOns(renderOpts, params, eFns) {
|
|
|
173
139
|
};
|
|
174
140
|
}
|
|
175
141
|
if (blurFunc) {
|
|
176
|
-
ons[(0,
|
|
142
|
+
ons[(0, import_vn.getOnName)(blurEvent)] = function(evnt) {
|
|
177
143
|
blurFunc(evnt);
|
|
178
144
|
if (events && events[blurEvent]) {
|
|
179
145
|
events[blurEvent](params, evnt);
|
|
@@ -182,38 +148,24 @@ function getNativeElementOns(renderOpts, params, eFns) {
|
|
|
182
148
|
}
|
|
183
149
|
return ons;
|
|
184
150
|
}
|
|
185
|
-
const blurEvent =
|
|
186
|
-
const clearEvent =
|
|
187
|
-
/**
|
|
188
|
-
* 组件事件处理
|
|
189
|
-
* @param renderOpts
|
|
190
|
-
* @param params
|
|
191
|
-
* @param modelFunc
|
|
192
|
-
* @param changeFunc
|
|
193
|
-
*/
|
|
151
|
+
const blurEvent = "blur";
|
|
152
|
+
const clearEvent = "clear";
|
|
194
153
|
function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
195
|
-
const {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
const changeEvent = (0, _vn.getChangeEvent)(renderOpts);
|
|
200
|
-
const {
|
|
201
|
-
model: modelFunc,
|
|
202
|
-
change: changeFunc,
|
|
203
|
-
blur: blurFunc,
|
|
204
|
-
clear: clearFunc
|
|
205
|
-
} = eFns || {};
|
|
154
|
+
const { events } = renderOpts;
|
|
155
|
+
const modelEvent = (0, import_vn.getModelEvent)(renderOpts);
|
|
156
|
+
const changeEvent = (0, import_vn.getChangeEvent)(renderOpts);
|
|
157
|
+
const { model: modelFunc, change: changeFunc, blur: blurFunc, clear: clearFunc } = eFns || {};
|
|
206
158
|
const ons = {};
|
|
207
|
-
|
|
208
|
-
ons[(0,
|
|
209
|
-
if (!
|
|
210
|
-
errLog(
|
|
159
|
+
import_xe_utils.default.objectEach(events, (func, key) => {
|
|
160
|
+
ons[(0, import_vn.getOnName)(key)] = function(...args) {
|
|
161
|
+
if (!import_xe_utils.default.isFunction(func)) {
|
|
162
|
+
errLog("vxe.error.errFunc", [func]);
|
|
211
163
|
}
|
|
212
164
|
func(params, ...args);
|
|
213
165
|
};
|
|
214
166
|
});
|
|
215
167
|
if (modelFunc) {
|
|
216
|
-
ons[(0,
|
|
168
|
+
ons[(0, import_vn.getOnName)(modelEvent)] = function(targetEvnt) {
|
|
217
169
|
modelFunc(targetEvnt);
|
|
218
170
|
if (events && events[modelEvent]) {
|
|
219
171
|
events[modelEvent](params, targetEvnt);
|
|
@@ -221,7 +173,7 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
|
221
173
|
};
|
|
222
174
|
}
|
|
223
175
|
if (changeFunc) {
|
|
224
|
-
ons[(0,
|
|
176
|
+
ons[(0, import_vn.getOnName)(changeEvent)] = function(...args) {
|
|
225
177
|
changeFunc(...args);
|
|
226
178
|
if (events && events[changeEvent]) {
|
|
227
179
|
events[changeEvent](params, ...args);
|
|
@@ -229,7 +181,7 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
|
229
181
|
};
|
|
230
182
|
}
|
|
231
183
|
if (blurFunc) {
|
|
232
|
-
ons[(0,
|
|
184
|
+
ons[(0, import_vn.getOnName)(blurEvent)] = function(...args) {
|
|
233
185
|
blurFunc(...args);
|
|
234
186
|
if (events && events[blurEvent]) {
|
|
235
187
|
events[blurEvent](params, ...args);
|
|
@@ -237,7 +189,7 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
|
237
189
|
};
|
|
238
190
|
}
|
|
239
191
|
if (clearFunc) {
|
|
240
|
-
ons[(0,
|
|
192
|
+
ons[(0, import_vn.getOnName)(clearEvent)] = function(...args) {
|
|
241
193
|
clearFunc(...args);
|
|
242
194
|
if (events && events[clearEvent]) {
|
|
243
195
|
events[clearEvent](params, ...args);
|
|
@@ -247,30 +199,20 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
|
247
199
|
return eventOns ? Object.assign(ons, eventOns) : ons;
|
|
248
200
|
}
|
|
249
201
|
function getEditOns(renderOpts, params) {
|
|
250
|
-
const {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
column
|
|
254
|
-
} = params;
|
|
255
|
-
const {
|
|
256
|
-
name
|
|
257
|
-
} = renderOpts;
|
|
258
|
-
const {
|
|
259
|
-
model
|
|
260
|
-
} = column;
|
|
202
|
+
const { $table, row, column } = params;
|
|
203
|
+
const { name } = renderOpts;
|
|
204
|
+
const { model } = column;
|
|
261
205
|
const isImmediate = isImmediateCell(renderOpts, params);
|
|
262
206
|
return getComponentOns(renderOpts, params, {
|
|
263
207
|
model(cellValue) {
|
|
264
|
-
// 处理 model 值双向绑定
|
|
265
208
|
model.update = true;
|
|
266
209
|
model.value = cellValue;
|
|
267
210
|
if (isImmediate) {
|
|
268
|
-
(0,
|
|
211
|
+
(0, import_util.setCellValue)(row, column, cellValue);
|
|
269
212
|
}
|
|
270
213
|
},
|
|
271
214
|
change(eventParams) {
|
|
272
|
-
|
|
273
|
-
if (!isImmediate && name && ['VxeInput', 'VxeNumberInput', 'VxeTextarea', '$input', '$textarea'].includes(name)) {
|
|
215
|
+
if (!isImmediate && name && ["VxeInput", "VxeNumberInput", "VxeTextarea", "$input", "$textarea"].includes(name)) {
|
|
274
216
|
const cellValue = eventParams.value;
|
|
275
217
|
model.update = true;
|
|
276
218
|
model.value = cellValue;
|
|
@@ -281,9 +223,9 @@ function getEditOns(renderOpts, params) {
|
|
|
281
223
|
},
|
|
282
224
|
blur() {
|
|
283
225
|
if (isImmediate) {
|
|
284
|
-
$table.handleCellRuleUpdateStatus(
|
|
226
|
+
$table.handleCellRuleUpdateStatus("blur", params);
|
|
285
227
|
} else {
|
|
286
|
-
$table.handleCellRuleUpdateStatus(
|
|
228
|
+
$table.handleCellRuleUpdateStatus("blur", params, model.value);
|
|
287
229
|
}
|
|
288
230
|
}
|
|
289
231
|
});
|
|
@@ -291,81 +233,68 @@ function getEditOns(renderOpts, params) {
|
|
|
291
233
|
function getFilterOns(renderOpts, params, option) {
|
|
292
234
|
return getComponentOns(renderOpts, params, {
|
|
293
235
|
model(value) {
|
|
294
|
-
// 处理 model 值双向绑定
|
|
295
236
|
option.data = value;
|
|
296
237
|
},
|
|
297
238
|
change() {
|
|
298
|
-
updateFilterChangeOption(params, !(0,
|
|
239
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
299
240
|
},
|
|
300
241
|
blur() {
|
|
301
|
-
updateFilterChangeOption(params, !(0,
|
|
242
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
302
243
|
}
|
|
303
244
|
});
|
|
304
245
|
}
|
|
305
246
|
function getFloatingFilterOns(renderOpts, params, option) {
|
|
306
|
-
const {
|
|
307
|
-
|
|
308
|
-
column
|
|
309
|
-
} = params;
|
|
310
|
-
if ((0, _vn.hasInputType)(renderOpts)) {
|
|
247
|
+
const { $table, column } = params;
|
|
248
|
+
if ((0, import_vn.hasInputType)(renderOpts)) {
|
|
311
249
|
return getComponentOns(renderOpts, params, {
|
|
312
250
|
model(value) {
|
|
313
|
-
// 处理 model 值双向绑定
|
|
314
251
|
option.data = value;
|
|
315
252
|
},
|
|
316
253
|
change() {
|
|
317
|
-
updateFilterChangeOption(params, !(0,
|
|
254
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
318
255
|
},
|
|
319
256
|
clear() {
|
|
320
|
-
updateFilterChangeOption(params, !(0,
|
|
257
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
321
258
|
saveFilterEvent(params);
|
|
322
259
|
},
|
|
323
260
|
blur() {
|
|
324
|
-
$table.saveFilterByEvent(new Event(
|
|
261
|
+
$table.saveFilterByEvent(new Event("change"), column);
|
|
325
262
|
}
|
|
326
|
-
}, renderOpts.name ===
|
|
327
|
-
[(0,
|
|
328
|
-
updateFilterChangeOption(params, !(0,
|
|
263
|
+
}, renderOpts.name === "VxeNumberInput" ? {
|
|
264
|
+
[(0, import_vn.getOnName)("plus-number")]() {
|
|
265
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
329
266
|
saveFilterEvent(params);
|
|
330
267
|
},
|
|
331
|
-
[(0,
|
|
332
|
-
updateFilterChangeOption(params, !(0,
|
|
268
|
+
[(0, import_vn.getOnName)("minus-number")]() {
|
|
269
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
333
270
|
saveFilterEvent(params);
|
|
334
271
|
}
|
|
335
272
|
} : {});
|
|
336
273
|
}
|
|
337
274
|
return getComponentOns(renderOpts, params, {
|
|
338
275
|
model(value) {
|
|
339
|
-
// 处理 model 值双向绑定
|
|
340
276
|
option.data = value;
|
|
341
277
|
},
|
|
342
278
|
clear() {
|
|
343
|
-
updateFilterChangeOption(params, !(0,
|
|
344
|
-
$table.saveFilterByEvent(new Event(
|
|
279
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
280
|
+
$table.saveFilterByEvent(new Event("change"), column);
|
|
345
281
|
},
|
|
346
282
|
change() {
|
|
347
|
-
updateFilterChangeOption(params, !(0,
|
|
348
|
-
$table.saveFilterByEvent(new Event(
|
|
283
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
284
|
+
$table.saveFilterByEvent(new Event("change"), column);
|
|
349
285
|
}
|
|
350
286
|
});
|
|
351
287
|
}
|
|
352
288
|
function getNativeEditOns(renderOpts, params) {
|
|
353
|
-
const {
|
|
354
|
-
|
|
355
|
-
row,
|
|
356
|
-
column
|
|
357
|
-
} = params;
|
|
358
|
-
const {
|
|
359
|
-
model
|
|
360
|
-
} = column;
|
|
289
|
+
const { $table, row, column } = params;
|
|
290
|
+
const { model } = column;
|
|
361
291
|
return getNativeElementOns(renderOpts, params, {
|
|
362
292
|
model(evnt) {
|
|
363
|
-
// 处理 model 值双向绑定
|
|
364
293
|
const targetEl = evnt.target;
|
|
365
294
|
if (targetEl) {
|
|
366
295
|
const cellValue = targetEl.value;
|
|
367
296
|
if (isImmediateCell(renderOpts, params)) {
|
|
368
|
-
(0,
|
|
297
|
+
(0, import_util.setCellValue)(row, column, cellValue);
|
|
369
298
|
} else {
|
|
370
299
|
model.update = true;
|
|
371
300
|
model.value = cellValue;
|
|
@@ -373,7 +302,6 @@ function getNativeEditOns(renderOpts, params) {
|
|
|
373
302
|
}
|
|
374
303
|
},
|
|
375
304
|
change(evnt) {
|
|
376
|
-
// 处理 change 事件相关逻辑
|
|
377
305
|
const targetEl = evnt.target;
|
|
378
306
|
if (targetEl) {
|
|
379
307
|
const cellValue = targetEl.value;
|
|
@@ -392,132 +320,123 @@ function getNativeEditOns(renderOpts, params) {
|
|
|
392
320
|
function getNativeFilterOns(renderOpts, params, option) {
|
|
393
321
|
return getNativeElementOns(renderOpts, params, {
|
|
394
322
|
model(evnt) {
|
|
395
|
-
// 处理 model 值双向绑定
|
|
396
323
|
const targetEl = evnt.target;
|
|
397
324
|
if (targetEl) {
|
|
398
325
|
option.data = targetEl.value;
|
|
399
326
|
}
|
|
400
327
|
},
|
|
401
328
|
change() {
|
|
402
|
-
updateFilterChangeOption(params, !
|
|
329
|
+
updateFilterChangeOption(params, !import_xe_utils.default.eqNull(option.data), option);
|
|
403
330
|
},
|
|
404
331
|
blur() {
|
|
405
|
-
updateFilterChangeOption(params, !
|
|
332
|
+
updateFilterChangeOption(params, !import_xe_utils.default.eqNull(option.data), option);
|
|
406
333
|
}
|
|
407
334
|
});
|
|
408
335
|
}
|
|
409
336
|
function nativeInputCellRender(renderOpts, renderParams) {
|
|
410
|
-
const {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
}, cellValue)];
|
|
337
|
+
const { row, column } = renderParams;
|
|
338
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
339
|
+
const cellVNs = [
|
|
340
|
+
(0, import_vue.h)("span", {
|
|
341
|
+
key: 1
|
|
342
|
+
}, cellValue)
|
|
343
|
+
];
|
|
418
344
|
return getNativeInputRenderCellVNs(cellValue, cellVNs, renderOpts, renderParams);
|
|
419
345
|
}
|
|
420
|
-
/**
|
|
421
|
-
* 单元格可编辑渲染-原生的标签
|
|
422
|
-
* input、textarea
|
|
423
|
-
*/
|
|
424
346
|
function nativeInputEditRender(renderOpts, renderParams) {
|
|
425
|
-
const {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
value: cellValue
|
|
438
|
-
}), getNativeEditOns(renderOpts, renderParams)))];
|
|
347
|
+
const { row, column } = renderParams;
|
|
348
|
+
const { name } = renderOpts;
|
|
349
|
+
const cellValue = isImmediateCell(renderOpts, renderParams) ? (0, import_util.getCellValue)(row, column) : column.model.value;
|
|
350
|
+
return [
|
|
351
|
+
(0, import_vue.h)("" + name, {
|
|
352
|
+
key: 2,
|
|
353
|
+
class: `vxe-default-${name}`,
|
|
354
|
+
...getNativeAttrs(renderOpts),
|
|
355
|
+
value: cellValue,
|
|
356
|
+
...getNativeEditOns(renderOpts, renderParams)
|
|
357
|
+
})
|
|
358
|
+
];
|
|
439
359
|
}
|
|
440
360
|
function buttonCellRender(renderOpts, params) {
|
|
441
|
-
return [
|
|
361
|
+
return [
|
|
362
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
363
|
+
...getCellEditProps(renderOpts, params, null),
|
|
364
|
+
...getComponentOns(renderOpts, params)
|
|
365
|
+
})
|
|
366
|
+
];
|
|
442
367
|
}
|
|
443
368
|
function defaultInputEditRender(renderOpts, params) {
|
|
444
|
-
const {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
369
|
+
const { row, column } = params;
|
|
370
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
371
|
+
return [
|
|
372
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
373
|
+
key: 2,
|
|
374
|
+
...getCellEditProps(renderOpts, params, cellValue),
|
|
375
|
+
...getEditOns(renderOpts, params)
|
|
376
|
+
})
|
|
377
|
+
];
|
|
452
378
|
}
|
|
453
379
|
function defaultEditRender(renderOpts, params) {
|
|
454
|
-
const {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
380
|
+
const { row, column } = params;
|
|
381
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
382
|
+
return [
|
|
383
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
384
|
+
...getCellEditProps(renderOpts, params, cellValue),
|
|
385
|
+
...getEditOns(renderOpts, params)
|
|
386
|
+
})
|
|
387
|
+
];
|
|
460
388
|
}
|
|
461
389
|
function checkboxEditRender(renderOpts, params) {
|
|
462
|
-
const {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
390
|
+
const { row, column } = params;
|
|
391
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
392
|
+
return [
|
|
393
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
394
|
+
...getCellEditProps(renderOpts, params, cellValue),
|
|
395
|
+
...getEditOns(renderOpts, params)
|
|
396
|
+
})
|
|
397
|
+
];
|
|
468
398
|
}
|
|
469
399
|
function radioAndCheckboxGroupEditRender(renderOpts, params) {
|
|
470
|
-
const {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}, getCellEditProps(renderOpts, params, cellValue)), getEditOns(renderOpts, params)))];
|
|
400
|
+
const { options } = renderOpts;
|
|
401
|
+
const { row, column } = params;
|
|
402
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
403
|
+
return [
|
|
404
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
405
|
+
options,
|
|
406
|
+
...getCellEditProps(renderOpts, params, cellValue),
|
|
407
|
+
...getEditOns(renderOpts, params)
|
|
408
|
+
})
|
|
409
|
+
];
|
|
481
410
|
}
|
|
482
|
-
/**
|
|
483
|
-
* 已废弃
|
|
484
|
-
* @deprecated
|
|
485
|
-
*/
|
|
486
411
|
function oldEditRender(renderOpts, params) {
|
|
487
|
-
const {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
412
|
+
const { row, column } = params;
|
|
413
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
414
|
+
return [
|
|
415
|
+
(0, import_vue.h)(getOldComponent(renderOpts), {
|
|
416
|
+
...getCellEditProps(renderOpts, params, cellValue),
|
|
417
|
+
...getEditOns(renderOpts, params)
|
|
418
|
+
})
|
|
419
|
+
];
|
|
493
420
|
}
|
|
494
|
-
/**
|
|
495
|
-
* 已废弃
|
|
496
|
-
* @deprecated
|
|
497
|
-
*/
|
|
498
421
|
function oldButtonEditRender(renderOpts, params) {
|
|
499
|
-
return [
|
|
422
|
+
return [
|
|
423
|
+
(0, import_vue.h)(getComponent("vxe-button"), {
|
|
424
|
+
...getCellEditProps(renderOpts, params, null),
|
|
425
|
+
...getComponentOns(renderOpts, params)
|
|
426
|
+
})
|
|
427
|
+
];
|
|
500
428
|
}
|
|
501
|
-
/**
|
|
502
|
-
* 已废弃
|
|
503
|
-
* @deprecated
|
|
504
|
-
*/
|
|
505
429
|
function oldButtonsEditRender(renderOpts, params) {
|
|
506
|
-
const {
|
|
507
|
-
|
|
508
|
-
} = renderOpts;
|
|
509
|
-
return children ? children.map(childRenderOpts => oldButtonEditRender(childRenderOpts, params)[0]) : [];
|
|
430
|
+
const { children } = renderOpts;
|
|
431
|
+
return children ? children.map((childRenderOpts) => oldButtonEditRender(childRenderOpts, params)[0]) : [];
|
|
510
432
|
}
|
|
511
433
|
function renderNativeOptgroups(renderOpts, params, renderOptionsMethods) {
|
|
512
|
-
const {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
} = renderOpts;
|
|
516
|
-
const groupOptions = optionGroupProps.options || 'options';
|
|
517
|
-
const groupLabel = optionGroupProps.label || 'label';
|
|
434
|
+
const { optionGroups, optionGroupProps = {} } = renderOpts;
|
|
435
|
+
const groupOptions = optionGroupProps.options || "options";
|
|
436
|
+
const groupLabel = optionGroupProps.label || "label";
|
|
518
437
|
if (optionGroups) {
|
|
519
438
|
return optionGroups.map((group, gIndex) => {
|
|
520
|
-
return (0,
|
|
439
|
+
return (0, import_vue.h)("optgroup", {
|
|
521
440
|
key: gIndex,
|
|
522
441
|
label: group[groupLabel]
|
|
523
442
|
}, renderOptionsMethods(group[groupOptions], renderOpts, params));
|
|
@@ -525,24 +444,16 @@ function renderNativeOptgroups(renderOpts, params, renderOptionsMethods) {
|
|
|
525
444
|
}
|
|
526
445
|
return [];
|
|
527
446
|
}
|
|
528
|
-
/**
|
|
529
|
-
* 渲染原生的 option 标签
|
|
530
|
-
*/
|
|
531
447
|
function renderNativeOptions(options, renderOpts, params) {
|
|
532
|
-
const {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
} = params;
|
|
539
|
-
const labelProp = optionProps.label || 'label';
|
|
540
|
-
const valueProp = optionProps.value || 'value';
|
|
541
|
-
const disabledProp = optionProps.disabled || 'disabled';
|
|
542
|
-
const cellValue = isImmediateCell(renderOpts, params) ? (0, _util.getCellValue)(row, column) : column.model.value;
|
|
448
|
+
const { optionProps = {} } = renderOpts;
|
|
449
|
+
const { row, column } = params;
|
|
450
|
+
const labelProp = optionProps.label || "label";
|
|
451
|
+
const valueProp = optionProps.value || "value";
|
|
452
|
+
const disabledProp = optionProps.disabled || "disabled";
|
|
453
|
+
const cellValue = isImmediateCell(renderOpts, params) ? (0, import_util.getCellValue)(row, column) : column.model.value;
|
|
543
454
|
if (options) {
|
|
544
455
|
return options.map((option, oIndex) => {
|
|
545
|
-
return (0,
|
|
456
|
+
return (0, import_vue.h)("option", {
|
|
546
457
|
key: oIndex,
|
|
547
458
|
value: option[valueProp],
|
|
548
459
|
disabled: option[disabledProp],
|
|
@@ -554,355 +465,274 @@ function renderNativeOptions(options, renderOpts, params) {
|
|
|
554
465
|
return [];
|
|
555
466
|
}
|
|
556
467
|
function nativeFilterRender(renderOpts, params) {
|
|
557
|
-
const {
|
|
558
|
-
|
|
559
|
-
} = params;
|
|
560
|
-
const {
|
|
561
|
-
name
|
|
562
|
-
} = renderOpts;
|
|
468
|
+
const { column } = params;
|
|
469
|
+
const { name } = renderOpts;
|
|
563
470
|
const attrs = getNativeAttrs(renderOpts);
|
|
564
471
|
return column.filters.map((option, oIndex) => {
|
|
565
|
-
return (0,
|
|
472
|
+
return (0, import_vue.h)(`${name}`, {
|
|
566
473
|
key: oIndex,
|
|
567
|
-
class: `vxe-default-${name}
|
|
568
|
-
|
|
569
|
-
value: option.data
|
|
570
|
-
|
|
474
|
+
class: `vxe-default-${name}`,
|
|
475
|
+
...attrs,
|
|
476
|
+
value: option.data,
|
|
477
|
+
...getNativeFilterOns(renderOpts, params, option)
|
|
478
|
+
});
|
|
571
479
|
});
|
|
572
480
|
}
|
|
573
481
|
function defaultFilterRender(renderOpts, params) {
|
|
574
|
-
const {
|
|
575
|
-
column
|
|
576
|
-
} = params;
|
|
482
|
+
const { column } = params;
|
|
577
483
|
return column.filters.map((option, oIndex) => {
|
|
578
484
|
const optionValue = option.data;
|
|
579
|
-
return (0,
|
|
580
|
-
key: oIndex
|
|
581
|
-
|
|
485
|
+
return (0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
486
|
+
key: oIndex,
|
|
487
|
+
...getCellEditFilterProps(renderOpts, renderOpts, optionValue),
|
|
488
|
+
...getFilterOns(renderOpts, params, option)
|
|
489
|
+
});
|
|
582
490
|
});
|
|
583
491
|
}
|
|
584
492
|
function defaultFloatingFilterRender(renderOpts, params) {
|
|
585
|
-
const {
|
|
586
|
-
option
|
|
587
|
-
} = params;
|
|
493
|
+
const { option } = params;
|
|
588
494
|
const optionValue = option.data;
|
|
589
|
-
return [
|
|
495
|
+
return [
|
|
496
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
497
|
+
...getCellEditFilterProps(renderOpts, renderOpts, optionValue),
|
|
498
|
+
...getFloatingFilterOns(renderOpts, params, option)
|
|
499
|
+
})
|
|
500
|
+
];
|
|
590
501
|
}
|
|
591
502
|
function defaultFilterOptions() {
|
|
592
|
-
return [
|
|
593
|
-
data: null
|
|
594
|
-
|
|
503
|
+
return [
|
|
504
|
+
{ data: null }
|
|
505
|
+
];
|
|
595
506
|
}
|
|
596
|
-
/**
|
|
597
|
-
* 已废弃
|
|
598
|
-
* @deprecated
|
|
599
|
-
*/
|
|
600
507
|
function oldFilterRender(renderOpts, params) {
|
|
601
|
-
const {
|
|
602
|
-
column
|
|
603
|
-
} = params;
|
|
508
|
+
const { column } = params;
|
|
604
509
|
return column.filters.map((option, oIndex) => {
|
|
605
510
|
const optionValue = option.data;
|
|
606
|
-
return (0,
|
|
607
|
-
key: oIndex
|
|
608
|
-
|
|
511
|
+
return (0, import_vue.h)(getOldComponent(renderOpts), {
|
|
512
|
+
key: oIndex,
|
|
513
|
+
...getCellEditFilterProps(renderOpts, renderOpts, optionValue),
|
|
514
|
+
...getFilterOns(renderOpts, params, option)
|
|
515
|
+
});
|
|
609
516
|
});
|
|
610
517
|
}
|
|
611
|
-
function handleFilterMethod({
|
|
612
|
-
option
|
|
613
|
-
row,
|
|
614
|
-
column
|
|
615
|
-
}) {
|
|
616
|
-
const {
|
|
617
|
-
data
|
|
618
|
-
} = option;
|
|
619
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
620
|
-
/* eslint-disable eqeqeq */
|
|
518
|
+
function handleFilterMethod({ option, row, column }) {
|
|
519
|
+
const { data } = option;
|
|
520
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
621
521
|
return cellValue == data;
|
|
622
522
|
}
|
|
623
|
-
function handleInputFilterMethod({
|
|
624
|
-
option
|
|
625
|
-
row,
|
|
626
|
-
|
|
627
|
-
}) {
|
|
628
|
-
const {
|
|
629
|
-
data
|
|
630
|
-
} = option;
|
|
631
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
632
|
-
/* eslint-disable eqeqeq */
|
|
633
|
-
return _xeUtils.default.toValueString(cellValue).indexOf(data) > -1;
|
|
523
|
+
function handleInputFilterMethod({ option, row, column }) {
|
|
524
|
+
const { data } = option;
|
|
525
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
526
|
+
return import_xe_utils.default.toValueString(cellValue).indexOf(data) > -1;
|
|
634
527
|
}
|
|
635
528
|
function nativeSelectEditRender(renderOpts, params) {
|
|
636
|
-
return [
|
|
637
|
-
|
|
638
|
-
|
|
529
|
+
return [
|
|
530
|
+
(0, import_vue.h)(
|
|
531
|
+
"select",
|
|
532
|
+
{
|
|
533
|
+
class: "vxe-default-select",
|
|
534
|
+
...getNativeAttrs(renderOpts),
|
|
535
|
+
...getNativeEditOns(renderOpts, params)
|
|
536
|
+
},
|
|
537
|
+
renderOpts.optionGroups ? renderNativeOptgroups(renderOpts, params, renderNativeOptions) : renderNativeOptions(renderOpts.options, renderOpts, params)
|
|
538
|
+
)
|
|
539
|
+
];
|
|
639
540
|
}
|
|
640
541
|
function defaultSelectEditRender(renderOpts, params) {
|
|
641
|
-
const {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
} = renderOpts;
|
|
651
|
-
const cellValue = (0, _util.getCellValue)(row, column);
|
|
652
|
-
return [(0, _vue.h)(getDefaultComponent(renderOpts), Object.assign(Object.assign({}, getCellEditProps(renderOpts, params, cellValue, {
|
|
653
|
-
options,
|
|
654
|
-
optionProps,
|
|
655
|
-
optionGroups,
|
|
656
|
-
optionGroupProps
|
|
657
|
-
})), getEditOns(renderOpts, params)))];
|
|
542
|
+
const { row, column } = params;
|
|
543
|
+
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts;
|
|
544
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
545
|
+
return [
|
|
546
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
547
|
+
...getCellEditProps(renderOpts, params, cellValue, { options, optionProps, optionGroups, optionGroupProps }),
|
|
548
|
+
...getEditOns(renderOpts, params)
|
|
549
|
+
})
|
|
550
|
+
];
|
|
658
551
|
}
|
|
659
552
|
function defaultTableOrTreeSelectEditRender(renderOpts, params) {
|
|
660
|
-
const {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
return [(0, _vue.h)(getDefaultComponent(renderOpts), Object.assign(Object.assign({}, getCellEditProps(renderOpts, params, cellValue, {
|
|
670
|
-
options,
|
|
671
|
-
optionProps
|
|
672
|
-
})), getEditOns(renderOpts, params)))];
|
|
553
|
+
const { row, column } = params;
|
|
554
|
+
const { options, optionProps } = renderOpts;
|
|
555
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
556
|
+
return [
|
|
557
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
558
|
+
...getCellEditProps(renderOpts, params, cellValue, { options, optionProps }),
|
|
559
|
+
...getEditOns(renderOpts, params)
|
|
560
|
+
})
|
|
561
|
+
];
|
|
673
562
|
}
|
|
674
|
-
/**
|
|
675
|
-
* 已废弃
|
|
676
|
-
* @deprecated
|
|
677
|
-
*/
|
|
678
563
|
function oldSelectEditRender(renderOpts, params) {
|
|
679
|
-
const {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
} = renderOpts;
|
|
689
|
-
const cellValue = (0, _util.getCellValue)(row, column);
|
|
690
|
-
return [(0, _vue.h)(getOldComponent(renderOpts), Object.assign(Object.assign({}, getCellEditProps(renderOpts, params, cellValue, {
|
|
691
|
-
options,
|
|
692
|
-
optionProps,
|
|
693
|
-
optionGroups,
|
|
694
|
-
optionGroupProps
|
|
695
|
-
})), getEditOns(renderOpts, params)))];
|
|
564
|
+
const { row, column } = params;
|
|
565
|
+
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts;
|
|
566
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
567
|
+
return [
|
|
568
|
+
(0, import_vue.h)(getOldComponent(renderOpts), {
|
|
569
|
+
...getCellEditProps(renderOpts, params, cellValue, { options, optionProps, optionGroups, optionGroupProps }),
|
|
570
|
+
...getEditOns(renderOpts, params)
|
|
571
|
+
})
|
|
572
|
+
];
|
|
696
573
|
}
|
|
697
574
|
function handleSelectCellValue(cellValue, renderOpts) {
|
|
698
|
-
const {
|
|
699
|
-
options,
|
|
700
|
-
optionGroups,
|
|
701
|
-
optionProps = {},
|
|
702
|
-
optionGroupProps = {},
|
|
703
|
-
props = {}
|
|
704
|
-
} = renderOpts;
|
|
575
|
+
const { options, optionGroups, optionProps = {}, optionGroupProps = {}, props = {} } = renderOpts;
|
|
705
576
|
let selectItem;
|
|
706
|
-
const labelProp = optionProps.label ||
|
|
707
|
-
const valueProp = optionProps.value ||
|
|
708
|
-
if (!(cellValue === null || cellValue ===
|
|
577
|
+
const labelProp = optionProps.label || "label";
|
|
578
|
+
const valueProp = optionProps.value || "value";
|
|
579
|
+
if (!(cellValue === null || cellValue === void 0)) {
|
|
709
580
|
let vals = [];
|
|
710
|
-
if (
|
|
581
|
+
if (import_xe_utils.default.isArray(cellValue)) {
|
|
711
582
|
vals = cellValue;
|
|
712
583
|
} else {
|
|
713
|
-
if (props.multiple && `${cellValue}`.indexOf(
|
|
714
|
-
vals = `${cellValue}`.split(
|
|
584
|
+
if (props.multiple && `${cellValue}`.indexOf(",") > -1) {
|
|
585
|
+
vals = `${cellValue}`.split(",");
|
|
715
586
|
} else {
|
|
716
587
|
vals = [cellValue];
|
|
717
588
|
}
|
|
718
589
|
}
|
|
719
|
-
return
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
590
|
+
return import_xe_utils.default.map(
|
|
591
|
+
vals,
|
|
592
|
+
optionGroups ? (value) => {
|
|
593
|
+
const groupOptions = optionGroupProps.options || "options";
|
|
594
|
+
for (let index = 0; index < optionGroups.length; index++) {
|
|
595
|
+
selectItem = import_xe_utils.default.find(optionGroups[index][groupOptions], (item) => item[valueProp] == value);
|
|
596
|
+
if (selectItem) {
|
|
597
|
+
break;
|
|
598
|
+
}
|
|
726
599
|
}
|
|
600
|
+
return selectItem ? selectItem[labelProp] : value;
|
|
601
|
+
} : (value) => {
|
|
602
|
+
selectItem = import_xe_utils.default.find(options, (item) => item[valueProp] == value);
|
|
603
|
+
return selectItem ? selectItem[labelProp] : value;
|
|
727
604
|
}
|
|
728
|
-
|
|
729
|
-
} : value => {
|
|
730
|
-
/* eslint-disable eqeqeq */
|
|
731
|
-
selectItem = _xeUtils.default.find(options, item => item[valueProp] == value);
|
|
732
|
-
return selectItem ? selectItem[labelProp] : value;
|
|
733
|
-
}).join(', ');
|
|
605
|
+
).join(", ");
|
|
734
606
|
}
|
|
735
|
-
return
|
|
607
|
+
return "";
|
|
736
608
|
}
|
|
737
|
-
function getSelectCellValue(renderOpts, {
|
|
738
|
-
row,
|
|
739
|
-
column
|
|
740
|
-
}) {
|
|
741
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
609
|
+
function getSelectCellValue(renderOpts, { row, column }) {
|
|
610
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
742
611
|
return handleSelectCellValue(cellValue, renderOpts);
|
|
743
612
|
}
|
|
744
613
|
function handleExportSelectMethod(params) {
|
|
745
|
-
const {
|
|
746
|
-
|
|
747
|
-
column,
|
|
748
|
-
options
|
|
749
|
-
} = params;
|
|
750
|
-
return options.original ? (0, _util.getCellValue)(row, column) : getSelectCellValue(column.editRender || column.cellRender, params);
|
|
614
|
+
const { row, column, options } = params;
|
|
615
|
+
return options.original ? (0, import_util.getCellValue)(row, column) : getSelectCellValue(column.editRender || column.cellRender, params);
|
|
751
616
|
}
|
|
752
617
|
function handleTreeSelectCellValue(cellValue, renderOpts) {
|
|
753
|
-
const {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
const valueProp = optionProps.value || 'value';
|
|
759
|
-
const childrenProp = optionProps.children || 'children';
|
|
760
|
-
if (!(cellValue === null || cellValue === undefined)) {
|
|
618
|
+
const { options, optionProps = {} } = renderOpts;
|
|
619
|
+
const labelProp = optionProps.label || "label";
|
|
620
|
+
const valueProp = optionProps.value || "value";
|
|
621
|
+
const childrenProp = optionProps.children || "children";
|
|
622
|
+
if (!(cellValue === null || cellValue === void 0)) {
|
|
761
623
|
const keyMaps = {};
|
|
762
|
-
|
|
763
|
-
keyMaps[
|
|
764
|
-
}, {
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
624
|
+
import_xe_utils.default.eachTree(options, (item) => {
|
|
625
|
+
keyMaps[import_xe_utils.default.get(item, valueProp)] = item;
|
|
626
|
+
}, { children: childrenProp });
|
|
627
|
+
return import_xe_utils.default.map(
|
|
628
|
+
import_xe_utils.default.isArray(cellValue) ? cellValue : [cellValue],
|
|
629
|
+
(value) => {
|
|
630
|
+
const item = keyMaps[value];
|
|
631
|
+
return item ? import_xe_utils.default.get(item, labelProp) : item;
|
|
632
|
+
}
|
|
633
|
+
).join(", ");
|
|
771
634
|
}
|
|
772
|
-
return
|
|
635
|
+
return "";
|
|
773
636
|
}
|
|
774
|
-
function getTreeSelectCellValue(renderOpts, {
|
|
775
|
-
row,
|
|
776
|
-
column
|
|
777
|
-
}) {
|
|
778
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
637
|
+
function getTreeSelectCellValue(renderOpts, { row, column }) {
|
|
638
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
779
639
|
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
780
640
|
}
|
|
781
641
|
function handleExportTreeSelectMethod(params) {
|
|
782
|
-
const {
|
|
783
|
-
|
|
784
|
-
column,
|
|
785
|
-
options
|
|
786
|
-
} = params;
|
|
787
|
-
return options.original ? (0, _util.getCellValue)(row, column) : getTreeSelectCellValue(column.editRender || column.cellRender, params);
|
|
642
|
+
const { row, column, options } = params;
|
|
643
|
+
return options.original ? (0, import_util.getCellValue)(row, column) : getTreeSelectCellValue(column.editRender || column.cellRender, params);
|
|
788
644
|
}
|
|
789
645
|
function handleNumberCell(cellValue, renderOpts, params) {
|
|
790
|
-
const {
|
|
791
|
-
|
|
792
|
-
showNegativeStatus
|
|
793
|
-
} = renderOpts;
|
|
794
|
-
const {
|
|
795
|
-
type
|
|
796
|
-
} = props;
|
|
646
|
+
const { props = {}, showNegativeStatus } = renderOpts;
|
|
647
|
+
const { type } = props;
|
|
797
648
|
let isNegative = false;
|
|
798
|
-
if (!(0,
|
|
649
|
+
if (!(0, import_utils.isEmptyValue)(cellValue)) {
|
|
799
650
|
const numberInputConfig = getConfig().numberInput || {};
|
|
800
|
-
if (type ===
|
|
651
|
+
if (type === "float") {
|
|
801
652
|
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
802
653
|
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 1);
|
|
803
|
-
cellValue =
|
|
654
|
+
cellValue = import_xe_utils.default.toFixed(import_xe_utils.default.floor(cellValue, digits), digits);
|
|
804
655
|
if (!autoFill) {
|
|
805
|
-
cellValue =
|
|
656
|
+
cellValue = import_xe_utils.default.toNumber(cellValue);
|
|
806
657
|
}
|
|
807
658
|
if (showNegativeStatus) {
|
|
808
659
|
if (cellValue < 0) {
|
|
809
660
|
isNegative = true;
|
|
810
661
|
}
|
|
811
662
|
}
|
|
812
|
-
} else if (type ===
|
|
663
|
+
} else if (type === "amount") {
|
|
813
664
|
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
814
665
|
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 2);
|
|
815
666
|
const showCurrency = handleDefaultValue(props.showCurrency, numberInputConfig.showCurrency, false);
|
|
816
|
-
cellValue =
|
|
667
|
+
cellValue = import_xe_utils.default.toNumber(cellValue);
|
|
817
668
|
if (showNegativeStatus) {
|
|
818
669
|
if (cellValue < 0) {
|
|
819
670
|
isNegative = true;
|
|
820
671
|
}
|
|
821
672
|
}
|
|
822
|
-
cellValue =
|
|
823
|
-
digits
|
|
824
|
-
});
|
|
673
|
+
cellValue = import_xe_utils.default.commafy(cellValue, { digits });
|
|
825
674
|
if (!autoFill) {
|
|
826
|
-
const [iStr, dStr] = cellValue.split(
|
|
675
|
+
const [iStr, dStr] = cellValue.split(".");
|
|
827
676
|
if (dStr) {
|
|
828
|
-
const dRest = dStr.replace(/0+$/,
|
|
829
|
-
cellValue = dRest ? [iStr,
|
|
677
|
+
const dRest = dStr.replace(/0+$/, "");
|
|
678
|
+
cellValue = dRest ? [iStr, ".", dRest].join("") : iStr;
|
|
830
679
|
}
|
|
831
680
|
}
|
|
832
681
|
if (showCurrency) {
|
|
833
|
-
cellValue = `${props.currencySymbol || numberInputConfig.currencySymbol || getI18n(
|
|
682
|
+
cellValue = `${props.currencySymbol || numberInputConfig.currencySymbol || getI18n("vxe.numberInput.currencySymbol") || ""}${cellValue}`;
|
|
834
683
|
}
|
|
835
684
|
} else {
|
|
836
|
-
if (type ===
|
|
837
|
-
cellValue =
|
|
685
|
+
if (type === "integer") {
|
|
686
|
+
cellValue = import_xe_utils.default.toInteger(cellValue);
|
|
838
687
|
}
|
|
839
688
|
if (showNegativeStatus) {
|
|
840
|
-
if (
|
|
689
|
+
if (import_xe_utils.default.toNumber(cellValue) < 0) {
|
|
841
690
|
isNegative = true;
|
|
842
691
|
}
|
|
843
692
|
}
|
|
844
693
|
}
|
|
845
694
|
}
|
|
846
695
|
return getCellLabelVNs(renderOpts, params, cellValue, isNegative ? {
|
|
847
|
-
class:
|
|
696
|
+
class: "is--negative"
|
|
848
697
|
} : {});
|
|
849
698
|
}
|
|
850
699
|
function handleFormatDatePicker(renderOpts, renderParams) {
|
|
851
|
-
const {
|
|
852
|
-
|
|
853
|
-
} = renderOpts;
|
|
854
|
-
const {
|
|
855
|
-
cellValue
|
|
856
|
-
} = renderParams;
|
|
700
|
+
const { props = {} } = renderOpts;
|
|
701
|
+
const { cellValue } = renderParams;
|
|
857
702
|
if (cellValue) {
|
|
858
|
-
if (props.type !==
|
|
703
|
+
if (props.type !== "time") {
|
|
859
704
|
return getLabelFormatDate(cellValue, props);
|
|
860
705
|
}
|
|
861
706
|
}
|
|
862
707
|
return cellValue;
|
|
863
708
|
}
|
|
864
709
|
function handleFormatSelect(renderOpts, renderParams) {
|
|
865
|
-
const {
|
|
866
|
-
cellValue
|
|
867
|
-
} = renderParams;
|
|
710
|
+
const { cellValue } = renderParams;
|
|
868
711
|
return handleSelectCellValue(cellValue, renderOpts);
|
|
869
712
|
}
|
|
870
713
|
function handleSetSelectValue(renderOpts, renderParams) {
|
|
871
|
-
const {
|
|
872
|
-
|
|
873
|
-
column,
|
|
874
|
-
cellValue
|
|
875
|
-
} = renderParams;
|
|
876
|
-
const {
|
|
877
|
-
field
|
|
878
|
-
} = column;
|
|
714
|
+
const { row, column, cellValue } = renderParams;
|
|
715
|
+
const { field } = column;
|
|
879
716
|
if (field) {
|
|
880
|
-
const {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
optionProps = {},
|
|
884
|
-
optionGroupProps = {},
|
|
885
|
-
props
|
|
886
|
-
} = renderOpts;
|
|
887
|
-
if ((0, _utils.isEmptyValue)(cellValue)) {
|
|
888
|
-
_xeUtils.default.set(row, field, props && props.multiple ? [] : null);
|
|
717
|
+
const { options, optionGroups, optionProps = {}, optionGroupProps = {}, props } = renderOpts;
|
|
718
|
+
if ((0, import_utils.isEmptyValue)(cellValue)) {
|
|
719
|
+
import_xe_utils.default.set(row, field, props && props.multiple ? [] : null);
|
|
889
720
|
return;
|
|
890
721
|
}
|
|
891
|
-
const isMultiVal =
|
|
892
|
-
const labelProp = optionProps.label ||
|
|
893
|
-
const valueProp = optionProps.value ||
|
|
722
|
+
const isMultiVal = import_xe_utils.default.indexOf(`${cellValue}`, ",") > -1;
|
|
723
|
+
const labelProp = optionProps.label || "label";
|
|
724
|
+
const valueProp = optionProps.value || "value";
|
|
894
725
|
const labelMpas = {};
|
|
895
726
|
if (optionGroups && optionGroups.length) {
|
|
896
|
-
const groupOptions = optionGroupProps.options ||
|
|
727
|
+
const groupOptions = optionGroupProps.options || "options";
|
|
897
728
|
for (let i = 0; i < optionGroups.length; i++) {
|
|
898
729
|
const opts = optionGroups[i][groupOptions] || {};
|
|
899
730
|
for (let j = 0; j < opts.length; j++) {
|
|
900
731
|
const item = opts[j];
|
|
901
732
|
if (isMultiVal) {
|
|
902
733
|
labelMpas[item[labelProp]] = item;
|
|
903
|
-
/* eslint-disable eqeqeq */
|
|
904
734
|
} else if (item[labelProp] == cellValue) {
|
|
905
|
-
|
|
735
|
+
import_xe_utils.default.set(row, field, item[valueProp]);
|
|
906
736
|
return;
|
|
907
737
|
}
|
|
908
738
|
}
|
|
@@ -913,88 +743,59 @@ function handleSetSelectValue(renderOpts, renderParams) {
|
|
|
913
743
|
const item = options[i];
|
|
914
744
|
if (isMultiVal) {
|
|
915
745
|
labelMpas[item[labelProp]] = item;
|
|
916
|
-
/* eslint-disable eqeqeq */
|
|
917
746
|
} else if (item[labelProp] == cellValue) {
|
|
918
|
-
|
|
747
|
+
import_xe_utils.default.set(row, field, item[valueProp]);
|
|
919
748
|
return;
|
|
920
749
|
}
|
|
921
750
|
}
|
|
922
751
|
}
|
|
923
752
|
}
|
|
924
753
|
if (isMultiVal) {
|
|
925
|
-
|
|
754
|
+
import_xe_utils.default.set(row, field, (isMultiVal ? cellValue.split(",") : [cellValue]).map((label) => {
|
|
926
755
|
const item = labelMpas[label];
|
|
927
756
|
return item ? item[valueProp] : label;
|
|
928
757
|
}));
|
|
929
758
|
} else {
|
|
930
|
-
|
|
759
|
+
import_xe_utils.default.set(row, field, cellValue);
|
|
931
760
|
}
|
|
932
761
|
}
|
|
933
762
|
}
|
|
934
763
|
function handleFormatTreeSelect(renderOpts, params) {
|
|
935
|
-
const {
|
|
936
|
-
cellValue
|
|
937
|
-
} = params;
|
|
764
|
+
const { cellValue } = params;
|
|
938
765
|
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
939
766
|
}
|
|
940
767
|
function handleSetTreeSelectValue(renderOpts, params) {
|
|
941
|
-
const {
|
|
942
|
-
|
|
943
|
-
column,
|
|
944
|
-
cellValue
|
|
945
|
-
} = params;
|
|
946
|
-
const {
|
|
947
|
-
field
|
|
948
|
-
} = column;
|
|
768
|
+
const { row, column, cellValue } = params;
|
|
769
|
+
const { field } = column;
|
|
949
770
|
if (field) {
|
|
950
|
-
const {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
const
|
|
955
|
-
const valueProp = optionProps.value || 'value';
|
|
956
|
-
const childrenProp = optionProps.children || 'children';
|
|
957
|
-
const matchRest = _xeUtils.default.findTree(options || [], item => _xeUtils.default.get(item, labelProp) === cellValue, {
|
|
958
|
-
children: childrenProp
|
|
959
|
-
});
|
|
771
|
+
const { options, optionProps = {} } = renderOpts;
|
|
772
|
+
const labelProp = optionProps.label || "label";
|
|
773
|
+
const valueProp = optionProps.value || "value";
|
|
774
|
+
const childrenProp = optionProps.children || "children";
|
|
775
|
+
const matchRest = import_xe_utils.default.findTree(options || [], (item) => import_xe_utils.default.get(item, labelProp) === cellValue, { children: childrenProp });
|
|
960
776
|
if (matchRest) {
|
|
961
777
|
const selectItem = matchRest.item;
|
|
962
778
|
if (selectItem) {
|
|
963
|
-
|
|
779
|
+
import_xe_utils.default.set(row, field, selectItem[valueProp]);
|
|
964
780
|
return;
|
|
965
781
|
}
|
|
966
782
|
}
|
|
967
|
-
|
|
783
|
+
import_xe_utils.default.set(row, field, cellValue);
|
|
968
784
|
}
|
|
969
785
|
}
|
|
970
786
|
function getNativeInputRenderCellVNs(cellValue, labelVNs, renderOpts, renderParams) {
|
|
971
|
-
const {
|
|
972
|
-
|
|
973
|
-
row,
|
|
974
|
-
column
|
|
975
|
-
} = renderParams;
|
|
976
|
-
const {
|
|
977
|
-
name
|
|
978
|
-
} = renderOpts;
|
|
787
|
+
const { $table, row, column } = renderParams;
|
|
788
|
+
const { name } = renderOpts;
|
|
979
789
|
const tableProps = $table.props;
|
|
980
|
-
const {
|
|
981
|
-
|
|
982
|
-
mouseConfig
|
|
983
|
-
} = tableProps;
|
|
984
|
-
const {
|
|
985
|
-
computeMouseOpts
|
|
986
|
-
} = $table.getComputeMaps();
|
|
790
|
+
const { editConfig, mouseConfig } = tableProps;
|
|
791
|
+
const { computeMouseOpts } = $table.getComputeMaps();
|
|
987
792
|
const mouseOpts = computeMouseOpts.value;
|
|
988
793
|
let isColSelected = false;
|
|
989
794
|
let isActiveCellArea = false;
|
|
990
|
-
if (editConfig && (0,
|
|
795
|
+
if (editConfig && (0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
|
|
991
796
|
const tableReactData = $table.reactData;
|
|
992
|
-
const {
|
|
993
|
-
|
|
994
|
-
} = tableReactData;
|
|
995
|
-
const {
|
|
996
|
-
selected
|
|
997
|
-
} = editStore;
|
|
797
|
+
const { editStore } = tableReactData;
|
|
798
|
+
const { selected } = editStore;
|
|
998
799
|
isColSelected = row === selected.row && column === selected.column;
|
|
999
800
|
if ($table.getActiveCellArea) {
|
|
1000
801
|
const activeCellArea = $table.getActiveCellArea();
|
|
@@ -1005,42 +806,32 @@ function getNativeInputRenderCellVNs(cellValue, labelVNs, renderOpts, renderPara
|
|
|
1005
806
|
}
|
|
1006
807
|
const cellVNs = labelVNs;
|
|
1007
808
|
if (isActiveCellArea || isColSelected) {
|
|
1008
|
-
cellVNs.push(
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
809
|
+
cellVNs.push(
|
|
810
|
+
(0, import_vue.h)("" + name, {
|
|
811
|
+
key: 2,
|
|
812
|
+
class: `vxe-default-${name} vxe-reusekeep-control`,
|
|
813
|
+
value: cellValue,
|
|
814
|
+
...getNativeAttrs(renderOpts),
|
|
815
|
+
...getNativeEditOns(renderOpts, renderParams)
|
|
816
|
+
})
|
|
817
|
+
);
|
|
1013
818
|
}
|
|
1014
819
|
return cellVNs;
|
|
1015
820
|
}
|
|
1016
821
|
function getInputRenderCellVNs(cellValue, labelVNs, renderOpts, renderParams) {
|
|
1017
|
-
const {
|
|
1018
|
-
$table,
|
|
1019
|
-
row,
|
|
1020
|
-
column
|
|
1021
|
-
} = renderParams;
|
|
822
|
+
const { $table, row, column } = renderParams;
|
|
1022
823
|
const tableProps = $table.props;
|
|
1023
|
-
const {
|
|
1024
|
-
|
|
1025
|
-
mouseConfig
|
|
1026
|
-
} = tableProps;
|
|
1027
|
-
const {
|
|
1028
|
-
computeEditOpts,
|
|
1029
|
-
computeMouseOpts
|
|
1030
|
-
} = $table.getComputeMaps();
|
|
824
|
+
const { editConfig, mouseConfig } = tableProps;
|
|
825
|
+
const { computeEditOpts, computeMouseOpts } = $table.getComputeMaps();
|
|
1031
826
|
const mouseOpts = computeMouseOpts.value;
|
|
1032
827
|
let isColSelected = false;
|
|
1033
828
|
let isActiveCellArea = false;
|
|
1034
|
-
if (editConfig && (0,
|
|
829
|
+
if (editConfig && (0, import_utils.hasEnableConf)(mouseConfig, mouseOpts)) {
|
|
1035
830
|
const tableReactData = $table.reactData;
|
|
1036
|
-
const {
|
|
1037
|
-
editStore
|
|
1038
|
-
} = tableReactData;
|
|
831
|
+
const { editStore } = tableReactData;
|
|
1039
832
|
const editOpts = computeEditOpts.value;
|
|
1040
833
|
if (editOpts.isReuseKeep) {
|
|
1041
|
-
const {
|
|
1042
|
-
selected
|
|
1043
|
-
} = editStore;
|
|
834
|
+
const { selected } = editStore;
|
|
1044
835
|
isColSelected = row === selected.row && column === selected.column;
|
|
1045
836
|
if ($table.getActiveCellArea) {
|
|
1046
837
|
const activeCellArea = $table.getActiveCellArea();
|
|
@@ -1053,22 +844,19 @@ function getInputRenderCellVNs(cellValue, labelVNs, renderOpts, renderParams) {
|
|
|
1053
844
|
const cellVNs = labelVNs;
|
|
1054
845
|
if (isActiveCellArea || isColSelected) {
|
|
1055
846
|
const compProps = getCellEditProps(renderOpts, renderParams, cellValue);
|
|
1056
|
-
const {
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
847
|
+
const { className, inputClassName } = compProps;
|
|
848
|
+
cellVNs.push(
|
|
849
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
850
|
+
key: 2,
|
|
851
|
+
...compProps,
|
|
852
|
+
className: "vxe-reusekeep-control" + (className ? " " + className : ""),
|
|
853
|
+
inputClassName: "vxe-reusekeep-control" + (inputClassName ? " " + inputClassName : ""),
|
|
854
|
+
...getEditOns(renderOpts, renderParams)
|
|
855
|
+
})
|
|
856
|
+
);
|
|
1066
857
|
}
|
|
1067
858
|
return cellVNs;
|
|
1068
859
|
}
|
|
1069
|
-
/**
|
|
1070
|
-
* 表格 - 渲染器
|
|
1071
|
-
*/
|
|
1072
860
|
renderer.mixin({
|
|
1073
861
|
input: {
|
|
1074
862
|
tableAutoFocus: true,
|
|
@@ -1089,51 +877,38 @@ renderer.mixin({
|
|
|
1089
877
|
renderTableEdit: nativeSelectEditRender,
|
|
1090
878
|
renderTableDefault: nativeSelectEditRender,
|
|
1091
879
|
renderTableCell(renderOpts, params) {
|
|
1092
|
-
const {
|
|
1093
|
-
|
|
1094
|
-
optionGroups
|
|
1095
|
-
} = renderOpts;
|
|
1096
|
-
const {
|
|
1097
|
-
$table,
|
|
1098
|
-
row,
|
|
1099
|
-
column
|
|
1100
|
-
} = params;
|
|
880
|
+
const { options, optionGroups } = renderOpts;
|
|
881
|
+
const { $table, row, column } = params;
|
|
1101
882
|
const opSize = options ? options.length : null;
|
|
1102
883
|
const ogSize = optionGroups ? optionGroups.length : null;
|
|
1103
|
-
const {
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
key: 'render_table_cell',
|
|
1107
|
-
isChanged({
|
|
1108
|
-
oldValue,
|
|
1109
|
-
cellValue
|
|
1110
|
-
}) {
|
|
884
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
885
|
+
key: "render_table_cell",
|
|
886
|
+
isChanged({ oldValue, cellValue }) {
|
|
1111
887
|
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
1112
888
|
},
|
|
1113
|
-
setValue({
|
|
1114
|
-
cellValue
|
|
1115
|
-
}) {
|
|
889
|
+
setValue({ cellValue }) {
|
|
1116
890
|
return [cellValue, opSize, ogSize];
|
|
1117
891
|
},
|
|
1118
|
-
getResult({
|
|
1119
|
-
cellValue
|
|
1120
|
-
}) {
|
|
892
|
+
getResult({ cellValue }) {
|
|
1121
893
|
return handleSelectCellValue(cellValue, renderOpts);
|
|
1122
894
|
}
|
|
1123
895
|
});
|
|
1124
|
-
// const cellResult = getSelectCellValue(renderOpts, params)
|
|
1125
896
|
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
1126
897
|
},
|
|
1127
898
|
createTableFilterOptions: defaultFilterOptions,
|
|
1128
899
|
renderTableFilter(renderOpts, params) {
|
|
1129
|
-
const {
|
|
1130
|
-
column
|
|
1131
|
-
} = params;
|
|
900
|
+
const { column } = params;
|
|
1132
901
|
return column.filters.map((option, oIndex) => {
|
|
1133
|
-
return (0,
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
902
|
+
return (0, import_vue.h)(
|
|
903
|
+
"select",
|
|
904
|
+
{
|
|
905
|
+
key: oIndex,
|
|
906
|
+
class: "vxe-default-select",
|
|
907
|
+
...getNativeAttrs(renderOpts),
|
|
908
|
+
...getNativeFilterOns(renderOpts, params, option)
|
|
909
|
+
},
|
|
910
|
+
renderOpts.optionGroups ? renderNativeOptgroups(renderOpts, params, renderNativeOptions) : renderNativeOptions(renderOpts.options, renderOpts, params)
|
|
911
|
+
);
|
|
1137
912
|
});
|
|
1138
913
|
},
|
|
1139
914
|
tableCellFormatter: handleFormatSelect,
|
|
@@ -1146,27 +921,22 @@ renderer.mixin({
|
|
|
1146
921
|
tableAutoFocus: true,
|
|
1147
922
|
renderTableEdit: defaultInputEditRender,
|
|
1148
923
|
renderTableCell(renderOpts, renderParams) {
|
|
1149
|
-
const {
|
|
1150
|
-
|
|
1151
|
-
} = renderOpts;
|
|
1152
|
-
const {
|
|
1153
|
-
row,
|
|
1154
|
-
column
|
|
1155
|
-
} = renderParams;
|
|
924
|
+
const { props = {} } = renderOpts;
|
|
925
|
+
const { row, column } = renderParams;
|
|
1156
926
|
const inputConfig = getConfig().input || {};
|
|
1157
927
|
const digits = props.digits || inputConfig.digits || 2;
|
|
1158
|
-
let cellValue =
|
|
928
|
+
let cellValue = import_xe_utils.default.get(row, column.field);
|
|
1159
929
|
if (cellValue) {
|
|
1160
930
|
switch (props.type) {
|
|
1161
|
-
case
|
|
1162
|
-
case
|
|
1163
|
-
case
|
|
1164
|
-
case
|
|
1165
|
-
case
|
|
931
|
+
case "date":
|
|
932
|
+
case "week":
|
|
933
|
+
case "month":
|
|
934
|
+
case "quarter":
|
|
935
|
+
case "year":
|
|
1166
936
|
cellValue = getLabelFormatDate(cellValue, props);
|
|
1167
937
|
break;
|
|
1168
|
-
case
|
|
1169
|
-
cellValue =
|
|
938
|
+
case "float":
|
|
939
|
+
cellValue = import_xe_utils.default.toFixed(import_xe_utils.default.floor(cellValue, digits), digits);
|
|
1170
940
|
break;
|
|
1171
941
|
}
|
|
1172
942
|
}
|
|
@@ -1181,31 +951,18 @@ renderer.mixin({
|
|
|
1181
951
|
},
|
|
1182
952
|
FormatNumberInput: {
|
|
1183
953
|
renderTableDefault(renderOpts, renderParams) {
|
|
1184
|
-
const {
|
|
1185
|
-
|
|
1186
|
-
column
|
|
1187
|
-
} = renderParams;
|
|
1188
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
954
|
+
const { row, column } = renderParams;
|
|
955
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1189
956
|
return handleNumberCell(cellValue, renderOpts, renderParams);
|
|
1190
957
|
},
|
|
1191
|
-
tableFilterDefaultMethod({
|
|
1192
|
-
option
|
|
1193
|
-
row,
|
|
1194
|
-
column
|
|
1195
|
-
}) {
|
|
1196
|
-
const {
|
|
1197
|
-
data
|
|
1198
|
-
} = option;
|
|
1199
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
1200
|
-
/* eslint-disable eqeqeq */
|
|
958
|
+
tableFilterDefaultMethod({ option, row, column }) {
|
|
959
|
+
const { data } = option;
|
|
960
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1201
961
|
return cellValue == data;
|
|
1202
962
|
},
|
|
1203
963
|
tableExportMethod(params) {
|
|
1204
|
-
const {
|
|
1205
|
-
|
|
1206
|
-
column
|
|
1207
|
-
} = params;
|
|
1208
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
964
|
+
const { row, column } = params;
|
|
965
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1209
966
|
return cellValue;
|
|
1210
967
|
}
|
|
1211
968
|
},
|
|
@@ -1213,82 +970,58 @@ renderer.mixin({
|
|
|
1213
970
|
tableAutoFocus: true,
|
|
1214
971
|
renderTableEdit: defaultInputEditRender,
|
|
1215
972
|
renderTableCell(renderOpts, renderParams) {
|
|
1216
|
-
const {
|
|
1217
|
-
|
|
1218
|
-
column
|
|
1219
|
-
} = renderParams;
|
|
1220
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
973
|
+
const { row, column } = renderParams;
|
|
974
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1221
975
|
const cellVNs = handleNumberCell(cellValue, renderOpts, renderParams);
|
|
1222
976
|
return getInputRenderCellVNs(cellValue, cellVNs, renderOpts, renderParams);
|
|
1223
977
|
},
|
|
1224
978
|
renderTableFooter(renderOpts, params) {
|
|
1225
|
-
const {
|
|
1226
|
-
|
|
1227
|
-
} =
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
column,
|
|
1231
|
-
_columnIndex
|
|
1232
|
-
} = params;
|
|
1233
|
-
const {
|
|
1234
|
-
type
|
|
1235
|
-
} = props;
|
|
1236
|
-
// 兼容老模式
|
|
1237
|
-
const itemValue = _xeUtils.default.isArray(row) ? row[_columnIndex] : _xeUtils.default.get(row, column.field);
|
|
1238
|
-
if (_xeUtils.default.isNumber(itemValue)) {
|
|
979
|
+
const { props = {} } = renderOpts;
|
|
980
|
+
const { row, column, _columnIndex } = params;
|
|
981
|
+
const { type } = props;
|
|
982
|
+
const itemValue = import_xe_utils.default.isArray(row) ? row[_columnIndex] : import_xe_utils.default.get(row, column.field);
|
|
983
|
+
if (import_xe_utils.default.isNumber(itemValue)) {
|
|
1239
984
|
const numberInputConfig = getConfig().numberInput || {};
|
|
1240
|
-
if (type ===
|
|
985
|
+
if (type === "float") {
|
|
1241
986
|
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
1242
987
|
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 1);
|
|
1243
|
-
let amountLabel =
|
|
988
|
+
let amountLabel = import_xe_utils.default.toFixed(import_xe_utils.default.floor(itemValue, digits), digits);
|
|
1244
989
|
if (!autoFill) {
|
|
1245
|
-
amountLabel =
|
|
990
|
+
amountLabel = "" + import_xe_utils.default.toNumber(amountLabel);
|
|
1246
991
|
}
|
|
1247
992
|
return amountLabel;
|
|
1248
|
-
} else if (type ===
|
|
993
|
+
} else if (type === "amount") {
|
|
1249
994
|
const autoFill = handleDefaultValue(props.autoFill, numberInputConfig.autoFill, true);
|
|
1250
995
|
const digits = handleDefaultValue(props.digits, numberInputConfig.digits, 2);
|
|
1251
996
|
const showCurrency = handleDefaultValue(props.showCurrency, numberInputConfig.showCurrency, false);
|
|
1252
|
-
let amountLabel =
|
|
1253
|
-
digits
|
|
1254
|
-
});
|
|
997
|
+
let amountLabel = import_xe_utils.default.commafy(import_xe_utils.default.toNumber(itemValue), { digits });
|
|
1255
998
|
if (!autoFill) {
|
|
1256
|
-
const [iStr, dStr] = amountLabel.split(
|
|
999
|
+
const [iStr, dStr] = amountLabel.split(".");
|
|
1257
1000
|
if (dStr) {
|
|
1258
|
-
const dRest = dStr.replace(/0+$/,
|
|
1259
|
-
amountLabel = dRest ? [iStr,
|
|
1001
|
+
const dRest = dStr.replace(/0+$/, "");
|
|
1002
|
+
amountLabel = dRest ? [iStr, ".", dRest].join("") : iStr;
|
|
1260
1003
|
}
|
|
1261
1004
|
}
|
|
1262
1005
|
if (showCurrency) {
|
|
1263
|
-
amountLabel = `${props.currencySymbol || numberInputConfig.currencySymbol || getI18n(
|
|
1006
|
+
amountLabel = `${props.currencySymbol || numberInputConfig.currencySymbol || getI18n("vxe.numberInput.currencySymbol") || ""}${amountLabel}`;
|
|
1264
1007
|
}
|
|
1265
1008
|
return amountLabel;
|
|
1266
1009
|
}
|
|
1267
1010
|
}
|
|
1268
|
-
return (0,
|
|
1011
|
+
return (0, import_utils.getFuncText)(itemValue, 1);
|
|
1269
1012
|
},
|
|
1270
1013
|
renderTableDefault: defaultInputEditRender,
|
|
1271
1014
|
createTableFilterOptions: defaultFilterOptions,
|
|
1272
1015
|
renderTableFilter: defaultFilterRender,
|
|
1273
1016
|
renderTableFloatingFilter: defaultFloatingFilterRender,
|
|
1274
|
-
tableFilterDefaultMethod({
|
|
1275
|
-
option
|
|
1276
|
-
row,
|
|
1277
|
-
column
|
|
1278
|
-
}) {
|
|
1279
|
-
const {
|
|
1280
|
-
data
|
|
1281
|
-
} = option;
|
|
1282
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
1283
|
-
/* eslint-disable eqeqeq */
|
|
1017
|
+
tableFilterDefaultMethod({ option, row, column }) {
|
|
1018
|
+
const { data } = option;
|
|
1019
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1284
1020
|
return cellValue == data;
|
|
1285
1021
|
},
|
|
1286
1022
|
tableExportMethod(params) {
|
|
1287
|
-
const {
|
|
1288
|
-
|
|
1289
|
-
column
|
|
1290
|
-
} = params;
|
|
1291
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
1023
|
+
const { row, column } = params;
|
|
1024
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1292
1025
|
return cellValue;
|
|
1293
1026
|
}
|
|
1294
1027
|
},
|
|
@@ -1297,20 +1030,12 @@ renderer.mixin({
|
|
|
1297
1030
|
renderTableEdit: defaultEditRender,
|
|
1298
1031
|
renderTableCell(renderOpts, params) {
|
|
1299
1032
|
const props = renderOpts.props || {};
|
|
1300
|
-
const {
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
} = params;
|
|
1305
|
-
const {
|
|
1306
|
-
cellResult
|
|
1307
|
-
} = $table.effectCellData(row, column, {
|
|
1308
|
-
key: 'render_table_cell',
|
|
1309
|
-
getResult({
|
|
1310
|
-
cellValue
|
|
1311
|
-
}) {
|
|
1033
|
+
const { $table, row, column } = params;
|
|
1034
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
1035
|
+
key: "render_table_cell",
|
|
1036
|
+
getResult({ cellValue }) {
|
|
1312
1037
|
if (cellValue) {
|
|
1313
|
-
if (props.type !==
|
|
1038
|
+
if (props.type !== "time") {
|
|
1314
1039
|
return getLabelFormatDate(cellValue, props);
|
|
1315
1040
|
}
|
|
1316
1041
|
}
|
|
@@ -1329,114 +1054,101 @@ renderer.mixin({
|
|
|
1329
1054
|
VxeDateRangePicker: {
|
|
1330
1055
|
tableAutoFocus: true,
|
|
1331
1056
|
renderTableEdit(renderOpts, params) {
|
|
1332
|
-
const {
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
const {
|
|
1337
|
-
$table,
|
|
1338
|
-
row,
|
|
1339
|
-
column
|
|
1340
|
-
} = params;
|
|
1341
|
-
const {
|
|
1342
|
-
model
|
|
1343
|
-
} = column;
|
|
1344
|
-
const cellValue = (0, _util.getCellValue)(row, column);
|
|
1057
|
+
const { startField, endField } = renderOpts;
|
|
1058
|
+
const { $table, row, column } = params;
|
|
1059
|
+
const { model } = column;
|
|
1060
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
1345
1061
|
const seProps = {};
|
|
1346
1062
|
const seOs = {};
|
|
1347
1063
|
if (startField && endField) {
|
|
1348
|
-
seProps.startValue =
|
|
1349
|
-
seProps.endValue =
|
|
1350
|
-
seOs[
|
|
1064
|
+
seProps.startValue = import_xe_utils.default.get(row, startField);
|
|
1065
|
+
seProps.endValue = import_xe_utils.default.get(row, endField);
|
|
1066
|
+
seOs["onUpdate:startValue"] = (value) => {
|
|
1351
1067
|
if (startField) {
|
|
1352
|
-
|
|
1068
|
+
import_xe_utils.default.set(row, startField, value);
|
|
1353
1069
|
}
|
|
1354
1070
|
};
|
|
1355
|
-
seOs[
|
|
1071
|
+
seOs["onUpdate:endValue"] = (value) => {
|
|
1356
1072
|
if (endField) {
|
|
1357
|
-
|
|
1073
|
+
import_xe_utils.default.set(row, endField, value);
|
|
1358
1074
|
}
|
|
1359
1075
|
};
|
|
1360
1076
|
}
|
|
1361
|
-
return [
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1077
|
+
return [
|
|
1078
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1079
|
+
...getCellEditProps(renderOpts, params, cellValue, seProps),
|
|
1080
|
+
...getComponentOns(renderOpts, params, {
|
|
1081
|
+
model(cellValue2) {
|
|
1082
|
+
model.update = true;
|
|
1083
|
+
model.value = cellValue2;
|
|
1084
|
+
(0, import_util.setCellValue)(row, column, cellValue2);
|
|
1085
|
+
},
|
|
1086
|
+
change() {
|
|
1087
|
+
$table.updateStatus(params);
|
|
1088
|
+
},
|
|
1089
|
+
blur() {
|
|
1090
|
+
$table.handleCellRuleUpdateStatus("blur", params);
|
|
1091
|
+
}
|
|
1092
|
+
}, seOs)
|
|
1093
|
+
})
|
|
1094
|
+
];
|
|
1374
1095
|
},
|
|
1375
1096
|
renderTableDefault(renderOpts, params) {
|
|
1376
|
-
const {
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
const {
|
|
1381
|
-
row,
|
|
1382
|
-
column
|
|
1383
|
-
} = params;
|
|
1384
|
-
const {
|
|
1385
|
-
model
|
|
1386
|
-
} = column;
|
|
1387
|
-
const cellValue = (0, _util.getCellValue)(row, column);
|
|
1097
|
+
const { startField, endField } = renderOpts;
|
|
1098
|
+
const { row, column } = params;
|
|
1099
|
+
const { model } = column;
|
|
1100
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
1388
1101
|
const seProps = {};
|
|
1389
1102
|
const seOs = {};
|
|
1390
1103
|
if (startField && endField) {
|
|
1391
|
-
seProps.startValue =
|
|
1392
|
-
seProps.endValue =
|
|
1393
|
-
seOs[
|
|
1104
|
+
seProps.startValue = import_xe_utils.default.get(row, startField);
|
|
1105
|
+
seProps.endValue = import_xe_utils.default.get(row, endField);
|
|
1106
|
+
seOs["onUpdate:startValue"] = (value) => {
|
|
1394
1107
|
if (startField) {
|
|
1395
|
-
|
|
1108
|
+
import_xe_utils.default.set(row, startField, value);
|
|
1396
1109
|
}
|
|
1397
1110
|
};
|
|
1398
|
-
seOs[
|
|
1111
|
+
seOs["onUpdate:endValue"] = (value) => {
|
|
1399
1112
|
if (endField) {
|
|
1400
|
-
|
|
1113
|
+
import_xe_utils.default.set(row, endField, value);
|
|
1401
1114
|
}
|
|
1402
1115
|
};
|
|
1403
1116
|
}
|
|
1404
|
-
return [
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1117
|
+
return [
|
|
1118
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1119
|
+
...getCellEditProps(renderOpts, params, cellValue, seProps),
|
|
1120
|
+
...getComponentOns(renderOpts, params, {
|
|
1121
|
+
model(cellValue2) {
|
|
1122
|
+
model.update = true;
|
|
1123
|
+
model.value = cellValue2;
|
|
1124
|
+
(0, import_util.setCellValue)(row, column, cellValue2);
|
|
1125
|
+
}
|
|
1126
|
+
}, seOs)
|
|
1127
|
+
})
|
|
1128
|
+
];
|
|
1411
1129
|
},
|
|
1412
1130
|
renderTableCell(renderOpts, params) {
|
|
1413
|
-
const {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
const {
|
|
1418
|
-
row,
|
|
1419
|
-
column
|
|
1420
|
-
} = params;
|
|
1421
|
-
let startValue = '';
|
|
1422
|
-
let endValue = '';
|
|
1131
|
+
const { startField, endField } = renderOpts;
|
|
1132
|
+
const { row, column } = params;
|
|
1133
|
+
let startValue = "";
|
|
1134
|
+
let endValue = "";
|
|
1423
1135
|
if (startField && endField) {
|
|
1424
|
-
startValue =
|
|
1425
|
-
endValue =
|
|
1136
|
+
startValue = import_xe_utils.default.get(row, startField);
|
|
1137
|
+
endValue = import_xe_utils.default.get(row, endField);
|
|
1426
1138
|
} else {
|
|
1427
|
-
const cellValue =
|
|
1139
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1428
1140
|
if (cellValue) {
|
|
1429
|
-
if (
|
|
1141
|
+
if (import_xe_utils.default.isArray(cellValue)) {
|
|
1430
1142
|
startValue = cellValue[0];
|
|
1431
1143
|
endValue = cellValue[1];
|
|
1432
1144
|
} else {
|
|
1433
|
-
const strs = `${cellValue}`.split(
|
|
1145
|
+
const strs = `${cellValue}`.split(",");
|
|
1434
1146
|
startValue = strs[0];
|
|
1435
1147
|
endValue = strs[1];
|
|
1436
1148
|
}
|
|
1437
1149
|
}
|
|
1438
1150
|
}
|
|
1439
|
-
let cellLabel =
|
|
1151
|
+
let cellLabel = "";
|
|
1440
1152
|
if (startValue && endValue) {
|
|
1441
1153
|
cellLabel = `${startValue} ~ ${endValue}`;
|
|
1442
1154
|
}
|
|
@@ -1447,11 +1159,8 @@ renderer.mixin({
|
|
|
1447
1159
|
tableAutoFocus: true,
|
|
1448
1160
|
renderTableDefault: defaultInputEditRender,
|
|
1449
1161
|
renderTableCell(renderOpts, renderParams) {
|
|
1450
|
-
const {
|
|
1451
|
-
|
|
1452
|
-
column
|
|
1453
|
-
} = renderParams;
|
|
1454
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
1162
|
+
const { row, column } = renderParams;
|
|
1163
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1455
1164
|
const cellVNs = getCellLabelVNs(renderOpts, renderParams, cellValue);
|
|
1456
1165
|
return getInputRenderCellVNs(cellValue, cellVNs, renderOpts, renderParams);
|
|
1457
1166
|
},
|
|
@@ -1462,12 +1171,14 @@ renderer.mixin({
|
|
|
1462
1171
|
},
|
|
1463
1172
|
VxeButtonGroup: {
|
|
1464
1173
|
renderTableDefault(renderOpts, params) {
|
|
1465
|
-
const {
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1174
|
+
const { options } = renderOpts;
|
|
1175
|
+
return [
|
|
1176
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1177
|
+
options,
|
|
1178
|
+
...getCellEditProps(renderOpts, params, null),
|
|
1179
|
+
...getComponentOns(renderOpts, params)
|
|
1180
|
+
})
|
|
1181
|
+
];
|
|
1471
1182
|
}
|
|
1472
1183
|
},
|
|
1473
1184
|
VxeSelect: {
|
|
@@ -1475,81 +1186,45 @@ renderer.mixin({
|
|
|
1475
1186
|
renderTableEdit: defaultSelectEditRender,
|
|
1476
1187
|
renderTableDefault: defaultSelectEditRender,
|
|
1477
1188
|
renderTableCell(renderOpts, params) {
|
|
1478
|
-
const {
|
|
1479
|
-
|
|
1480
|
-
optionGroups
|
|
1481
|
-
} = renderOpts;
|
|
1482
|
-
const {
|
|
1483
|
-
$table,
|
|
1484
|
-
row,
|
|
1485
|
-
column
|
|
1486
|
-
} = params;
|
|
1189
|
+
const { options, optionGroups } = renderOpts;
|
|
1190
|
+
const { $table, row, column } = params;
|
|
1487
1191
|
const opSize = options ? options.length : null;
|
|
1488
1192
|
const ogSize = optionGroups ? optionGroups.length : null;
|
|
1489
|
-
const {
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
key: 'render_table_cell',
|
|
1493
|
-
isChanged({
|
|
1494
|
-
oldValue,
|
|
1495
|
-
cellValue
|
|
1496
|
-
}) {
|
|
1193
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
1194
|
+
key: "render_table_cell",
|
|
1195
|
+
isChanged({ oldValue, cellValue }) {
|
|
1497
1196
|
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
1498
1197
|
},
|
|
1499
|
-
setValue({
|
|
1500
|
-
cellValue
|
|
1501
|
-
}) {
|
|
1198
|
+
setValue({ cellValue }) {
|
|
1502
1199
|
return [cellValue, opSize, ogSize];
|
|
1503
1200
|
},
|
|
1504
|
-
getResult({
|
|
1505
|
-
cellValue
|
|
1506
|
-
}) {
|
|
1201
|
+
getResult({ cellValue }) {
|
|
1507
1202
|
return handleSelectCellValue(cellValue, renderOpts);
|
|
1508
1203
|
}
|
|
1509
1204
|
});
|
|
1510
|
-
// const cellResult = getSelectCellValue(renderOpts, params)
|
|
1511
1205
|
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
1512
1206
|
},
|
|
1513
1207
|
createTableFilterOptions: defaultFilterOptions,
|
|
1514
1208
|
renderTableFilter(renderOpts, params) {
|
|
1515
|
-
const {
|
|
1516
|
-
|
|
1517
|
-
} = params;
|
|
1518
|
-
const {
|
|
1519
|
-
options,
|
|
1520
|
-
optionProps,
|
|
1521
|
-
optionGroups,
|
|
1522
|
-
optionGroupProps
|
|
1523
|
-
} = renderOpts;
|
|
1209
|
+
const { column } = params;
|
|
1210
|
+
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts;
|
|
1524
1211
|
return column.filters.map((option, oIndex) => {
|
|
1525
1212
|
const optionValue = option.data;
|
|
1526
|
-
return (0,
|
|
1527
|
-
key: oIndex
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
optionGroups,
|
|
1532
|
-
optionGroupProps
|
|
1533
|
-
})), getFilterOns(renderOpts, params, option)));
|
|
1213
|
+
return (0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1214
|
+
key: oIndex,
|
|
1215
|
+
...getCellEditFilterProps(renderOpts, params, optionValue, { options, optionProps, optionGroups, optionGroupProps }),
|
|
1216
|
+
...getFilterOns(renderOpts, params, option)
|
|
1217
|
+
});
|
|
1534
1218
|
});
|
|
1535
1219
|
},
|
|
1536
1220
|
renderTableFloatingFilter(renderOpts, params) {
|
|
1537
|
-
const {
|
|
1538
|
-
|
|
1539
|
-
} = params;
|
|
1540
|
-
const {
|
|
1541
|
-
options,
|
|
1542
|
-
optionProps,
|
|
1543
|
-
optionGroups,
|
|
1544
|
-
optionGroupProps
|
|
1545
|
-
} = renderOpts;
|
|
1221
|
+
const { option } = params;
|
|
1222
|
+
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts;
|
|
1546
1223
|
const optionValue = option.data;
|
|
1547
|
-
return (0,
|
|
1548
|
-
options,
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
optionGroupProps
|
|
1552
|
-
})), getFloatingFilterOns(renderOpts, params, option)));
|
|
1224
|
+
return (0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1225
|
+
...getCellEditFilterProps(renderOpts, params, optionValue, { options, optionProps, optionGroups, optionGroupProps }),
|
|
1226
|
+
...getFloatingFilterOns(renderOpts, params, option)
|
|
1227
|
+
});
|
|
1553
1228
|
},
|
|
1554
1229
|
tableCellFormatter: handleFormatSelect,
|
|
1555
1230
|
tableCellCopyMethod: handleFormatSelect,
|
|
@@ -1559,38 +1234,32 @@ renderer.mixin({
|
|
|
1559
1234
|
},
|
|
1560
1235
|
VxeText: {
|
|
1561
1236
|
renderTableDefault(renderOpts, params) {
|
|
1562
|
-
const {
|
|
1563
|
-
|
|
1564
|
-
row,
|
|
1565
|
-
column
|
|
1566
|
-
} = params;
|
|
1567
|
-
const {
|
|
1568
|
-
props
|
|
1569
|
-
} = renderOpts;
|
|
1237
|
+
const { $table, row, column } = params;
|
|
1238
|
+
const { props } = renderOpts;
|
|
1570
1239
|
const cellLabel = $table.getCellLabel(row, column);
|
|
1571
|
-
return [
|
|
1572
|
-
|
|
1573
|
-
|
|
1240
|
+
return [
|
|
1241
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1242
|
+
...props || {},
|
|
1243
|
+
content: cellLabel,
|
|
1244
|
+
...getComponentOns(renderOpts, params)
|
|
1245
|
+
})
|
|
1246
|
+
];
|
|
1574
1247
|
}
|
|
1575
1248
|
},
|
|
1576
1249
|
VxeLink: {
|
|
1577
1250
|
renderTableDefault(renderOpts, params) {
|
|
1578
|
-
const {
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
column
|
|
1582
|
-
} = params;
|
|
1583
|
-
const {
|
|
1584
|
-
props
|
|
1585
|
-
} = renderOpts;
|
|
1586
|
-
const {
|
|
1587
|
-
href
|
|
1588
|
-
} = props || {};
|
|
1251
|
+
const { $table, row, column } = params;
|
|
1252
|
+
const { props } = renderOpts;
|
|
1253
|
+
const { href } = props || {};
|
|
1589
1254
|
const cellLabel = $table.getCellLabel(row, column);
|
|
1590
|
-
return [
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1255
|
+
return [
|
|
1256
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1257
|
+
...props || {},
|
|
1258
|
+
content: cellLabel,
|
|
1259
|
+
href: import_xe_utils.default.toFormatString(href, params),
|
|
1260
|
+
...getComponentOns(renderOpts, params)
|
|
1261
|
+
})
|
|
1262
|
+
];
|
|
1594
1263
|
}
|
|
1595
1264
|
},
|
|
1596
1265
|
/**
|
|
@@ -1604,39 +1273,22 @@ renderer.mixin({
|
|
|
1604
1273
|
},
|
|
1605
1274
|
FormatSelect: {
|
|
1606
1275
|
renderTableDefault(renderOpts, params) {
|
|
1607
|
-
const {
|
|
1608
|
-
|
|
1609
|
-
optionGroups
|
|
1610
|
-
} = renderOpts;
|
|
1611
|
-
const {
|
|
1612
|
-
$table,
|
|
1613
|
-
row,
|
|
1614
|
-
column
|
|
1615
|
-
} = params;
|
|
1276
|
+
const { options, optionGroups } = renderOpts;
|
|
1277
|
+
const { $table, row, column } = params;
|
|
1616
1278
|
const opSize = options ? options.length : null;
|
|
1617
1279
|
const ogSize = optionGroups ? optionGroups.length : null;
|
|
1618
|
-
const {
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
key: 'render_table_cell',
|
|
1622
|
-
isChanged({
|
|
1623
|
-
oldValue,
|
|
1624
|
-
cellValue
|
|
1625
|
-
}) {
|
|
1280
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
1281
|
+
key: "render_table_cell",
|
|
1282
|
+
isChanged({ oldValue, cellValue }) {
|
|
1626
1283
|
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
1627
1284
|
},
|
|
1628
|
-
setValue({
|
|
1629
|
-
cellValue
|
|
1630
|
-
}) {
|
|
1285
|
+
setValue({ cellValue }) {
|
|
1631
1286
|
return [cellValue, opSize, ogSize];
|
|
1632
1287
|
},
|
|
1633
|
-
getResult({
|
|
1634
|
-
cellValue
|
|
1635
|
-
}) {
|
|
1288
|
+
getResult({ cellValue }) {
|
|
1636
1289
|
return handleSelectCellValue(cellValue, renderOpts);
|
|
1637
1290
|
}
|
|
1638
1291
|
});
|
|
1639
|
-
// const cellResult = getSelectCellValue(renderOpts, params)
|
|
1640
1292
|
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
1641
1293
|
},
|
|
1642
1294
|
tableCellFormatter: handleFormatSelect,
|
|
@@ -1649,39 +1301,22 @@ renderer.mixin({
|
|
|
1649
1301
|
tableAutoFocus: true,
|
|
1650
1302
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
1651
1303
|
renderTableCell(renderOpts, params) {
|
|
1652
|
-
const {
|
|
1653
|
-
|
|
1654
|
-
optionGroups
|
|
1655
|
-
} = renderOpts;
|
|
1656
|
-
const {
|
|
1657
|
-
$table,
|
|
1658
|
-
row,
|
|
1659
|
-
column
|
|
1660
|
-
} = params;
|
|
1304
|
+
const { options, optionGroups } = renderOpts;
|
|
1305
|
+
const { $table, row, column } = params;
|
|
1661
1306
|
const opSize = options ? options.length : null;
|
|
1662
1307
|
const ogSize = optionGroups ? optionGroups.length : null;
|
|
1663
|
-
const {
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
key: 'render_table_cell',
|
|
1667
|
-
isChanged({
|
|
1668
|
-
oldValue,
|
|
1669
|
-
cellValue
|
|
1670
|
-
}) {
|
|
1308
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
1309
|
+
key: "render_table_cell",
|
|
1310
|
+
isChanged({ oldValue, cellValue }) {
|
|
1671
1311
|
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
1672
1312
|
},
|
|
1673
|
-
setValue({
|
|
1674
|
-
cellValue
|
|
1675
|
-
}) {
|
|
1313
|
+
setValue({ cellValue }) {
|
|
1676
1314
|
return [cellValue, opSize, ogSize];
|
|
1677
1315
|
},
|
|
1678
|
-
getResult({
|
|
1679
|
-
cellValue
|
|
1680
|
-
}) {
|
|
1316
|
+
getResult({ cellValue }) {
|
|
1681
1317
|
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
1682
1318
|
}
|
|
1683
1319
|
});
|
|
1684
|
-
// const cellResult = getTreeSelectCellValue(renderOpts, params)
|
|
1685
1320
|
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
1686
1321
|
},
|
|
1687
1322
|
tableCellFormatter: handleFormatTreeSelect,
|
|
@@ -1700,39 +1335,22 @@ renderer.mixin({
|
|
|
1700
1335
|
},
|
|
1701
1336
|
FormatTreeSelect: {
|
|
1702
1337
|
renderTableDefault(renderOpts, params) {
|
|
1703
|
-
const {
|
|
1704
|
-
|
|
1705
|
-
optionGroups
|
|
1706
|
-
} = renderOpts;
|
|
1707
|
-
const {
|
|
1708
|
-
$table,
|
|
1709
|
-
row,
|
|
1710
|
-
column
|
|
1711
|
-
} = params;
|
|
1338
|
+
const { options, optionGroups } = renderOpts;
|
|
1339
|
+
const { $table, row, column } = params;
|
|
1712
1340
|
const opSize = options ? options.length : null;
|
|
1713
1341
|
const ogSize = optionGroups ? optionGroups.length : null;
|
|
1714
|
-
const {
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
key: 'render_table_cell',
|
|
1718
|
-
isChanged({
|
|
1719
|
-
oldValue,
|
|
1720
|
-
cellValue
|
|
1721
|
-
}) {
|
|
1342
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
1343
|
+
key: "render_table_cell",
|
|
1344
|
+
isChanged({ oldValue, cellValue }) {
|
|
1722
1345
|
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
1723
1346
|
},
|
|
1724
|
-
setValue({
|
|
1725
|
-
cellValue
|
|
1726
|
-
}) {
|
|
1347
|
+
setValue({ cellValue }) {
|
|
1727
1348
|
return [cellValue, opSize, ogSize];
|
|
1728
1349
|
},
|
|
1729
|
-
getResult({
|
|
1730
|
-
cellValue
|
|
1731
|
-
}) {
|
|
1350
|
+
getResult({ cellValue }) {
|
|
1732
1351
|
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
1733
1352
|
}
|
|
1734
1353
|
});
|
|
1735
|
-
// const cellResult = getTreeSelectCellValue(renderOpts, params)
|
|
1736
1354
|
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
1737
1355
|
},
|
|
1738
1356
|
tableCellFormatter: handleFormatTreeSelect,
|
|
@@ -1744,39 +1362,22 @@ renderer.mixin({
|
|
|
1744
1362
|
tableAutoFocus: true,
|
|
1745
1363
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
1746
1364
|
renderTableCell(renderOpts, params) {
|
|
1747
|
-
const {
|
|
1748
|
-
|
|
1749
|
-
optionGroups
|
|
1750
|
-
} = renderOpts;
|
|
1751
|
-
const {
|
|
1752
|
-
$table,
|
|
1753
|
-
row,
|
|
1754
|
-
column
|
|
1755
|
-
} = params;
|
|
1365
|
+
const { options, optionGroups } = renderOpts;
|
|
1366
|
+
const { $table, row, column } = params;
|
|
1756
1367
|
const opSize = options ? options.length : null;
|
|
1757
1368
|
const ogSize = optionGroups ? optionGroups.length : null;
|
|
1758
|
-
const {
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
key: 'render_table_cell',
|
|
1762
|
-
isChanged({
|
|
1763
|
-
oldValue,
|
|
1764
|
-
cellValue
|
|
1765
|
-
}) {
|
|
1369
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
1370
|
+
key: "render_table_cell",
|
|
1371
|
+
isChanged({ oldValue, cellValue }) {
|
|
1766
1372
|
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
1767
1373
|
},
|
|
1768
|
-
setValue({
|
|
1769
|
-
cellValue
|
|
1770
|
-
}) {
|
|
1374
|
+
setValue({ cellValue }) {
|
|
1771
1375
|
return [cellValue, opSize, ogSize];
|
|
1772
1376
|
},
|
|
1773
|
-
getResult({
|
|
1774
|
-
cellValue
|
|
1775
|
-
}) {
|
|
1377
|
+
getResult({ cellValue }) {
|
|
1776
1378
|
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
1777
1379
|
}
|
|
1778
1380
|
});
|
|
1779
|
-
// const cellResult = getTreeSelectCellValue(renderOpts, params)
|
|
1780
1381
|
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
1781
1382
|
},
|
|
1782
1383
|
tableCellFormatter: handleFormatTreeSelect,
|
|
@@ -1788,39 +1389,22 @@ renderer.mixin({
|
|
|
1788
1389
|
tableAutoFocus: true,
|
|
1789
1390
|
renderTableEdit: defaultTableOrTreeSelectEditRender,
|
|
1790
1391
|
renderTableCell(renderOpts, params) {
|
|
1791
|
-
const {
|
|
1792
|
-
|
|
1793
|
-
optionGroups
|
|
1794
|
-
} = renderOpts;
|
|
1795
|
-
const {
|
|
1796
|
-
$table,
|
|
1797
|
-
row,
|
|
1798
|
-
column
|
|
1799
|
-
} = params;
|
|
1392
|
+
const { options, optionGroups } = renderOpts;
|
|
1393
|
+
const { $table, row, column } = params;
|
|
1800
1394
|
const opSize = options ? options.length : null;
|
|
1801
1395
|
const ogSize = optionGroups ? optionGroups.length : null;
|
|
1802
|
-
const {
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
key: 'render_table_cell',
|
|
1806
|
-
isChanged({
|
|
1807
|
-
oldValue,
|
|
1808
|
-
cellValue
|
|
1809
|
-
}) {
|
|
1396
|
+
const { cellResult } = $table.effectCellData(row, column, {
|
|
1397
|
+
key: "render_table_cell",
|
|
1398
|
+
isChanged({ oldValue, cellValue }) {
|
|
1810
1399
|
return oldValue && oldValue[0] === cellValue && oldValue[1] === opSize && oldValue[2] === ogSize;
|
|
1811
1400
|
},
|
|
1812
|
-
setValue({
|
|
1813
|
-
cellValue
|
|
1814
|
-
}) {
|
|
1401
|
+
setValue({ cellValue }) {
|
|
1815
1402
|
return [cellValue, opSize, ogSize];
|
|
1816
1403
|
},
|
|
1817
|
-
getResult({
|
|
1818
|
-
cellValue
|
|
1819
|
-
}) {
|
|
1404
|
+
getResult({ cellValue }) {
|
|
1820
1405
|
return handleTreeSelectCellValue(cellValue, renderOpts);
|
|
1821
1406
|
}
|
|
1822
1407
|
});
|
|
1823
|
-
// const cellResult = getTreeSelectCellValue(renderOpts, params)
|
|
1824
1408
|
return getCellLabelVNs(renderOpts, params, cellResult);
|
|
1825
1409
|
},
|
|
1826
1410
|
tableCellFormatter: handleFormatTreeSelect,
|
|
@@ -1831,69 +1415,56 @@ renderer.mixin({
|
|
|
1831
1415
|
VxeColorPicker: {
|
|
1832
1416
|
tableAutoFocus: true,
|
|
1833
1417
|
renderTableEdit(renderOpts, params) {
|
|
1834
|
-
const {
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
colors: options
|
|
1844
|
-
})), getEditOns(renderOpts, params)))];
|
|
1418
|
+
const { row, column } = params;
|
|
1419
|
+
const { options } = renderOpts;
|
|
1420
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
1421
|
+
return [
|
|
1422
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1423
|
+
...getCellEditProps(renderOpts, params, cellValue, { colors: options }),
|
|
1424
|
+
...getEditOns(renderOpts, params)
|
|
1425
|
+
})
|
|
1426
|
+
];
|
|
1845
1427
|
},
|
|
1846
1428
|
renderTableCell(renderOpts, params) {
|
|
1847
|
-
const {
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
column
|
|
1851
|
-
} = params;
|
|
1852
|
-
const {
|
|
1853
|
-
props
|
|
1854
|
-
} = renderOpts;
|
|
1855
|
-
const {
|
|
1856
|
-
computeSize
|
|
1857
|
-
} = $table.getComputeMaps();
|
|
1429
|
+
const { $table, row, column } = params;
|
|
1430
|
+
const { props } = renderOpts;
|
|
1431
|
+
const { computeSize } = $table.getComputeMaps();
|
|
1858
1432
|
const customSize = props ? props.size : null;
|
|
1859
1433
|
const vSize = customSize || computeSize.value;
|
|
1860
|
-
const cellValue =
|
|
1861
|
-
return (0,
|
|
1862
|
-
class: [
|
|
1434
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1435
|
+
return (0, import_vue.h)("span", {
|
|
1436
|
+
class: ["vxe-color-picker--readonly", {
|
|
1863
1437
|
[`size--${vSize}`]: vSize
|
|
1864
1438
|
}]
|
|
1865
|
-
}, [
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1439
|
+
}, [
|
|
1440
|
+
(0, import_vue.h)("div", {
|
|
1441
|
+
class: ["vxe-color-picker--readonly-color", {
|
|
1442
|
+
"is--empty": !cellValue
|
|
1443
|
+
}],
|
|
1444
|
+
style: cellValue ? {
|
|
1445
|
+
backgroundColor: cellValue
|
|
1446
|
+
} : void 0
|
|
1447
|
+
})
|
|
1448
|
+
]);
|
|
1873
1449
|
}
|
|
1874
1450
|
},
|
|
1875
1451
|
VxeIconPicker: {
|
|
1876
1452
|
tableAutoFocus: true,
|
|
1877
1453
|
renderTableEdit(renderOpts, params) {
|
|
1878
|
-
const {
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
icons: options
|
|
1888
|
-
})), getEditOns(renderOpts, params)))];
|
|
1454
|
+
const { row, column } = params;
|
|
1455
|
+
const { options } = renderOpts;
|
|
1456
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
1457
|
+
return [
|
|
1458
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1459
|
+
...getCellEditProps(renderOpts, params, cellValue, { icons: options }),
|
|
1460
|
+
...getEditOns(renderOpts, params)
|
|
1461
|
+
})
|
|
1462
|
+
];
|
|
1889
1463
|
},
|
|
1890
1464
|
renderTableCell(renderOpts, params) {
|
|
1891
|
-
const {
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
} = params;
|
|
1895
|
-
const cellValue = _xeUtils.default.get(row, column.field);
|
|
1896
|
-
return (0, _vue.h)('i', {
|
|
1465
|
+
const { row, column } = params;
|
|
1466
|
+
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1467
|
+
return (0, import_vue.h)("i", {
|
|
1897
1468
|
class: cellValue
|
|
1898
1469
|
});
|
|
1899
1470
|
}
|
|
@@ -1908,7 +1479,7 @@ renderer.mixin({
|
|
|
1908
1479
|
renderTableDefault: radioAndCheckboxGroupEditRender
|
|
1909
1480
|
},
|
|
1910
1481
|
VxeSwitch: {
|
|
1911
|
-
tableAutoFocus:
|
|
1482
|
+
tableAutoFocus: "button",
|
|
1912
1483
|
renderTableEdit: defaultEditRender,
|
|
1913
1484
|
renderTableDefault: defaultEditRender
|
|
1914
1485
|
},
|
|
@@ -1919,47 +1490,44 @@ renderer.mixin({
|
|
|
1919
1490
|
},
|
|
1920
1491
|
VxeImage: {
|
|
1921
1492
|
renderTableDefault(renderOpts, params) {
|
|
1922
|
-
const {
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
}), getEditOns(renderOpts, params)))];
|
|
1493
|
+
const { row, column } = params;
|
|
1494
|
+
const { props } = renderOpts;
|
|
1495
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
1496
|
+
return [
|
|
1497
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1498
|
+
...props,
|
|
1499
|
+
src: cellValue,
|
|
1500
|
+
...getEditOns(renderOpts, params)
|
|
1501
|
+
})
|
|
1502
|
+
];
|
|
1933
1503
|
}
|
|
1934
1504
|
},
|
|
1935
1505
|
VxeImageGroup: {
|
|
1936
1506
|
renderTableDefault(renderOpts, params) {
|
|
1937
|
-
const {
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
}), getEditOns(renderOpts, params)))];
|
|
1507
|
+
const { row, column } = params;
|
|
1508
|
+
const { props } = renderOpts;
|
|
1509
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
1510
|
+
return [
|
|
1511
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1512
|
+
...props,
|
|
1513
|
+
urlList: cellValue,
|
|
1514
|
+
...getEditOns(renderOpts, params)
|
|
1515
|
+
})
|
|
1516
|
+
];
|
|
1948
1517
|
}
|
|
1949
1518
|
},
|
|
1950
1519
|
VxeTextEllipsis: {
|
|
1951
1520
|
renderTableDefault(renderOpts, params) {
|
|
1952
|
-
const {
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
}), getEditOns(renderOpts, params)))];
|
|
1521
|
+
const { row, column } = params;
|
|
1522
|
+
const { props } = renderOpts;
|
|
1523
|
+
const cellValue = (0, import_util.getCellValue)(row, column);
|
|
1524
|
+
return [
|
|
1525
|
+
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1526
|
+
...props,
|
|
1527
|
+
content: cellValue,
|
|
1528
|
+
...getEditOns(renderOpts, params)
|
|
1529
|
+
})
|
|
1530
|
+
];
|
|
1963
1531
|
}
|
|
1964
1532
|
},
|
|
1965
1533
|
VxeRate: {
|
|
@@ -1970,29 +1538,24 @@ renderer.mixin({
|
|
|
1970
1538
|
},
|
|
1971
1539
|
// 以下已废弃
|
|
1972
1540
|
$input: {
|
|
1973
|
-
tableAutoFocus:
|
|
1541
|
+
tableAutoFocus: "input",
|
|
1974
1542
|
renderTableEdit: oldEditRender,
|
|
1975
1543
|
renderTableCell(renderOpts, params) {
|
|
1976
1544
|
var _a;
|
|
1977
|
-
const {
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
row,
|
|
1982
|
-
column
|
|
1983
|
-
} = params;
|
|
1984
|
-
const digits = props.digits || ((_a = getConfig().input) === null || _a === void 0 ? void 0 : _a.digits) || 2;
|
|
1985
|
-
let cellValue = _xeUtils.default.get(row, column.field);
|
|
1545
|
+
const { props = {} } = renderOpts;
|
|
1546
|
+
const { row, column } = params;
|
|
1547
|
+
const digits = props.digits || ((_a = getConfig().input) == null ? void 0 : _a.digits) || 2;
|
|
1548
|
+
let cellValue = import_xe_utils.default.get(row, column.field);
|
|
1986
1549
|
if (cellValue) {
|
|
1987
1550
|
switch (props.type) {
|
|
1988
|
-
case
|
|
1989
|
-
case
|
|
1990
|
-
case
|
|
1991
|
-
case
|
|
1551
|
+
case "date":
|
|
1552
|
+
case "week":
|
|
1553
|
+
case "month":
|
|
1554
|
+
case "year":
|
|
1992
1555
|
cellValue = getLabelFormatDate(cellValue, props);
|
|
1993
1556
|
break;
|
|
1994
|
-
case
|
|
1995
|
-
cellValue =
|
|
1557
|
+
case "float":
|
|
1558
|
+
cellValue = import_xe_utils.default.toFixed(import_xe_utils.default.floor(cellValue, digits), digits);
|
|
1996
1559
|
break;
|
|
1997
1560
|
}
|
|
1998
1561
|
}
|
|
@@ -2003,7 +1566,7 @@ renderer.mixin({
|
|
|
2003
1566
|
tableFilterDefaultMethod: handleInputFilterMethod
|
|
2004
1567
|
},
|
|
2005
1568
|
$textarea: {
|
|
2006
|
-
tableAutoFocus:
|
|
1569
|
+
tableAutoFocus: "textarea"
|
|
2007
1570
|
},
|
|
2008
1571
|
$button: {
|
|
2009
1572
|
renderTableDefault: oldButtonEditRender
|
|
@@ -2012,47 +1575,37 @@ renderer.mixin({
|
|
|
2012
1575
|
renderTableDefault: oldButtonsEditRender
|
|
2013
1576
|
},
|
|
2014
1577
|
$select: {
|
|
2015
|
-
tableAutoFocus:
|
|
1578
|
+
tableAutoFocus: "input",
|
|
2016
1579
|
renderTableEdit: oldSelectEditRender,
|
|
2017
1580
|
renderTableDefault: oldSelectEditRender,
|
|
2018
1581
|
renderTableCell(renderOpts, params) {
|
|
2019
1582
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
|
|
2020
1583
|
},
|
|
2021
1584
|
renderTableFilter(renderOpts, params) {
|
|
2022
|
-
const {
|
|
2023
|
-
|
|
2024
|
-
} = params;
|
|
2025
|
-
const {
|
|
2026
|
-
options,
|
|
2027
|
-
optionProps,
|
|
2028
|
-
optionGroups,
|
|
2029
|
-
optionGroupProps
|
|
2030
|
-
} = renderOpts;
|
|
1585
|
+
const { column } = params;
|
|
1586
|
+
const { options, optionProps, optionGroups, optionGroupProps } = renderOpts;
|
|
2031
1587
|
return column.filters.map((option, oIndex) => {
|
|
2032
1588
|
const optionValue = option.data;
|
|
2033
|
-
return (0,
|
|
2034
|
-
key: oIndex
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
optionGroups,
|
|
2039
|
-
optionGroupProps
|
|
2040
|
-
})), getFilterOns(renderOpts, params, option)));
|
|
1589
|
+
return (0, import_vue.h)(getOldComponent(renderOpts), {
|
|
1590
|
+
key: oIndex,
|
|
1591
|
+
...getCellEditFilterProps(renderOpts, params, optionValue, { options, optionProps, optionGroups, optionGroupProps }),
|
|
1592
|
+
...getFilterOns(renderOpts, params, option)
|
|
1593
|
+
});
|
|
2041
1594
|
});
|
|
2042
1595
|
},
|
|
2043
1596
|
tableFilterDefaultMethod: handleFilterMethod,
|
|
2044
1597
|
tableExportMethod: handleExportSelectMethod
|
|
2045
1598
|
},
|
|
2046
1599
|
$radio: {
|
|
2047
|
-
tableAutoFocus:
|
|
1600
|
+
tableAutoFocus: "input"
|
|
2048
1601
|
},
|
|
2049
1602
|
$checkbox: {
|
|
2050
|
-
tableAutoFocus:
|
|
1603
|
+
tableAutoFocus: "input"
|
|
2051
1604
|
},
|
|
2052
1605
|
$switch: {
|
|
2053
|
-
tableAutoFocus:
|
|
1606
|
+
tableAutoFocus: "button",
|
|
2054
1607
|
renderTableEdit: oldEditRender,
|
|
2055
1608
|
renderTableDefault: oldEditRender
|
|
2056
1609
|
}
|
|
2057
1610
|
// 以上已废弃
|
|
2058
|
-
});
|
|
1611
|
+
});
|