vxe-table 4.3.4 → 4.3.6-beta.0
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/es/button/style.css +465 -341
- package/es/checkbox/style.css +156 -127
- package/es/checkbox-group/style.css +1 -1
- package/es/colgroup/style.css +1 -1
- package/es/column/style.css +1 -1
- package/es/edit/style.css +1 -1
- package/es/export/src/hook.js +1 -0
- package/es/export/style.css +136 -108
- package/es/filter/src/hook.js +1 -1
- package/es/filter/style.css +103 -82
- package/es/footer/src/footer.js +3 -3
- package/es/form/src/form.js +5 -4
- package/es/form/style.css +201 -168
- package/es/form-gather/style.css +1 -1
- package/es/form-item/style.css +1 -1
- package/es/grid/style.css +61 -50
- package/es/header/src/header.js +10 -5
- package/es/icon/style/iconfont.1669214286403.ttf +0 -0
- package/es/icon/style/iconfont.1669214286403.woff +0 -0
- package/es/icon/style/iconfont.1669214286403.woff2 +0 -0
- package/es/icon/style.css +406 -178
- package/es/iconfont.1669214286403.ttf +0 -0
- package/es/iconfont.1669214286403.woff +0 -0
- package/es/iconfont.1669214286403.woff2 +0 -0
- package/es/input/style.css +771 -595
- package/es/keyboard/style.css +1 -1
- package/es/list/src/list.js +7 -1
- package/es/list/style.css +19 -14
- package/es/loading/style.css +52 -48
- package/es/locale/lang/en-US.js +0 -1
- package/es/locale/lang/ja-JP.js +0 -1
- package/es/locale/lang/zh-CN.js +0 -1
- package/es/locale/lang/zh-TC.js +0 -1
- package/es/menu/style.css +79 -59
- package/es/modal/style.css +311 -247
- package/es/optgroup/style.css +1 -1
- package/es/option/style.css +1 -1
- package/es/pager/style.css +307 -257
- package/es/pulldown/src/pulldown.js +9 -3
- package/es/pulldown/style.css +42 -31
- package/es/radio/style.css +184 -151
- package/es/radio-button/style.css +1 -1
- package/es/radio-group/style.css +1 -1
- package/es/select/style.css +108 -79
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/style.css +87 -67
- package/es/table/src/column.js +2 -0
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/table.js +36 -40
- package/es/table/style.css +1025 -835
- package/es/textarea/style.css +57 -41
- package/es/toolbar/style.css +216 -174
- package/es/tools/log.js +1 -1
- package/es/tooltip/style.css +87 -63
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/style.css +458 -226
- package/es/validator/style.css +1 -1
- package/es/vxe-button/style.css +465 -341
- package/es/vxe-checkbox/style.css +156 -127
- package/es/vxe-checkbox-group/style.css +1 -1
- package/es/vxe-colgroup/style.css +1 -1
- package/es/vxe-column/style.css +1 -1
- package/es/vxe-form/style.css +201 -168
- package/es/vxe-form-gather/style.css +1 -1
- package/es/vxe-form-item/style.css +1 -1
- package/es/vxe-grid/style.css +61 -50
- package/es/vxe-icon/style.css +406 -178
- package/es/vxe-input/style.css +771 -595
- package/es/vxe-list/style.css +19 -14
- package/es/vxe-loading/style.css +52 -48
- package/es/vxe-modal/style.css +311 -247
- package/es/vxe-module-edit/style.css +1 -1
- package/es/vxe-module-export/style.css +136 -108
- package/es/vxe-module-filter/style.css +103 -82
- package/es/vxe-module-keyboard/style.css +1 -1
- package/es/vxe-module-menu/style.css +79 -59
- package/es/vxe-module-validator/style.css +1 -1
- package/es/vxe-optgroup/style.css +1 -1
- package/es/vxe-option/style.css +1 -1
- package/es/vxe-pager/style.css +307 -257
- package/es/vxe-pulldown/style.css +42 -31
- package/es/vxe-radio/style.css +184 -151
- package/es/vxe-radio-button/style.css +1 -1
- package/es/vxe-radio-group/style.css +1 -1
- package/es/vxe-select/style.css +108 -79
- package/es/vxe-switch/style.css +87 -67
- package/es/vxe-table/style.css +1025 -835
- package/es/vxe-textarea/style.css +57 -41
- package/es/vxe-toolbar/style.css +216 -174
- package/es/vxe-tooltip/style.css +87 -63
- package/lib/all.js +45 -115
- package/lib/all.min.js +1 -1
- package/lib/button/index.js +1 -7
- package/lib/button/index.min.js +1 -1
- package/lib/button/src/button.js +48 -113
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +465 -341
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/index.js +1 -7
- package/lib/checkbox/index.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +12 -32
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +13 -28
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/checkbox/style/style.css +156 -127
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/checkbox-group/index.js +1 -7
- package/lib/checkbox-group/index.min.js +1 -1
- package/lib/checkbox-group/style/style.css +1 -1
- package/lib/colgroup/index.js +5 -12
- package/lib/colgroup/index.min.js +1 -1
- package/lib/colgroup/style/style.css +1 -1
- package/lib/column/index.js +5 -12
- package/lib/column/index.min.js +1 -1
- package/lib/column/style/style.css +1 -1
- package/lib/dynamics/index.js +1 -5
- package/lib/dynamics/index.min.js +1 -1
- package/lib/edit/index.js +1 -5
- package/lib/edit/index.min.js +1 -1
- package/lib/edit/src/hook.js +102 -248
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/edit/style/style.css +1 -1
- package/lib/export/index.js +4 -19
- package/lib/export/index.min.js +1 -1
- package/lib/export/src/export-panel.js +38 -77
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/hook.js +127 -380
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/import-panel.js +17 -39
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/util.js +10 -52
- package/lib/export/src/util.min.js +1 -1
- package/lib/export/style/style.css +136 -108
- package/lib/export/style/style.min.css +1 -1
- package/lib/filter/index.js +1 -10
- package/lib/filter/index.min.js +1 -1
- package/lib/filter/src/hook.js +31 -82
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/filter/src/panel.js +25 -52
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/filter/style/style.css +103 -82
- package/lib/filter/style/style.min.css +1 -1
- package/lib/footer/index.js +1 -7
- package/lib/footer/index.min.js +1 -1
- package/lib/footer/src/footer.js +54 -99
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/index.js +1 -7
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-config-item.js +27 -56
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-gather.js +3 -12
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +23 -52
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +78 -185
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +1 -9
- package/lib/form/src/render.js +7 -26
- package/lib/form/src/render.min.js +1 -1
- package/lib/form/src/util.js +4 -28
- package/lib/form/src/util.min.js +1 -1
- package/lib/form/style/style.css +201 -168
- package/lib/form/style/style.min.css +1 -1
- package/lib/form-gather/index.js +1 -7
- package/lib/form-gather/index.min.js +1 -1
- package/lib/form-gather/style/style.css +1 -1
- package/lib/form-item/index.js +1 -7
- package/lib/form-item/index.min.js +1 -1
- package/lib/form-item/style/style.css +1 -1
- package/lib/grid/index.js +1 -7
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +97 -315
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +61 -50
- package/lib/grid/style/style.min.css +1 -1
- package/lib/header/index.js +1 -7
- package/lib/header/index.min.js +1 -1
- package/lib/header/src/header.js +57 -92
- package/lib/header/src/header.min.js +1 -1
- package/lib/header/src/util.js +3 -14
- package/lib/header/src/util.min.js +1 -1
- package/lib/hooks/size.js +0 -2
- package/lib/icon/index.js +1 -7
- package/lib/icon/index.min.js +1 -1
- package/lib/icon/src/icon.js +2 -7
- package/lib/icon/style/iconfont.1669214286403.ttf +0 -0
- package/lib/icon/style/iconfont.1669214286403.woff +0 -0
- package/lib/icon/style/iconfont.1669214286403.woff2 +0 -0
- package/lib/icon/style/style.css +406 -178
- package/lib/icon/style/style.min.css +719 -1
- package/lib/iconfont.1669214286403.ttf +0 -0
- package/lib/iconfont.1669214286403.woff +0 -0
- package/lib/iconfont.1669214286403.woff2 +0 -0
- package/lib/index.common.js +3 -10
- package/lib/index.common.min.js +1 -1
- package/lib/index.umd.js +14514 -23890
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.js +1 -7
- package/lib/input/index.min.js +1 -1
- package/lib/input/src/date.js +0 -10
- package/lib/input/src/date.min.js +1 -1
- package/lib/input/src/input.js +217 -553
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/src/number.js +0 -5
- package/lib/input/style/style.css +771 -595
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/index.js +1 -5
- package/lib/keyboard/index.min.js +1 -1
- package/lib/keyboard/src/hook.js +40 -106
- package/lib/keyboard/src/hook.min.js +1 -1
- package/lib/keyboard/style/style.css +1 -1
- package/lib/list/index.js +1 -7
- package/lib/list/index.min.js +1 -1
- package/lib/list/src/list.js +39 -91
- package/lib/list/src/list.min.js +1 -1
- package/lib/list/style/style.css +19 -14
- package/lib/loading/index.js +1 -4
- package/lib/loading/index.min.js +1 -1
- package/lib/loading/src/loading.js +1 -6
- package/lib/loading/style/style.css +52 -48
- package/lib/loading/style/style.min.css +1 -1
- package/lib/locale/lang/en-US.js +0 -1
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +0 -1
- package/lib/locale/lang/ja-JP.js +0 -1
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +0 -1
- package/lib/locale/lang/zh-CN.js +0 -1
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +0 -1
- package/lib/locale/lang/zh-HK.js +0 -3
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +0 -1
- package/lib/locale/lang/zh-MO.js +0 -3
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +0 -1
- package/lib/locale/lang/zh-TC.js +0 -1
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +0 -1
- package/lib/locale/lang/zh-TW.js +0 -3
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +0 -1
- package/lib/menu/index.js +1 -10
- package/lib/menu/index.min.js +1 -1
- package/lib/menu/src/hooks.js +45 -109
- package/lib/menu/src/hooks.min.js +1 -1
- package/lib/menu/src/panel.js +10 -19
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/menu/style/style.css +79 -59
- package/lib/menu/style/style.min.css +1 -1
- package/lib/modal/index.js +5 -36
- package/lib/modal/index.min.js +1 -1
- package/lib/modal/src/modal.js +128 -315
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +311 -247
- package/lib/modal/style/style.min.css +1 -1
- package/lib/optgroup/index.js +1 -7
- package/lib/optgroup/index.min.js +1 -1
- package/lib/optgroup/style/style.css +1 -1
- package/lib/option/index.js +1 -7
- package/lib/option/index.min.js +1 -1
- package/lib/option/style/style.css +1 -1
- package/lib/pager/index.js +1 -7
- package/lib/pager/index.min.js +1 -1
- package/lib/pager/src/pager.js +74 -151
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +307 -257
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/index.js +1 -7
- package/lib/pulldown/index.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +46 -90
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/pulldown/style/style.css +42 -31
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/radio/index.js +1 -7
- package/lib/radio/index.min.js +1 -1
- package/lib/radio/src/button.js +14 -32
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/group.js +11 -22
- package/lib/radio/src/group.min.js +1 -1
- package/lib/radio/src/radio.js +15 -34
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/radio/style/style.css +184 -151
- package/lib/radio/style/style.min.css +1 -1
- package/lib/radio-button/index.js +1 -7
- package/lib/radio-button/index.min.js +1 -1
- package/lib/radio-button/style/style.css +1 -1
- package/lib/radio-group/index.js +1 -7
- package/lib/radio-group/index.min.js +1 -1
- package/lib/radio-group/style/style.css +1 -1
- package/lib/select/index.js +1 -7
- package/lib/select/index.min.js +1 -1
- package/lib/select/src/optgroup.js +1 -5
- package/lib/select/src/option.js +1 -5
- package/lib/select/src/optionInfo.js +1 -9
- package/lib/select/src/select.js +103 -256
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/src/util.js +0 -13
- package/lib/select/src/util.min.js +1 -1
- package/lib/select/style/style.css +108 -79
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +1 -7
- package/lib/switch/index.min.js +1 -1
- package/lib/switch/src/switch.js +16 -35
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/switch/style/style.css +87 -67
- package/lib/switch/style/style.min.css +1 -1
- package/lib/table/index.js +1 -7
- package/lib/table/index.min.js +1 -1
- package/lib/table/src/body.js +143 -262
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +138 -259
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +4 -13
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +6 -35
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/group.js +2 -15
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/props.js +25 -29
- package/lib/table/src/props.min.js +1 -1
- package/lib/table/src/table.js +670 -1620
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +32 -102
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +1025 -835
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/index.js +1 -7
- package/lib/textarea/index.min.js +1 -1
- package/lib/textarea/src/textarea.js +31 -71
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/textarea/style/style.css +57 -41
- package/lib/textarea/style/style.min.css +1 -1
- package/lib/toolbar/index.js +1 -7
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +60 -167
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +216 -174
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +6 -48
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/event.js +8 -20
- package/lib/tools/event.min.js +1 -1
- package/lib/tools/log.js +1 -6
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/resize.js +3 -27
- package/lib/tools/utils.js +0 -16
- package/lib/tools/utils.min.js +1 -1
- package/lib/tools/vn.js +0 -5
- package/lib/tooltip/index.js +1 -8
- package/lib/tooltip/index.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +47 -111
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/tooltip/style/style.css +87 -63
- package/lib/v-x-e-table/index.js +13 -44
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/commands.js +0 -4
- package/lib/v-x-e-table/src/conf.js +31 -19
- package/lib/v-x-e-table/src/formats.js +0 -4
- package/lib/v-x-e-table/src/hooks.js +0 -3
- package/lib/v-x-e-table/src/interceptor.js +6 -18
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/menus.js +0 -4
- package/lib/v-x-e-table/src/renderer.js +66 -199
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/src/setup.js +1 -6
- package/lib/v-x-e-table/src/store.js +3 -19
- package/lib/v-x-e-table/style/style.css +458 -226
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/lib/validator/index.js +1 -5
- package/lib/validator/index.min.js +1 -1
- package/lib/validator/src/hook.js +50 -116
- package/lib/validator/src/hook.min.js +1 -1
- package/lib/validator/style/style.css +1 -1
- package/lib/vxe-button/index.js +3 -10
- package/lib/vxe-button/index.min.js +1 -1
- package/lib/vxe-button/style/style.css +465 -341
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-checkbox/index.js +3 -10
- package/lib/vxe-checkbox/index.min.js +1 -1
- package/lib/vxe-checkbox/style/style.css +156 -127
- package/lib/vxe-checkbox/style/style.min.css +1 -1
- package/lib/vxe-checkbox-group/index.js +3 -10
- package/lib/vxe-checkbox-group/index.min.js +1 -1
- package/lib/vxe-checkbox-group/style/style.css +1 -1
- package/lib/vxe-colgroup/index.js +3 -10
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-colgroup/style/style.css +1 -1
- package/lib/vxe-column/index.js +3 -10
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-column/style/style.css +1 -1
- package/lib/vxe-form/index.js +3 -10
- package/lib/vxe-form/index.min.js +1 -1
- package/lib/vxe-form/style/style.css +201 -168
- package/lib/vxe-form/style/style.min.css +1 -1
- package/lib/vxe-form-gather/index.js +3 -10
- package/lib/vxe-form-gather/index.min.js +1 -1
- package/lib/vxe-form-gather/style/style.css +1 -1
- package/lib/vxe-form-item/index.js +3 -10
- package/lib/vxe-form-item/index.min.js +1 -1
- package/lib/vxe-form-item/style/style.css +1 -1
- package/lib/vxe-grid/index.js +3 -10
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-grid/style/style.css +61 -50
- package/lib/vxe-grid/style/style.min.css +1 -1
- package/lib/vxe-icon/index.js +3 -10
- package/lib/vxe-icon/index.min.js +1 -1
- package/lib/vxe-icon/style/style.css +406 -178
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-input/index.js +3 -10
- package/lib/vxe-input/index.min.js +1 -1
- package/lib/vxe-input/style/style.css +771 -595
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-list/index.js +3 -10
- package/lib/vxe-list/index.min.js +1 -1
- package/lib/vxe-list/style/style.css +19 -14
- package/lib/vxe-loading/index.js +3 -10
- package/lib/vxe-loading/index.min.js +1 -1
- package/lib/vxe-loading/style/style.css +52 -48
- package/lib/vxe-loading/style/style.min.css +1 -1
- package/lib/vxe-modal/index.js +3 -10
- package/lib/vxe-modal/index.min.js +1 -1
- package/lib/vxe-modal/style/style.css +311 -247
- package/lib/vxe-modal/style/style.min.css +1 -1
- package/lib/vxe-module-edit/index.js +3 -10
- package/lib/vxe-module-edit/index.min.js +1 -1
- package/lib/vxe-module-edit/style/style.css +1 -1
- package/lib/vxe-module-export/index.js +3 -10
- package/lib/vxe-module-export/index.min.js +1 -1
- package/lib/vxe-module-export/style/style.css +136 -108
- package/lib/vxe-module-export/style/style.min.css +1 -1
- package/lib/vxe-module-filter/index.js +3 -10
- package/lib/vxe-module-filter/index.min.js +1 -1
- package/lib/vxe-module-filter/style/style.css +103 -82
- package/lib/vxe-module-filter/style/style.min.css +1 -1
- package/lib/vxe-module-keyboard/index.js +3 -10
- package/lib/vxe-module-keyboard/index.min.js +1 -1
- package/lib/vxe-module-keyboard/style/style.css +1 -1
- package/lib/vxe-module-menu/index.js +3 -10
- package/lib/vxe-module-menu/index.min.js +1 -1
- package/lib/vxe-module-menu/style/style.css +79 -59
- package/lib/vxe-module-menu/style/style.min.css +1 -1
- package/lib/vxe-module-validator/index.js +3 -10
- package/lib/vxe-module-validator/index.min.js +1 -1
- package/lib/vxe-module-validator/style/style.css +1 -1
- package/lib/vxe-optgroup/index.js +3 -10
- package/lib/vxe-optgroup/index.min.js +1 -1
- package/lib/vxe-optgroup/style/style.css +1 -1
- package/lib/vxe-option/index.js +3 -10
- package/lib/vxe-option/index.min.js +1 -1
- package/lib/vxe-option/style/style.css +1 -1
- package/lib/vxe-pager/index.js +3 -10
- package/lib/vxe-pager/index.min.js +1 -1
- package/lib/vxe-pager/style/style.css +307 -257
- package/lib/vxe-pager/style/style.min.css +1 -1
- package/lib/vxe-pulldown/index.js +3 -10
- package/lib/vxe-pulldown/index.min.js +1 -1
- package/lib/vxe-pulldown/style/style.css +42 -31
- package/lib/vxe-pulldown/style/style.min.css +1 -1
- package/lib/vxe-radio/index.js +3 -10
- package/lib/vxe-radio/index.min.js +1 -1
- package/lib/vxe-radio/style/style.css +184 -151
- package/lib/vxe-radio/style/style.min.css +1 -1
- package/lib/vxe-radio-button/index.js +3 -10
- package/lib/vxe-radio-button/index.min.js +1 -1
- package/lib/vxe-radio-button/style/style.css +1 -1
- package/lib/vxe-radio-group/index.js +3 -10
- package/lib/vxe-radio-group/index.min.js +1 -1
- package/lib/vxe-radio-group/style/style.css +1 -1
- package/lib/vxe-select/index.js +3 -10
- package/lib/vxe-select/index.min.js +1 -1
- package/lib/vxe-select/style/style.css +108 -79
- package/lib/vxe-select/style/style.min.css +1 -1
- package/lib/vxe-switch/index.js +3 -10
- package/lib/vxe-switch/index.min.js +1 -1
- package/lib/vxe-switch/style/style.css +87 -67
- package/lib/vxe-switch/style/style.min.css +1 -1
- package/lib/vxe-table/index.js +3 -10
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table/style/style.css +1025 -835
- package/lib/vxe-table/style/style.min.css +1 -1
- package/lib/vxe-textarea/index.js +3 -10
- package/lib/vxe-textarea/index.min.js +1 -1
- package/lib/vxe-textarea/style/style.css +57 -41
- package/lib/vxe-textarea/style/style.min.css +1 -1
- package/lib/vxe-toolbar/index.js +3 -10
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-toolbar/style/style.css +216 -174
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/lib/vxe-tooltip/index.js +3 -10
- package/lib/vxe-tooltip/index.min.js +1 -1
- package/lib/vxe-tooltip/style/style.css +87 -63
- package/package.json +27 -33
- package/packages/export/src/hook.ts +1 -0
- package/packages/filter/src/hook.ts +1 -1
- package/packages/footer/src/footer.ts +3 -3
- package/packages/form/src/form.ts +5 -4
- package/packages/header/src/header.ts +13 -9
- package/packages/list/src/list.ts +8 -2
- package/packages/locale/lang/en-US.ts +0 -1
- package/packages/locale/lang/ja-JP.ts +0 -1
- package/packages/locale/lang/zh-CN.ts +0 -1
- package/packages/locale/lang/zh-TC.ts +0 -1
- package/packages/pulldown/src/pulldown.ts +11 -5
- package/packages/table/src/column.ts +2 -0
- package/packages/table/src/columnInfo.ts +1 -0
- package/packages/table/src/table.ts +117 -113
- package/packages/table/src/util.ts +1 -1
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/icon.scss +78 -2
- package/styles/table.scss +1 -1
- package/styles/variable.scss +2 -2
- package/types/column.d.ts +6 -1
- package/types/list.d.ts +4 -4
- package/types/pulldown.d.ts +61 -61
- package/types/table.d.ts +11 -1
|
@@ -4,39 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.renderer = void 0;
|
|
7
|
-
|
|
8
7
|
var _vue = require("vue");
|
|
9
|
-
|
|
10
8
|
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
11
|
-
|
|
12
9
|
var _conf = _interopRequireDefault(require("./conf"));
|
|
13
|
-
|
|
14
10
|
var _util = require("../../table/src/util");
|
|
15
|
-
|
|
16
11
|
var _utils = require("../../tools/utils");
|
|
17
|
-
|
|
18
12
|
var _log = require("../../tools/log");
|
|
19
|
-
|
|
20
13
|
var _vn = require("../../tools/vn");
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
25
16
|
__assign = Object.assign || function (t) {
|
|
26
17
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
27
18
|
s = arguments[i];
|
|
28
|
-
|
|
29
|
-
for (var p in s) {
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
31
|
-
}
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
32
20
|
}
|
|
33
|
-
|
|
34
21
|
return t;
|
|
35
22
|
};
|
|
36
|
-
|
|
37
23
|
return __assign.apply(this, arguments);
|
|
38
24
|
};
|
|
39
|
-
|
|
40
25
|
var __spreadArray = void 0 && (void 0).__spreadArray || function (to, from, pack) {
|
|
41
26
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42
27
|
if (ar || !(i in from)) {
|
|
@@ -46,22 +31,18 @@ var __spreadArray = void 0 && (void 0).__spreadArray || function (to, from, pack
|
|
|
46
31
|
}
|
|
47
32
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
48
33
|
};
|
|
49
|
-
|
|
50
34
|
var componentDefaultModelProp = 'modelValue';
|
|
51
35
|
var defaultCompProps = {
|
|
52
36
|
transfer: true
|
|
53
37
|
};
|
|
54
|
-
|
|
55
38
|
function getModelEvent(renderOpts) {
|
|
56
39
|
switch (renderOpts.name) {
|
|
57
40
|
case 'input':
|
|
58
41
|
case 'textarea':
|
|
59
42
|
return 'input';
|
|
60
43
|
}
|
|
61
|
-
|
|
62
44
|
return 'update:modelValue';
|
|
63
45
|
}
|
|
64
|
-
|
|
65
46
|
function getChangeEvent(renderOpts) {
|
|
66
47
|
switch (renderOpts.name) {
|
|
67
48
|
case 'input':
|
|
@@ -70,96 +51,73 @@ function getChangeEvent(renderOpts) {
|
|
|
70
51
|
case '$textarea':
|
|
71
52
|
return 'input';
|
|
72
53
|
}
|
|
73
|
-
|
|
74
54
|
return 'change';
|
|
75
55
|
}
|
|
76
|
-
|
|
77
56
|
function parseDate(value, props) {
|
|
78
57
|
return value && props.valueFormat ? _xeUtils.default.toStringDate(value, props.valueFormat) : value;
|
|
79
58
|
}
|
|
80
|
-
|
|
81
59
|
function getFormatDate(value, props, defaultFormat) {
|
|
82
60
|
var _a = props.dateConfig,
|
|
83
|
-
|
|
61
|
+
dateConfig = _a === void 0 ? {} : _a;
|
|
84
62
|
return _xeUtils.default.toDateString(parseDate(value, props), dateConfig.labelFormat || defaultFormat);
|
|
85
63
|
}
|
|
86
|
-
|
|
87
64
|
function getLabelFormatDate(value, props) {
|
|
88
65
|
return getFormatDate(value, props, _conf.default.i18n("vxe.input.date.labelFormat.".concat(props.type)));
|
|
89
66
|
}
|
|
90
|
-
|
|
91
67
|
function getComponentName(name) {
|
|
92
68
|
return "vxe-".concat(name.replace('$', ''));
|
|
93
69
|
}
|
|
94
|
-
|
|
95
70
|
function getDefaultComponent(_a) {
|
|
96
71
|
var name = _a.name;
|
|
97
72
|
return (0, _vue.resolveComponent)(getComponentName(name));
|
|
98
73
|
}
|
|
99
|
-
|
|
100
74
|
function handleConfirmFilter(params, checked, option) {
|
|
101
75
|
var $panel = params.$panel;
|
|
102
76
|
$panel.changeOption({}, checked, option);
|
|
103
77
|
}
|
|
104
|
-
|
|
105
78
|
function getNativeAttrs(renderOpts) {
|
|
106
79
|
var name = renderOpts.name,
|
|
107
|
-
|
|
108
|
-
|
|
80
|
+
attrs = renderOpts.attrs;
|
|
109
81
|
if (name === 'input') {
|
|
110
82
|
attrs = Object.assign({
|
|
111
83
|
type: 'text'
|
|
112
84
|
}, attrs);
|
|
113
85
|
}
|
|
114
|
-
|
|
115
86
|
return attrs;
|
|
116
87
|
}
|
|
117
|
-
|
|
118
88
|
function getInputImmediateModel(renderOpts) {
|
|
119
89
|
var name = renderOpts.name,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
90
|
+
immediate = renderOpts.immediate,
|
|
91
|
+
props = renderOpts.props;
|
|
123
92
|
if (!immediate) {
|
|
124
93
|
if (name === '$input') {
|
|
125
94
|
var type = (props || {}).type;
|
|
126
95
|
return !(!type || type === 'text' || type === 'number' || type === 'integer' || type === 'float');
|
|
127
96
|
}
|
|
128
|
-
|
|
129
97
|
if (name === 'input' || name === 'textarea' || name === '$textarea') {
|
|
130
98
|
return false;
|
|
131
99
|
}
|
|
132
|
-
|
|
133
100
|
return true;
|
|
134
101
|
}
|
|
135
|
-
|
|
136
102
|
return immediate;
|
|
137
103
|
}
|
|
138
|
-
|
|
139
104
|
function getCellEditProps(renderOpts, params, value, defaultProps) {
|
|
140
105
|
var _a;
|
|
141
|
-
|
|
142
106
|
return _xeUtils.default.assign({
|
|
143
107
|
immediate: getInputImmediateModel(renderOpts)
|
|
144
108
|
}, defaultCompProps, defaultProps, renderOpts.props, (_a = {}, _a[componentDefaultModelProp] = value, _a));
|
|
145
109
|
}
|
|
146
|
-
|
|
147
110
|
function getCellEditFilterProps(renderOpts, params, value, defaultProps) {
|
|
148
111
|
var _a;
|
|
149
|
-
|
|
150
112
|
return _xeUtils.default.assign({}, defaultCompProps, defaultProps, renderOpts.props, (_a = {}, _a[componentDefaultModelProp] = value, _a));
|
|
151
113
|
}
|
|
152
|
-
|
|
153
114
|
function getComponentFormItemProps(renderOpts, params, value, defaultProps) {
|
|
154
115
|
var _a;
|
|
155
|
-
|
|
156
116
|
return _xeUtils.default.assign({}, defaultCompProps, defaultProps, renderOpts.props, (_a = {}, _a[componentDefaultModelProp] = value, _a));
|
|
157
117
|
}
|
|
158
|
-
|
|
159
118
|
function isImmediateCell(renderOpts, params) {
|
|
160
119
|
return params.$type === 'cell' || getInputImmediateModel(renderOpts);
|
|
161
120
|
}
|
|
162
|
-
|
|
163
121
|
function getCellLabelVNs(renderOpts, params, cellLabel) {
|
|
164
122
|
var placeholder = renderOpts.placeholder;
|
|
165
123
|
return [(0, _vue.h)('span', {
|
|
@@ -175,59 +133,46 @@ function getCellLabelVNs(renderOpts, params, cellLabel) {
|
|
|
175
133
|
* @param modelFunc
|
|
176
134
|
* @param changeFunc
|
|
177
135
|
*/
|
|
178
|
-
|
|
179
|
-
|
|
180
136
|
function getElementOns(renderOpts, params, modelFunc, changeFunc) {
|
|
181
137
|
var events = renderOpts.events;
|
|
182
138
|
var modelEvent = getModelEvent(renderOpts);
|
|
183
139
|
var changeEvent = getChangeEvent(renderOpts);
|
|
184
140
|
var isSameEvent = changeEvent === modelEvent;
|
|
185
141
|
var ons = {};
|
|
186
|
-
|
|
187
142
|
if (events) {
|
|
188
143
|
_xeUtils.default.objectEach(events, function (func, key) {
|
|
189
144
|
ons[(0, _vn.getOnName)(key)] = function () {
|
|
190
145
|
var args = [];
|
|
191
|
-
|
|
192
146
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
193
147
|
args[_i] = arguments[_i];
|
|
194
148
|
}
|
|
195
|
-
|
|
196
149
|
func.apply(void 0, __spreadArray([params], args, false));
|
|
197
150
|
};
|
|
198
151
|
});
|
|
199
152
|
}
|
|
200
|
-
|
|
201
153
|
if (modelFunc) {
|
|
202
154
|
ons[(0, _vn.getOnName)(modelEvent)] = function (targetEvnt) {
|
|
203
155
|
modelFunc(targetEvnt);
|
|
204
|
-
|
|
205
156
|
if (isSameEvent && changeFunc) {
|
|
206
157
|
changeFunc(targetEvnt);
|
|
207
158
|
}
|
|
208
|
-
|
|
209
159
|
if (events && events[modelEvent]) {
|
|
210
160
|
events[modelEvent](params, targetEvnt);
|
|
211
161
|
}
|
|
212
162
|
};
|
|
213
163
|
}
|
|
214
|
-
|
|
215
164
|
if (!isSameEvent && changeFunc) {
|
|
216
165
|
ons[(0, _vn.getOnName)(changeEvent)] = function () {
|
|
217
166
|
var args = [];
|
|
218
|
-
|
|
219
167
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
220
168
|
args[_i] = arguments[_i];
|
|
221
169
|
}
|
|
222
|
-
|
|
223
170
|
changeFunc.apply(void 0, args);
|
|
224
|
-
|
|
225
171
|
if (events && events[changeEvent]) {
|
|
226
172
|
events[changeEvent].apply(events, __spreadArray([params], args, false));
|
|
227
173
|
}
|
|
228
174
|
};
|
|
229
175
|
}
|
|
230
|
-
|
|
231
176
|
return ons;
|
|
232
177
|
}
|
|
233
178
|
/**
|
|
@@ -237,59 +182,46 @@ function getElementOns(renderOpts, params, modelFunc, changeFunc) {
|
|
|
237
182
|
* @param modelFunc
|
|
238
183
|
* @param changeFunc
|
|
239
184
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
185
|
function getComponentOns(renderOpts, params, modelFunc, changeFunc) {
|
|
243
186
|
var events = renderOpts.events;
|
|
244
187
|
var modelEvent = getModelEvent(renderOpts);
|
|
245
188
|
var changeEvent = getChangeEvent(renderOpts);
|
|
246
189
|
var ons = {};
|
|
247
|
-
|
|
248
190
|
_xeUtils.default.objectEach(events, function (func, key) {
|
|
249
191
|
ons[(0, _vn.getOnName)(key)] = function () {
|
|
250
192
|
var args = [];
|
|
251
|
-
|
|
252
193
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
253
194
|
args[_i] = arguments[_i];
|
|
254
195
|
}
|
|
255
|
-
|
|
256
196
|
func.apply(void 0, __spreadArray([params], args, false));
|
|
257
197
|
};
|
|
258
198
|
});
|
|
259
|
-
|
|
260
199
|
if (modelFunc) {
|
|
261
200
|
ons[(0, _vn.getOnName)(modelEvent)] = function (targetEvnt) {
|
|
262
201
|
modelFunc(targetEvnt);
|
|
263
|
-
|
|
264
202
|
if (events && events[modelEvent]) {
|
|
265
203
|
events[modelEvent](params, targetEvnt);
|
|
266
204
|
}
|
|
267
205
|
};
|
|
268
206
|
}
|
|
269
|
-
|
|
270
207
|
if (changeFunc) {
|
|
271
208
|
ons[(0, _vn.getOnName)(changeEvent)] = function () {
|
|
272
209
|
var args = [];
|
|
273
|
-
|
|
274
210
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
275
211
|
args[_i] = arguments[_i];
|
|
276
212
|
}
|
|
277
|
-
|
|
278
213
|
changeFunc.apply(void 0, args);
|
|
279
|
-
|
|
280
214
|
if (events && events[changeEvent]) {
|
|
281
215
|
events[changeEvent].apply(events, __spreadArray([params], args, false));
|
|
282
216
|
}
|
|
283
217
|
};
|
|
284
218
|
}
|
|
285
|
-
|
|
286
219
|
return ons;
|
|
287
220
|
}
|
|
288
|
-
|
|
289
221
|
function getEditOns(renderOpts, params) {
|
|
290
222
|
var $table = params.$table,
|
|
291
|
-
|
|
292
|
-
|
|
223
|
+
row = params.row,
|
|
224
|
+
column = params.column;
|
|
293
225
|
var name = renderOpts.name;
|
|
294
226
|
var model = column.model;
|
|
295
227
|
var isImmediate = isImmediateCell(renderOpts, params);
|
|
@@ -313,7 +245,6 @@ function getEditOns(renderOpts, params) {
|
|
|
313
245
|
}
|
|
314
246
|
});
|
|
315
247
|
}
|
|
316
|
-
|
|
317
248
|
function getFilterOns(renderOpts, params, option) {
|
|
318
249
|
return getComponentOns(renderOpts, params, function (value) {
|
|
319
250
|
// 处理 model 值双向绑定
|
|
@@ -322,11 +253,10 @@ function getFilterOns(renderOpts, params, option) {
|
|
|
322
253
|
handleConfirmFilter(params, !_xeUtils.default.eqNull(option.data), option);
|
|
323
254
|
});
|
|
324
255
|
}
|
|
325
|
-
|
|
326
256
|
function getItemOns(renderOpts, params) {
|
|
327
257
|
var $form = params.$form,
|
|
328
|
-
|
|
329
|
-
|
|
258
|
+
data = params.data,
|
|
259
|
+
property = params.property;
|
|
330
260
|
return getComponentOns(renderOpts, params, function (value) {
|
|
331
261
|
// 处理 model 值双向绑定
|
|
332
262
|
_xeUtils.default.set(data, property, value);
|
|
@@ -335,16 +265,14 @@ function getItemOns(renderOpts, params) {
|
|
|
335
265
|
$form.updateStatus(params);
|
|
336
266
|
});
|
|
337
267
|
}
|
|
338
|
-
|
|
339
268
|
function getNativeEditOns(renderOpts, params) {
|
|
340
269
|
var $table = params.$table,
|
|
341
|
-
|
|
342
|
-
|
|
270
|
+
row = params.row,
|
|
271
|
+
column = params.column;
|
|
343
272
|
var model = column.model;
|
|
344
273
|
return getElementOns(renderOpts, params, function (evnt) {
|
|
345
274
|
// 处理 model 值双向绑定
|
|
346
275
|
var cellValue = evnt.target.value;
|
|
347
|
-
|
|
348
276
|
if (isImmediateCell(renderOpts, params)) {
|
|
349
277
|
(0, _util.setCellValue)(row, column, cellValue);
|
|
350
278
|
} else {
|
|
@@ -357,7 +285,6 @@ function getNativeEditOns(renderOpts, params) {
|
|
|
357
285
|
$table.updateStatus(params, cellValue);
|
|
358
286
|
});
|
|
359
287
|
}
|
|
360
|
-
|
|
361
288
|
function getNativeFilterOns(renderOpts, params, option) {
|
|
362
289
|
return getElementOns(renderOpts, params, function (evnt) {
|
|
363
290
|
// 处理 model 值双向绑定
|
|
@@ -366,15 +293,13 @@ function getNativeFilterOns(renderOpts, params, option) {
|
|
|
366
293
|
handleConfirmFilter(params, !_xeUtils.default.eqNull(option.data), option);
|
|
367
294
|
});
|
|
368
295
|
}
|
|
369
|
-
|
|
370
296
|
function getNativeItemOns(renderOpts, params) {
|
|
371
297
|
var $form = params.$form,
|
|
372
|
-
|
|
373
|
-
|
|
298
|
+
data = params.data,
|
|
299
|
+
property = params.property;
|
|
374
300
|
return getElementOns(renderOpts, params, function (evnt) {
|
|
375
301
|
// 处理 model 值双向绑定
|
|
376
302
|
var itemValue = evnt.target.value;
|
|
377
|
-
|
|
378
303
|
_xeUtils.default.set(data, property, itemValue);
|
|
379
304
|
}, function () {
|
|
380
305
|
// 处理 change 事件相关逻辑
|
|
@@ -385,11 +310,9 @@ function getNativeItemOns(renderOpts, params) {
|
|
|
385
310
|
* 单元格可编辑渲染-原生的标签
|
|
386
311
|
* input、textarea、select
|
|
387
312
|
*/
|
|
388
|
-
|
|
389
|
-
|
|
390
313
|
function nativeEditRender(renderOpts, params) {
|
|
391
314
|
var row = params.row,
|
|
392
|
-
|
|
315
|
+
column = params.column;
|
|
393
316
|
var name = renderOpts.name;
|
|
394
317
|
var cellValue = isImmediateCell(renderOpts, params) ? (0, _util.getCellValue)(row, column) : column.model.value;
|
|
395
318
|
return [(0, _vue.h)(name, __assign(__assign(__assign({
|
|
@@ -398,28 +321,24 @@ function nativeEditRender(renderOpts, params) {
|
|
|
398
321
|
value: cellValue
|
|
399
322
|
}), getNativeEditOns(renderOpts, params)))];
|
|
400
323
|
}
|
|
401
|
-
|
|
402
324
|
function defaultEditRender(renderOpts, params) {
|
|
403
325
|
var row = params.row,
|
|
404
|
-
|
|
326
|
+
column = params.column;
|
|
405
327
|
var cellValue = (0, _util.getCellValue)(row, column);
|
|
406
328
|
return [(0, _vue.h)(getDefaultComponent(renderOpts), __assign(__assign({}, getCellEditProps(renderOpts, params, cellValue)), getEditOns(renderOpts, params)))];
|
|
407
329
|
}
|
|
408
|
-
|
|
409
330
|
function defaultButtonEditRender(renderOpts, params) {
|
|
410
331
|
return [(0, _vue.h)((0, _vue.resolveComponent)('vxe-button'), __assign(__assign({}, getCellEditProps(renderOpts, params, null)), getComponentOns(renderOpts, params)))];
|
|
411
332
|
}
|
|
412
|
-
|
|
413
333
|
function defaultButtonsEditRender(renderOpts, params) {
|
|
414
334
|
return renderOpts.children.map(function (childRenderOpts) {
|
|
415
335
|
return defaultButtonEditRender(childRenderOpts, params)[0];
|
|
416
336
|
});
|
|
417
337
|
}
|
|
418
|
-
|
|
419
338
|
function renderNativeOptgroups(renderOpts, params, renderOptionsMethods) {
|
|
420
339
|
var optionGroups = renderOpts.optionGroups,
|
|
421
|
-
|
|
422
|
-
|
|
340
|
+
_a = renderOpts.optionGroupProps,
|
|
341
|
+
optionGroupProps = _a === void 0 ? {} : _a;
|
|
423
342
|
var groupOptions = optionGroupProps.options || 'options';
|
|
424
343
|
var groupLabel = optionGroupProps.label || 'label';
|
|
425
344
|
return optionGroups.map(function (group, gIndex) {
|
|
@@ -432,13 +351,11 @@ function renderNativeOptgroups(renderOpts, params, renderOptionsMethods) {
|
|
|
432
351
|
/**
|
|
433
352
|
* 渲染原生的 option 标签
|
|
434
353
|
*/
|
|
435
|
-
|
|
436
|
-
|
|
437
354
|
function renderNativeOptions(options, renderOpts, params) {
|
|
438
355
|
var _a = renderOpts.optionProps,
|
|
439
|
-
|
|
356
|
+
optionProps = _a === void 0 ? {} : _a;
|
|
440
357
|
var row = params.row,
|
|
441
|
-
|
|
358
|
+
column = params.column;
|
|
442
359
|
var labelProp = optionProps.label || 'label';
|
|
443
360
|
var valueProp = optionProps.value || 'value';
|
|
444
361
|
var disabledProp = optionProps.disabled || 'disabled';
|
|
@@ -448,13 +365,11 @@ function renderNativeOptions(options, renderOpts, params) {
|
|
|
448
365
|
key: oIndex,
|
|
449
366
|
value: option[valueProp],
|
|
450
367
|
disabled: option[disabledProp],
|
|
451
|
-
|
|
452
368
|
/* eslint-disable eqeqeq */
|
|
453
369
|
selected: option[valueProp] == cellValue
|
|
454
370
|
}, option[labelProp]);
|
|
455
371
|
});
|
|
456
372
|
}
|
|
457
|
-
|
|
458
373
|
function nativeFilterRender(renderOpts, params) {
|
|
459
374
|
var column = params.column;
|
|
460
375
|
var name = renderOpts.name;
|
|
@@ -468,7 +383,6 @@ function nativeFilterRender(renderOpts, params) {
|
|
|
468
383
|
}), getNativeFilterOns(renderOpts, params, option)));
|
|
469
384
|
});
|
|
470
385
|
}
|
|
471
|
-
|
|
472
386
|
function defaultFilterRender(renderOpts, params) {
|
|
473
387
|
var column = params.column;
|
|
474
388
|
return column.filters.map(function (option, oIndex) {
|
|
@@ -478,33 +392,27 @@ function defaultFilterRender(renderOpts, params) {
|
|
|
478
392
|
}, getCellEditFilterProps(renderOpts, renderOpts, optionValue)), getFilterOns(renderOpts, params, option)));
|
|
479
393
|
});
|
|
480
394
|
}
|
|
481
|
-
|
|
482
395
|
function handleFilterMethod(_a) {
|
|
483
396
|
var option = _a.option,
|
|
484
|
-
|
|
485
|
-
|
|
397
|
+
row = _a.row,
|
|
398
|
+
column = _a.column;
|
|
486
399
|
var data = option.data;
|
|
487
|
-
|
|
488
400
|
var cellValue = _xeUtils.default.get(row, column.property);
|
|
489
401
|
/* eslint-disable eqeqeq */
|
|
490
|
-
|
|
491
|
-
|
|
492
402
|
return cellValue == data;
|
|
493
403
|
}
|
|
494
|
-
|
|
495
404
|
function nativeSelectEditRender(renderOpts, params) {
|
|
496
405
|
return [(0, _vue.h)('select', __assign(__assign({
|
|
497
406
|
class: 'vxe-default-select'
|
|
498
407
|
}, getNativeAttrs(renderOpts)), getNativeEditOns(renderOpts, params)), renderOpts.optionGroups ? renderNativeOptgroups(renderOpts, params, renderNativeOptions) : renderNativeOptions(renderOpts.options, renderOpts, params))];
|
|
499
408
|
}
|
|
500
|
-
|
|
501
409
|
function defaultSelectEditRender(renderOpts, params) {
|
|
502
410
|
var row = params.row,
|
|
503
|
-
|
|
411
|
+
column = params.column;
|
|
504
412
|
var options = renderOpts.options,
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
413
|
+
optionProps = renderOpts.optionProps,
|
|
414
|
+
optionGroups = renderOpts.optionGroups,
|
|
415
|
+
optionGroupProps = renderOpts.optionGroupProps;
|
|
508
416
|
var cellValue = (0, _util.getCellValue)(row, column);
|
|
509
417
|
return [(0, _vue.h)(getDefaultComponent(renderOpts), __assign(__assign({}, getCellEditProps(renderOpts, params, cellValue, {
|
|
510
418
|
options: options,
|
|
@@ -513,40 +421,33 @@ function defaultSelectEditRender(renderOpts, params) {
|
|
|
513
421
|
optionGroupProps: optionGroupProps
|
|
514
422
|
})), getEditOns(renderOpts, params)))];
|
|
515
423
|
}
|
|
516
|
-
|
|
517
424
|
function getSelectCellValue(renderOpts, _a) {
|
|
518
425
|
var row = _a.row,
|
|
519
|
-
|
|
426
|
+
column = _a.column;
|
|
520
427
|
var _b = renderOpts.props,
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
428
|
+
props = _b === void 0 ? {} : _b,
|
|
429
|
+
options = renderOpts.options,
|
|
430
|
+
optionGroups = renderOpts.optionGroups,
|
|
431
|
+
_c = renderOpts.optionProps,
|
|
432
|
+
optionProps = _c === void 0 ? {} : _c,
|
|
433
|
+
_d = renderOpts.optionGroupProps,
|
|
434
|
+
optionGroupProps = _d === void 0 ? {} : _d;
|
|
529
435
|
var cellValue = _xeUtils.default.get(row, column.property);
|
|
530
|
-
|
|
531
436
|
var selectItem;
|
|
532
437
|
var labelProp = optionProps.label || 'label';
|
|
533
438
|
var valueProp = optionProps.value || 'value';
|
|
534
|
-
|
|
535
439
|
if (!(0, _utils.isEmptyValue)(cellValue)) {
|
|
536
440
|
return _xeUtils.default.map(props.multiple ? cellValue : [cellValue], optionGroups ? function (value) {
|
|
537
441
|
var groupOptions = optionGroupProps.options || 'options';
|
|
538
|
-
|
|
539
442
|
for (var index = 0; index < optionGroups.length; index++) {
|
|
540
443
|
/* eslint-disable eqeqeq */
|
|
541
444
|
selectItem = _xeUtils.default.find(optionGroups[index][groupOptions], function (item) {
|
|
542
445
|
return item[valueProp] == value;
|
|
543
446
|
});
|
|
544
|
-
|
|
545
447
|
if (selectItem) {
|
|
546
448
|
break;
|
|
547
449
|
}
|
|
548
450
|
}
|
|
549
|
-
|
|
550
451
|
return selectItem ? selectItem[labelProp] : value;
|
|
551
452
|
} : function (value) {
|
|
552
453
|
/* eslint-disable eqeqeq */
|
|
@@ -556,43 +457,33 @@ function getSelectCellValue(renderOpts, _a) {
|
|
|
556
457
|
return selectItem ? selectItem[labelProp] : value;
|
|
557
458
|
}).join(', ');
|
|
558
459
|
}
|
|
559
|
-
|
|
560
460
|
return '';
|
|
561
461
|
}
|
|
562
462
|
/**
|
|
563
463
|
* 渲染表单-项
|
|
564
464
|
* 用于渲染原生的标签
|
|
565
465
|
*/
|
|
566
|
-
|
|
567
|
-
|
|
568
466
|
function nativeItemRender(renderOpts, params) {
|
|
569
467
|
var data = params.data,
|
|
570
|
-
|
|
468
|
+
property = params.property;
|
|
571
469
|
var name = renderOpts.name;
|
|
572
470
|
var attrs = getNativeAttrs(renderOpts);
|
|
573
|
-
|
|
574
471
|
var itemValue = _xeUtils.default.get(data, property);
|
|
575
|
-
|
|
576
472
|
return [(0, _vue.h)(name, __assign(__assign(__assign({
|
|
577
473
|
class: "vxe-default-".concat(name)
|
|
578
474
|
}, attrs), {
|
|
579
475
|
value: attrs && name === 'input' && (attrs.type === 'submit' || attrs.type === 'reset') ? null : itemValue
|
|
580
476
|
}), getNativeItemOns(renderOpts, params)))];
|
|
581
477
|
}
|
|
582
|
-
|
|
583
478
|
function defaultItemRender(renderOpts, params) {
|
|
584
479
|
var data = params.data,
|
|
585
|
-
|
|
586
|
-
|
|
480
|
+
property = params.property;
|
|
587
481
|
var itemValue = _xeUtils.default.get(data, property);
|
|
588
|
-
|
|
589
482
|
return [(0, _vue.h)(getDefaultComponent(renderOpts), __assign(__assign({}, getComponentFormItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)))];
|
|
590
483
|
}
|
|
591
|
-
|
|
592
484
|
function defaultButtonItemRender(renderOpts, params) {
|
|
593
485
|
return [(0, _vue.h)((0, _vue.resolveComponent)('vxe-button'), __assign(__assign({}, getComponentFormItemProps(renderOpts, params, null)), getComponentOns(renderOpts, params)))];
|
|
594
486
|
}
|
|
595
|
-
|
|
596
487
|
function defaultButtonsItemRender(renderOpts, params) {
|
|
597
488
|
return renderOpts.children.map(function (childRenderOpts) {
|
|
598
489
|
return defaultButtonItemRender(childRenderOpts, params)[0];
|
|
@@ -601,61 +492,51 @@ function defaultButtonsItemRender(renderOpts, params) {
|
|
|
601
492
|
/**
|
|
602
493
|
* 渲染原生的 select 标签
|
|
603
494
|
*/
|
|
604
|
-
|
|
605
|
-
|
|
606
495
|
function renderNativeFormOptions(options, renderOpts, params) {
|
|
607
496
|
var data = params.data,
|
|
608
|
-
|
|
497
|
+
property = params.property;
|
|
609
498
|
var _a = renderOpts.optionProps,
|
|
610
|
-
|
|
499
|
+
optionProps = _a === void 0 ? {} : _a;
|
|
611
500
|
var labelProp = optionProps.label || 'label';
|
|
612
501
|
var valueProp = optionProps.value || 'value';
|
|
613
502
|
var disabledProp = optionProps.disabled || 'disabled';
|
|
614
|
-
|
|
615
503
|
var cellValue = _xeUtils.default.get(data, property);
|
|
616
|
-
|
|
617
504
|
return options.map(function (item, oIndex) {
|
|
618
505
|
return (0, _vue.h)('option', {
|
|
619
506
|
key: oIndex,
|
|
620
507
|
value: item[valueProp],
|
|
621
508
|
disabled: item[disabledProp],
|
|
622
|
-
|
|
623
509
|
/* eslint-disable eqeqeq */
|
|
624
510
|
selected: item[valueProp] == cellValue
|
|
625
511
|
}, item[labelProp]);
|
|
626
512
|
});
|
|
627
513
|
}
|
|
628
|
-
|
|
629
514
|
function handleExportSelectMethod(params) {
|
|
630
515
|
var row = params.row,
|
|
631
|
-
|
|
632
|
-
|
|
516
|
+
column = params.column,
|
|
517
|
+
options = params.options;
|
|
633
518
|
return options.original ? (0, _util.getCellValue)(row, column) : getSelectCellValue(column.editRender || column.cellRender, params);
|
|
634
519
|
}
|
|
635
520
|
/**
|
|
636
521
|
* 渲染表单-项中
|
|
637
522
|
* 单选框和复选框
|
|
638
523
|
*/
|
|
639
|
-
|
|
640
|
-
|
|
641
524
|
function defaultFormItemRadioAndCheckboxRender(renderOpts, params) {
|
|
642
525
|
var name = renderOpts.name,
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
526
|
+
options = renderOpts.options,
|
|
527
|
+
_a = renderOpts.optionProps,
|
|
528
|
+
optionProps = _a === void 0 ? {} : _a;
|
|
646
529
|
var data = params.data,
|
|
647
|
-
|
|
530
|
+
property = params.property;
|
|
648
531
|
var labelProp = optionProps.label || 'label';
|
|
649
532
|
var valueProp = optionProps.value || 'value';
|
|
650
533
|
var disabledProp = optionProps.disabled || 'disabled';
|
|
651
|
-
|
|
652
534
|
var itemValue = _xeUtils.default.get(data, property);
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
535
|
+
var compName = getComponentName(name);
|
|
536
|
+
// 如果是分组
|
|
656
537
|
if (options) {
|
|
657
538
|
return [(0, _vue.h)((0, _vue.resolveComponent)("".concat(compName, "-group")), __assign(__assign({}, getComponentFormItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)), {
|
|
658
|
-
default: function
|
|
539
|
+
default: function () {
|
|
659
540
|
return options.map(function (item, index) {
|
|
660
541
|
return (0, _vue.h)((0, _vue.resolveComponent)(compName), {
|
|
661
542
|
key: index,
|
|
@@ -667,14 +548,11 @@ function defaultFormItemRadioAndCheckboxRender(renderOpts, params) {
|
|
|
667
548
|
}
|
|
668
549
|
})];
|
|
669
550
|
}
|
|
670
|
-
|
|
671
551
|
return [(0, _vue.h)((0, _vue.resolveComponent)(compName), __assign(__assign({}, getComponentFormItemProps(renderOpts, params, itemValue)), getItemOns(renderOpts, params)))];
|
|
672
552
|
}
|
|
673
553
|
/**
|
|
674
554
|
* 内置的组件渲染
|
|
675
555
|
*/
|
|
676
|
-
|
|
677
|
-
|
|
678
556
|
var renderMap = {
|
|
679
557
|
input: {
|
|
680
558
|
autofocus: 'input',
|
|
@@ -692,10 +570,10 @@ var renderMap = {
|
|
|
692
570
|
select: {
|
|
693
571
|
renderEdit: nativeSelectEditRender,
|
|
694
572
|
renderDefault: nativeSelectEditRender,
|
|
695
|
-
renderCell: function
|
|
573
|
+
renderCell: function (renderOpts, params) {
|
|
696
574
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
|
|
697
575
|
},
|
|
698
|
-
renderFilter: function
|
|
576
|
+
renderFilter: function (renderOpts, params) {
|
|
699
577
|
var column = params.column;
|
|
700
578
|
return column.filters.map(function (option, oIndex) {
|
|
701
579
|
return (0, _vue.h)('select', __assign(__assign({
|
|
@@ -705,7 +583,7 @@ var renderMap = {
|
|
|
705
583
|
});
|
|
706
584
|
},
|
|
707
585
|
defaultFilterMethod: handleFilterMethod,
|
|
708
|
-
renderItemContent: function
|
|
586
|
+
renderItemContent: function (renderOpts, params) {
|
|
709
587
|
return [(0, _vue.h)('select', __assign(__assign({
|
|
710
588
|
class: 'vxe-default-select'
|
|
711
589
|
}, getNativeAttrs(renderOpts)), getNativeItemOns(renderOpts, params)), renderOpts.optionGroups ? renderNativeOptgroups(renderOpts, params, renderNativeFormOptions) : renderNativeFormOptions(renderOpts.options, renderOpts, params))];
|
|
@@ -715,15 +593,13 @@ var renderMap = {
|
|
|
715
593
|
$input: {
|
|
716
594
|
autofocus: '.vxe-input--inner',
|
|
717
595
|
renderEdit: defaultEditRender,
|
|
718
|
-
renderCell: function
|
|
596
|
+
renderCell: function (renderOpts, params) {
|
|
719
597
|
var _a = renderOpts.props,
|
|
720
|
-
|
|
598
|
+
props = _a === void 0 ? {} : _a;
|
|
721
599
|
var row = params.row,
|
|
722
|
-
|
|
600
|
+
column = params.column;
|
|
723
601
|
var digits = props.digits || _conf.default.input.digits;
|
|
724
|
-
|
|
725
602
|
var cellValue = _xeUtils.default.get(row, column.property);
|
|
726
|
-
|
|
727
603
|
if (cellValue) {
|
|
728
604
|
switch (props.type) {
|
|
729
605
|
case 'date':
|
|
@@ -732,13 +608,11 @@ var renderMap = {
|
|
|
732
608
|
case 'year':
|
|
733
609
|
cellValue = getLabelFormatDate(cellValue, props);
|
|
734
610
|
break;
|
|
735
|
-
|
|
736
611
|
case 'float':
|
|
737
612
|
cellValue = _xeUtils.default.toFixed(_xeUtils.default.floor(cellValue, digits), digits);
|
|
738
613
|
break;
|
|
739
614
|
}
|
|
740
615
|
}
|
|
741
|
-
|
|
742
616
|
return getCellLabelVNs(renderOpts, params, cellValue);
|
|
743
617
|
},
|
|
744
618
|
renderDefault: defaultEditRender,
|
|
@@ -762,15 +636,15 @@ var renderMap = {
|
|
|
762
636
|
autofocus: '.vxe-input--inner',
|
|
763
637
|
renderEdit: defaultSelectEditRender,
|
|
764
638
|
renderDefault: defaultSelectEditRender,
|
|
765
|
-
renderCell: function
|
|
639
|
+
renderCell: function (renderOpts, params) {
|
|
766
640
|
return getCellLabelVNs(renderOpts, params, getSelectCellValue(renderOpts, params));
|
|
767
641
|
},
|
|
768
|
-
renderFilter: function
|
|
642
|
+
renderFilter: function (renderOpts, params) {
|
|
769
643
|
var column = params.column;
|
|
770
644
|
var options = renderOpts.options,
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
645
|
+
optionProps = renderOpts.optionProps,
|
|
646
|
+
optionGroups = renderOpts.optionGroups,
|
|
647
|
+
optionGroupProps = renderOpts.optionGroupProps;
|
|
774
648
|
return column.filters.map(function (option, oIndex) {
|
|
775
649
|
var optionValue = option.data;
|
|
776
650
|
return (0, _vue.h)(getDefaultComponent(renderOpts), __assign(__assign({
|
|
@@ -784,16 +658,14 @@ var renderMap = {
|
|
|
784
658
|
});
|
|
785
659
|
},
|
|
786
660
|
defaultFilterMethod: handleFilterMethod,
|
|
787
|
-
renderItemContent: function
|
|
661
|
+
renderItemContent: function (renderOpts, params) {
|
|
788
662
|
var data = params.data,
|
|
789
|
-
|
|
663
|
+
property = params.property;
|
|
790
664
|
var options = renderOpts.options,
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
665
|
+
optionProps = renderOpts.optionProps,
|
|
666
|
+
optionGroups = renderOpts.optionGroups,
|
|
667
|
+
optionGroupProps = renderOpts.optionGroupProps;
|
|
795
668
|
var itemValue = _xeUtils.default.get(data, property);
|
|
796
|
-
|
|
797
669
|
return [(0, _vue.h)(getDefaultComponent(renderOpts), __assign(__assign({}, getComponentFormItemProps(renderOpts, params, itemValue, {
|
|
798
670
|
options: options,
|
|
799
671
|
optionProps: optionProps,
|
|
@@ -821,22 +693,19 @@ var renderMap = {
|
|
|
821
693
|
/**
|
|
822
694
|
* 全局渲染器
|
|
823
695
|
*/
|
|
824
|
-
|
|
825
696
|
var renderer = {
|
|
826
|
-
mixin: function
|
|
697
|
+
mixin: function (opts) {
|
|
827
698
|
_xeUtils.default.each(opts, function (options, name) {
|
|
828
699
|
return renderer.add(name, options);
|
|
829
700
|
});
|
|
830
|
-
|
|
831
701
|
return renderer;
|
|
832
702
|
},
|
|
833
|
-
get: function
|
|
703
|
+
get: function (name) {
|
|
834
704
|
return renderMap[name] || null;
|
|
835
705
|
},
|
|
836
|
-
add: function
|
|
706
|
+
add: function (name, options) {
|
|
837
707
|
if (name && options) {
|
|
838
708
|
var renders_1 = renderMap[name];
|
|
839
|
-
|
|
840
709
|
if (renders_1) {
|
|
841
710
|
// 检测是否覆盖
|
|
842
711
|
if (process.env.NODE_ENV === 'development') {
|
|
@@ -846,16 +715,14 @@ var renderer = {
|
|
|
846
715
|
}
|
|
847
716
|
});
|
|
848
717
|
}
|
|
849
|
-
|
|
850
718
|
Object.assign(renders_1, options);
|
|
851
719
|
} else {
|
|
852
720
|
renderMap[name] = options;
|
|
853
721
|
}
|
|
854
722
|
}
|
|
855
|
-
|
|
856
723
|
return renderer;
|
|
857
724
|
},
|
|
858
|
-
delete: function
|
|
725
|
+
delete: function (name) {
|
|
859
726
|
delete renderMap[name];
|
|
860
727
|
return renderer;
|
|
861
728
|
}
|