vxe-table 3.8.0-beta.3 → 3.8.0-beta.4
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/README.md +2 -2
- package/helper/vetur/attributes.json +28 -0
- package/helper/vetur/tags.json +12 -0
- package/lib/all.js +38 -28
- package/lib/all.min.js +1 -1
- package/lib/button/index.d.ts +2 -2
- package/lib/button/index.js +4 -5
- package/lib/button/index.min.js +1 -1
- package/lib/button/src/button.js +40 -19
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/src/group.js +8 -6
- package/lib/button/src/group.min.js +1 -1
- package/lib/button/style/style.css +8 -4
- package/lib/button/style/style.min.css +1 -1
- package/lib/button-group/index.d.ts +2 -2
- package/lib/button-group/index.js +4 -5
- package/lib/button-group/index.min.js +1 -1
- package/lib/checkbox/index.d.ts +2 -2
- package/lib/checkbox/index.js +4 -5
- package/lib/checkbox/index.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +7 -6
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +2 -3
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/checkbox/style/style.css +35 -0
- package/lib/checkbox/style/style.min.css +1 -1
- package/lib/checkbox-group/index.d.ts +2 -2
- package/lib/checkbox-group/index.js +4 -5
- package/lib/checkbox-group/index.min.js +1 -1
- package/lib/colgroup/index.d.ts +2 -2
- package/lib/colgroup/index.js +4 -5
- package/lib/colgroup/index.min.js +1 -1
- package/lib/column/index.d.ts +2 -2
- package/lib/column/index.js +4 -5
- package/lib/column/index.min.js +1 -1
- package/lib/custom/index.d.ts +4 -0
- package/lib/custom/index.js +21 -0
- package/lib/custom/index.min.js +1 -0
- package/lib/custom/src/mixin.js +100 -0
- package/lib/custom/src/mixin.min.js +1 -0
- package/lib/custom/src/panel.js +409 -0
- package/lib/custom/src/panel.min.js +1 -0
- package/lib/custom/style/index.js +1 -0
- package/lib/custom/style/style.css +294 -0
- package/lib/custom/style/style.min.css +1 -0
- package/lib/edit/index.d.ts +3 -3
- package/lib/edit/index.js +4 -5
- package/lib/edit/index.min.js +1 -1
- package/lib/edit/src/mixin.js +19 -12
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/export/index.d.ts +3 -3
- package/lib/export/index.js +7 -8
- package/lib/export/index.min.js +1 -1
- package/lib/export/src/export-panel.js +3 -4
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/import-panel.js +3 -4
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/mixin.js +3 -4
- package/lib/export/src/mixin.min.js +1 -1
- package/lib/filter/index.d.ts +3 -3
- package/lib/filter/index.js +4 -5
- package/lib/filter/index.min.js +1 -1
- package/lib/filter/src/mixin.js +2 -3
- package/lib/filter/src/mixin.min.js +1 -1
- package/lib/filter/src/panel.js +3 -4
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/form/index.d.ts +2 -2
- package/lib/form/index.js +4 -5
- package/lib/form/index.min.js +1 -1
- package/lib/form/src/form-config-item.js +1 -2
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-gather.js +2 -3
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +2 -3
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +11 -12
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +6 -3
- package/lib/form/src/render.min.js +1 -1
- package/lib/form/src/util.js +6 -5
- package/lib/form/src/util.min.js +1 -1
- package/lib/form-gather/index.d.ts +2 -2
- package/lib/form-gather/index.js +4 -5
- package/lib/form-gather/index.min.js +1 -1
- package/lib/form-item/index.d.ts +2 -2
- package/lib/form-item/index.js +4 -5
- package/lib/form-item/index.min.js +1 -1
- package/lib/grid/index.d.ts +2 -2
- package/lib/grid/index.js +4 -5
- package/lib/grid/index.min.js +1 -1
- package/lib/grid/src/grid.js +12 -12
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/icon/index.d.ts +2 -2
- package/lib/icon/index.js +4 -5
- package/lib/icon/index.min.js +1 -1
- package/lib/icon/src/icon.js +2 -3
- package/lib/icon/src/icon.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.common.js +4 -5
- package/lib/index.common.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +3526 -3576
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.d.ts +2 -2
- package/lib/input/index.js +4 -5
- package/lib/input/index.min.js +1 -1
- package/lib/input/src/input.js +12 -13
- package/lib/input/src/input.min.js +1 -1
- package/lib/keyboard/index.d.ts +3 -3
- package/lib/keyboard/index.js +4 -5
- package/lib/keyboard/index.min.js +1 -1
- package/lib/keyboard/src/mixin.js +5 -6
- package/lib/keyboard/src/mixin.min.js +1 -1
- package/lib/list/index.d.ts +2 -2
- package/lib/list/index.js +4 -5
- package/lib/list/index.min.js +1 -1
- package/lib/list/src/list.js +2 -3
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/index.d.ts +2 -2
- package/lib/loading/index.js +4 -5
- package/lib/loading/index.min.js +1 -1
- package/lib/loading/src/loading.js +2 -3
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/locale/lang/en-US.js +8 -3
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +7 -2
- package/lib/locale/lang/es-ES.js +8 -3
- package/lib/locale/lang/es-ES.min.js +1 -1
- package/lib/locale/lang/es-ES.umd.js +7 -2
- package/lib/locale/lang/ja-JP.js +8 -3
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +7 -2
- package/lib/locale/lang/pt-BR.js +8 -3
- package/lib/locale/lang/pt-BR.min.js +1 -1
- package/lib/locale/lang/pt-BR.umd.js +7 -2
- package/lib/locale/lang/zh-CN.js +8 -3
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +7 -2
- package/lib/locale/lang/zh-HK.js +1 -2
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +7 -2
- package/lib/locale/lang/zh-MO.js +1 -2
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +7 -2
- package/lib/locale/lang/zh-TC.js +8 -3
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +7 -2
- package/lib/locale/lang/zh-TW.js +1 -2
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +7 -2
- package/lib/menu/index.d.ts +3 -3
- package/lib/menu/index.js +4 -5
- package/lib/menu/index.min.js +1 -1
- package/lib/menu/src/mixin.js +5 -6
- package/lib/menu/src/mixin.min.js +1 -1
- package/lib/menu/src/panel.js +3 -4
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/mixins/size.js +2 -3
- package/lib/mixins/size.min.js +1 -1
- package/lib/modal/index.d.ts +2 -2
- package/lib/modal/index.js +9 -10
- package/lib/modal/index.min.js +1 -1
- package/lib/modal/src/modal.js +13 -14
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/optgroup/index.d.ts +2 -2
- package/lib/optgroup/index.js +4 -5
- package/lib/optgroup/index.min.js +1 -1
- package/lib/option/index.d.ts +2 -2
- package/lib/option/index.js +4 -5
- package/lib/option/index.min.js +1 -1
- package/lib/pager/index.d.ts +2 -2
- package/lib/pager/index.js +4 -5
- package/lib/pager/index.min.js +1 -1
- package/lib/pager/src/pager.js +10 -9
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pulldown/index.d.ts +2 -2
- package/lib/pulldown/index.js +4 -5
- package/lib/pulldown/index.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +8 -7
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/radio/index.d.ts +2 -2
- package/lib/radio/index.js +4 -5
- package/lib/radio/index.min.js +1 -1
- package/lib/radio/src/button.js +7 -6
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/group.js +6 -4
- package/lib/radio/src/group.min.js +1 -1
- package/lib/radio/src/radio.js +7 -6
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/radio-button/index.d.ts +2 -2
- package/lib/radio-button/index.js +4 -5
- package/lib/radio-button/index.min.js +1 -1
- package/lib/radio-group/index.d.ts +2 -2
- package/lib/radio-group/index.js +4 -5
- package/lib/radio-group/index.min.js +1 -1
- package/lib/select/index.d.ts +2 -2
- package/lib/select/index.js +4 -5
- package/lib/select/index.min.js +1 -1
- package/lib/select/src/optgroup.js +2 -3
- package/lib/select/src/optgroup.min.js +1 -1
- package/lib/select/src/option.js +2 -3
- package/lib/select/src/option.min.js +1 -1
- package/lib/select/src/select.js +11 -12
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/src/util.js +5 -3
- package/lib/select/src/util.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +4 -5
- package/lib/switch/index.min.js +1 -1
- package/lib/switch/src/switch.js +7 -6
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +4 -5
- package/lib/table/index.min.js +1 -1
- package/lib/table/src/body.js +12 -11
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +10 -10
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/column.js +2 -3
- package/lib/table/src/column.min.js +1 -1
- package/lib/table/src/columnInfo.js +7 -6
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/footer.js +7 -6
- package/lib/table/src/footer.min.js +1 -1
- package/lib/table/src/group.js +2 -3
- package/lib/table/src/group.min.js +1 -1
- package/lib/table/src/header.js +9 -8
- package/lib/table/src/header.min.js +1 -1
- package/lib/table/src/methods.js +44 -12
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +36 -14
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +2 -3
- package/lib/table/src/util.min.js +1 -1
- package/lib/textarea/index.d.ts +2 -2
- package/lib/textarea/index.js +4 -5
- package/lib/textarea/index.min.js +1 -1
- package/lib/textarea/src/textarea.js +7 -6
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/toolbar/index.d.ts +2 -2
- package/lib/toolbar/index.js +4 -5
- package/lib/toolbar/index.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +106 -360
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +0 -193
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +3 -6
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/event.js +3 -6
- package/lib/tools/event.min.js +1 -1
- package/lib/tools/log.js +3 -5
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/resize.js +5 -3
- package/lib/tools/resize.min.js +1 -1
- package/lib/tools/utils.js +3 -5
- package/lib/tools/utils.min.js +1 -1
- package/lib/tooltip/index.d.ts +2 -2
- package/lib/tooltip/index.js +4 -5
- package/lib/tooltip/index.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +7 -6
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/v-x-e-table/index.js +12 -16
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/commands.js +6 -5
- package/lib/v-x-e-table/src/commands.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +8 -14
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/formats.js +6 -5
- package/lib/v-x-e-table/src/formats.min.js +1 -1
- package/lib/v-x-e-table/src/interceptor.js +2 -3
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/menus.js +6 -5
- package/lib/v-x-e-table/src/menus.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +10 -9
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/src/store.js +6 -5
- package/lib/v-x-e-table/src/store.min.js +1 -1
- package/lib/v-x-e-table/src/validators.js +1 -2
- package/lib/v-x-e-table/src/validators.min.js +1 -1
- package/lib/validator/index.d.ts +3 -3
- package/lib/validator/index.js +4 -5
- package/lib/validator/index.min.js +1 -1
- package/lib/validator/src/mixin.js +8 -7
- package/lib/validator/src/mixin.min.js +1 -1
- package/lib/vxe-button/index.d.ts +2 -2
- package/lib/vxe-button/index.js +4 -5
- package/lib/vxe-button/index.min.js +1 -1
- package/lib/vxe-button/style/style.css +8 -4
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-button-group/index.d.ts +2 -2
- package/lib/vxe-button-group/index.js +4 -5
- package/lib/vxe-button-group/index.min.js +1 -1
- package/lib/vxe-checkbox/index.d.ts +2 -2
- package/lib/vxe-checkbox/index.js +4 -5
- package/lib/vxe-checkbox/index.min.js +1 -1
- package/lib/vxe-checkbox/style/style.css +35 -0
- package/lib/vxe-checkbox/style/style.min.css +1 -1
- package/lib/vxe-checkbox-group/index.d.ts +2 -2
- package/lib/vxe-checkbox-group/index.js +4 -5
- package/lib/vxe-checkbox-group/index.min.js +1 -1
- package/lib/vxe-colgroup/index.d.ts +2 -2
- package/lib/vxe-colgroup/index.js +4 -5
- package/lib/vxe-colgroup/index.min.js +1 -1
- package/lib/vxe-column/index.d.ts +2 -2
- package/lib/vxe-column/index.js +4 -5
- package/lib/vxe-column/index.min.js +1 -1
- package/lib/vxe-form/index.d.ts +2 -2
- package/lib/vxe-form/index.js +4 -5
- package/lib/vxe-form/index.min.js +1 -1
- package/lib/vxe-form-gather/index.d.ts +2 -2
- package/lib/vxe-form-gather/index.js +4 -5
- package/lib/vxe-form-gather/index.min.js +1 -1
- package/lib/vxe-form-item/index.d.ts +2 -2
- package/lib/vxe-form-item/index.js +4 -5
- package/lib/vxe-form-item/index.min.js +1 -1
- package/lib/vxe-grid/index.d.ts +2 -2
- package/lib/vxe-grid/index.js +4 -5
- package/lib/vxe-grid/index.min.js +1 -1
- package/lib/vxe-icon/index.d.ts +2 -2
- package/lib/vxe-icon/index.js +4 -5
- package/lib/vxe-icon/index.min.js +1 -1
- package/lib/vxe-input/index.d.ts +2 -2
- package/lib/vxe-input/index.js +4 -5
- package/lib/vxe-input/index.min.js +1 -1
- package/lib/vxe-list/index.d.ts +2 -2
- package/lib/vxe-list/index.js +4 -5
- package/lib/vxe-list/index.min.js +1 -1
- package/lib/vxe-loading/index.d.ts +2 -2
- package/lib/vxe-loading/index.js +4 -5
- package/lib/vxe-loading/index.min.js +1 -1
- package/lib/vxe-modal/index.d.ts +2 -2
- package/lib/vxe-modal/index.js +4 -5
- package/lib/vxe-modal/index.min.js +1 -1
- package/lib/vxe-optgroup/index.d.ts +2 -2
- package/lib/vxe-optgroup/index.js +4 -5
- package/lib/vxe-optgroup/index.min.js +1 -1
- package/lib/vxe-option/index.d.ts +2 -2
- package/lib/vxe-option/index.js +4 -5
- package/lib/vxe-option/index.min.js +1 -1
- package/lib/vxe-pager/index.d.ts +2 -2
- package/lib/vxe-pager/index.js +4 -5
- package/lib/vxe-pager/index.min.js +1 -1
- package/lib/vxe-pulldown/index.d.ts +2 -2
- package/lib/vxe-pulldown/index.js +4 -5
- package/lib/vxe-pulldown/index.min.js +1 -1
- package/lib/vxe-radio/index.d.ts +2 -2
- package/lib/vxe-radio/index.js +4 -5
- package/lib/vxe-radio/index.min.js +1 -1
- package/lib/vxe-radio-button/index.d.ts +2 -2
- package/lib/vxe-radio-button/index.js +4 -5
- package/lib/vxe-radio-button/index.min.js +1 -1
- package/lib/vxe-radio-group/index.d.ts +2 -2
- package/lib/vxe-radio-group/index.js +4 -5
- package/lib/vxe-radio-group/index.min.js +1 -1
- package/lib/vxe-select/index.d.ts +2 -2
- package/lib/vxe-select/index.js +4 -5
- package/lib/vxe-select/index.min.js +1 -1
- package/lib/vxe-switch/index.js +4 -5
- package/lib/vxe-switch/index.min.js +1 -1
- package/lib/vxe-table/index.d.ts +2 -2
- package/lib/vxe-table/index.js +4 -5
- package/lib/vxe-table/index.min.js +1 -1
- package/lib/vxe-table-custom-module/index.d.ts +4 -0
- package/lib/vxe-table-custom-module/index.js +23 -0
- package/lib/vxe-table-custom-module/index.min.js +1 -0
- package/lib/vxe-table-custom-module/style/index.js +1 -0
- package/lib/vxe-table-custom-module/style/style.css +294 -0
- package/lib/vxe-table-custom-module/style/style.min.css +1 -0
- package/lib/vxe-table-edit-module/index.d.ts +3 -3
- package/lib/vxe-table-edit-module/index.js +4 -5
- package/lib/vxe-table-edit-module/index.min.js +1 -1
- package/lib/vxe-table-export-module/index.d.ts +3 -3
- package/lib/vxe-table-export-module/index.js +4 -5
- package/lib/vxe-table-export-module/index.min.js +1 -1
- package/lib/vxe-table-filter-module/index.d.ts +3 -3
- package/lib/vxe-table-filter-module/index.js +4 -5
- package/lib/vxe-table-filter-module/index.min.js +1 -1
- package/lib/vxe-table-keyboard-module/index.d.ts +3 -3
- package/lib/vxe-table-keyboard-module/index.js +4 -5
- package/lib/vxe-table-keyboard-module/index.min.js +1 -1
- package/lib/vxe-table-menu-module/index.d.ts +3 -3
- package/lib/vxe-table-menu-module/index.js +4 -5
- package/lib/vxe-table-menu-module/index.min.js +1 -1
- package/lib/vxe-table-validator-module/index.d.ts +3 -3
- package/lib/vxe-table-validator-module/index.js +4 -5
- package/lib/vxe-table-validator-module/index.min.js +1 -1
- package/lib/vxe-textarea/index.d.ts +2 -2
- package/lib/vxe-textarea/index.js +4 -5
- package/lib/vxe-textarea/index.min.js +1 -1
- package/lib/vxe-toolbar/index.d.ts +2 -2
- package/lib/vxe-toolbar/index.js +4 -5
- package/lib/vxe-toolbar/index.min.js +1 -1
- package/lib/vxe-toolbar/style/style.css +0 -193
- package/lib/vxe-toolbar/style/style.min.css +1 -1
- package/lib/vxe-tooltip/index.d.ts +2 -2
- package/lib/vxe-tooltip/index.js +4 -5
- package/lib/vxe-tooltip/index.min.js +1 -1
- package/package.json +16 -19
- package/packages/all.js +11 -12
- package/packages/button/index.d.ts +2 -2
- package/packages/button/index.js +6 -4
- package/packages/button/src/button.js +21 -9
- package/packages/button-group/index.d.ts +2 -2
- package/packages/button-group/index.js +6 -4
- package/packages/checkbox/index.d.ts +2 -2
- package/packages/checkbox/index.js +6 -4
- package/packages/checkbox-group/index.d.ts +2 -2
- package/packages/checkbox-group/index.js +6 -4
- package/packages/colgroup/index.d.ts +2 -2
- package/packages/colgroup/index.js +7 -5
- package/packages/column/index.d.ts +2 -2
- package/packages/column/index.js +7 -5
- package/packages/custom/index.d.ts +4 -0
- package/packages/custom/index.js +17 -0
- package/packages/custom/src/mixin.js +74 -0
- package/packages/custom/src/panel.js +430 -0
- package/packages/edit/index.d.ts +3 -3
- package/packages/edit/index.js +4 -2
- package/packages/edit/src/mixin.js +4 -0
- package/packages/export/index.d.ts +3 -3
- package/packages/export/index.js +4 -2
- package/packages/export/src/export-panel.js +1 -1
- package/packages/export/src/import-panel.js +1 -1
- package/packages/filter/index.d.ts +3 -3
- package/packages/filter/index.js +7 -5
- package/packages/filter/src/panel.js +1 -1
- package/packages/form/index.d.ts +2 -2
- package/packages/form/index.js +6 -4
- package/packages/form-gather/index.d.ts +2 -2
- package/packages/form-gather/index.js +6 -4
- package/packages/form-item/index.d.ts +2 -2
- package/packages/form-item/index.js +6 -4
- package/packages/grid/index.d.ts +2 -2
- package/packages/grid/index.js +8 -6
- package/packages/icon/index.d.ts +2 -2
- package/packages/icon/index.js +6 -4
- package/packages/input/index.d.ts +2 -2
- package/packages/input/index.js +6 -4
- package/packages/keyboard/index.d.ts +3 -3
- package/packages/keyboard/index.js +4 -2
- package/packages/list/index.d.ts +2 -2
- package/packages/list/index.js +6 -4
- package/packages/loading/index.d.ts +2 -2
- package/packages/loading/index.js +5 -3
- package/packages/locale/lang/en-US.js +6 -0
- package/packages/locale/lang/es-ES.js +6 -0
- package/packages/locale/lang/ja-JP.js +6 -0
- package/packages/locale/lang/pt-BR.js +6 -0
- package/packages/locale/lang/zh-CN.js +6 -0
- package/packages/locale/lang/zh-TC.js +6 -0
- package/packages/menu/index.d.ts +3 -3
- package/packages/menu/index.js +4 -2
- package/packages/menu/src/panel.js +1 -1
- package/packages/modal/index.d.ts +2 -2
- package/packages/modal/index.js +8 -5
- package/packages/modal/src/modal.js +1 -1
- package/packages/optgroup/index.d.ts +2 -2
- package/packages/optgroup/index.js +6 -4
- package/packages/option/index.d.ts +2 -2
- package/packages/option/index.js +6 -4
- package/packages/pager/index.d.ts +2 -2
- package/packages/pager/index.js +6 -4
- package/packages/pulldown/index.d.ts +2 -2
- package/packages/pulldown/index.js +6 -4
- package/packages/radio/index.d.ts +2 -2
- package/packages/radio/index.js +6 -4
- package/packages/radio/src/group.js +4 -2
- package/packages/radio-button/index.d.ts +2 -2
- package/packages/radio-button/index.js +6 -4
- package/packages/radio-group/index.d.ts +2 -2
- package/packages/radio-group/index.js +6 -4
- package/packages/select/index.d.ts +2 -2
- package/packages/select/index.js +12 -10
- package/packages/select/src/select.js +3 -3
- package/packages/switch/index.js +6 -4
- package/packages/switch/src/switch.js +1 -1
- package/packages/table/index.d.ts +2 -2
- package/packages/table/index.js +11 -9
- package/packages/table/src/body.js +1 -1
- package/packages/table/src/columnInfo.js +2 -2
- package/packages/table/src/methods.js +31 -4
- package/packages/table/src/table.js +27 -7
- package/packages/textarea/index.d.ts +2 -2
- package/packages/textarea/index.js +6 -4
- package/packages/toolbar/index.d.ts +2 -2
- package/packages/toolbar/index.js +6 -4
- package/packages/toolbar/src/toolbar.js +106 -354
- package/packages/tools/dom.js +2 -1
- package/packages/tooltip/index.d.ts +2 -2
- package/packages/tooltip/index.js +6 -4
- package/packages/v-x-e-table/src/conf.js +4 -2
- package/packages/validator/index.d.ts +3 -3
- package/packages/validator/index.js +4 -2
- package/styles/all.scss +3 -1
- package/styles/button.scss +4 -1
- package/styles/checkbox.scss +1 -0
- package/styles/custom.scss +168 -0
- package/styles/icon.scss +787 -787
- package/styles/modules.scss +2 -1
- package/styles/toolbar.scss +0 -111
- package/types/all.d.ts +3 -6
- package/types/button-group.d.ts +3 -1
- package/types/button.d.ts +3 -1
- package/types/checkbox-group.d.ts +3 -1
- package/types/checkbox.d.ts +3 -1
- package/types/colgroup.d.ts +5 -4
- package/types/column.d.ts +5 -4
- package/types/form-gather.d.ts +3 -1
- package/types/form-item.d.ts +2 -1
- package/types/form.d.ts +2 -1
- package/types/grid.d.ts +2 -1
- package/types/icon.d.ts +2 -1
- package/types/input.d.ts +2 -1
- package/types/list.d.ts +2 -1
- package/types/loading.d.ts +1 -1
- package/types/modal.d.ts +2 -1
- package/types/module/custom.d.ts +11 -0
- package/types/{edit.d.ts → module/edit.d.ts} +8 -3
- package/types/{export.d.ts → module/export.d.ts} +11 -6
- package/types/{filter.d.ts → module/filter.d.ts} +9 -4
- package/types/module/index.d.ts +7 -0
- package/types/module/keyboard.d.ts +11 -0
- package/types/{menu.d.ts → module/menu.d.ts} +8 -3
- package/types/{validator.d.ts → module/validator.d.ts} +9 -4
- package/types/optgroup.d.ts +2 -1
- package/types/option.d.ts +2 -1
- package/types/pager.d.ts +2 -1
- package/types/pulldown.d.ts +2 -1
- package/types/radio-button.d.ts +2 -1
- package/types/radio-group.d.ts +2 -1
- package/types/radio.d.ts +2 -1
- package/types/select.d.ts +2 -1
- package/types/switch.d.ts +2 -1
- package/types/table.d.ts +7 -5
- package/types/textarea.d.ts +2 -1
- package/types/toolbar.d.ts +2 -1
- package/types/tooltip.d.ts +2 -1
- package/types/v-x-e-table/index.d.ts +1 -1
- package/types/v-x-e-table/interceptor.d.ts +2 -2
- package/types/v-x-e-table/menus.d.ts +1 -1
- package/types/v-x-e-table/renderer.d.ts +3 -3
- package/types/v-x-e-table/validators.d.ts +1 -1
- package/lib/footer/index.d.ts +0 -4
- package/lib/footer/index.js +0 -16
- package/lib/footer/index.min.js +0 -1
- package/lib/header/index.d.ts +0 -4
- package/lib/header/index.js +0 -16
- package/lib/header/index.min.js +0 -1
- package/packages/footer/index.d.ts +0 -4
- package/packages/footer/index.js +0 -9
- package/packages/header/index.d.ts +0 -4
- package/packages/header/index.js +0 -9
- package/types/footer.d.ts +0 -47
- package/types/header.d.ts +0 -34
- package/types/keyboard.d.ts +0 -6
- package/types/vxe-table/index.d.ts +0 -4
- /package/lib/icon/style/{iconfont.1713329378368.ttf → iconfont.1713750567034.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1713329378368.woff → iconfont.1713750567034.woff} +0 -0
- /package/lib/icon/style/{iconfont.1713329378368.woff2 → iconfont.1713750567034.woff2} +0 -0
- /package/lib/{iconfont.1713329378368.ttf → iconfont.1713750567034.ttf} +0 -0
- /package/lib/{iconfont.1713329378368.woff → iconfont.1713750567034.woff} +0 -0
- /package/lib/{iconfont.1713329378368.woff2 → iconfont.1713750567034.woff2} +0 -0
|
@@ -8,13 +8,13 @@ var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
|
8
8
|
var _conf = _interopRequireDefault(require("../../v-x-e-table/src/conf"));
|
|
9
9
|
var _vXETable = _interopRequireDefault(require("../../v-x-e-table"));
|
|
10
10
|
var _size = _interopRequireDefault(require("../../mixins/size"));
|
|
11
|
-
var _utils = _interopRequireDefault(require("../../tools/utils"));
|
|
12
|
-
var _dom = _interopRequireDefault(require("../../tools/dom"));
|
|
13
11
|
var _vn = require("../../tools/vn");
|
|
14
|
-
var _event = require("../../tools/event");
|
|
15
12
|
var _log = require("../../tools/log");
|
|
16
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function
|
|
14
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
15
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
18
|
var renderDropdowns = function renderDropdowns(h, _vm, item, isBtn) {
|
|
19
19
|
var _e = _vm._e;
|
|
20
20
|
var dropdowns = item.dropdowns;
|
|
@@ -173,149 +173,97 @@ function renderRightTools(h, _vm) {
|
|
|
173
173
|
});
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
var
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
176
|
+
function renderToolImport(h, _vm) {
|
|
177
|
+
var importOpts = _vm.importOpts;
|
|
178
|
+
return h('vxe-button', {
|
|
179
|
+
props: {
|
|
180
|
+
circle: true,
|
|
181
|
+
title: _conf.default.i18n('vxe.toolbar.import'),
|
|
182
|
+
icon: importOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_IMPORT
|
|
183
|
+
},
|
|
184
|
+
on: {
|
|
185
|
+
click: _vm.importEvent
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function renderToolExport(h, _vm) {
|
|
190
|
+
var exportOpts = _vm.exportOpts;
|
|
191
|
+
return h('vxe-button', {
|
|
192
|
+
props: {
|
|
193
|
+
circle: true,
|
|
194
|
+
title: _conf.default.i18n('vxe.toolbar.export'),
|
|
195
|
+
icon: exportOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_EXPORT
|
|
196
|
+
},
|
|
197
|
+
on: {
|
|
198
|
+
click: _vm.exportEvent
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function renderToolPrint(h, _vm) {
|
|
203
|
+
var printOpts = _vm.printOpts;
|
|
204
|
+
return h('vxe-button', {
|
|
205
|
+
props: {
|
|
206
|
+
circle: true,
|
|
207
|
+
title: _conf.default.i18n('vxe.toolbar.print'),
|
|
208
|
+
icon: printOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_PRINT
|
|
209
|
+
},
|
|
210
|
+
on: {
|
|
211
|
+
click: _vm.printEvent
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
function renderToolRefresh(h, _vm) {
|
|
216
|
+
var refreshOpts = _vm.refreshOpts,
|
|
217
|
+
isRefresh = _vm.isRefresh;
|
|
218
|
+
return h('vxe-button', {
|
|
219
|
+
props: {
|
|
220
|
+
circle: true,
|
|
221
|
+
title: _conf.default.i18n('vxe.toolbar.refresh'),
|
|
222
|
+
icon: isRefresh ? refreshOpts.iconLoading || _conf.default.icon.TOOLBAR_TOOLS_REFRESH_LOADING : refreshOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_REFRESH
|
|
223
|
+
},
|
|
224
|
+
on: {
|
|
225
|
+
click: _vm.refreshEvent
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
function renderToolZoom(h, _vm) {
|
|
230
|
+
var _e = _vm._e,
|
|
231
|
+
$xegrid = _vm.$xegrid,
|
|
232
|
+
zoomOpts = _vm.zoomOpts;
|
|
233
|
+
return $xegrid ? h('vxe-button', {
|
|
234
|
+
props: {
|
|
235
|
+
circle: true,
|
|
236
|
+
title: _conf.default.i18n("vxe.toolbar.zoom".concat($xegrid.isMaximized() ? 'Out' : 'In')),
|
|
237
|
+
icon: $xegrid.isMaximized() ? zoomOpts.iconOut || _conf.default.icon.TOOLBAR_TOOLS_MINIMIZE : zoomOpts.iconIn || _conf.default.icon.TOOLBAR_TOOLS_FULLSCREEN
|
|
238
|
+
},
|
|
239
|
+
on: {
|
|
240
|
+
click: $xegrid.triggerZoomEvent
|
|
241
|
+
}
|
|
242
|
+
}) : _e();
|
|
243
|
+
}
|
|
244
|
+
function renderToolCustom(h, _vm) {
|
|
245
|
+
var customOpts = _vm.customOpts;
|
|
183
246
|
var customBtnOns = {};
|
|
184
|
-
var customWrapperOns = {};
|
|
185
|
-
var checkMethod = $xetable ? $xetable.customOpts.checkMethod : null;
|
|
186
247
|
if (customOpts.trigger === 'manual') {
|
|
187
248
|
// 手动触发
|
|
188
249
|
} else if (customOpts.trigger === 'hover') {
|
|
189
250
|
// hover 触发
|
|
190
251
|
customBtnOns.mouseenter = _vm.handleMouseenterSettingEvent;
|
|
191
252
|
customBtnOns.mouseleave = _vm.handleMouseleaveSettingEvent;
|
|
192
|
-
customWrapperOns.mouseenter = _vm.handleWrapperMouseenterEvent;
|
|
193
|
-
customWrapperOns.mouseleave = _vm.handleWrapperMouseleaveEvent;
|
|
194
253
|
} else {
|
|
195
254
|
// 点击触发
|
|
196
255
|
customBtnOns.click = _vm.handleClickSettingEvent;
|
|
197
256
|
}
|
|
198
|
-
|
|
199
|
-
var colTitle = _utils.default.formatText(column.getTitle(), 1);
|
|
200
|
-
var colKey = column.getKey();
|
|
201
|
-
var isColGroup = column.children && column.children.length;
|
|
202
|
-
var isDisabled = checkMethod ? !checkMethod({
|
|
203
|
-
column: column
|
|
204
|
-
}) : false;
|
|
205
|
-
if (isColGroup || colKey) {
|
|
206
|
-
var isChecked = column.visible;
|
|
207
|
-
var isIndeterminate = column.halfVisible;
|
|
208
|
-
cols.push(h('li', {
|
|
209
|
-
class: ['vxe-custom--option', "level--".concat(column.level), {
|
|
210
|
-
'is--group': isColGroup
|
|
211
|
-
}]
|
|
212
|
-
}, [h('div', {
|
|
213
|
-
title: colTitle,
|
|
214
|
-
class: ['vxe-custom--checkbox-option', {
|
|
215
|
-
'is--checked': isChecked,
|
|
216
|
-
'is--indeterminate': isIndeterminate,
|
|
217
|
-
'is--disabled': isDisabled
|
|
218
|
-
}],
|
|
219
|
-
attrs: {
|
|
220
|
-
title: colTitle
|
|
221
|
-
},
|
|
222
|
-
on: {
|
|
223
|
-
click: function click() {
|
|
224
|
-
if (!isDisabled) {
|
|
225
|
-
_vm.changeCustomOption(column);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}, [h('span', {
|
|
230
|
-
class: ['vxe-checkbox--icon', isIndeterminate ? _conf.default.icon.TABLE_CHECKBOX_INDETERMINATE : isChecked ? _conf.default.icon.TABLE_CHECKBOX_CHECKED : _conf.default.icon.TABLE_CHECKBOX_UNCHECKED]
|
|
231
|
-
}), h('span', {
|
|
232
|
-
class: 'vxe-checkbox--label'
|
|
233
|
-
}, colTitle)]), !parent && customOpts.allowFixed ? h('div', {
|
|
234
|
-
class: 'vxe-custom--fixed-option'
|
|
235
|
-
}, [h('span', {
|
|
236
|
-
class: ['vxe-custom--fixed-left-option', column.fixed === 'left' ? _conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED : _conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT, {
|
|
237
|
-
'is--checked': column.fixed === 'left',
|
|
238
|
-
'is--disabled': isMaxFixedColumn && !column.fixed
|
|
239
|
-
}],
|
|
240
|
-
attrs: {
|
|
241
|
-
title: _conf.default.i18n(column.fixed === 'left' ? 'vxe.toolbar.cancelfixed' : 'vxe.toolbar.fixedLeft')
|
|
242
|
-
},
|
|
243
|
-
on: {
|
|
244
|
-
click: function click() {
|
|
245
|
-
_vm.changeFixedOption(column, 'left');
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}), h('span', {
|
|
249
|
-
class: ['vxe-custom--fixed-right-option', column.fixed === 'right' ? _conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED : _conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT, {
|
|
250
|
-
'is--checked': column.fixed === 'right',
|
|
251
|
-
'is--disabled': isMaxFixedColumn && !column.fixed
|
|
252
|
-
}],
|
|
253
|
-
attrs: {
|
|
254
|
-
title: _conf.default.i18n(column.fixed === 'right' ? 'vxe.toolbar.cancelfixed' : 'vxe.toolbar.fixedRight')
|
|
255
|
-
},
|
|
256
|
-
on: {
|
|
257
|
-
click: function click() {
|
|
258
|
-
_vm.changeFixedOption(column, 'right');
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
})]) : null]));
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
var isAllChecked = customStore.isAll;
|
|
265
|
-
var isAllIndeterminate = customStore.isIndeterminate;
|
|
266
|
-
return h('div', {
|
|
267
|
-
class: ['vxe-custom--wrapper', {
|
|
268
|
-
'is--active': customStore.visible
|
|
269
|
-
}],
|
|
270
|
-
ref: 'customWrapper'
|
|
271
|
-
}, [h('vxe-button', {
|
|
257
|
+
return h('vxe-button', {
|
|
272
258
|
props: {
|
|
273
259
|
circle: true,
|
|
260
|
+
title: _conf.default.i18n('vxe.toolbar.custom'),
|
|
274
261
|
icon: customOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_CUSTOM
|
|
275
262
|
},
|
|
276
|
-
attrs: {
|
|
277
|
-
title: _conf.default.i18n('vxe.toolbar.custom')
|
|
278
|
-
},
|
|
279
263
|
on: customBtnOns
|
|
280
|
-
})
|
|
281
|
-
class: 'vxe-custom--option-wrapper'
|
|
282
|
-
}, [h('ul', {
|
|
283
|
-
class: 'vxe-custom--header'
|
|
284
|
-
}, [h('li', {
|
|
285
|
-
class: 'vxe-custom--option'
|
|
286
|
-
}, [h('div', {
|
|
287
|
-
class: ['vxe-custom--checkbox-option', {
|
|
288
|
-
'is--checked': isAllChecked,
|
|
289
|
-
'is--indeterminate': isAllIndeterminate
|
|
290
|
-
}],
|
|
291
|
-
attrs: {
|
|
292
|
-
title: _conf.default.i18n('vxe.table.allTitle')
|
|
293
|
-
},
|
|
294
|
-
on: {
|
|
295
|
-
click: _vm.allCustomEvent
|
|
296
|
-
}
|
|
297
|
-
}, [h('span', {
|
|
298
|
-
class: ['vxe-checkbox--icon', isAllIndeterminate ? _conf.default.icon.TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? _conf.default.icon.TABLE_CHECKBOX_CHECKED : _conf.default.icon.TABLE_CHECKBOX_UNCHECKED]
|
|
299
|
-
}), h('span', {
|
|
300
|
-
class: 'vxe-checkbox--label'
|
|
301
|
-
}, _conf.default.i18n('vxe.toolbar.customAll'))])])]), h('ul', {
|
|
302
|
-
class: 'vxe-custom--body',
|
|
303
|
-
on: customWrapperOns
|
|
304
|
-
}, cols), customOpts.showFooter || customOpts.isFooter ? h('div', {
|
|
305
|
-
class: 'vxe-custom--footer'
|
|
306
|
-
}, [h('button', {
|
|
307
|
-
class: 'btn--reset',
|
|
308
|
-
on: {
|
|
309
|
-
click: _vm.resetCustomEvent
|
|
310
|
-
}
|
|
311
|
-
}, customOpts.resetButtonText || _conf.default.i18n('vxe.toolbar.customRestore')), h('button', {
|
|
312
|
-
class: 'btn--confirm',
|
|
313
|
-
on: {
|
|
314
|
-
click: _vm.confirmCustomEvent
|
|
315
|
-
}
|
|
316
|
-
}, customOpts.confirmButtonText || _conf.default.i18n('vxe.toolbar.customConfirm'))]) : null])]);
|
|
264
|
+
});
|
|
317
265
|
}
|
|
318
|
-
var _default2 = {
|
|
266
|
+
var _default2 = exports.default = {
|
|
319
267
|
name: 'VxeToolbar',
|
|
320
268
|
mixins: [_size.default],
|
|
321
269
|
props: {
|
|
@@ -405,7 +353,16 @@ var _default2 = {
|
|
|
405
353
|
}
|
|
406
354
|
if (process.env.NODE_ENV === 'development') {
|
|
407
355
|
if (customOpts.isFooter) {
|
|
408
|
-
(0, _log.warnLog)('vxe.error.
|
|
356
|
+
(0, _log.warnLog)('vxe.error.delProp', ['custom.isFooter', 'custom-config.showFooter']);
|
|
357
|
+
}
|
|
358
|
+
if (customOpts.showFooter) {
|
|
359
|
+
(0, _log.warnLog)('vxe.error.delProp', ['custom.isFooter', 'custom-config.showFooter']);
|
|
360
|
+
}
|
|
361
|
+
if (customOpts.immediate) {
|
|
362
|
+
(0, _log.warnLog)('vxe.error.delProp', ['custom.immediate', 'custom-config.immediate']);
|
|
363
|
+
}
|
|
364
|
+
if (customOpts.trigger) {
|
|
365
|
+
(0, _log.warnLog)('vxe.error.delProp', ['custom.trigger', 'custom-config.trigger']);
|
|
409
366
|
}
|
|
410
367
|
if (_this.buttons) {
|
|
411
368
|
_this.buttons.forEach(function (item) {
|
|
@@ -418,94 +375,28 @@ var _default2 = {
|
|
|
418
375
|
}
|
|
419
376
|
}
|
|
420
377
|
});
|
|
421
|
-
_event.GlobalEvent.on(this, 'mousedown', this.handleGlobalMousedownEvent);
|
|
422
|
-
_event.GlobalEvent.on(this, 'blur', this.handleGlobalBlurEvent);
|
|
423
|
-
},
|
|
424
|
-
destroyed: function destroyed() {
|
|
425
|
-
_event.GlobalEvent.off(this, 'mousedown');
|
|
426
|
-
_event.GlobalEvent.off(this, 'blur');
|
|
427
378
|
},
|
|
428
379
|
render: function render(h) {
|
|
429
|
-
var _ref;
|
|
430
380
|
var _e = this._e,
|
|
431
381
|
$xegrid = this.$xegrid,
|
|
432
382
|
perfect = this.perfect,
|
|
433
383
|
loading = this.loading,
|
|
434
|
-
importOpts = this.importOpts,
|
|
435
|
-
exportOpts = this.exportOpts,
|
|
436
384
|
refresh = this.refresh,
|
|
437
|
-
refreshOpts = this.refreshOpts,
|
|
438
385
|
zoom = this.zoom,
|
|
439
|
-
zoomOpts = this.zoomOpts,
|
|
440
386
|
custom = this.custom,
|
|
441
387
|
vSize = this.vSize,
|
|
442
388
|
className = this.className;
|
|
443
389
|
return h('div', {
|
|
444
390
|
class: ['vxe-toolbar', className ? _xeUtils.default.isFunction(className) ? className({
|
|
445
391
|
$toolbar: this
|
|
446
|
-
}) : className : '', (
|
|
392
|
+
}) : className : '', _defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), 'is--perfect', perfect), 'is--loading', loading)]
|
|
447
393
|
}, [h('div', {
|
|
448
394
|
class: 'vxe-buttons--wrapper'
|
|
449
395
|
}, renderBtns(h, this)), h('div', {
|
|
450
396
|
class: 'vxe-tools--wrapper'
|
|
451
397
|
}, renderRightTools(h, this)), h('div', {
|
|
452
398
|
class: 'vxe-tools--operate'
|
|
453
|
-
}, [this.import ? h(
|
|
454
|
-
props: {
|
|
455
|
-
circle: true,
|
|
456
|
-
icon: importOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_IMPORT
|
|
457
|
-
},
|
|
458
|
-
attrs: {
|
|
459
|
-
title: _conf.default.i18n('vxe.toolbar.import')
|
|
460
|
-
},
|
|
461
|
-
on: {
|
|
462
|
-
click: this.importEvent
|
|
463
|
-
}
|
|
464
|
-
}) : _e(), this.export ? h('vxe-button', {
|
|
465
|
-
props: {
|
|
466
|
-
circle: true,
|
|
467
|
-
icon: exportOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_EXPORT
|
|
468
|
-
},
|
|
469
|
-
attrs: {
|
|
470
|
-
title: _conf.default.i18n('vxe.toolbar.export')
|
|
471
|
-
},
|
|
472
|
-
on: {
|
|
473
|
-
click: this.exportEvent
|
|
474
|
-
}
|
|
475
|
-
}) : _e(), this.print ? h('vxe-button', {
|
|
476
|
-
props: {
|
|
477
|
-
circle: true,
|
|
478
|
-
icon: this.printOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_PRINT
|
|
479
|
-
},
|
|
480
|
-
attrs: {
|
|
481
|
-
title: _conf.default.i18n('vxe.toolbar.print')
|
|
482
|
-
},
|
|
483
|
-
on: {
|
|
484
|
-
click: this.printEvent
|
|
485
|
-
}
|
|
486
|
-
}) : _e(), refresh ? h('vxe-button', {
|
|
487
|
-
props: {
|
|
488
|
-
circle: true,
|
|
489
|
-
icon: this.isRefresh ? refreshOpts.iconLoading || _conf.default.icon.TOOLBAR_TOOLS_REFRESH_LOADING : refreshOpts.icon || _conf.default.icon.TOOLBAR_TOOLS_REFRESH
|
|
490
|
-
},
|
|
491
|
-
attrs: {
|
|
492
|
-
title: _conf.default.i18n('vxe.toolbar.refresh')
|
|
493
|
-
},
|
|
494
|
-
on: {
|
|
495
|
-
click: this.refreshEvent
|
|
496
|
-
}
|
|
497
|
-
}) : _e(), zoom && $xegrid ? h('vxe-button', {
|
|
498
|
-
props: {
|
|
499
|
-
circle: true,
|
|
500
|
-
icon: $xegrid.isMaximized() ? zoomOpts.iconOut || _conf.default.icon.TOOLBAR_TOOLS_MINIMIZE : zoomOpts.iconIn || _conf.default.icon.TOOLBAR_TOOLS_FULLSCREEN
|
|
501
|
-
},
|
|
502
|
-
attrs: {
|
|
503
|
-
title: _conf.default.i18n("vxe.toolbar.zoom".concat($xegrid.isMaximized() ? 'Out' : 'In'))
|
|
504
|
-
},
|
|
505
|
-
on: {
|
|
506
|
-
click: $xegrid.triggerZoomEvent
|
|
507
|
-
}
|
|
508
|
-
}) : _e(), custom ? renderCustoms(h, this) : _e()])]);
|
|
399
|
+
}, [this.import ? renderToolImport(h, this) : _e(), this.export ? renderToolExport(h, this) : _e(), this.print ? renderToolPrint(h, this) : _e(), refresh ? renderToolRefresh(h, this) : _e(), zoom && $xegrid ? renderToolZoom(h, this) : _e(), custom ? renderToolCustom(h, this) : _e()])]);
|
|
509
400
|
},
|
|
510
401
|
methods: {
|
|
511
402
|
syncUpdate: function syncUpdate(params) {
|
|
@@ -527,177 +418,33 @@ var _default2 = {
|
|
|
527
418
|
}
|
|
528
419
|
(0, _log.errLog)('vxe.error.barUnableLink');
|
|
529
420
|
},
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
this.checkCustomStatus();
|
|
533
|
-
},
|
|
534
|
-
closeCustom: function closeCustom() {
|
|
535
|
-
var custom = this.custom,
|
|
536
|
-
customStore = this.customStore;
|
|
537
|
-
if (customStore.visible) {
|
|
538
|
-
customStore.visible = false;
|
|
539
|
-
if (custom && !customStore.immediate) {
|
|
540
|
-
this.handleTableCustom();
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
},
|
|
544
|
-
confirmCustomEvent: function confirmCustomEvent(evnt) {
|
|
545
|
-
this.closeCustom();
|
|
546
|
-
this.emitCustomEvent('confirm', evnt);
|
|
547
|
-
},
|
|
548
|
-
customOpenEvent: function customOpenEvent(evnt) {
|
|
549
|
-
var customStore = this.customStore;
|
|
550
|
-
if (this.checkTable()) {
|
|
551
|
-
if (!customStore.visible) {
|
|
552
|
-
this.showCustom();
|
|
553
|
-
this.emitCustomEvent('open', evnt);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
|
-
customColseEvent: function customColseEvent(evnt) {
|
|
558
|
-
var customStore = this.customStore;
|
|
559
|
-
if (customStore.visible) {
|
|
560
|
-
this.closeCustom();
|
|
561
|
-
this.emitCustomEvent('close', evnt);
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
resetCustomEvent: function resetCustomEvent(evnt) {
|
|
421
|
+
handleClickSettingEvent: function handleClickSettingEvent(_ref2) {
|
|
422
|
+
var $event = _ref2.$event;
|
|
565
423
|
var $xetable = this.$xetable;
|
|
566
|
-
$xetable
|
|
567
|
-
|
|
568
|
-
this.emitCustomEvent('reset', evnt);
|
|
569
|
-
},
|
|
570
|
-
emitCustomEvent: function emitCustomEvent(type, evnt) {
|
|
571
|
-
var $xetable = this.$xetable,
|
|
572
|
-
$xegrid = this.$xegrid;
|
|
573
|
-
var comp = $xegrid || $xetable;
|
|
574
|
-
comp.$emit('custom', {
|
|
575
|
-
type: type,
|
|
576
|
-
$table: $xetable,
|
|
577
|
-
$grid: $xegrid,
|
|
578
|
-
$event: evnt
|
|
579
|
-
});
|
|
580
|
-
},
|
|
581
|
-
changeCustomOption: function changeCustomOption(column) {
|
|
582
|
-
var isChecked = !column.visible;
|
|
583
|
-
_xeUtils.default.eachTree([column], function (item) {
|
|
584
|
-
item.visible = isChecked;
|
|
585
|
-
item.halfVisible = false;
|
|
586
|
-
});
|
|
587
|
-
this.handleOptionCheck(column);
|
|
588
|
-
if (this.custom && this.customOpts.immediate) {
|
|
589
|
-
this.handleTableCustom();
|
|
424
|
+
if ($xetable) {
|
|
425
|
+
$xetable.triggerCustomEvent($event);
|
|
590
426
|
}
|
|
591
|
-
this.checkCustomStatus();
|
|
592
427
|
},
|
|
593
|
-
|
|
428
|
+
handleMouseenterSettingEvent: function handleMouseenterSettingEvent(_ref3) {
|
|
429
|
+
var $event = _ref3.$event;
|
|
594
430
|
var $xetable = this.$xetable;
|
|
595
|
-
if (
|
|
596
|
-
$xetable.
|
|
597
|
-
} else {
|
|
598
|
-
if (!$xetable.isMaxFixedColumn || column.fixed) {
|
|
599
|
-
$xetable.setColumnFixed(column, colFixed);
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
handleOptionCheck: function handleOptionCheck(column) {
|
|
604
|
-
var matchObj = _xeUtils.default.findTree(this.columns, function (item) {
|
|
605
|
-
return item === column;
|
|
606
|
-
});
|
|
607
|
-
if (matchObj && matchObj.parent) {
|
|
608
|
-
var parent = matchObj.parent;
|
|
609
|
-
if (parent.children && parent.children.length) {
|
|
610
|
-
parent.visible = parent.children.every(function (column) {
|
|
611
|
-
return column.visible;
|
|
612
|
-
});
|
|
613
|
-
parent.halfVisible = !parent.visible && parent.children.some(function (column) {
|
|
614
|
-
return column.visible || column.halfVisible;
|
|
615
|
-
});
|
|
616
|
-
this.handleOptionCheck(parent);
|
|
617
|
-
}
|
|
431
|
+
if ($xetable) {
|
|
432
|
+
$xetable.customOpenEvent($event);
|
|
618
433
|
}
|
|
619
434
|
},
|
|
620
|
-
|
|
621
|
-
var $
|
|
622
|
-
$xetable.handleCustom();
|
|
623
|
-
},
|
|
624
|
-
checkCustomStatus: function checkCustomStatus() {
|
|
625
|
-
var $xetable = this.$xetable,
|
|
626
|
-
columns = this.columns;
|
|
627
|
-
var checkMethod = $xetable.customOpts.checkMethod;
|
|
628
|
-
this.customStore.isAll = columns.every(function (column) {
|
|
629
|
-
return (checkMethod ? !checkMethod({
|
|
630
|
-
column: column
|
|
631
|
-
}) : false) || column.visible;
|
|
632
|
-
});
|
|
633
|
-
this.customStore.isIndeterminate = !this.customStore.isAll && columns.some(function (column) {
|
|
634
|
-
return (!checkMethod || checkMethod({
|
|
635
|
-
column: column
|
|
636
|
-
})) && (column.visible || column.halfVisible);
|
|
637
|
-
});
|
|
638
|
-
},
|
|
639
|
-
allCustomEvent: function allCustomEvent() {
|
|
435
|
+
handleMouseleaveSettingEvent: function handleMouseleaveSettingEvent(_ref4) {
|
|
436
|
+
var $event = _ref4.$event;
|
|
640
437
|
var $xetable = this.$xetable,
|
|
641
|
-
columns = this.columns,
|
|
642
438
|
customStore = this.customStore;
|
|
643
|
-
var checkMethod = $xetable.customOpts.checkMethod;
|
|
644
|
-
var isAll = !customStore.isAll;
|
|
645
|
-
_xeUtils.default.eachTree(columns, function (column) {
|
|
646
|
-
if (!checkMethod || checkMethod({
|
|
647
|
-
column: column
|
|
648
|
-
})) {
|
|
649
|
-
column.visible = isAll;
|
|
650
|
-
column.halfVisible = false;
|
|
651
|
-
}
|
|
652
|
-
});
|
|
653
|
-
customStore.isAll = isAll;
|
|
654
|
-
this.checkCustomStatus();
|
|
655
|
-
},
|
|
656
|
-
handleGlobalMousedownEvent: function handleGlobalMousedownEvent(evnt) {
|
|
657
|
-
if (!_dom.default.getEventTargetNode(evnt, this.$refs.customWrapper).flag) {
|
|
658
|
-
this.customColseEvent(evnt);
|
|
659
|
-
}
|
|
660
|
-
},
|
|
661
|
-
handleGlobalBlurEvent: function handleGlobalBlurEvent(evnt) {
|
|
662
|
-
this.customColseEvent(evnt);
|
|
663
|
-
},
|
|
664
|
-
handleClickSettingEvent: function handleClickSettingEvent(evnt) {
|
|
665
|
-
if (this.customStore.visible) {
|
|
666
|
-
this.customColseEvent(evnt);
|
|
667
|
-
} else {
|
|
668
|
-
this.customOpenEvent(evnt);
|
|
669
|
-
}
|
|
670
|
-
},
|
|
671
|
-
handleMouseenterSettingEvent: function handleMouseenterSettingEvent(evnt) {
|
|
672
|
-
this.customStore.activeBtn = true;
|
|
673
|
-
this.customOpenEvent(evnt);
|
|
674
|
-
},
|
|
675
|
-
handleMouseleaveSettingEvent: function handleMouseleaveSettingEvent(evnt) {
|
|
676
|
-
var _this2 = this;
|
|
677
|
-
var customStore = this.customStore;
|
|
678
439
|
customStore.activeBtn = false;
|
|
679
440
|
setTimeout(function () {
|
|
680
441
|
if (!customStore.activeBtn && !customStore.activeWrapper) {
|
|
681
|
-
|
|
682
|
-
}
|
|
683
|
-
}, 300);
|
|
684
|
-
},
|
|
685
|
-
handleWrapperMouseenterEvent: function handleWrapperMouseenterEvent(evnt) {
|
|
686
|
-
this.customStore.activeWrapper = true;
|
|
687
|
-
this.customOpenEvent(evnt);
|
|
688
|
-
},
|
|
689
|
-
handleWrapperMouseleaveEvent: function handleWrapperMouseleaveEvent(evnt) {
|
|
690
|
-
var _this3 = this;
|
|
691
|
-
var customStore = this.customStore;
|
|
692
|
-
customStore.activeWrapper = false;
|
|
693
|
-
setTimeout(function () {
|
|
694
|
-
if (!customStore.activeBtn && !customStore.activeWrapper) {
|
|
695
|
-
_this3.customColseEvent(evnt);
|
|
442
|
+
$xetable.customColseEvent($event);
|
|
696
443
|
}
|
|
697
|
-
},
|
|
444
|
+
}, 350);
|
|
698
445
|
},
|
|
699
446
|
refreshEvent: function refreshEvent(evnt) {
|
|
700
|
-
var
|
|
447
|
+
var _this2 = this;
|
|
701
448
|
var $xegrid = this.$xegrid,
|
|
702
449
|
refreshOpts = this.refreshOpts,
|
|
703
450
|
isRefresh = this.isRefresh;
|
|
@@ -709,7 +456,7 @@ var _default2 = {
|
|
|
709
456
|
Promise.resolve(queryMethod({})).catch(function (e) {
|
|
710
457
|
return e;
|
|
711
458
|
}).then(function () {
|
|
712
|
-
|
|
459
|
+
_this2.isRefresh = false;
|
|
713
460
|
});
|
|
714
461
|
} catch (e) {
|
|
715
462
|
this.isRefresh = false;
|
|
@@ -721,7 +468,7 @@ var _default2 = {
|
|
|
721
468
|
}, evnt).catch(function (e) {
|
|
722
469
|
return e;
|
|
723
470
|
}).then(function () {
|
|
724
|
-
|
|
471
|
+
_this2.isRefresh = false;
|
|
725
472
|
});
|
|
726
473
|
}
|
|
727
474
|
}
|
|
@@ -800,5 +547,4 @@ var _default2 = {
|
|
|
800
547
|
}
|
|
801
548
|
}
|
|
802
549
|
}
|
|
803
|
-
};
|
|
804
|
-
exports.default = _default2;
|
|
550
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_vXETable=_interopRequireDefault(require("../../v-x-e-table")),_size=_interopRequireDefault(require("../../mixins/size")),_utils=_interopRequireDefault(require("../../tools/utils")),_dom=_interopRequireDefault(require("../../tools/dom")),_vn=require("../../tools/vn"),_event=require("../../tools/event"),_log=require("../../tools/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var renderDropdowns=function(e,o,t,n){var i=o._e,t=t.dropdowns;return t?t.map(function(t){return!1===t.visible?i():e("vxe-button",{on:{click:function(e){return n?o.btnEvent(e,t):o.tolEvent(e,t)}},props:{disabled:t.disabled,loading:t.loading,type:t.type,icon:t.icon,circle:t.circle,round:t.round,status:t.status,content:t.name}})}):[]};function renderBtns(r,l){var c=l._e,e=l.$scopedSlots,a=l.$xegrid,u=l.$xetable,t=l.buttons,t=void 0===t?[]:t,e=e.buttons;return e?e.call(l,{$grid:a,$table:u},r):t.map(function(t){var e=t.dropdowns,o=t.buttonRender,n=o?_vXETable.default.renderer.get(o.name):null;if(!1===t.visible)return c();if(n){var i=n.renderToolbarButton||n.renderButton,n=n.toolbarButtonClassName,s={$grid:a,$table:u,button:t};if(i)return r("span",{class:["vxe-button--item",n?_xeUtils.default.isFunction(n)?n(s):n:""]},(0,_vn.getSlotVNs)(i.call(l,r,o,s)))}return r("vxe-button",{on:{click:function(e){return l.btnEvent(e,t)}},props:{disabled:t.disabled,loading:t.loading,type:t.type,icon:t.icon,circle:t.circle,round:t.round,status:t.status,content:t.name,destroyOnClose:t.destroyOnClose,placement:t.placement,transfer:t.transfer},scopedSlots:e&&e.length?{dropdowns:function(){return renderDropdowns(r,l,t,!0)}}:null})})}function renderRightTools(r,l){var c=l._e,e=l.$scopedSlots,a=l.$xetable,u=l.$xegrid,t=l.tools,t=void 0===t?[]:t,e=e.tools;return e?e.call(l,{$table:a,$grid:u},r):t.map(function(t){var e=t.dropdowns,o=t.toolRender,n=o?_vXETable.default.renderer.get(o.name):null;if(!1===t.visible)return c();if(n){var i,s=n.renderToolbarTool;if(s)return n=n.toolbarToolClassName,i={$table:a,$grid:u,tool:t},r("span",{class:["vxe-tool--item",n?_xeUtils.default.isFunction(n)?n(i):n:""]},(0,_vn.getSlotVNs)(s.call(l,r,o,i)))}return r("vxe-button",{on:{click:function(e){return l.tolEvent(e,t)}},props:{disabled:t.disabled,loading:t.loading,type:t.type,icon:t.icon,circle:t.circle,round:t.round,status:t.status,content:t.name,destroyOnClose:t.destroyOnClose,placement:t.placement,transfer:t.transfer},scopedSlots:e&&e.length?{dropdowns:function(){return renderDropdowns(r,l,t,!1)}}:null})})}function renderCustoms(u,d){var e=d.$xetable,t=d.customStore,f=d.customOpts,o=d.columns,h=!e||e.isMaxFixedColumn,v=[],n={},i={},m=e?e.customOpts.checkMethod:null,e=("manual"!==f.trigger&&("hover"===f.trigger?(n.mouseenter=d.handleMouseenterSettingEvent,n.mouseleave=d.handleMouseleaveSettingEvent,i.mouseenter=d.handleWrapperMouseenterEvent,i.mouseleave=d.handleWrapperMouseleaveEvent):n.click=d.handleClickSettingEvent),_xeUtils.default.eachTree(o,function(e,t,o,n,i){var s,r=_utils.default.formatText(e.getTitle(),1),l=e.getKey(),c=e.children&&e.children.length,a=!!m&&!m({column:e});(c||l)&&(l=e.visible,s=e.halfVisible,v.push(u("li",{class:["vxe-custom--option","level--".concat(e.level),{"is--group":c}]},[u("div",{title:r,class:["vxe-custom--checkbox-option",{"is--checked":l,"is--indeterminate":s,"is--disabled":a}],attrs:{title:r},on:{click:function(){a||d.changeCustomOption(e)}}},[u("span",{class:["vxe-checkbox--icon",s?_conf.default.icon.TABLE_CHECKBOX_INDETERMINATE:l?_conf.default.icon.TABLE_CHECKBOX_CHECKED:_conf.default.icon.TABLE_CHECKBOX_UNCHECKED]}),u("span",{class:"vxe-checkbox--label"},r)]),!i&&f.allowFixed?u("div",{class:"vxe-custom--fixed-option"},[u("span",{class:["vxe-custom--fixed-left-option","left"===e.fixed?_conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVED:_conf.default.icon.TOOLBAR_TOOLS_FIXED_LEFT,{"is--checked":"left"===e.fixed,"is--disabled":h&&!e.fixed}],attrs:{title:_conf.default.i18n("left"===e.fixed?"vxe.toolbar.cancelfixed":"vxe.toolbar.fixedLeft")},on:{click:function(){d.changeFixedOption(e,"left")}}}),u("span",{class:["vxe-custom--fixed-right-option","right"===e.fixed?_conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVED:_conf.default.icon.TOOLBAR_TOOLS_FIXED_RIGHT,{"is--checked":"right"===e.fixed,"is--disabled":h&&!e.fixed}],attrs:{title:_conf.default.i18n("right"===e.fixed?"vxe.toolbar.cancelfixed":"vxe.toolbar.fixedRight")},on:{click:function(){d.changeFixedOption(e,"right")}}})]):null])))}),t.isAll),o=t.isIndeterminate;return u("div",{class:["vxe-custom--wrapper",{"is--active":t.visible}],ref:"customWrapper"},[u("vxe-button",{props:{circle:!0,icon:f.icon||_conf.default.icon.TOOLBAR_TOOLS_CUSTOM},attrs:{title:_conf.default.i18n("vxe.toolbar.custom")},on:n}),u("div",{class:"vxe-custom--option-wrapper"},[u("ul",{class:"vxe-custom--header"},[u("li",{class:"vxe-custom--option"},[u("div",{class:["vxe-custom--checkbox-option",{"is--checked":e,"is--indeterminate":o}],attrs:{title:_conf.default.i18n("vxe.table.allTitle")},on:{click:d.allCustomEvent}},[u("span",{class:["vxe-checkbox--icon",o?_conf.default.icon.TABLE_CHECKBOX_INDETERMINATE:e?_conf.default.icon.TABLE_CHECKBOX_CHECKED:_conf.default.icon.TABLE_CHECKBOX_UNCHECKED]}),u("span",{class:"vxe-checkbox--label"},_conf.default.i18n("vxe.toolbar.customAll"))])])]),u("ul",{class:"vxe-custom--body",on:i},v),f.showFooter||f.isFooter?u("div",{class:"vxe-custom--footer"},[u("button",{class:"btn--reset",on:{click:d.resetCustomEvent}},f.resetButtonText||_conf.default.i18n("vxe.toolbar.customRestore")),u("button",{class:"btn--confirm",on:{click:d.confirmCustomEvent}},f.confirmButtonText||_conf.default.i18n("vxe.toolbar.customConfirm"))]):null])])}var _default2={name:"VxeToolbar",mixins:[_size.default],props:{loading:Boolean,refresh:[Boolean,Object],import:[Boolean,Object],export:[Boolean,Object],print:[Boolean,Object],zoom:[Boolean,Object],custom:[Boolean,Object],buttons:{type:Array,default:function(){return _conf.default.toolbar.buttons}},tools:{type:Array,default:function(){return _conf.default.toolbar.tools}},perfect:{type:Boolean,default:function(){return _conf.default.toolbar.perfect}},size:{type:String,default:function(){return _conf.default.toolbar.size||_conf.default.size}},className:[String,Function]},inject:{$xegrid:{default:null}},data:function(){return{$xetable:null,isRefresh:!1,columns:[],customStore:{isAll:!1,isIndeterminate:!1,visible:!1}}},computed:{refreshOpts:function(){return Object.assign({},_conf.default.toolbar.refresh,this.refresh)},importOpts:function(){return Object.assign({},_conf.default.toolbar.import,this.import)},exportOpts:function(){return Object.assign({},_conf.default.toolbar.export,this.export)},printOpts:function(){return Object.assign({},_conf.default.toolbar.print,this.print)},zoomOpts:function(){return Object.assign({},_conf.default.toolbar.zoom,this.zoom)},customOpts:function(){return Object.assign({},_conf.default.toolbar.custom,this.custom)}},created:function(){var o=this,n=this.refresh,i=this.refreshOpts,s=this.customOpts;this.$nextTick(function(){var e=o.fintTable(),t=i.queryMethod||i.query;!n||o.$xegrid||t||(0,_log.warnLog)("vxe.error.notFunc",["queryMethod"]),e&&e.connect(o),"development"===process.env.NODE_ENV&&(s.isFooter&&(0,_log.warnLog)("vxe.error.notValidators",["custom.isFooter","custom.showFooter"]),o.buttons)&&o.buttons.forEach(function(e){e=e.buttonRender,e=e?_vXETable.default.renderer.get(e.name):null;e&&e.renderButton&&(0,_log.warnLog)("vxe.error.delFunc",["renderButton","renderToolbarButton"])})}),_event.GlobalEvent.on(this,"mousedown",this.handleGlobalMousedownEvent),_event.GlobalEvent.on(this,"blur",this.handleGlobalBlurEvent)},destroyed:function(){_event.GlobalEvent.off(this,"mousedown"),_event.GlobalEvent.off(this,"blur")},render:function(e){var t=this._e,o=this.$xegrid,n=this.perfect,i=this.loading,s=this.importOpts,r=this.exportOpts,l=this.refresh,c=this.refreshOpts,a=this.zoom,u=this.zoomOpts,d=this.custom,f=this.vSize,h=this.className;return e("div",{class:["vxe-toolbar",h?_xeUtils.default.isFunction(h)?h({$toolbar:this}):h:"",(_defineProperty(h={},"size--".concat(f),f),_defineProperty(h,"is--perfect",n),_defineProperty(h,"is--loading",i),h)]},[e("div",{class:"vxe-buttons--wrapper"},renderBtns(e,this)),e("div",{class:"vxe-tools--wrapper"},renderRightTools(e,this)),e("div",{class:"vxe-tools--operate"},[this.import?e("vxe-button",{props:{circle:!0,icon:s.icon||_conf.default.icon.TOOLBAR_TOOLS_IMPORT},attrs:{title:_conf.default.i18n("vxe.toolbar.import")},on:{click:this.importEvent}}):t(),this.export?e("vxe-button",{props:{circle:!0,icon:r.icon||_conf.default.icon.TOOLBAR_TOOLS_EXPORT},attrs:{title:_conf.default.i18n("vxe.toolbar.export")},on:{click:this.exportEvent}}):t(),this.print?e("vxe-button",{props:{circle:!0,icon:this.printOpts.icon||_conf.default.icon.TOOLBAR_TOOLS_PRINT},attrs:{title:_conf.default.i18n("vxe.toolbar.print")},on:{click:this.printEvent}}):t(),l?e("vxe-button",{props:{circle:!0,icon:this.isRefresh?c.iconLoading||_conf.default.icon.TOOLBAR_TOOLS_REFRESH_LOADING:c.icon||_conf.default.icon.TOOLBAR_TOOLS_REFRESH},attrs:{title:_conf.default.i18n("vxe.toolbar.refresh")},on:{click:this.refreshEvent}}):t(),a&&o?e("vxe-button",{props:{circle:!0,icon:o.isMaximized()?u.iconOut||_conf.default.icon.TOOLBAR_TOOLS_MINIMIZE:u.iconIn||_conf.default.icon.TOOLBAR_TOOLS_FULLSCREEN},attrs:{title:_conf.default.i18n("vxe.toolbar.zoom".concat(o.isMaximized()?"Out":"In"))},on:{click:o.triggerZoomEvent}}):t(),d?renderCustoms(e,this):t()])])},methods:{syncUpdate:function(e){var t=e.collectColumn,e=e.$table;this.$xetable=e,this.columns=t},fintTable:function(){var e=this.$parent.$children,o=e.indexOf(this);return _xeUtils.default.find(e,function(e,t){return e&&e.loadData&&o<t&&"vxe-table"===e.$vnode.componentOptions.tag})},checkTable:function(){if(this.$xetable)return!0;(0,_log.errLog)("vxe.error.barUnableLink")},showCustom:function(){this.customStore.visible=!0,this.checkCustomStatus()},closeCustom:function(){var e=this.custom,t=this.customStore;t.visible&&(t.visible=!1,e)&&!t.immediate&&this.handleTableCustom()},confirmCustomEvent:function(e){this.closeCustom(),this.emitCustomEvent("confirm",e)},customOpenEvent:function(e){var t=this.customStore;this.checkTable()&&!t.visible&&(this.showCustom(),this.emitCustomEvent("open",e))},customColseEvent:function(e){this.customStore.visible&&(this.closeCustom(),this.emitCustomEvent("close",e))},resetCustomEvent:function(e){this.$xetable.resetColumn(!0),this.closeCustom(),this.emitCustomEvent("reset",e)},emitCustomEvent:function(e,t){var o=this.$xetable,n=this.$xegrid;(n||o).$emit("custom",{type:e,$table:o,$grid:n,$event:t})},changeCustomOption:function(e){var t=!e.visible;_xeUtils.default.eachTree([e],function(e){e.visible=t,e.halfVisible=!1}),this.handleOptionCheck(e),this.custom&&this.customOpts.immediate&&this.handleTableCustom(),this.checkCustomStatus()},changeFixedOption:function(e,t){var o=this.$xetable;e.fixed===t?o.clearColumnFixed(e):o.isMaxFixedColumn&&!e.fixed||o.setColumnFixed(e,t)},handleOptionCheck:function(t){var e=_xeUtils.default.findTree(this.columns,function(e){return e===t});e&&e.parent&&(e=e.parent).children&&e.children.length&&(e.visible=e.children.every(function(e){return e.visible}),e.halfVisible=!e.visible&&e.children.some(function(e){return e.visible||e.halfVisible}),this.handleOptionCheck(e))},handleTableCustom:function(){this.$xetable.handleCustom()},checkCustomStatus:function(){var e=this.$xetable,t=this.columns,o=e.customOpts.checkMethod;this.customStore.isAll=t.every(function(e){return!!o&&!o({column:e})||e.visible}),this.customStore.isIndeterminate=!this.customStore.isAll&&t.some(function(e){return(!o||o({column:e}))&&(e.visible||e.halfVisible)})},allCustomEvent:function(){var e=this.$xetable,t=this.columns,o=this.customStore,n=e.customOpts.checkMethod,i=!o.isAll;_xeUtils.default.eachTree(t,function(e){n&&!n({column:e})||(e.visible=i,e.halfVisible=!1)}),o.isAll=i,this.checkCustomStatus()},handleGlobalMousedownEvent:function(e){_dom.default.getEventTargetNode(e,this.$refs.customWrapper).flag||this.customColseEvent(e)},handleGlobalBlurEvent:function(e){this.customColseEvent(e)},handleClickSettingEvent:function(e){this.customStore.visible?this.customColseEvent(e):this.customOpenEvent(e)},handleMouseenterSettingEvent:function(e){this.customStore.activeBtn=!0,this.customOpenEvent(e)},handleMouseleaveSettingEvent:function(e){var t=this,o=this.customStore;o.activeBtn=!1,setTimeout(function(){o.activeBtn||o.activeWrapper||t.customColseEvent(e)},300)},handleWrapperMouseenterEvent:function(e){this.customStore.activeWrapper=!0,this.customOpenEvent(e)},handleWrapperMouseleaveEvent:function(e){var t=this,o=this.customStore;o.activeWrapper=!1,setTimeout(function(){o.activeBtn||o.activeWrapper||t.customColseEvent(e)},300)},refreshEvent:function(e){var t=this,o=this.$xegrid,n=this.refreshOpts;if(!this.isRefresh){var i=n.queryMethod||n.query;if(i){this.isRefresh=!0;try{Promise.resolve(i({})).catch(function(e){return e}).then(function(){t.isRefresh=!1})}catch(e){this.isRefresh=!1}}else o&&(this.isRefresh=!0,o.triggerToolbarCommitEvent({code:n.code||"reload"},e).catch(function(e){return e}).then(function(){t.isRefresh=!1}))}},btnEvent:function(e,t){var o=this.$xegrid,n=this.$xetable,i=t.code;i&&(o?o.triggerToolbarBtnEvent(t,e):(t={code:i,button:t,$table:n,$grid:o,$event:e},(n=_vXETable.default.commands.get(i))&&(n.commandMethod?n.commandMethod(t):"development"===process.env.NODE_ENV&&(0,_log.errLog)("vxe.error.notCommands",[i])),this.$emit("button-click",t)))},tolEvent:function(e,t){var o=this.$xegrid,n=this.$xetable,i=t.code;i&&(o?o.triggerToolbarTolEvent(t,e):(t={code:i,tool:t,$xegrid:o,$table:n,$event:e},(o=_vXETable.default.commands.get(i))&&(o.commandMethod?o.commandMethod(t):"development"===process.env.NODE_ENV&&(0,_log.errLog)("vxe.error.notCommands",[i])),this.$emit("tool-click",t)))},importEvent:function(){this.checkTable()&&this.$xetable.openImport(this.importOpts)},exportEvent:function(){this.checkTable()&&this.$xetable.openExport(this.exportOpts)},printEvent:function(){this.checkTable()&&this.$xetable.openPrint(this.printOpts)}}};exports.default=_default2;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_vXETable=_interopRequireDefault(require("../../v-x-e-table")),_size=_interopRequireDefault(require("../../mixins/size")),_vn=require("../../tools/vn"),_log=require("../../tools/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0===o)return("string"===t?String:Number)(e);o=o.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}var renderDropdowns=function(e,o,t,n){var r=o._e,t=t.dropdowns;return t?t.map(function(t){return!1===t.visible?r():e("vxe-button",{on:{click:function(e){return n?o.btnEvent(e,t):o.tolEvent(e,t)}},props:{disabled:t.disabled,loading:t.loading,type:t.type,icon:t.icon,circle:t.circle,round:t.round,status:t.status,content:t.name}})}):[]};function renderBtns(s,l){var c=l._e,e=l.$scopedSlots,a=l.$xegrid,u=l.$xetable,t=l.buttons,t=void 0===t?[]:t,e=e.buttons;return e?e.call(l,{$grid:a,$table:u},s):t.map(function(t){var e=t.dropdowns,o=t.buttonRender,n=o?_vXETable.default.renderer.get(o.name):null;if(!1===t.visible)return c();if(n){var r=n.renderToolbarButton||n.renderButton,n=n.toolbarButtonClassName,i={$grid:a,$table:u,button:t};if(r)return s("span",{class:["vxe-button--item",n?_xeUtils.default.isFunction(n)?n(i):n:""]},(0,_vn.getSlotVNs)(r.call(l,s,o,i)))}return s("vxe-button",{on:{click:function(e){return l.btnEvent(e,t)}},props:{disabled:t.disabled,loading:t.loading,type:t.type,icon:t.icon,circle:t.circle,round:t.round,status:t.status,content:t.name,destroyOnClose:t.destroyOnClose,placement:t.placement,transfer:t.transfer},scopedSlots:e&&e.length?{dropdowns:function(){return renderDropdowns(s,l,t,!0)}}:null})})}function renderRightTools(s,l){var c=l._e,e=l.$scopedSlots,a=l.$xetable,u=l.$xegrid,t=l.tools,t=void 0===t?[]:t,e=e.tools;return e?e.call(l,{$table:a,$grid:u},s):t.map(function(t){var e=t.dropdowns,o=t.toolRender,n=o?_vXETable.default.renderer.get(o.name):null;if(!1===t.visible)return c();if(n){var r,i=n.renderToolbarTool;if(i)return n=n.toolbarToolClassName,r={$table:a,$grid:u,tool:t},s("span",{class:["vxe-tool--item",n?_xeUtils.default.isFunction(n)?n(r):n:""]},(0,_vn.getSlotVNs)(i.call(l,s,o,r)))}return s("vxe-button",{on:{click:function(e){return l.tolEvent(e,t)}},props:{disabled:t.disabled,loading:t.loading,type:t.type,icon:t.icon,circle:t.circle,round:t.round,status:t.status,content:t.name,destroyOnClose:t.destroyOnClose,placement:t.placement,transfer:t.transfer},scopedSlots:e&&e.length?{dropdowns:function(){return renderDropdowns(s,l,t,!1)}}:null})})}function renderToolImport(e,t){var o=t.importOpts;return e("vxe-button",{props:{circle:!0,title:_conf.default.i18n("vxe.toolbar.import"),icon:o.icon||_conf.default.icon.TOOLBAR_TOOLS_IMPORT},on:{click:t.importEvent}})}function renderToolExport(e,t){var o=t.exportOpts;return e("vxe-button",{props:{circle:!0,title:_conf.default.i18n("vxe.toolbar.export"),icon:o.icon||_conf.default.icon.TOOLBAR_TOOLS_EXPORT},on:{click:t.exportEvent}})}function renderToolPrint(e,t){var o=t.printOpts;return e("vxe-button",{props:{circle:!0,title:_conf.default.i18n("vxe.toolbar.print"),icon:o.icon||_conf.default.icon.TOOLBAR_TOOLS_PRINT},on:{click:t.printEvent}})}function renderToolRefresh(e,t){var o=t.refreshOpts,n=t.isRefresh;return e("vxe-button",{props:{circle:!0,title:_conf.default.i18n("vxe.toolbar.refresh"),icon:n?o.iconLoading||_conf.default.icon.TOOLBAR_TOOLS_REFRESH_LOADING:o.icon||_conf.default.icon.TOOLBAR_TOOLS_REFRESH},on:{click:t.refreshEvent}})}function renderToolZoom(e,t){var o=t._e,n=t.$xegrid,t=t.zoomOpts;return n?e("vxe-button",{props:{circle:!0,title:_conf.default.i18n("vxe.toolbar.zoom".concat(n.isMaximized()?"Out":"In")),icon:n.isMaximized()?t.iconOut||_conf.default.icon.TOOLBAR_TOOLS_MINIMIZE:t.iconIn||_conf.default.icon.TOOLBAR_TOOLS_FULLSCREEN},on:{click:n.triggerZoomEvent}}):o()}function renderToolCustom(e,t){var o=t.customOpts,n={};return"manual"!==o.trigger&&("hover"===o.trigger?(n.mouseenter=t.handleMouseenterSettingEvent,n.mouseleave=t.handleMouseleaveSettingEvent):n.click=t.handleClickSettingEvent),e("vxe-button",{props:{circle:!0,title:_conf.default.i18n("vxe.toolbar.custom"),icon:o.icon||_conf.default.icon.TOOLBAR_TOOLS_CUSTOM},on:n})}var _default2=exports.default={name:"VxeToolbar",mixins:[_size.default],props:{loading:Boolean,refresh:[Boolean,Object],import:[Boolean,Object],export:[Boolean,Object],print:[Boolean,Object],zoom:[Boolean,Object],custom:[Boolean,Object],buttons:{type:Array,default:function(){return _conf.default.toolbar.buttons}},tools:{type:Array,default:function(){return _conf.default.toolbar.tools}},perfect:{type:Boolean,default:function(){return _conf.default.toolbar.perfect}},size:{type:String,default:function(){return _conf.default.toolbar.size||_conf.default.size}},className:[String,Function]},inject:{$xegrid:{default:null}},data:function(){return{$xetable:null,isRefresh:!1,columns:[],customStore:{isAll:!1,isIndeterminate:!1,visible:!1}}},computed:{refreshOpts:function(){return Object.assign({},_conf.default.toolbar.refresh,this.refresh)},importOpts:function(){return Object.assign({},_conf.default.toolbar.import,this.import)},exportOpts:function(){return Object.assign({},_conf.default.toolbar.export,this.export)},printOpts:function(){return Object.assign({},_conf.default.toolbar.print,this.print)},zoomOpts:function(){return Object.assign({},_conf.default.toolbar.zoom,this.zoom)},customOpts:function(){return Object.assign({},_conf.default.toolbar.custom,this.custom)}},created:function(){var o=this,n=this.refresh,r=this.refreshOpts,i=this.customOpts;this.$nextTick(function(){var e=o.fintTable(),t=r.queryMethod||r.query;!n||o.$xegrid||t||(0,_log.warnLog)("vxe.error.notFunc",["queryMethod"]),e&&e.connect(o),"development"===process.env.NODE_ENV&&(i.isFooter&&(0,_log.warnLog)("vxe.error.delProp",["custom.isFooter","custom-config.showFooter"]),i.showFooter&&(0,_log.warnLog)("vxe.error.delProp",["custom.isFooter","custom-config.showFooter"]),i.immediate&&(0,_log.warnLog)("vxe.error.delProp",["custom.immediate","custom-config.immediate"]),i.trigger&&(0,_log.warnLog)("vxe.error.delProp",["custom.trigger","custom-config.trigger"]),o.buttons)&&o.buttons.forEach(function(e){e=e.buttonRender,e=e?_vXETable.default.renderer.get(e.name):null;e&&e.renderButton&&(0,_log.warnLog)("vxe.error.delFunc",["renderButton","renderToolbarButton"])})})},render:function(e){var t=this._e,o=this.$xegrid,n=this.perfect,r=this.loading,i=this.refresh,s=this.zoom,l=this.custom,c=this.vSize,a=this.className;return e("div",{class:["vxe-toolbar",a?_xeUtils.default.isFunction(a)?a({$toolbar:this}):a:"",_defineProperty(_defineProperty(_defineProperty({},"size--".concat(c),c),"is--perfect",n),"is--loading",r)]},[e("div",{class:"vxe-buttons--wrapper"},renderBtns(e,this)),e("div",{class:"vxe-tools--wrapper"},renderRightTools(e,this)),e("div",{class:"vxe-tools--operate"},[this.import?renderToolImport(e,this):t(),this.export?renderToolExport(e,this):t(),this.print?renderToolPrint(e,this):t(),i?renderToolRefresh(e,this):t(),s&&o?renderToolZoom(e,this):t(),l?renderToolCustom(e,this):t()])])},methods:{syncUpdate:function(e){var t=e.collectColumn,e=e.$table;this.$xetable=e,this.columns=t},fintTable:function(){var e=this.$parent.$children,o=e.indexOf(this);return _xeUtils.default.find(e,function(e,t){return e&&e.loadData&&o<t&&"vxe-table"===e.$vnode.componentOptions.tag})},checkTable:function(){if(this.$xetable)return!0;(0,_log.errLog)("vxe.error.barUnableLink")},handleClickSettingEvent:function(e){var e=e.$event,t=this.$xetable;t&&t.triggerCustomEvent(e)},handleMouseenterSettingEvent:function(e){var e=e.$event,t=this.$xetable;t&&t.customOpenEvent(e)},handleMouseleaveSettingEvent:function(e){var t=e.$event,o=this.$xetable,n=this.customStore;n.activeBtn=!1,setTimeout(function(){n.activeBtn||n.activeWrapper||o.customColseEvent(t)},350)},refreshEvent:function(e){var t=this,o=this.$xegrid,n=this.refreshOpts;if(!this.isRefresh){var r=n.queryMethod||n.query;if(r){this.isRefresh=!0;try{Promise.resolve(r({})).catch(function(e){return e}).then(function(){t.isRefresh=!1})}catch(e){this.isRefresh=!1}}else o&&(this.isRefresh=!0,o.triggerToolbarCommitEvent({code:n.code||"reload"},e).catch(function(e){return e}).then(function(){t.isRefresh=!1}))}},btnEvent:function(e,t){var o=this.$xegrid,n=this.$xetable,r=t.code;r&&(o?o.triggerToolbarBtnEvent(t,e):(t={code:r,button:t,$table:n,$grid:o,$event:e},(n=_vXETable.default.commands.get(r))&&(n.commandMethod?n.commandMethod(t):"development"===process.env.NODE_ENV&&(0,_log.errLog)("vxe.error.notCommands",[r])),this.$emit("button-click",t)))},tolEvent:function(e,t){var o=this.$xegrid,n=this.$xetable,r=t.code;r&&(o?o.triggerToolbarTolEvent(t,e):(t={code:r,tool:t,$xegrid:o,$table:n,$event:e},(o=_vXETable.default.commands.get(r))&&(o.commandMethod?o.commandMethod(t):"development"===process.env.NODE_ENV&&(0,_log.errLog)("vxe.error.notCommands",[r])),this.$emit("tool-click",t)))},importEvent:function(){this.checkTable()&&this.$xetable.openImport(this.importOpts)},exportEvent:function(){this.checkTable()&&this.$xetable.openExport(this.exportOpts)},printEvent:function(){this.checkTable()&&this.$xetable.openPrint(this.printOpts)}}};
|