vxe-pc-ui 0.0.2 → 0.1.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/anchor/src/anchor.js +1 -1
- package/es/anchor-link/index.js +1 -1
- package/es/{button-group → button}/src/button-group.js +2 -2
- package/es/button/src/button.js +3 -3
- package/es/button/style.css +17 -17
- package/es/button/style.min.css +1 -1
- package/es/button-group/index.js +1 -1
- package/es/checkbox/index.js +10 -0
- package/es/checkbox/src/checkbox.js +116 -0
- package/es/checkbox/src/group.js +108 -0
- package/es/checkbox/style.css +107 -0
- package/es/checkbox/style.min.css +1 -0
- package/es/checkbox-group/index.js +10 -0
- package/es/col/index.js +1 -1
- package/es/components.js +98 -35
- package/es/dynamics/index.js +27 -0
- package/es/form/index.js +8 -0
- package/es/form/src/form-config-item.js +178 -0
- package/es/form/src/form-gather.js +47 -0
- package/es/form/src/form-item.js +228 -0
- package/es/form/src/form.js +665 -0
- package/es/form/src/itemInfo.js +39 -0
- package/es/form/src/render.js +68 -0
- package/es/form/src/util.js +65 -0
- package/es/form/style.css +321 -0
- package/es/form/style.min.css +1 -0
- package/es/form-design/index.js +8 -0
- package/es/form-design/src/form-design.js +79 -0
- package/es/form-design/src/setting.js +12 -0
- package/es/form-design/src/util.js +8 -0
- package/es/form-design/src/view.js +113 -0
- package/es/form-design/src/widget.js +104 -0
- package/es/form-design/style.css +97 -0
- package/es/form-design/style.min.css +1 -0
- package/es/form-gather/index.js +8 -0
- package/es/form-item/index.js +8 -0
- package/es/icon/style.css +540 -1
- package/es/icon/style.min.css +1 -1
- package/es/input/index.js +10 -0
- package/es/input/src/date.js +41 -0
- package/es/input/src/input.js +2333 -0
- package/es/input/src/number.js +10 -0
- package/es/input/style.css +1000 -0
- package/es/input/style.min.css +1 -0
- package/es/layout-aside/style.css +1 -0
- package/es/layout-aside/style.min.css +1 -1
- package/es/layout-body/style.css +1 -0
- package/es/layout-body/style.min.css +1 -1
- package/es/layout-footer/style.css +1 -0
- package/es/layout-footer/style.min.css +1 -1
- package/es/layout-header/style.css +1 -0
- package/es/layout-header/style.min.css +1 -1
- package/es/list-design/index.js +8 -0
- package/es/{design/src/design.js → list-design/src/list-design.js} +7 -7
- package/es/loading/index.js +8 -0
- package/es/loading/src/loading.js +53 -0
- package/es/loading/style.css +75 -0
- package/es/loading/style.min.css +1 -0
- package/es/modal/index.js +96 -0
- package/es/modal/src/modal.js +876 -0
- package/es/modal/style.css +323 -0
- package/es/modal/style.min.css +1 -0
- package/es/optgroup/index.js +10 -0
- package/es/optgroup/style.css +0 -0
- package/es/optgroup/style.min.css +0 -0
- package/es/option/index.js +10 -0
- package/es/option/style.css +0 -0
- package/es/option/style.min.css +0 -0
- package/es/pager/index.js +10 -0
- package/es/pager/src/pager.js +539 -0
- package/es/pager/style.css +319 -0
- package/es/pager/style.min.css +1 -0
- package/es/pulldown/index.js +10 -0
- package/es/pulldown/src/pulldown.js +328 -0
- package/es/pulldown/style.css +57 -0
- package/es/pulldown/style.min.css +1 -0
- package/es/radio/index.js +10 -0
- package/es/radio/src/button.js +113 -0
- package/es/radio/src/group.js +93 -0
- package/es/radio/src/radio.js +118 -0
- package/es/radio/style.css +143 -0
- package/es/radio/style.min.css +1 -0
- package/es/radio-button/index.js +10 -0
- package/es/radio-button/style.css +0 -0
- package/es/radio-button/style.min.css +0 -0
- package/es/radio-group/index.js +10 -0
- package/es/radio-group/style.css +0 -0
- package/es/radio-group/style.min.css +0 -0
- package/es/select/index.js +10 -0
- package/es/select/src/optgroup.js +31 -0
- package/es/select/src/option.js +31 -0
- package/es/select/src/optionInfo.js +16 -0
- package/es/select/src/select.js +992 -0
- package/es/select/src/util.js +36 -0
- package/es/select/style.css +201 -0
- package/es/select/style.min.css +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/index.js +10 -0
- package/es/switch/src/switch.js +151 -0
- package/es/switch/style.css +97 -0
- package/es/switch/style.min.css +1 -0
- package/es/textarea/index.js +10 -0
- package/es/textarea/src/textarea.js +245 -0
- package/es/textarea/style.css +102 -0
- package/es/textarea/style.min.css +1 -0
- package/es/tooltip/index.js +8 -0
- package/es/tooltip/src/tooltip.js +336 -0
- package/es/tooltip/style.css +103 -0
- package/es/tooltip/style.min.css +1 -0
- package/es/ui/src/core.js +12 -2
- package/es/ui/src/dom.js +20 -0
- package/es/ui/src/globalStore.js +119 -4
- package/es/ui/src/i18n.js +7 -0
- package/es/ui/src/log.js +2 -2
- package/es/ui/src/renderer.js +67 -0
- package/es/ui/src/store.js +41 -0
- package/es/ui/src/utils.js +10 -0
- package/es/ui/src/validators.js +5 -0
- package/es/ui/src/vn.js +10 -0
- package/es/vxe-button/style.css +17 -17
- package/es/vxe-button/style.min.css +1 -1
- package/es/vxe-checkbox/index.js +3 -0
- package/es/vxe-checkbox/style.css +107 -0
- package/es/vxe-checkbox/style.min.css +1 -0
- package/es/vxe-checkbox-group/index.js +3 -0
- package/es/vxe-checkbox-group/style.css +0 -0
- package/es/vxe-checkbox-group/style.min.css +0 -0
- package/es/vxe-form/index.js +3 -0
- package/es/vxe-form/style.css +321 -0
- package/es/vxe-form/style.min.css +1 -0
- package/es/vxe-form-design/index.js +3 -0
- package/es/vxe-form-design/style.css +97 -0
- package/es/vxe-form-design/style.min.css +1 -0
- package/es/vxe-form-gather/index.js +3 -0
- package/es/vxe-form-gather/style.css +0 -0
- package/es/vxe-form-gather/style.min.css +0 -0
- package/es/vxe-form-item/index.js +3 -0
- package/es/vxe-form-item/style.css +0 -0
- package/es/vxe-form-item/style.min.css +0 -0
- package/es/vxe-icon/style.css +540 -1
- package/es/vxe-icon/style.min.css +1 -1
- package/es/vxe-input/index.js +3 -0
- package/es/vxe-input/style.css +1000 -0
- package/es/vxe-input/style.min.css +1 -0
- package/es/vxe-layout-aside/style.css +1 -0
- package/es/vxe-layout-aside/style.min.css +1 -1
- package/es/vxe-layout-body/style.css +1 -0
- package/es/vxe-layout-body/style.min.css +1 -1
- package/es/vxe-layout-footer/style.css +1 -0
- package/es/vxe-layout-footer/style.min.css +1 -1
- package/es/vxe-layout-header/style.css +1 -0
- package/es/vxe-layout-header/style.min.css +1 -1
- package/es/vxe-list-design/index.js +3 -0
- package/es/vxe-list-design/style.css +0 -0
- package/es/vxe-list-design/style.min.css +0 -0
- package/es/vxe-loading/index.js +3 -0
- package/es/vxe-loading/style.css +75 -0
- package/es/vxe-loading/style.min.css +1 -0
- package/es/vxe-modal/index.js +3 -0
- package/es/vxe-modal/style.css +323 -0
- package/es/vxe-modal/style.min.css +1 -0
- package/es/vxe-optgroup/index.js +3 -0
- package/es/vxe-optgroup/style.css +0 -0
- package/es/vxe-optgroup/style.min.css +0 -0
- package/es/vxe-option/index.js +3 -0
- package/es/vxe-option/style.css +0 -0
- package/es/vxe-option/style.min.css +0 -0
- package/es/vxe-pager/index.js +3 -0
- package/es/vxe-pager/style.css +319 -0
- package/es/vxe-pager/style.min.css +1 -0
- package/es/vxe-pulldown/index.js +3 -0
- package/es/vxe-pulldown/style.css +57 -0
- package/es/vxe-pulldown/style.min.css +1 -0
- package/es/vxe-radio/index.js +3 -0
- package/es/vxe-radio/style.css +143 -0
- package/es/vxe-radio/style.min.css +1 -0
- package/es/vxe-radio-button/index.js +3 -0
- package/es/vxe-radio-button/style.css +0 -0
- package/es/vxe-radio-button/style.min.css +0 -0
- package/es/vxe-radio-group/index.js +3 -0
- package/es/vxe-radio-group/style.css +0 -0
- package/es/vxe-radio-group/style.min.css +0 -0
- package/es/vxe-select/index.js +3 -0
- package/es/vxe-select/style.css +201 -0
- package/es/vxe-select/style.min.css +1 -0
- package/es/vxe-switch/index.js +3 -0
- package/es/vxe-switch/style.css +97 -0
- package/es/vxe-switch/style.min.css +1 -0
- package/es/vxe-textarea/index.js +3 -0
- package/es/vxe-textarea/style.css +102 -0
- package/es/vxe-textarea/style.min.css +1 -0
- package/es/vxe-tooltip/index.js +3 -0
- package/es/vxe-tooltip/style.css +103 -0
- package/es/vxe-tooltip/style.min.css +1 -0
- package/lib/anchor/src/anchor.js +1 -1
- package/lib/anchor/src/anchor.min.js +1 -1
- package/lib/anchor-link/index.js +1 -1
- package/lib/anchor-link/index.min.js +1 -1
- package/lib/{button-group → button}/src/button-group.js +2 -2
- package/lib/button/src/button-group.min.js +1 -0
- package/lib/button/src/button.js +3 -3
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +17 -17
- package/lib/button/style/style.min.css +1 -1
- package/lib/button-group/index.js +1 -1
- package/lib/button-group/index.min.js +1 -1
- package/lib/checkbox/index.js +17 -0
- package/lib/checkbox/index.min.js +1 -0
- package/lib/checkbox/src/checkbox.js +144 -0
- package/lib/checkbox/src/checkbox.min.js +1 -0
- package/lib/checkbox/src/group.js +129 -0
- package/lib/checkbox/src/group.min.js +1 -0
- package/lib/checkbox/style/style.css +107 -0
- package/lib/checkbox/style/style.min.css +1 -0
- package/lib/checkbox-group/index.js +17 -0
- package/lib/checkbox-group/index.min.js +1 -0
- package/lib/checkbox-group/style/style.css +0 -0
- package/lib/checkbox-group/style/style.min.css +0 -0
- package/lib/col/index.js +1 -1
- package/lib/col/index.min.js +1 -1
- package/lib/components.js +290 -63
- package/lib/components.min.js +1 -1
- package/lib/dynamics/index.js +36 -0
- package/lib/dynamics/index.min.js +1 -0
- package/lib/form/index.js +15 -0
- package/lib/form/index.min.js +1 -0
- package/lib/form/src/form-config-item.js +192 -0
- package/lib/form/src/form-config-item.min.js +1 -0
- package/lib/form/src/form-gather.js +57 -0
- package/lib/form/src/form-gather.min.js +1 -0
- package/lib/form/src/form-item.js +247 -0
- package/lib/form/src/form-item.min.js +1 -0
- package/lib/form/src/form.js +768 -0
- package/lib/form/src/form.min.js +1 -0
- package/lib/form/src/itemInfo.js +47 -0
- package/lib/form/src/itemInfo.min.js +1 -0
- package/lib/form/src/render.js +84 -0
- package/lib/form/src/render.min.js +1 -0
- package/lib/form/src/util.js +108 -0
- package/lib/form/src/util.min.js +1 -0
- package/lib/form/style/index.js +1 -0
- package/lib/form/style/style.css +321 -0
- package/lib/form/style/style.min.css +1 -0
- package/lib/form-design/index.js +15 -0
- package/lib/form-design/index.min.js +1 -0
- package/lib/form-design/src/form-design.js +87 -0
- package/lib/form-design/src/form-design.min.js +1 -0
- package/lib/form-design/src/setting.js +18 -0
- package/lib/form-design/src/setting.min.js +1 -0
- package/lib/form-design/src/util.js +17 -0
- package/lib/form-design/src/util.min.js +1 -0
- package/lib/form-design/src/view.js +147 -0
- package/lib/form-design/src/view.min.js +1 -0
- package/lib/form-design/src/widget.js +114 -0
- package/lib/form-design/src/widget.min.js +1 -0
- package/lib/form-design/style/index.js +1 -0
- package/lib/form-design/style/style.css +97 -0
- package/lib/form-design/style/style.min.css +1 -0
- package/lib/form-gather/index.js +15 -0
- package/lib/form-gather/index.min.js +1 -0
- package/lib/form-gather/style/index.js +1 -0
- package/lib/form-gather/style/style.css +0 -0
- package/lib/form-gather/style/style.min.css +0 -0
- package/lib/form-item/index.js +15 -0
- package/lib/form-item/index.min.js +1 -0
- package/lib/form-item/style/index.js +1 -0
- package/lib/form-item/style/style.css +0 -0
- package/lib/form-item/style/style.min.css +0 -0
- package/lib/icon/style/style.css +540 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +10741 -782
- package/lib/index.umd.min.js +1 -1
- package/lib/input/index.js +17 -0
- package/lib/input/index.min.js +1 -0
- package/lib/input/src/date.js +46 -0
- package/lib/input/src/date.min.js +1 -0
- package/lib/input/src/input.js +2546 -0
- package/lib/input/src/input.min.js +1 -0
- package/lib/input/src/number.js +18 -0
- package/lib/input/src/number.min.js +1 -0
- package/lib/input/style/index.js +1 -0
- package/lib/input/style/style.css +1000 -0
- package/lib/input/style/style.min.css +1 -0
- package/lib/layout-aside/style/style.css +1 -0
- package/lib/layout-aside/style/style.min.css +1 -1
- package/lib/layout-body/style/style.css +1 -0
- package/lib/layout-body/style/style.min.css +1 -1
- package/lib/layout-footer/style/style.css +1 -0
- package/lib/layout-footer/style/style.min.css +1 -1
- package/lib/layout-header/style/style.css +1 -0
- package/lib/layout-header/style/style.min.css +1 -1
- package/lib/list-design/index.js +15 -0
- package/lib/list-design/index.min.js +1 -0
- package/lib/{design/src/design.js → list-design/src/list-design.js} +7 -7
- package/lib/list-design/src/list-design.min.js +1 -0
- package/lib/list-design/style/index.js +1 -0
- package/lib/list-design/style/style.css +0 -0
- package/lib/list-design/style/style.min.css +0 -0
- package/lib/loading/index.js +15 -0
- package/lib/loading/index.min.js +1 -0
- package/lib/loading/src/loading.js +49 -0
- package/lib/loading/src/loading.min.js +1 -0
- package/lib/loading/style/index.js +1 -0
- package/lib/loading/style/style.css +75 -0
- package/lib/loading/style/style.min.css +1 -0
- package/lib/modal/index.js +110 -0
- package/lib/modal/index.min.js +1 -0
- package/lib/modal/src/modal.js +1064 -0
- package/lib/modal/src/modal.min.js +1 -0
- package/lib/modal/style/index.js +1 -0
- package/lib/modal/style/style.css +323 -0
- package/lib/modal/style/style.min.css +1 -0
- package/lib/optgroup/index.js +17 -0
- package/lib/optgroup/index.min.js +1 -0
- package/lib/optgroup/style/index.js +1 -0
- package/lib/optgroup/style/style.css +0 -0
- package/lib/optgroup/style/style.min.css +0 -0
- package/lib/option/index.js +17 -0
- package/lib/option/index.min.js +1 -0
- package/lib/option/style/index.js +1 -0
- package/lib/option/style/style.css +0 -0
- package/lib/option/style/style.min.css +0 -0
- package/lib/pager/index.js +17 -0
- package/lib/pager/index.min.js +1 -0
- package/lib/pager/src/pager.js +593 -0
- package/lib/pager/src/pager.min.js +1 -0
- package/lib/pager/style/index.js +1 -0
- package/lib/pager/style/style.css +319 -0
- package/lib/pager/style/style.min.css +1 -0
- package/lib/pulldown/index.js +17 -0
- package/lib/pulldown/index.min.js +1 -0
- package/lib/pulldown/src/pulldown.js +359 -0
- package/lib/pulldown/src/pulldown.min.js +1 -0
- package/lib/pulldown/style/index.js +1 -0
- package/lib/pulldown/style/style.css +57 -0
- package/lib/pulldown/style/style.min.css +1 -0
- package/lib/radio/index.js +17 -0
- package/lib/radio/index.min.js +1 -0
- package/lib/radio/src/button.js +135 -0
- package/lib/radio/src/button.min.js +1 -0
- package/lib/radio/src/group.js +108 -0
- package/lib/radio/src/group.min.js +1 -0
- package/lib/radio/src/radio.js +139 -0
- package/lib/radio/src/radio.min.js +1 -0
- package/lib/radio/style/index.js +1 -0
- package/lib/radio/style/style.css +143 -0
- package/lib/radio/style/style.min.css +1 -0
- package/lib/radio-button/index.js +17 -0
- package/lib/radio-button/index.min.js +1 -0
- package/lib/radio-button/style/index.js +1 -0
- package/lib/radio-button/style/style.css +0 -0
- package/lib/radio-button/style/style.min.css +0 -0
- package/lib/radio-group/index.js +17 -0
- package/lib/radio-group/index.min.js +1 -0
- package/lib/radio-group/style/index.js +1 -0
- package/lib/radio-group/style/style.css +0 -0
- package/lib/radio-group/style/style.min.css +0 -0
- package/lib/select/index.js +17 -0
- package/lib/select/index.min.js +1 -0
- package/lib/select/src/optgroup.js +47 -0
- package/lib/select/src/optgroup.min.js +1 -0
- package/lib/select/src/option.js +45 -0
- package/lib/select/src/option.min.js +1 -0
- package/lib/select/src/optionInfo.js +24 -0
- package/lib/select/src/optionInfo.min.js +1 -0
- package/lib/select/src/select.js +1104 -0
- package/lib/select/src/select.min.js +1 -0
- package/lib/select/src/util.js +57 -0
- package/lib/select/src/util.min.js +1 -0
- package/lib/select/style/index.js +1 -0
- package/lib/select/style/style.css +201 -0
- package/lib/select/style/style.min.css +1 -0
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/index.js +17 -0
- package/lib/switch/index.min.js +1 -0
- package/lib/switch/src/switch.js +161 -0
- package/lib/switch/src/switch.min.js +1 -0
- package/lib/switch/style/index.js +1 -0
- package/lib/switch/style/style.css +97 -0
- package/lib/switch/style/style.min.css +1 -0
- package/lib/textarea/index.js +17 -0
- package/lib/textarea/index.min.js +1 -0
- package/lib/textarea/src/textarea.js +298 -0
- package/lib/textarea/src/textarea.min.js +1 -0
- package/lib/textarea/style/index.js +1 -0
- package/lib/textarea/style/style.css +102 -0
- package/lib/textarea/style/style.min.css +1 -0
- package/lib/tooltip/index.js +15 -0
- package/lib/tooltip/index.min.js +1 -0
- package/lib/tooltip/src/tooltip.js +418 -0
- package/lib/tooltip/src/tooltip.min.js +1 -0
- package/lib/tooltip/style/index.js +1 -0
- package/lib/tooltip/style/style.css +103 -0
- package/lib/tooltip/style/style.min.css +1 -0
- package/lib/ui/src/core.js +49 -2
- package/lib/ui/src/core.min.js +1 -1
- package/lib/ui/src/dom.js +22 -0
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/globalStore.js +119 -4
- package/lib/ui/src/globalStore.min.js +1 -1
- package/lib/ui/src/i18n.js +14 -0
- package/lib/ui/src/i18n.min.js +1 -0
- package/lib/ui/src/log.js +2 -3
- package/lib/ui/src/log.min.js +1 -1
- package/lib/ui/src/renderer.js +77 -0
- package/lib/ui/src/renderer.min.js +1 -0
- package/lib/ui/src/store.js +49 -0
- package/lib/ui/src/store.min.js +1 -0
- package/lib/ui/src/utils.js +12 -0
- package/lib/ui/src/utils.min.js +1 -1
- package/lib/ui/src/validators.js +14 -0
- package/lib/ui/src/validators.min.js +1 -0
- package/lib/ui/src/vn.js +18 -0
- package/lib/ui/src/vn.min.js +1 -0
- package/lib/vxe-button/style/style.css +17 -17
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-checkbox/index.js +22 -0
- package/lib/vxe-checkbox/index.min.js +1 -0
- package/lib/vxe-checkbox/style/index.js +1 -0
- package/lib/vxe-checkbox/style/style.css +107 -0
- package/lib/vxe-checkbox/style/style.min.css +1 -0
- package/lib/vxe-checkbox-group/index.js +22 -0
- package/lib/vxe-checkbox-group/index.min.js +1 -0
- package/lib/vxe-checkbox-group/style/index.js +1 -0
- package/lib/vxe-checkbox-group/style/style.css +0 -0
- package/lib/vxe-checkbox-group/style/style.min.css +0 -0
- package/lib/{vxe-design → vxe-form}/index.js +5 -5
- package/lib/vxe-form/index.min.js +1 -0
- package/lib/vxe-form/style/index.js +1 -0
- package/lib/vxe-form/style/style.css +321 -0
- package/lib/vxe-form/style/style.min.css +1 -0
- package/lib/vxe-form-design/index.js +22 -0
- package/lib/vxe-form-design/index.min.js +1 -0
- package/lib/vxe-form-design/style/index.js +1 -0
- package/lib/vxe-form-design/style/style.css +97 -0
- package/lib/vxe-form-design/style/style.min.css +1 -0
- package/lib/vxe-form-gather/index.js +22 -0
- package/lib/vxe-form-gather/index.min.js +1 -0
- package/lib/vxe-form-gather/style/index.js +1 -0
- package/lib/vxe-form-gather/style/style.css +0 -0
- package/lib/vxe-form-gather/style/style.min.css +0 -0
- package/lib/vxe-form-item/index.js +22 -0
- package/lib/vxe-form-item/index.min.js +1 -0
- package/lib/vxe-form-item/style/index.js +1 -0
- package/lib/vxe-form-item/style/style.css +0 -0
- package/lib/vxe-form-item/style/style.min.css +0 -0
- package/lib/vxe-icon/style/style.css +540 -1
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/lib/vxe-input/index.js +22 -0
- package/lib/vxe-input/index.min.js +1 -0
- package/lib/vxe-input/style/index.js +1 -0
- package/lib/vxe-input/style/style.css +1000 -0
- package/lib/vxe-input/style/style.min.css +1 -0
- package/lib/vxe-layout-aside/style/style.css +1 -0
- package/lib/vxe-layout-aside/style/style.min.css +1 -1
- package/lib/vxe-layout-body/style/style.css +1 -0
- package/lib/vxe-layout-body/style/style.min.css +1 -1
- package/lib/vxe-layout-footer/style/style.css +1 -0
- package/lib/vxe-layout-footer/style/style.min.css +1 -1
- package/lib/vxe-layout-header/style/style.css +1 -0
- package/lib/vxe-layout-header/style/style.min.css +1 -1
- package/lib/vxe-list-design/index.js +22 -0
- package/lib/vxe-list-design/index.min.js +1 -0
- package/lib/vxe-list-design/style/index.js +1 -0
- package/lib/vxe-list-design/style/style.css +0 -0
- package/lib/vxe-list-design/style/style.min.css +0 -0
- package/lib/vxe-loading/index.js +22 -0
- package/lib/vxe-loading/index.min.js +1 -0
- package/lib/vxe-loading/style/index.js +1 -0
- package/lib/vxe-loading/style/style.css +75 -0
- package/lib/vxe-loading/style/style.min.css +1 -0
- package/lib/vxe-modal/index.js +22 -0
- package/lib/vxe-modal/index.min.js +1 -0
- package/lib/vxe-modal/style/index.js +1 -0
- package/lib/vxe-modal/style/style.css +323 -0
- package/lib/vxe-modal/style/style.min.css +1 -0
- package/lib/vxe-optgroup/index.js +22 -0
- package/lib/vxe-optgroup/index.min.js +1 -0
- package/lib/vxe-optgroup/style/index.js +1 -0
- package/lib/vxe-optgroup/style/style.css +0 -0
- package/lib/vxe-optgroup/style/style.min.css +0 -0
- package/lib/vxe-option/index.js +22 -0
- package/lib/vxe-option/index.min.js +1 -0
- package/lib/vxe-option/style/index.js +1 -0
- package/lib/vxe-option/style/style.css +0 -0
- package/lib/vxe-option/style/style.min.css +0 -0
- package/lib/vxe-pager/index.js +22 -0
- package/lib/vxe-pager/index.min.js +1 -0
- package/lib/vxe-pager/style/index.js +1 -0
- package/lib/vxe-pager/style/style.css +319 -0
- package/lib/vxe-pager/style/style.min.css +1 -0
- package/lib/vxe-pulldown/index.js +22 -0
- package/lib/vxe-pulldown/index.min.js +1 -0
- package/lib/vxe-pulldown/style/index.js +1 -0
- package/lib/vxe-pulldown/style/style.css +57 -0
- package/lib/vxe-pulldown/style/style.min.css +1 -0
- package/lib/vxe-radio/index.js +22 -0
- package/lib/vxe-radio/index.min.js +1 -0
- package/lib/vxe-radio/style/index.js +1 -0
- package/lib/vxe-radio/style/style.css +143 -0
- package/lib/vxe-radio/style/style.min.css +1 -0
- package/lib/vxe-radio-button/index.js +22 -0
- package/lib/vxe-radio-button/index.min.js +1 -0
- package/lib/vxe-radio-button/style/index.js +1 -0
- package/lib/vxe-radio-button/style/style.css +0 -0
- package/lib/vxe-radio-button/style/style.min.css +0 -0
- package/lib/vxe-radio-group/index.js +22 -0
- package/lib/vxe-radio-group/index.min.js +1 -0
- package/lib/vxe-radio-group/style/index.js +1 -0
- package/lib/vxe-radio-group/style/style.css +0 -0
- package/lib/vxe-radio-group/style/style.min.css +0 -0
- package/lib/vxe-select/index.js +22 -0
- package/lib/vxe-select/index.min.js +1 -0
- package/lib/vxe-select/style/index.js +1 -0
- package/lib/vxe-select/style/style.css +201 -0
- package/lib/vxe-select/style/style.min.css +1 -0
- package/lib/vxe-switch/index.js +22 -0
- package/lib/vxe-switch/index.min.js +1 -0
- package/lib/vxe-switch/style/index.js +1 -0
- package/lib/vxe-switch/style/style.css +97 -0
- package/lib/vxe-switch/style/style.min.css +1 -0
- package/lib/vxe-textarea/index.js +22 -0
- package/lib/vxe-textarea/index.min.js +1 -0
- package/lib/vxe-textarea/style/index.js +1 -0
- package/lib/vxe-textarea/style/style.css +102 -0
- package/lib/vxe-textarea/style/style.min.css +1 -0
- package/lib/vxe-tooltip/index.js +22 -0
- package/lib/vxe-tooltip/index.min.js +1 -0
- package/lib/vxe-tooltip/style/index.js +1 -0
- package/lib/vxe-tooltip/style/style.css +103 -0
- package/lib/vxe-tooltip/style/style.min.css +1 -0
- package/package.json +1 -1
- package/packages/anchor/src/anchor.ts +1 -1
- package/packages/anchor-link/index.ts +1 -1
- package/packages/{button-group → button}/src/button-group.ts +2 -2
- package/packages/button/src/button.ts +3 -3
- package/packages/button-group/index.ts +1 -1
- package/packages/checkbox/index.ts +15 -0
- package/packages/checkbox/src/checkbox.ts +131 -0
- package/packages/checkbox/src/group.ts +127 -0
- package/packages/checkbox-group/index.ts +15 -0
- package/packages/col/index.ts +1 -1
- package/packages/components.ts +100 -35
- package/packages/dynamics/index.ts +34 -0
- package/packages/form/index.ts +11 -0
- package/packages/form/src/form-config-item.ts +193 -0
- package/packages/form/src/form-gather.ts +60 -0
- package/packages/form/src/form-item.ts +253 -0
- package/packages/form/src/form.ts +716 -0
- package/packages/form/src/itemInfo.ts +43 -0
- package/packages/form/src/render.ts +83 -0
- package/packages/form/src/util.ts +79 -0
- package/packages/form-design/index.ts +11 -0
- package/packages/form-design/src/form-design.ts +99 -0
- package/packages/form-design/src/setting.ts +13 -0
- package/packages/form-design/src/util.ts +10 -0
- package/packages/form-design/src/view.ts +125 -0
- package/packages/form-design/src/widget.ts +117 -0
- package/packages/form-gather/index.ts +11 -0
- package/packages/form-item/index.ts +11 -0
- package/packages/icon/src/icon.ts +1 -1
- package/packages/input/index.ts +15 -0
- package/packages/input/src/date.ts +42 -0
- package/packages/input/src/input.ts +2480 -0
- package/packages/input/src/number.ts +12 -0
- package/packages/list-design/index.ts +11 -0
- package/packages/list-design/src/list-design.ts +55 -0
- package/packages/loading/index.ts +11 -0
- package/packages/loading/src/loading.ts +56 -0
- package/packages/modal/index.ts +110 -0
- package/packages/modal/src/modal.ts +950 -0
- package/packages/optgroup/index.ts +15 -0
- package/packages/option/index.ts +15 -0
- package/packages/pager/index.ts +15 -0
- package/packages/pager/src/pager.ts +595 -0
- package/packages/pulldown/index.ts +15 -0
- package/packages/pulldown/src/pulldown.ts +349 -0
- package/packages/radio/index.ts +15 -0
- package/packages/radio/src/button.ts +132 -0
- package/packages/radio/src/group.ts +110 -0
- package/packages/radio/src/radio.ts +137 -0
- package/packages/radio-button/index.ts +15 -0
- package/packages/radio-group/index.ts +15 -0
- package/packages/select/index.ts +15 -0
- package/packages/select/src/optgroup.ts +39 -0
- package/packages/select/src/option.ts +38 -0
- package/packages/select/src/optionInfo.ts +20 -0
- package/packages/select/src/select.ts +1034 -0
- package/packages/select/src/util.ts +47 -0
- package/packages/switch/index.ts +15 -0
- package/packages/switch/src/switch.ts +171 -0
- package/packages/textarea/index.ts +15 -0
- package/packages/textarea/src/textarea.ts +273 -0
- package/packages/tooltip/index.ts +11 -0
- package/packages/tooltip/src/tooltip.ts +360 -0
- package/packages/ui/src/core.ts +13 -1
- package/packages/ui/src/dom.ts +23 -0
- package/packages/ui/src/globalStore.ts +122 -5
- package/packages/ui/src/i18n.ts +8 -0
- package/packages/ui/src/log.ts +2 -2
- package/packages/ui/src/renderer.ts +71 -0
- package/packages/ui/src/store.ts +49 -0
- package/packages/ui/src/utils.ts +12 -0
- package/packages/ui/src/validators.ts +9 -0
- package/packages/ui/src/vn.ts +14 -0
- package/styles/all.scss +30 -10
- package/styles/base/common.scss +13 -0
- package/styles/components/button.scss +8 -8
- package/styles/components/checkbox-group.scss +0 -0
- package/styles/components/checkbox.scss +91 -0
- package/styles/components/form-design.scss +93 -0
- package/styles/components/form-gather.scss +0 -0
- package/styles/components/form-item.scss +0 -0
- package/styles/components/form.scss +339 -0
- package/styles/components/icon.scss +3 -1
- package/styles/components/input.scss +911 -0
- package/styles/components/layout-aside.scss +1 -0
- package/styles/components/layout-body.scss +1 -0
- package/styles/components/layout-footer.scss +1 -0
- package/styles/components/layout-header.scss +1 -0
- package/styles/components/list-design.scss +0 -0
- package/styles/components/list.scss +26 -0
- package/styles/components/loading.scss +84 -0
- package/styles/components/modal.scss +383 -0
- package/styles/components/old-icon.scss +712 -0
- package/styles/components/optgroup.scss +0 -0
- package/styles/components/option.scss +0 -0
- package/styles/components/pager.scss +287 -0
- package/styles/components/pulldown.scss +55 -0
- package/styles/components/radio-button.scss +0 -0
- package/styles/components/radio-group.scss +0 -0
- package/styles/components/radio.scss +149 -0
- package/styles/components/select.scss +226 -0
- package/styles/components/switch.scss +113 -0
- package/styles/components/textarea.scss +102 -0
- package/styles/components/tooltip.scss +124 -0
- package/styles/helpers/mixin.scss +12 -12
- package/styles/theme/base.scss +143 -6
- package/types/all.d.ts +66 -33
- package/types/{component → components}/anchor-link.d.ts +17 -2
- package/types/{component → components}/anchor.d.ts +10 -2
- package/types/{component → components}/breadcrumb-item.d.ts +12 -1
- package/types/{component → components}/breadcrumb.d.ts +10 -2
- package/types/{component → components}/button-group.d.ts +11 -3
- package/types/{component → components}/button.d.ts +14 -3
- package/types/components/checkbox-group.d.ts +112 -0
- package/types/components/checkbox.d.ts +119 -0
- package/types/{component → components}/col.d.ts +9 -1
- package/types/components/form-design.d.ts +88 -0
- package/types/components/form-gather.d.ts +75 -0
- package/types/components/form-item.d.ts +231 -0
- package/types/components/form.d.ts +349 -0
- package/types/{component → components}/icon.d.ts +7 -2
- package/types/components/input.d.ts +375 -0
- package/types/{component → components}/layout-aside.d.ts +10 -2
- package/types/{component → components}/layout-body.d.ts +10 -2
- package/types/{component → components}/layout-container.d.ts +10 -2
- package/types/{component → components}/layout-footer.d.ts +10 -2
- package/types/{component → components}/layout-header.d.ts +7 -1
- package/types/components/list-design.d.ts +67 -0
- package/types/components/loading.d.ts +66 -0
- package/types/components/modal.d.ts +381 -0
- package/types/components/optgroup.d.ts +80 -0
- package/types/components/option.d.ts +99 -0
- package/types/components/pager.d.ts +208 -0
- package/types/components/pulldown.d.ts +134 -0
- package/types/components/radio-button.d.ts +99 -0
- package/types/components/radio-group.d.ts +107 -0
- package/types/components/radio.d.ts +119 -0
- package/types/{component → components}/row.d.ts +10 -2
- package/types/components/select.d.ts +274 -0
- package/types/components/switch.d.ts +118 -0
- package/types/components/textarea.d.ts +212 -0
- package/types/components/tooltip.d.ts +122 -0
- package/types/ui/global-config.d.ts +43 -6
- package/types/ui/global-icon.d.ts +80 -10
- package/types/ui/index.d.ts +25 -2
- package/types/ui/renderer.d.ts +239 -0
- package/types/ui/validators.d.ts +26 -0
- package/es/design/index.js +0 -8
- package/es/vxe-design/index.js +0 -3
- package/lib/button-group/src/button-group.min.js +0 -1
- package/lib/design/index.js +0 -15
- package/lib/design/index.min.js +0 -1
- package/lib/design/src/design.min.js +0 -1
- package/lib/vxe-design/index.min.js +0 -1
- package/packages/design/index.ts +0 -11
- package/packages/design/src/design.ts +0 -55
- package/styles/components/design.scss +0 -1
- package/types/component/design.d.ts +0 -63
- /package/es/{anchor-link → anchor}/src/anchor-link.js +0 -0
- /package/es/{anchor-link → anchor}/src/util.js +0 -0
- /package/es/{design → checkbox-group}/style.css +0 -0
- /package/es/{design → checkbox-group}/style.min.css +0 -0
- /package/es/{vxe-design → form-gather}/style.css +0 -0
- /package/es/{vxe-design → form-gather}/style.min.css +0 -0
- /package/{lib/design/style → es/form-item}/style.css +0 -0
- /package/{lib/design/style → es/form-item}/style.min.css +0 -0
- /package/{lib/vxe-design/style → es/list-design}/style.css +0 -0
- /package/{lib/vxe-design/style → es/list-design}/style.min.css +0 -0
- /package/es/{col → row}/src/col.js +0 -0
- /package/lib/{anchor-link → anchor}/src/anchor-link.js +0 -0
- /package/lib/{anchor-link → anchor}/src/anchor-link.min.js +0 -0
- /package/lib/{anchor-link → anchor}/src/util.js +0 -0
- /package/lib/{anchor-link → anchor}/src/util.min.js +0 -0
- /package/lib/{vxe-design → checkbox}/style/index.js +0 -0
- /package/lib/{design → checkbox-group}/style/index.js +0 -0
- /package/lib/{col → row}/src/col.js +0 -0
- /package/lib/{col → row}/src/col.min.js +0 -0
- /package/packages/{anchor-link → anchor}/src/anchor-link.ts +0 -0
- /package/packages/{anchor-link → anchor}/src/util.ts +0 -0
- /package/packages/{col → row}/src/col.ts +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
import VxeOptgroupComponent from '../select/src/optgroup'
|
|
3
|
+
import { dynamicApp } from '../dynamics'
|
|
4
|
+
|
|
5
|
+
export const VxeOptgroup = Object.assign(VxeOptgroupComponent, {
|
|
6
|
+
install: function (app: App) {
|
|
7
|
+
app.component(VxeOptgroupComponent.name, VxeOptgroupComponent)
|
|
8
|
+
}
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export const Optgroup = VxeOptgroup
|
|
12
|
+
|
|
13
|
+
dynamicApp.component(VxeOptgroupComponent.name, VxeOptgroupComponent)
|
|
14
|
+
|
|
15
|
+
export default VxeOptgroup
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
import VxeOptionComponent from '../select/src/option'
|
|
3
|
+
import { dynamicApp } from '../dynamics'
|
|
4
|
+
|
|
5
|
+
export const VxeOption = Object.assign(VxeOptionComponent, {
|
|
6
|
+
install: function (app: App) {
|
|
7
|
+
app.component(VxeOptionComponent.name, VxeOptionComponent)
|
|
8
|
+
}
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export const Option = VxeOption
|
|
12
|
+
|
|
13
|
+
dynamicApp.component(VxeOptionComponent.name, VxeOptionComponent)
|
|
14
|
+
|
|
15
|
+
export default VxeOption
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
import VxePagerComponent from './src/pager'
|
|
3
|
+
import { dynamicApp } from '../dynamics'
|
|
4
|
+
|
|
5
|
+
export const VxePager = Object.assign(VxePagerComponent, {
|
|
6
|
+
install: function (app: App) {
|
|
7
|
+
app.component(VxePagerComponent.name, VxePagerComponent)
|
|
8
|
+
}
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export const Pager = VxePager
|
|
12
|
+
|
|
13
|
+
dynamicApp.component(VxePagerComponent.name, VxePagerComponent)
|
|
14
|
+
|
|
15
|
+
export default VxePager
|
|
@@ -0,0 +1,595 @@
|
|
|
1
|
+
import { defineComponent, h, PropType, computed, inject, ref, Ref, reactive, nextTick, watch } from 'vue'
|
|
2
|
+
import XEUtils from 'xe-utils'
|
|
3
|
+
import globalConfigStore from '../../ui/src/globalStore'
|
|
4
|
+
import iconConfigStore from '../../ui/src/iconStore'
|
|
5
|
+
import VxeSelectComponent from '../../select'
|
|
6
|
+
import { hasEventKey, EVENT_KEYS } from '../../ui/src/event'
|
|
7
|
+
import { getI18n } from '../../ui/src/i18n'
|
|
8
|
+
import { useSize } from '../../hooks/size'
|
|
9
|
+
import { errLog } from '../../ui/src/log'
|
|
10
|
+
|
|
11
|
+
import { VxePagerPropTypes, VxePagerConstructor, VxePagerEmits, VxeSelectEvents, PagerPrivateRef, PagerMethods, PagerPrivateMethods, VxePagerPrivateMethods, PagerReactData } from '../../../types'
|
|
12
|
+
|
|
13
|
+
export default defineComponent({
|
|
14
|
+
name: 'VxePager',
|
|
15
|
+
props: {
|
|
16
|
+
size: { type: String as PropType<VxePagerPropTypes.Size>, default: () => globalConfigStore.pager.size || globalConfigStore.size },
|
|
17
|
+
// 自定义布局
|
|
18
|
+
layouts: { type: Array as PropType<VxePagerPropTypes.Layouts>, default: () => globalConfigStore.pager.layouts || ['PrevJump', 'PrevPage', 'Jump', 'PageCount', 'NextPage', 'NextJump', 'Sizes', 'Total'] },
|
|
19
|
+
// 当前页
|
|
20
|
+
currentPage: { type: Number as PropType<VxePagerPropTypes.CurrentPage>, default: 1 },
|
|
21
|
+
// 加载中
|
|
22
|
+
loading: Boolean as PropType<VxePagerPropTypes.Loading>,
|
|
23
|
+
// 每页大小
|
|
24
|
+
pageSize: { type: Number as PropType<VxePagerPropTypes.PageSize>, default: () => globalConfigStore.pager.pageSize || 10 },
|
|
25
|
+
// 总条数
|
|
26
|
+
total: { type: Number as PropType<VxePagerPropTypes.Total>, default: 0 },
|
|
27
|
+
// 显示页码按钮的数量
|
|
28
|
+
pagerCount: { type: Number as PropType<VxePagerPropTypes.PagerCount>, default: () => globalConfigStore.pager.pagerCount || 7 },
|
|
29
|
+
// 每页大小选项列表
|
|
30
|
+
pageSizes: { type: Array as PropType<VxePagerPropTypes.PageSizes>, default: () => globalConfigStore.pager.pageSizes || [10, 15, 20, 50, 100] },
|
|
31
|
+
// 列对其方式
|
|
32
|
+
align: { type: String as PropType<VxePagerPropTypes.Align>, default: () => globalConfigStore.pager.align },
|
|
33
|
+
// 带边框
|
|
34
|
+
border: { type: Boolean as PropType<VxePagerPropTypes.Border>, default: () => globalConfigStore.pager.border },
|
|
35
|
+
// 带背景颜色
|
|
36
|
+
background: { type: Boolean as PropType<VxePagerPropTypes.Background>, default: () => globalConfigStore.pager.background },
|
|
37
|
+
// 配套的样式
|
|
38
|
+
perfect: { type: Boolean as PropType<VxePagerPropTypes.Perfect>, default: () => globalConfigStore.pager.perfect },
|
|
39
|
+
// 当只有一页时隐藏
|
|
40
|
+
autoHidden: { type: Boolean as PropType<VxePagerPropTypes.AutoHidden>, default: () => globalConfigStore.pager.autoHidden },
|
|
41
|
+
transfer: { type: Boolean as PropType<VxePagerPropTypes.Transfer>, default: () => globalConfigStore.pager.transfer },
|
|
42
|
+
className: [String, Function] as PropType<VxePagerPropTypes.ClassName>,
|
|
43
|
+
// 自定义图标
|
|
44
|
+
iconPrevPage: String as PropType<VxePagerPropTypes.IconPrevPage>,
|
|
45
|
+
iconJumpPrev: String as PropType<VxePagerPropTypes.IconJumpPrev>,
|
|
46
|
+
iconJumpNext: String as PropType<VxePagerPropTypes.IconJumpNext>,
|
|
47
|
+
iconNextPage: String as PropType<VxePagerPropTypes.IconNextPage>,
|
|
48
|
+
iconJumpMore: String as PropType<VxePagerPropTypes.IconJumpMore>,
|
|
49
|
+
iconHomePage: String as PropType<VxePagerPropTypes.IconHome>,
|
|
50
|
+
iconEndPage: String as PropType<VxePagerPropTypes.IconEnd>
|
|
51
|
+
},
|
|
52
|
+
emits: [
|
|
53
|
+
'update:pageSize',
|
|
54
|
+
'update:currentPage',
|
|
55
|
+
'page-change'
|
|
56
|
+
] as VxePagerEmits,
|
|
57
|
+
setup (props, context) {
|
|
58
|
+
const { slots, emit } = context
|
|
59
|
+
|
|
60
|
+
const xID = XEUtils.uniqueId()
|
|
61
|
+
|
|
62
|
+
const computeSize = useSize(props)
|
|
63
|
+
|
|
64
|
+
const $xegrid = inject('$xegrid', null as any)
|
|
65
|
+
|
|
66
|
+
const reactData = reactive<PagerReactData>({
|
|
67
|
+
inpCurrPage: props.currentPage
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
const refElem = ref() as Ref<HTMLDivElement>
|
|
71
|
+
|
|
72
|
+
const refMaps: PagerPrivateRef = {
|
|
73
|
+
refElem
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const $xepager = {
|
|
77
|
+
xID,
|
|
78
|
+
props,
|
|
79
|
+
context,
|
|
80
|
+
getRefMaps: () => refMaps
|
|
81
|
+
} as unknown as VxePagerConstructor & VxePagerPrivateMethods
|
|
82
|
+
|
|
83
|
+
let pagerMethods = {} as PagerMethods
|
|
84
|
+
let pagerPrivateMethods = {} as PagerPrivateMethods
|
|
85
|
+
|
|
86
|
+
const getPageCount = (total: number, size: number) => {
|
|
87
|
+
return Math.max(Math.ceil(total / size), 1)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const computePageCount = computed(() => {
|
|
91
|
+
return getPageCount(props.total, props.pageSize)
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
const jumpPageEvent = (evnt: Event, currentPage: number) => {
|
|
95
|
+
emit('update:currentPage', currentPage)
|
|
96
|
+
if (evnt && currentPage !== props.currentPage) {
|
|
97
|
+
pagerMethods.dispatchEvent('page-change', { type: 'current', pageSize: props.pageSize, currentPage }, evnt)
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const changeCurrentPage = (currentPage: number, evnt?: Event) => {
|
|
102
|
+
emit('update:currentPage', currentPage)
|
|
103
|
+
if (evnt && currentPage !== props.currentPage) {
|
|
104
|
+
pagerMethods.dispatchEvent('page-change', { type: 'current', pageSize: props.pageSize, currentPage }, evnt)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const triggerJumpEvent = (evnt: Event) => {
|
|
109
|
+
const inputElem: HTMLInputElement = evnt.target as HTMLInputElement
|
|
110
|
+
const inpValue = XEUtils.toInteger(inputElem.value)
|
|
111
|
+
const pageCount = computePageCount.value
|
|
112
|
+
const current = inpValue <= 0 ? 1 : inpValue >= pageCount ? pageCount : inpValue
|
|
113
|
+
const currPage = XEUtils.toValueString(current)
|
|
114
|
+
inputElem.value = currPage
|
|
115
|
+
reactData.inpCurrPage = currPage
|
|
116
|
+
changeCurrentPage(current, evnt)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const computeNumList = computed(() => {
|
|
120
|
+
const { pagerCount } = props
|
|
121
|
+
const pageCount = computePageCount.value
|
|
122
|
+
const len = pageCount > pagerCount ? pagerCount - 2 : pagerCount
|
|
123
|
+
const rest = []
|
|
124
|
+
for (let index = 0; index < len; index++) {
|
|
125
|
+
rest.push(index)
|
|
126
|
+
}
|
|
127
|
+
return rest
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
const computeOffsetNumber = computed(() => {
|
|
131
|
+
return Math.floor((props.pagerCount - 2) / 2)
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
const computeSizeList = computed(() => {
|
|
135
|
+
return props.pageSizes.map((item) => {
|
|
136
|
+
if (XEUtils.isNumber(item)) {
|
|
137
|
+
return {
|
|
138
|
+
value: item,
|
|
139
|
+
label: `${getI18n('vxe.pager.pagesize', [item])}`
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return { value: '', label: '', ...item }
|
|
143
|
+
})
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
const handleHomePage = (evnt?: Event) => {
|
|
147
|
+
const { currentPage } = props
|
|
148
|
+
if (currentPage > 1) {
|
|
149
|
+
changeCurrentPage(1, evnt)
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const handleEndPage = (evnt?: Event) => {
|
|
154
|
+
const { currentPage } = props
|
|
155
|
+
const pageCount = computePageCount.value
|
|
156
|
+
if (currentPage < pageCount) {
|
|
157
|
+
changeCurrentPage(pageCount, evnt)
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const handlePrevPage = (evnt?: Event) => {
|
|
162
|
+
const { currentPage } = props
|
|
163
|
+
const pageCount = computePageCount.value
|
|
164
|
+
if (currentPage > 1) {
|
|
165
|
+
changeCurrentPage(Math.min(pageCount, Math.max(currentPage - 1, 1)), evnt)
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const handleNextPage = (evnt?: Event) => {
|
|
170
|
+
const { currentPage } = props
|
|
171
|
+
const pageCount = computePageCount.value
|
|
172
|
+
if (currentPage < pageCount) {
|
|
173
|
+
changeCurrentPage(Math.min(pageCount, currentPage + 1), evnt)
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const handlePrevJump = (evnt?: Event) => {
|
|
178
|
+
const numList = computeNumList.value
|
|
179
|
+
changeCurrentPage(Math.max(props.currentPage - numList.length, 1), evnt)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const handleNextJump = (evnt?: Event) => {
|
|
183
|
+
const pageCount = computePageCount.value
|
|
184
|
+
const numList = computeNumList.value
|
|
185
|
+
changeCurrentPage(Math.min(props.currentPage + numList.length, pageCount), evnt)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const pageSizeEvent: VxeSelectEvents.Change = (params) => {
|
|
189
|
+
const { value } = params
|
|
190
|
+
const pageSize = XEUtils.toNumber(value)
|
|
191
|
+
const pageCount = getPageCount(props.total, pageSize)
|
|
192
|
+
let currentPage = props.currentPage
|
|
193
|
+
if (currentPage > pageCount) {
|
|
194
|
+
currentPage = pageCount
|
|
195
|
+
emit('update:currentPage', pageCount)
|
|
196
|
+
}
|
|
197
|
+
emit('update:pageSize', pageSize)
|
|
198
|
+
pagerMethods.dispatchEvent('page-change', { type: 'size', pageSize, currentPage })
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const jumpInputEvent = (evnt: KeyboardEvent) => {
|
|
202
|
+
const inputElem: HTMLInputElement = evnt.target as HTMLInputElement
|
|
203
|
+
reactData.inpCurrPage = inputElem.value
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const jumpKeydownEvent = (evnt: KeyboardEvent) => {
|
|
207
|
+
if (hasEventKey(evnt, EVENT_KEYS.ENTER)) {
|
|
208
|
+
triggerJumpEvent(evnt)
|
|
209
|
+
} else if (hasEventKey(evnt, EVENT_KEYS.ARROW_UP)) {
|
|
210
|
+
evnt.preventDefault()
|
|
211
|
+
handleNextPage(evnt)
|
|
212
|
+
} else if (hasEventKey(evnt, EVENT_KEYS.ARROW_DOWN)) {
|
|
213
|
+
evnt.preventDefault()
|
|
214
|
+
handlePrevPage(evnt)
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// 第一页
|
|
219
|
+
const renderHomePage = () => {
|
|
220
|
+
return h('button', {
|
|
221
|
+
class: ['vxe-pager--prev-btn', {
|
|
222
|
+
'is--disabled': props.currentPage <= 1
|
|
223
|
+
}],
|
|
224
|
+
type: 'button',
|
|
225
|
+
title: getI18n('vxe.pager.homePageTitle'),
|
|
226
|
+
onClick: handleHomePage
|
|
227
|
+
}, [
|
|
228
|
+
h('i', {
|
|
229
|
+
class: ['vxe-pager--btn-icon', props.iconHomePage || iconConfigStore.PAGER_HOME]
|
|
230
|
+
})
|
|
231
|
+
])
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// 上一页
|
|
235
|
+
const renderPrevPage = () => {
|
|
236
|
+
return h('button', {
|
|
237
|
+
class: ['vxe-pager--prev-btn', {
|
|
238
|
+
'is--disabled': props.currentPage <= 1
|
|
239
|
+
}],
|
|
240
|
+
type: 'button',
|
|
241
|
+
title: getI18n('vxe.pager.prevPageTitle'),
|
|
242
|
+
onClick: handlePrevPage
|
|
243
|
+
}, [
|
|
244
|
+
h('i', {
|
|
245
|
+
class: ['vxe-pager--btn-icon', props.iconPrevPage || iconConfigStore.PAGER_PREV_PAGE]
|
|
246
|
+
})
|
|
247
|
+
])
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// 向上翻页
|
|
251
|
+
const renderPrevJump = (tagName?: string) => {
|
|
252
|
+
return h(tagName || 'button', {
|
|
253
|
+
class: ['vxe-pager--jump-prev', {
|
|
254
|
+
'is--fixed': !tagName,
|
|
255
|
+
'is--disabled': props.currentPage <= 1
|
|
256
|
+
}],
|
|
257
|
+
type: 'button',
|
|
258
|
+
title: getI18n('vxe.pager.prevJumpTitle'),
|
|
259
|
+
onClick: handlePrevJump
|
|
260
|
+
}, [
|
|
261
|
+
tagName
|
|
262
|
+
? h('i', {
|
|
263
|
+
class: ['vxe-pager--jump-more-icon', props.iconJumpMore || iconConfigStore.PAGER_JUMP_MORE]
|
|
264
|
+
})
|
|
265
|
+
: null,
|
|
266
|
+
h('i', {
|
|
267
|
+
class: ['vxe-pager--jump-icon', props.iconJumpPrev || iconConfigStore.PAGER_JUMP_PREV]
|
|
268
|
+
})
|
|
269
|
+
])
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// 向下翻页
|
|
273
|
+
const renderNextJump = (tagName?: string) => {
|
|
274
|
+
const pageCount = computePageCount.value
|
|
275
|
+
return h(tagName || 'button', {
|
|
276
|
+
class: ['vxe-pager--jump-next', {
|
|
277
|
+
'is--fixed': !tagName,
|
|
278
|
+
'is--disabled': props.currentPage >= pageCount
|
|
279
|
+
}],
|
|
280
|
+
type: 'button',
|
|
281
|
+
title: getI18n('vxe.pager.nextJumpTitle'),
|
|
282
|
+
onClick: handleNextJump
|
|
283
|
+
}, [
|
|
284
|
+
tagName
|
|
285
|
+
? h('i', {
|
|
286
|
+
class: ['vxe-pager--jump-more-icon', props.iconJumpMore || iconConfigStore.PAGER_JUMP_MORE]
|
|
287
|
+
})
|
|
288
|
+
: null,
|
|
289
|
+
h('i', {
|
|
290
|
+
class: ['vxe-pager--jump-icon', props.iconJumpNext || iconConfigStore.PAGER_JUMP_NEXT]
|
|
291
|
+
})
|
|
292
|
+
])
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// 下一页
|
|
296
|
+
const renderNextPage = () => {
|
|
297
|
+
const pageCount = computePageCount.value
|
|
298
|
+
return h('button', {
|
|
299
|
+
class: ['vxe-pager--next-btn', {
|
|
300
|
+
'is--disabled': props.currentPage >= pageCount
|
|
301
|
+
}],
|
|
302
|
+
type: 'button',
|
|
303
|
+
title: getI18n('vxe.pager.nextPageTitle'),
|
|
304
|
+
onClick: handleNextPage
|
|
305
|
+
}, [
|
|
306
|
+
h('i', {
|
|
307
|
+
class: ['vxe-pager--btn-icon', props.iconNextPage || iconConfigStore.PAGER_NEXT_PAGE]
|
|
308
|
+
})
|
|
309
|
+
])
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// 最后一页
|
|
313
|
+
const renderEndPage = () => {
|
|
314
|
+
const pageCount = computePageCount.value
|
|
315
|
+
return h('button', {
|
|
316
|
+
class: ['vxe-pager--prev-btn', {
|
|
317
|
+
'is--disabled': props.currentPage >= pageCount
|
|
318
|
+
}],
|
|
319
|
+
type: 'button',
|
|
320
|
+
title: getI18n('vxe.pager.endPageTitle'),
|
|
321
|
+
onClick: handleEndPage
|
|
322
|
+
}, [
|
|
323
|
+
h('i', {
|
|
324
|
+
class: ['vxe-pager--btn-icon', props.iconEndPage || iconConfigStore.PAGER_END]
|
|
325
|
+
})
|
|
326
|
+
])
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// 页数
|
|
330
|
+
const renderNumber = (showJump?: boolean) => {
|
|
331
|
+
const { currentPage, pagerCount } = props
|
|
332
|
+
const nums = []
|
|
333
|
+
const pageCount = computePageCount.value
|
|
334
|
+
const numList = computeNumList.value
|
|
335
|
+
const offsetNumber = computeOffsetNumber.value
|
|
336
|
+
const isOv = pageCount > pagerCount
|
|
337
|
+
const isLt = isOv && currentPage > offsetNumber + 1
|
|
338
|
+
const isGt = isOv && currentPage < pageCount - offsetNumber
|
|
339
|
+
let startNumber = 1
|
|
340
|
+
if (isOv) {
|
|
341
|
+
if (currentPage >= pageCount - offsetNumber) {
|
|
342
|
+
startNumber = Math.max(pageCount - numList.length + 1, 1)
|
|
343
|
+
} else {
|
|
344
|
+
startNumber = Math.max(currentPage - offsetNumber, 1)
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
if (showJump && isLt) {
|
|
348
|
+
nums.push(
|
|
349
|
+
h('button', {
|
|
350
|
+
class: 'vxe-pager--num-btn',
|
|
351
|
+
type: 'button',
|
|
352
|
+
onClick: (evnt: Event) => jumpPageEvent(evnt, 1)
|
|
353
|
+
}, 1),
|
|
354
|
+
renderPrevJump('span')
|
|
355
|
+
)
|
|
356
|
+
}
|
|
357
|
+
numList.forEach((item, index) => {
|
|
358
|
+
const number = startNumber + index
|
|
359
|
+
if (number <= pageCount) {
|
|
360
|
+
nums.push(
|
|
361
|
+
h('button', {
|
|
362
|
+
key: number,
|
|
363
|
+
class: ['vxe-pager--num-btn', {
|
|
364
|
+
'is--active': currentPage === number
|
|
365
|
+
}],
|
|
366
|
+
type: 'button',
|
|
367
|
+
onClick: (evnt: Event) => jumpPageEvent(evnt, number)
|
|
368
|
+
}, number)
|
|
369
|
+
)
|
|
370
|
+
}
|
|
371
|
+
})
|
|
372
|
+
if (showJump && isGt) {
|
|
373
|
+
nums.push(
|
|
374
|
+
renderNextJump('button'),
|
|
375
|
+
h('button', {
|
|
376
|
+
class: 'vxe-pager--num-btn',
|
|
377
|
+
type: 'button',
|
|
378
|
+
onClick: (evnt: Event) => jumpPageEvent(evnt, pageCount)
|
|
379
|
+
}, pageCount)
|
|
380
|
+
)
|
|
381
|
+
}
|
|
382
|
+
return h('span', {
|
|
383
|
+
class: 'vxe-pager--btn-wrapper'
|
|
384
|
+
}, nums)
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// jumpNumber
|
|
388
|
+
const renderJumpNumber = () => {
|
|
389
|
+
return renderNumber(true)
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// sizes
|
|
393
|
+
const renderSizes = () => {
|
|
394
|
+
const sizeList = computeSizeList.value
|
|
395
|
+
return h(VxeSelectComponent, {
|
|
396
|
+
class: 'vxe-pager--sizes',
|
|
397
|
+
modelValue: props.pageSize,
|
|
398
|
+
placement: 'top',
|
|
399
|
+
transfer: props.transfer,
|
|
400
|
+
options: sizeList,
|
|
401
|
+
onChange: pageSizeEvent
|
|
402
|
+
})
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Jump
|
|
406
|
+
const renderJump = (isFull?: boolean) => {
|
|
407
|
+
return h('span', {
|
|
408
|
+
class: 'vxe-pager--jump'
|
|
409
|
+
}, [
|
|
410
|
+
isFull
|
|
411
|
+
? h('span', {
|
|
412
|
+
class: 'vxe-pager--goto-text'
|
|
413
|
+
}, getI18n('vxe.pager.goto'))
|
|
414
|
+
: null,
|
|
415
|
+
h('input', {
|
|
416
|
+
class: 'vxe-pager--goto',
|
|
417
|
+
value: reactData.inpCurrPage,
|
|
418
|
+
type: 'text',
|
|
419
|
+
autocomplete: 'off',
|
|
420
|
+
onInput: jumpInputEvent,
|
|
421
|
+
onKeydown: jumpKeydownEvent,
|
|
422
|
+
onBlur: triggerJumpEvent
|
|
423
|
+
}),
|
|
424
|
+
isFull
|
|
425
|
+
? h('span', {
|
|
426
|
+
class: 'vxe-pager--classifier-text'
|
|
427
|
+
}, getI18n('vxe.pager.pageClassifier'))
|
|
428
|
+
: null
|
|
429
|
+
])
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// FullJump
|
|
433
|
+
const renderFullJump = () => {
|
|
434
|
+
return renderJump(true)
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// PageCount
|
|
438
|
+
const renderPageCount = () => {
|
|
439
|
+
const pageCount = computePageCount.value
|
|
440
|
+
return h('span', {
|
|
441
|
+
class: 'vxe-pager--count'
|
|
442
|
+
}, [
|
|
443
|
+
h('span', {
|
|
444
|
+
class: 'vxe-pager--separator'
|
|
445
|
+
}),
|
|
446
|
+
h('span', pageCount)
|
|
447
|
+
])
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// total
|
|
451
|
+
const renderTotal = () => {
|
|
452
|
+
return h('span', {
|
|
453
|
+
class: 'vxe-pager--total'
|
|
454
|
+
}, getI18n('vxe.pager.total', [props.total]))
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
pagerMethods = {
|
|
458
|
+
dispatchEvent (type, params, evnt) {
|
|
459
|
+
emit(type, Object.assign({ $pager: $xepager, $event: evnt }, params))
|
|
460
|
+
},
|
|
461
|
+
homePage () {
|
|
462
|
+
handleHomePage()
|
|
463
|
+
return nextTick()
|
|
464
|
+
},
|
|
465
|
+
endPage () {
|
|
466
|
+
handleEndPage()
|
|
467
|
+
return nextTick()
|
|
468
|
+
},
|
|
469
|
+
prevPage () {
|
|
470
|
+
handlePrevPage()
|
|
471
|
+
return nextTick()
|
|
472
|
+
},
|
|
473
|
+
nextPage () {
|
|
474
|
+
handleNextPage()
|
|
475
|
+
return nextTick()
|
|
476
|
+
},
|
|
477
|
+
prevJump () {
|
|
478
|
+
handlePrevJump()
|
|
479
|
+
return nextTick()
|
|
480
|
+
},
|
|
481
|
+
nextJump () {
|
|
482
|
+
handleNextJump()
|
|
483
|
+
return nextTick()
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
pagerPrivateMethods = {
|
|
488
|
+
handlePrevPage,
|
|
489
|
+
handleNextPage,
|
|
490
|
+
handlePrevJump,
|
|
491
|
+
handleNextJump
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
Object.assign($xepager, pagerMethods, pagerPrivateMethods)
|
|
495
|
+
|
|
496
|
+
watch(() => props.currentPage, (value) => {
|
|
497
|
+
reactData.inpCurrPage = value
|
|
498
|
+
})
|
|
499
|
+
|
|
500
|
+
const renderVN = () => {
|
|
501
|
+
const { align, layouts, className } = props
|
|
502
|
+
const childNodes = []
|
|
503
|
+
const vSize = computeSize.value
|
|
504
|
+
const pageCount = computePageCount.value
|
|
505
|
+
if (slots.left) {
|
|
506
|
+
childNodes.push(
|
|
507
|
+
h('span', {
|
|
508
|
+
class: 'vxe-pager--left-wrapper'
|
|
509
|
+
}, slots.left({ $grid: $xegrid }))
|
|
510
|
+
)
|
|
511
|
+
}
|
|
512
|
+
layouts.forEach((name) => {
|
|
513
|
+
let renderFn
|
|
514
|
+
switch (name) {
|
|
515
|
+
case 'Home':
|
|
516
|
+
renderFn = renderHomePage
|
|
517
|
+
break
|
|
518
|
+
case 'PrevJump':
|
|
519
|
+
renderFn = renderPrevJump
|
|
520
|
+
break
|
|
521
|
+
case 'PrevPage':
|
|
522
|
+
renderFn = renderPrevPage
|
|
523
|
+
break
|
|
524
|
+
case 'Number':
|
|
525
|
+
renderFn = renderNumber
|
|
526
|
+
break
|
|
527
|
+
case 'JumpNumber':
|
|
528
|
+
renderFn = renderJumpNumber
|
|
529
|
+
break
|
|
530
|
+
case 'NextPage':
|
|
531
|
+
renderFn = renderNextPage
|
|
532
|
+
break
|
|
533
|
+
case 'NextJump':
|
|
534
|
+
renderFn = renderNextJump
|
|
535
|
+
break
|
|
536
|
+
case 'End':
|
|
537
|
+
renderFn = renderEndPage
|
|
538
|
+
break
|
|
539
|
+
case 'Sizes':
|
|
540
|
+
renderFn = renderSizes
|
|
541
|
+
break
|
|
542
|
+
case 'FullJump':
|
|
543
|
+
renderFn = renderFullJump
|
|
544
|
+
break
|
|
545
|
+
case 'Jump':
|
|
546
|
+
renderFn = renderJump
|
|
547
|
+
break
|
|
548
|
+
case 'PageCount':
|
|
549
|
+
renderFn = renderPageCount
|
|
550
|
+
break
|
|
551
|
+
case 'Total':
|
|
552
|
+
renderFn = renderTotal
|
|
553
|
+
break
|
|
554
|
+
}
|
|
555
|
+
if (renderFn) {
|
|
556
|
+
childNodes.push(renderFn())
|
|
557
|
+
} else {
|
|
558
|
+
if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
|
|
559
|
+
errLog('vxe.error.notProp', [`layouts -> ${name}`])
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
})
|
|
563
|
+
if (slots.right) {
|
|
564
|
+
childNodes.push(
|
|
565
|
+
h('span', {
|
|
566
|
+
class: 'vxe-pager--right-wrapper'
|
|
567
|
+
}, slots.right({ $grid: $xegrid }))
|
|
568
|
+
)
|
|
569
|
+
}
|
|
570
|
+
return h('div', {
|
|
571
|
+
ref: refElem,
|
|
572
|
+
class: ['vxe-pager', className ? (XEUtils.isFunction(className) ? className({ $pager: $xepager }) : className) : '', {
|
|
573
|
+
[`size--${vSize}`]: vSize,
|
|
574
|
+
[`align--${align}`]: align,
|
|
575
|
+
'is--border': props.border,
|
|
576
|
+
'is--background': props.background,
|
|
577
|
+
'is--perfect': props.perfect,
|
|
578
|
+
'is--hidden': props.autoHidden && pageCount === 1,
|
|
579
|
+
'is--loading': props.loading
|
|
580
|
+
}]
|
|
581
|
+
}, [
|
|
582
|
+
h('div', {
|
|
583
|
+
class: 'vxe-pager--wrapper'
|
|
584
|
+
}, childNodes)
|
|
585
|
+
])
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
$xepager.renderVN = renderVN
|
|
589
|
+
|
|
590
|
+
return $xepager
|
|
591
|
+
},
|
|
592
|
+
render () {
|
|
593
|
+
return this.renderVN()
|
|
594
|
+
}
|
|
595
|
+
})
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { App } from 'vue'
|
|
2
|
+
import VxePulldownComponent from './src/pulldown'
|
|
3
|
+
import { dynamicApp } from '../dynamics'
|
|
4
|
+
|
|
5
|
+
export const VxePulldown = Object.assign(VxePulldownComponent, {
|
|
6
|
+
install: function (app: App) {
|
|
7
|
+
app.component(VxePulldownComponent.name, VxePulldownComponent)
|
|
8
|
+
}
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
export const Pulldown = VxePulldown
|
|
12
|
+
|
|
13
|
+
dynamicApp.component(VxePulldownComponent.name, VxePulldownComponent)
|
|
14
|
+
|
|
15
|
+
export default VxePulldown
|