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
package/lib/button/src/button.js
CHANGED
|
@@ -4,24 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = 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("../../v-x-e-table/src/conf"));
|
|
13
|
-
|
|
14
10
|
var _size = require("../../hooks/size");
|
|
15
|
-
|
|
16
11
|
var _dom = require("../../tools/dom");
|
|
17
|
-
|
|
18
12
|
var _utils = require("../../tools/utils");
|
|
19
|
-
|
|
20
13
|
var _event = require("../../tools/event");
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
|
-
var _default2 = (0, _vue.defineComponent)({
|
|
15
|
+
var _default = (0, _vue.defineComponent)({
|
|
25
16
|
name: 'VxeButton',
|
|
26
17
|
props: {
|
|
27
18
|
/**
|
|
@@ -29,84 +20,70 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
29
20
|
*/
|
|
30
21
|
type: String,
|
|
31
22
|
className: String,
|
|
32
|
-
|
|
33
23
|
/**
|
|
34
24
|
* 按钮尺寸
|
|
35
25
|
*/
|
|
36
26
|
size: {
|
|
37
27
|
type: String,
|
|
38
|
-
default: function
|
|
28
|
+
default: function () {
|
|
39
29
|
return _conf.default.button.size || _conf.default.size;
|
|
40
30
|
}
|
|
41
31
|
},
|
|
42
|
-
|
|
43
32
|
/**
|
|
44
33
|
* 用来标识这一项
|
|
45
34
|
*/
|
|
46
35
|
name: [String, Number],
|
|
47
|
-
|
|
48
36
|
/**
|
|
49
37
|
* 按钮内容
|
|
50
38
|
*/
|
|
51
39
|
content: String,
|
|
52
|
-
|
|
53
40
|
/**
|
|
54
41
|
* 固定显示下拉面板的方向
|
|
55
42
|
*/
|
|
56
43
|
placement: String,
|
|
57
|
-
|
|
58
44
|
/**
|
|
59
45
|
* 按钮状态
|
|
60
46
|
*/
|
|
61
47
|
status: String,
|
|
62
|
-
|
|
63
48
|
/**
|
|
64
49
|
* 按钮的图标
|
|
65
50
|
*/
|
|
66
51
|
icon: String,
|
|
67
|
-
|
|
68
52
|
/**
|
|
69
53
|
* 圆角边框
|
|
70
54
|
*/
|
|
71
55
|
round: Boolean,
|
|
72
|
-
|
|
73
56
|
/**
|
|
74
57
|
* 圆角按钮
|
|
75
58
|
*/
|
|
76
59
|
circle: Boolean,
|
|
77
|
-
|
|
78
60
|
/**
|
|
79
61
|
* 是否禁用
|
|
80
62
|
*/
|
|
81
63
|
disabled: Boolean,
|
|
82
|
-
|
|
83
64
|
/**
|
|
84
65
|
* 是否加载中
|
|
85
66
|
*/
|
|
86
67
|
loading: Boolean,
|
|
87
|
-
|
|
88
68
|
/**
|
|
89
69
|
* 在下拉面板关闭时销毁内容
|
|
90
70
|
*/
|
|
91
71
|
destroyOnClose: Boolean,
|
|
92
|
-
|
|
93
72
|
/**
|
|
94
73
|
* 是否将弹框容器插入于 body 内
|
|
95
74
|
*/
|
|
96
75
|
transfer: {
|
|
97
76
|
type: Boolean,
|
|
98
|
-
default: function
|
|
77
|
+
default: function () {
|
|
99
78
|
return _conf.default.button.transfer;
|
|
100
79
|
}
|
|
101
80
|
}
|
|
102
81
|
},
|
|
103
82
|
emits: ['click', 'dropdown-click'],
|
|
104
|
-
setup: function
|
|
83
|
+
setup: function (props, context) {
|
|
105
84
|
var slots = context.slots,
|
|
106
|
-
|
|
107
|
-
|
|
85
|
+
emit = context.emit;
|
|
108
86
|
var xID = _xeUtils.default.uniqueId();
|
|
109
|
-
|
|
110
87
|
var computeSize = (0, _size.useSize)(props);
|
|
111
88
|
var reactData = (0, _vue.reactive)({
|
|
112
89
|
inited: false,
|
|
@@ -131,39 +108,34 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
131
108
|
context: context,
|
|
132
109
|
reactData: reactData,
|
|
133
110
|
internalData: internalData,
|
|
134
|
-
getRefMaps: function
|
|
111
|
+
getRefMaps: function () {
|
|
135
112
|
return refMaps;
|
|
136
113
|
}
|
|
137
114
|
};
|
|
138
115
|
var buttonMethods = {};
|
|
139
116
|
var computeIsFormBtn = (0, _vue.computed)(function () {
|
|
140
117
|
var type = props.type;
|
|
141
|
-
|
|
142
118
|
if (type) {
|
|
143
119
|
return ['submit', 'reset', 'button'].indexOf(type) > -1;
|
|
144
120
|
}
|
|
145
|
-
|
|
146
121
|
return false;
|
|
147
122
|
});
|
|
148
123
|
var computeBtnType = (0, _vue.computed)(function () {
|
|
149
124
|
var type = props.type;
|
|
150
125
|
return type && type === 'text' ? type : 'button';
|
|
151
126
|
});
|
|
152
|
-
|
|
153
|
-
var updateZindex = function updateZindex() {
|
|
127
|
+
var updateZindex = function () {
|
|
154
128
|
if (reactData.panelIndex < (0, _utils.getLastZIndex)()) {
|
|
155
129
|
reactData.panelIndex = (0, _utils.nextZIndex)();
|
|
156
130
|
}
|
|
157
131
|
};
|
|
158
|
-
|
|
159
|
-
var updatePlacement = function updatePlacement() {
|
|
132
|
+
var updatePlacement = function () {
|
|
160
133
|
return (0, _vue.nextTick)().then(function () {
|
|
161
134
|
var transfer = props.transfer,
|
|
162
|
-
|
|
135
|
+
placement = props.placement;
|
|
163
136
|
var panelIndex = reactData.panelIndex;
|
|
164
137
|
var targetElem = refButton.value;
|
|
165
138
|
var panelElem = refBtnPanel.value;
|
|
166
|
-
|
|
167
139
|
if (panelElem && targetElem) {
|
|
168
140
|
var targetHeight = targetElem.offsetHeight;
|
|
169
141
|
var targetWidth = targetElem.offsetWidth;
|
|
@@ -173,20 +145,16 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
173
145
|
var panelStyle = {
|
|
174
146
|
zIndex: panelIndex
|
|
175
147
|
};
|
|
176
|
-
|
|
177
148
|
var _a = (0, _dom.getAbsolutePos)(targetElem),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
149
|
+
top_1 = _a.top,
|
|
150
|
+
left = _a.left,
|
|
151
|
+
boundingTop = _a.boundingTop,
|
|
152
|
+
visibleHeight = _a.visibleHeight,
|
|
153
|
+
visibleWidth = _a.visibleWidth;
|
|
184
154
|
var panelPlacement = 'bottom';
|
|
185
|
-
|
|
186
155
|
if (transfer) {
|
|
187
156
|
var btnLeft = left + targetWidth - panelWidth;
|
|
188
157
|
var btnTop = top_1 + targetHeight;
|
|
189
|
-
|
|
190
158
|
if (placement === 'top') {
|
|
191
159
|
panelPlacement = 'top';
|
|
192
160
|
btnTop = top_1 - panelHeight;
|
|
@@ -195,25 +163,21 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
195
163
|
if (boundingTop + targetHeight + panelHeight + marginSize > visibleHeight) {
|
|
196
164
|
panelPlacement = 'top';
|
|
197
165
|
btnTop = top_1 - panelHeight;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
166
|
+
}
|
|
167
|
+
// 如果上面不够放,则向下(优先)
|
|
201
168
|
if (btnTop < marginSize) {
|
|
202
169
|
panelPlacement = 'bottom';
|
|
203
170
|
btnTop = top_1 + targetHeight;
|
|
204
171
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
172
|
+
}
|
|
173
|
+
// 如果溢出右边
|
|
208
174
|
if (btnLeft + panelWidth + marginSize > visibleWidth) {
|
|
209
175
|
btnLeft -= btnLeft + panelWidth + marginSize - visibleWidth;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
176
|
+
}
|
|
177
|
+
// 如果溢出左边
|
|
213
178
|
if (btnLeft < marginSize) {
|
|
214
179
|
btnLeft = marginSize;
|
|
215
180
|
}
|
|
216
|
-
|
|
217
181
|
Object.assign(panelStyle, {
|
|
218
182
|
left: "".concat(btnLeft, "px"),
|
|
219
183
|
right: 'auto',
|
|
@@ -235,41 +199,33 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
235
199
|
}
|
|
236
200
|
}
|
|
237
201
|
}
|
|
238
|
-
|
|
239
202
|
reactData.panelStyle = panelStyle;
|
|
240
203
|
reactData.panelPlacement = panelPlacement;
|
|
241
204
|
return (0, _vue.nextTick)();
|
|
242
205
|
}
|
|
243
206
|
});
|
|
244
207
|
};
|
|
245
|
-
|
|
246
|
-
var clickEvent = function clickEvent(evnt) {
|
|
208
|
+
var clickEvent = function (evnt) {
|
|
247
209
|
buttonMethods.dispatchEvent('click', {
|
|
248
210
|
$event: evnt
|
|
249
211
|
}, evnt);
|
|
250
212
|
};
|
|
251
|
-
|
|
252
|
-
var mousedownDropdownEvent = function mousedownDropdownEvent(evnt) {
|
|
213
|
+
var mousedownDropdownEvent = function (evnt) {
|
|
253
214
|
var isLeftBtn = evnt.button === 0;
|
|
254
|
-
|
|
255
215
|
if (isLeftBtn) {
|
|
256
216
|
evnt.stopPropagation();
|
|
257
217
|
}
|
|
258
218
|
};
|
|
259
|
-
|
|
260
|
-
var clickDropdownEvent = function clickDropdownEvent(evnt) {
|
|
219
|
+
var clickDropdownEvent = function (evnt) {
|
|
261
220
|
var dropdownElem = evnt.currentTarget;
|
|
262
221
|
var panelElem = refBtnPanel.value;
|
|
263
|
-
|
|
264
222
|
var _a = (0, _dom.getEventTargetNode)(evnt, dropdownElem, 'vxe-button'),
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
223
|
+
flag = _a.flag,
|
|
224
|
+
targetElem = _a.targetElem;
|
|
268
225
|
if (flag) {
|
|
269
226
|
if (panelElem) {
|
|
270
227
|
panelElem.dataset.active = 'N';
|
|
271
228
|
}
|
|
272
|
-
|
|
273
229
|
reactData.showPanel = false;
|
|
274
230
|
setTimeout(function () {
|
|
275
231
|
if (!panelElem || panelElem.dataset.active !== 'Y') {
|
|
@@ -282,10 +238,8 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
282
238
|
}, evnt);
|
|
283
239
|
}
|
|
284
240
|
};
|
|
285
|
-
|
|
286
|
-
var mouseenterEvent = function mouseenterEvent() {
|
|
241
|
+
var mouseenterEvent = function () {
|
|
287
242
|
var panelElem = refBtnPanel.value;
|
|
288
|
-
|
|
289
243
|
if (panelElem) {
|
|
290
244
|
panelElem.dataset.active = 'Y';
|
|
291
245
|
reactData.animatVisible = true;
|
|
@@ -303,17 +257,13 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
303
257
|
}, 20);
|
|
304
258
|
}
|
|
305
259
|
};
|
|
306
|
-
|
|
307
|
-
var mouseenterTargetEvent = function mouseenterTargetEvent() {
|
|
260
|
+
var mouseenterTargetEvent = function () {
|
|
308
261
|
var panelElem = refBtnPanel.value;
|
|
309
|
-
|
|
310
262
|
if (panelElem) {
|
|
311
263
|
panelElem.dataset.active = 'Y';
|
|
312
|
-
|
|
313
264
|
if (!reactData.inited) {
|
|
314
265
|
reactData.inited = true;
|
|
315
266
|
}
|
|
316
|
-
|
|
317
267
|
internalData.showTime = setTimeout(function () {
|
|
318
268
|
if (panelElem.dataset.active === 'Y') {
|
|
319
269
|
mouseenterEvent();
|
|
@@ -323,11 +273,9 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
323
273
|
}, 250);
|
|
324
274
|
}
|
|
325
275
|
};
|
|
326
|
-
|
|
327
|
-
var closePanel = function closePanel() {
|
|
276
|
+
var closePanel = function () {
|
|
328
277
|
var panelElem = refBtnPanel.value;
|
|
329
278
|
clearTimeout(internalData.showTime);
|
|
330
|
-
|
|
331
279
|
if (panelElem) {
|
|
332
280
|
panelElem.dataset.active = 'N';
|
|
333
281
|
setTimeout(function () {
|
|
@@ -345,17 +293,14 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
345
293
|
reactData.showPanel = false;
|
|
346
294
|
}
|
|
347
295
|
};
|
|
348
|
-
|
|
349
|
-
var mouseleaveEvent = function mouseleaveEvent() {
|
|
296
|
+
var mouseleaveEvent = function () {
|
|
350
297
|
closePanel();
|
|
351
298
|
};
|
|
352
|
-
|
|
353
|
-
var renderContent = function renderContent() {
|
|
299
|
+
var renderContent = function () {
|
|
354
300
|
var content = props.content,
|
|
355
|
-
|
|
356
|
-
|
|
301
|
+
icon = props.icon,
|
|
302
|
+
loading = props.loading;
|
|
357
303
|
var contVNs = [];
|
|
358
|
-
|
|
359
304
|
if (loading) {
|
|
360
305
|
contVNs.push((0, _vue.h)('i', {
|
|
361
306
|
class: ['vxe-button--loading-icon', _conf.default.icon.BUTTON_LOADING]
|
|
@@ -369,7 +314,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
369
314
|
class: ['vxe-button--icon', icon]
|
|
370
315
|
}));
|
|
371
316
|
}
|
|
372
|
-
|
|
373
317
|
if (slots.default) {
|
|
374
318
|
contVNs.push((0, _vue.h)('span', {
|
|
375
319
|
class: 'vxe-button--content'
|
|
@@ -379,23 +323,21 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
379
323
|
class: 'vxe-button--content'
|
|
380
324
|
}, (0, _utils.getFuncText)(content)));
|
|
381
325
|
}
|
|
382
|
-
|
|
383
326
|
return contVNs;
|
|
384
327
|
};
|
|
385
|
-
|
|
386
328
|
buttonMethods = {
|
|
387
|
-
dispatchEvent: function
|
|
329
|
+
dispatchEvent: function (type, params, evnt) {
|
|
388
330
|
emit(type, Object.assign({
|
|
389
331
|
$button: $xebutton,
|
|
390
332
|
$event: evnt
|
|
391
333
|
}, params));
|
|
392
334
|
},
|
|
393
|
-
focus: function
|
|
335
|
+
focus: function () {
|
|
394
336
|
var btnElem = refButton.value;
|
|
395
337
|
btnElem.focus();
|
|
396
338
|
return (0, _vue.nextTick)();
|
|
397
339
|
},
|
|
398
|
-
blur: function
|
|
340
|
+
blur: function () {
|
|
399
341
|
var btnElem = refButton.value;
|
|
400
342
|
btnElem.blur();
|
|
401
343
|
return (0, _vue.nextTick)();
|
|
@@ -405,7 +347,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
405
347
|
(0, _vue.onMounted)(function () {
|
|
406
348
|
_event.GlobalEvent.on($xebutton, 'mousewheel', function (evnt) {
|
|
407
349
|
var panelElem = refBtnPanel.value;
|
|
408
|
-
|
|
409
350
|
if (reactData.showPanel && !(0, _dom.getEventTargetNode)(evnt, panelElem).flag) {
|
|
410
351
|
closePanel();
|
|
411
352
|
}
|
|
@@ -414,26 +355,23 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
414
355
|
(0, _vue.onUnmounted)(function () {
|
|
415
356
|
_event.GlobalEvent.off($xebutton, 'mousewheel');
|
|
416
357
|
});
|
|
417
|
-
|
|
418
|
-
var renderVN = function renderVN() {
|
|
358
|
+
var renderVN = function () {
|
|
419
359
|
var _a, _b, _c, _d;
|
|
420
|
-
|
|
421
360
|
var className = props.className,
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
361
|
+
transfer = props.transfer,
|
|
362
|
+
type = props.type,
|
|
363
|
+
round = props.round,
|
|
364
|
+
circle = props.circle,
|
|
365
|
+
destroyOnClose = props.destroyOnClose,
|
|
366
|
+
status = props.status,
|
|
367
|
+
name = props.name,
|
|
368
|
+
disabled = props.disabled,
|
|
369
|
+
loading = props.loading;
|
|
431
370
|
var inited = reactData.inited,
|
|
432
|
-
|
|
371
|
+
showPanel = reactData.showPanel;
|
|
433
372
|
var isFormBtn = computeIsFormBtn.value;
|
|
434
373
|
var btnType = computeBtnType.value;
|
|
435
374
|
var vSize = computeSize.value;
|
|
436
|
-
|
|
437
375
|
if (slots.dropdowns) {
|
|
438
376
|
return (0, _vue.h)('div', {
|
|
439
377
|
ref: refElem,
|
|
@@ -465,7 +403,6 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
465
403
|
onMouseleave: mouseleaveEvent
|
|
466
404
|
}, destroyOnClose && !showPanel ? [] : slots.dropdowns({}))] : [])])]);
|
|
467
405
|
}
|
|
468
|
-
|
|
469
406
|
return (0, _vue.h)('button', {
|
|
470
407
|
ref: refButton,
|
|
471
408
|
class: ['vxe-button', "type--".concat(btnType), (_d = {}, _d["size--".concat(vSize)] = vSize, _d["theme--".concat(status)] = status, _d['is--round'] = round, _d['is--circle'] = circle, _d['is--disabled'] = disabled || loading, _d['is--loading'] = loading, _d)],
|
|
@@ -475,13 +412,11 @@ var _default2 = (0, _vue.defineComponent)({
|
|
|
475
412
|
onClick: clickEvent
|
|
476
413
|
}, renderContent());
|
|
477
414
|
};
|
|
478
|
-
|
|
479
415
|
$xebutton.renderVN = renderVN;
|
|
480
416
|
return $xebutton;
|
|
481
417
|
},
|
|
482
|
-
render: function
|
|
418
|
+
render: function () {
|
|
483
419
|
return this.renderVN();
|
|
484
420
|
}
|
|
485
421
|
});
|
|
486
|
-
|
|
487
|
-
exports.default = _default2;
|
|
422
|
+
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_size=require("../../hooks/size"),_dom=require("../../tools/dom"),_utils=require("../../tools/utils"),_event=require("../../tools/event");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_size=require("../../hooks/size"),_dom=require("../../tools/dom"),_utils=require("../../tools/utils"),_event=require("../../tools/event");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=(0,_vue.defineComponent)({name:"VxeButton",props:{type:String,className:String,size:{type:String,default:function(){return _conf.default.button.size||_conf.default.size}},name:[String,Number],content:String,placement:String,status:String,icon:String,round:Boolean,circle:Boolean,disabled:Boolean,loading:Boolean,destroyOnClose:Boolean,transfer:{type:Boolean,default:function(){return _conf.default.button.transfer}}},emits:["click","dropdown-click"],setup:function(m,e){function _(e){u.dispatchEvent("click",{$event:e},e)}function b(e){0===e.button&&e.stopPropagation()}function h(e){var t=e.currentTarget,n=z.value,o=(t=(0,_dom.getEventTargetNode)(e,t,"vxe-button")).flag,t=t.targetElem;o&&(n&&(n.dataset.active="N"),P.showPanel=!1,setTimeout(function(){n&&"Y"===n.dataset.active||(P.animatVisible=!1)},350),u.dispatchEvent("dropdown-click",{name:t.getAttribute("name"),$event:e},e))}function x(){var e=z.value;e&&(e.dataset.active="Y",P.inited||(P.inited=!0),n.showTime=setTimeout(function(){"Y"===e.dataset.active?q():P.animatVisible=!1},250))}function g(){l()}function w(){var e=m.content,t=m.icon,n=[];return m.loading?n.push((0,_vue.h)("i",{class:["vxe-button--loading-icon",_conf.default.icon.BUTTON_LOADING]})):T.icon?n.push((0,_vue.h)("span",{class:"vxe-button--custom-icon"},T.icon({}))):t&&n.push((0,_vue.h)("i",{class:["vxe-button--icon",t]})),T.default?n.push((0,_vue.h)("span",{class:"vxe-button--content"},T.default({}))):e&&n.push((0,_vue.h)("span",{class:"vxe-button--content"},(0,_utils.getFuncText)(e))),n}var T=e.slots,o=e.emit,t=_xeUtils.default.uniqueId(),y=(0,_size.useSize)(m),P=(0,_vue.reactive)({inited:!1,showPanel:!1,animatVisible:!1,panelIndex:0,panelStyle:{},panelPlacement:""}),n={showTime:null},N=(0,_vue.ref)(),k=(0,_vue.ref)(),z=(0,_vue.ref)(),a={refElem:N},i={xID:t,props:m,context:e,reactData:P,internalData:n,getRefMaps:function(){return a}},u={},O=(0,_vue.computed)(function(){var e=m.type;return!!e&&-1<["submit","reset","button"].indexOf(e)}),S=(0,_vue.computed)(function(){var e=m.type;return e&&"text"===e?e:"button"}),s=function(){P.panelIndex<(0,_utils.getLastZIndex)()&&(P.panelIndex=(0,_utils.nextZIndex)())},c=function(){return(0,_vue.nextTick)().then(function(){var e,t,n,o,a,i,u,s,c=m.transfer,l=m.placement,r=P.panelIndex,d=k.value,v=z.value;if(v&&d)return e=d.offsetHeight,t=d.offsetWidth,n=v.offsetHeight,v=v.offsetWidth,r={zIndex:r},s=(d=(0,_dom.getAbsolutePos)(d)).top,o=d.left,a=d.boundingTop,i=d.visibleHeight,d=d.visibleWidth,u="bottom",c?(c=s+e,"top"===l?(u="top",c=s-n):l||(i<a+e+n+5&&(u="top",c=s-n),c<5&&(u="bottom",c=s+e)),d<(s=o+t-v)+v+5&&(s-=s+v+5-d),s<5&&(s=5),Object.assign(r,{left:"".concat(s,"px"),right:"auto",top:"".concat(c,"px"),minWidth:"".concat(t,"px")})):"top"===l?(u="top",r.bottom="".concat(e,"px")):l||i<a+e+n&&5<a-e-n&&(u="top",r.bottom="".concat(e,"px")),P.panelStyle=r,P.panelPlacement=u,(0,_vue.nextTick)()})},q=function(){var e=z.value;e&&(e.dataset.active="Y",P.animatVisible=!0,setTimeout(function(){"Y"===e.dataset.active&&(P.showPanel=!0,s(),c(),setTimeout(function(){P.showPanel&&c()},50))},20))},l=function(){var e=z.value;clearTimeout(n.showTime),e?(e.dataset.active="N",setTimeout(function(){"Y"!==e.dataset.active&&(P.showPanel=!1,setTimeout(function(){"Y"!==e.dataset.active&&(P.animatVisible=!1)},350))},100)):(P.animatVisible=!1,P.showPanel=!1)},u={dispatchEvent:function(e,t,n){o(e,Object.assign({$button:i,$event:n},t))},focus:function(){return k.value.focus(),(0,_vue.nextTick)()},blur:function(){return k.value.blur(),(0,_vue.nextTick)()}};Object.assign(i,u),(0,_vue.onMounted)(function(){_event.GlobalEvent.on(i,"mousewheel",function(e){var t=z.value;P.showPanel&&!(0,_dom.getEventTargetNode)(e,t).flag&&l()})}),(0,_vue.onUnmounted)(function(){_event.GlobalEvent.off(i,"mousewheel")});return i.renderVN=function(){var e=m.className,t=m.transfer,n=m.type,o=m.round,a=m.circle,i=m.destroyOnClose,u=m.status,s=m.name,c=m.disabled,l=m.loading,r=P.inited,d=P.showPanel,v=O.value,f=S.value,p=y.value;return T.dropdowns?(0,_vue.h)("div",{ref:N,class:["vxe-button--dropdown",e,((e={})["size--".concat(p)]=p,e["is--active"]=d,e)]},[(0,_vue.h)("button",{ref:k,class:["vxe-button","type--".concat(f),((e={})["size--".concat(p)]=p,e["theme--".concat(u)]=u,e["is--round"]=o,e["is--circle"]=a,e["is--disabled"]=c||l,e["is--loading"]=l,e)],name:s,type:v?n:"button",disabled:c||l,onMouseenter:x,onMouseleave:g,onClick:_},w().concat([(0,_vue.h)("i",{class:"vxe-button--dropdown-arrow ".concat(_conf.default.icon.BUTTON_DROPDOWN)})])),(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!t||!r},[(0,_vue.h)("div",{ref:z,class:["vxe-button--dropdown-panel",((e={})["size--".concat(p)]=p,e["animat--leave"]=P.animatVisible,e["animat--enter"]=d,e)],placement:P.panelPlacement,style:P.panelStyle},r?[(0,_vue.h)("div",{class:"vxe-button--dropdown-wrapper",onMousedown:b,onClick:h,onMouseenter:q,onMouseleave:g},i&&!d?[]:T.dropdowns({}))]:[])])]):(0,_vue.h)("button",{ref:k,class:["vxe-button","type--".concat(f),((t={})["size--".concat(p)]=p,t["theme--".concat(u)]=u,t["is--round"]=o,t["is--circle"]=a,t["is--disabled"]=c||l,t["is--loading"]=l,t)],name:s,type:v?n:"button",disabled:c||l,onClick:_},w())},i},render:function(){return this.renderVN()}});exports.default=_default;
|