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,57 @@
|
|
|
1
|
+
.vxe-pulldown {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
color: var(--vxe-font-color);
|
|
5
|
+
text-align: left;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.vxe-pulldown--panel {
|
|
9
|
+
display: none;
|
|
10
|
+
position: absolute;
|
|
11
|
+
left: 0;
|
|
12
|
+
padding: 4px 0;
|
|
13
|
+
color: var(--vxe-font-color);
|
|
14
|
+
text-align: left;
|
|
15
|
+
}
|
|
16
|
+
.vxe-pulldown--panel:not(.is--transfer) {
|
|
17
|
+
min-width: 100%;
|
|
18
|
+
}
|
|
19
|
+
.vxe-pulldown--panel.is--transfer {
|
|
20
|
+
position: fixed;
|
|
21
|
+
}
|
|
22
|
+
.vxe-pulldown--panel.animat--leave {
|
|
23
|
+
display: block;
|
|
24
|
+
opacity: 0;
|
|
25
|
+
transform: scaleY(0.5);
|
|
26
|
+
transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
|
|
27
|
+
transform-origin: center top;
|
|
28
|
+
backface-visibility: hidden;
|
|
29
|
+
}
|
|
30
|
+
.vxe-pulldown--panel.animat--leave[placement=top] {
|
|
31
|
+
transform-origin: center bottom;
|
|
32
|
+
}
|
|
33
|
+
.vxe-pulldown--panel.animat--enter {
|
|
34
|
+
opacity: 1;
|
|
35
|
+
transform: scaleY(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.vxe-pulldown--panel-wrapper {
|
|
39
|
+
background-color: var(--vxe-ui-pulldown-panel-background-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.vxe-pulldown,
|
|
43
|
+
.vxe-pulldown--panel {
|
|
44
|
+
font-size: var(--vxe-font-size);
|
|
45
|
+
}
|
|
46
|
+
.vxe-pulldown.size--medium,
|
|
47
|
+
.vxe-pulldown--panel.size--medium {
|
|
48
|
+
font-size: var(--vxe-font-size-medium);
|
|
49
|
+
}
|
|
50
|
+
.vxe-pulldown.size--small,
|
|
51
|
+
.vxe-pulldown--panel.size--small {
|
|
52
|
+
font-size: var(--vxe-font-size-small);
|
|
53
|
+
}
|
|
54
|
+
.vxe-pulldown.size--mini,
|
|
55
|
+
.vxe-pulldown--panel.size--mini {
|
|
56
|
+
font-size: var(--vxe-font-size-mini);
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vxe-pulldown{position:relative;display:inline-block;color:var(--vxe-font-color);text-align:left}.vxe-pulldown--panel{display:none;position:absolute;left:0;padding:4px 0;color:var(--vxe-font-color);text-align:left}.vxe-pulldown--panel:not(.is--transfer){min-width:100%}.vxe-pulldown--panel.is--transfer{position:fixed}.vxe-pulldown--panel.animat--leave{display:block;opacity:0;transform:scaleY(.5);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transform-origin:center top;backface-visibility:hidden}.vxe-pulldown--panel.animat--leave[placement=top]{transform-origin:center bottom}.vxe-pulldown--panel.animat--enter{opacity:1;transform:scaleY(1)}.vxe-pulldown--panel-wrapper{background-color:var(--vxe-ui-pulldown-panel-background-color)}.vxe-pulldown,.vxe-pulldown--panel{font-size:var(--vxe-font-size)}.vxe-pulldown--panel.size--medium,.vxe-pulldown.size--medium{font-size:var(--vxe-font-size-medium)}.vxe-pulldown--panel.size--small,.vxe-pulldown.size--small{font-size:var(--vxe-font-size-small)}.vxe-pulldown--panel.size--mini,.vxe-pulldown.size--mini{font-size:var(--vxe-font-size-mini)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import VxeRadioComponent from './src/radio';
|
|
2
|
+
import { dynamicApp } from '../dynamics';
|
|
3
|
+
export const VxeRadio = Object.assign(VxeRadioComponent, {
|
|
4
|
+
install: function (app) {
|
|
5
|
+
app.component(VxeRadioComponent.name, VxeRadioComponent);
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
export const Radio = VxeRadio;
|
|
9
|
+
dynamicApp.component(VxeRadioComponent.name, VxeRadioComponent);
|
|
10
|
+
export default VxeRadio;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineComponent, h, computed, inject } from 'vue';
|
|
2
|
+
import XEUtils from 'xe-utils';
|
|
3
|
+
import { getFuncText } from '../../ui/src/utils';
|
|
4
|
+
import globalConfigStore from '../../ui/src/globalStore';
|
|
5
|
+
import { useSize } from '../../hooks/size';
|
|
6
|
+
export default defineComponent({
|
|
7
|
+
name: 'VxeRadioButton',
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: [String, Number, Boolean],
|
|
10
|
+
label: { type: [String, Number, Boolean], default: null },
|
|
11
|
+
title: [String, Number],
|
|
12
|
+
content: [String, Number],
|
|
13
|
+
disabled: Boolean,
|
|
14
|
+
strict: { type: Boolean, default: () => globalConfigStore.radioButton.strict },
|
|
15
|
+
size: { type: String, default: () => globalConfigStore.radioButton.size || globalConfigStore.size }
|
|
16
|
+
},
|
|
17
|
+
emits: [
|
|
18
|
+
'update:modelValue',
|
|
19
|
+
'change'
|
|
20
|
+
],
|
|
21
|
+
setup(props, context) {
|
|
22
|
+
const { slots, emit } = context;
|
|
23
|
+
const $xeform = inject('$xeForm', null);
|
|
24
|
+
const $xeformiteminfo = inject('$xeFormItemInfo', null);
|
|
25
|
+
const xID = XEUtils.uniqueId();
|
|
26
|
+
const computeSize = useSize(props);
|
|
27
|
+
const $xeradiobutton = {
|
|
28
|
+
xID,
|
|
29
|
+
props,
|
|
30
|
+
context
|
|
31
|
+
};
|
|
32
|
+
let radioButtonMethods = {};
|
|
33
|
+
const $xeradiogroup = inject('$xeradiogroup', null);
|
|
34
|
+
const computeDisabled = computed(() => {
|
|
35
|
+
return props.disabled || ($xeradiogroup && $xeradiogroup.props.disabled);
|
|
36
|
+
});
|
|
37
|
+
const computeName = computed(() => {
|
|
38
|
+
return $xeradiogroup ? $xeradiogroup.name : null;
|
|
39
|
+
});
|
|
40
|
+
const computeStrict = computed(() => {
|
|
41
|
+
return $xeradiogroup ? $xeradiogroup.props.strict : props.strict;
|
|
42
|
+
});
|
|
43
|
+
const computeChecked = computed(() => {
|
|
44
|
+
const { modelValue, label } = props;
|
|
45
|
+
return $xeradiogroup ? $xeradiogroup.props.modelValue === label : modelValue === label;
|
|
46
|
+
});
|
|
47
|
+
radioButtonMethods = {
|
|
48
|
+
dispatchEvent(type, params, evnt) {
|
|
49
|
+
emit(type, Object.assign({ $radioButton: $xeradiobutton, $event: evnt }, params));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
Object.assign($xeradiobutton, radioButtonMethods);
|
|
53
|
+
const handleValue = (label, evnt) => {
|
|
54
|
+
if ($xeradiogroup) {
|
|
55
|
+
$xeradiogroup.handleChecked({ label }, evnt);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
emit('update:modelValue', label);
|
|
59
|
+
radioButtonMethods.dispatchEvent('change', { label }, evnt);
|
|
60
|
+
// 自动更新校验状态
|
|
61
|
+
if ($xeform && $xeformiteminfo) {
|
|
62
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, label);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const changeEvent = (evnt) => {
|
|
67
|
+
const isDisabled = computeDisabled.value;
|
|
68
|
+
if (!isDisabled) {
|
|
69
|
+
handleValue(props.label, evnt);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const clickEvent = (evnt) => {
|
|
73
|
+
const isDisabled = computeDisabled.value;
|
|
74
|
+
const isStrict = computeStrict.value;
|
|
75
|
+
if (!isDisabled && !isStrict) {
|
|
76
|
+
if (props.label === ($xeradiogroup ? $xeradiogroup.props.modelValue : props.modelValue)) {
|
|
77
|
+
handleValue(null, evnt);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const renderVN = () => {
|
|
82
|
+
const vSize = computeSize.value;
|
|
83
|
+
const isDisabled = computeDisabled.value;
|
|
84
|
+
const name = computeName.value;
|
|
85
|
+
const checked = computeChecked.value;
|
|
86
|
+
return h('label', {
|
|
87
|
+
class: ['vxe-radio', 'vxe-radio-button', {
|
|
88
|
+
[`size--${vSize}`]: vSize,
|
|
89
|
+
'is--disabled': isDisabled
|
|
90
|
+
}],
|
|
91
|
+
title: props.title
|
|
92
|
+
}, [
|
|
93
|
+
h('input', {
|
|
94
|
+
class: 'vxe-radio--input',
|
|
95
|
+
type: 'radio',
|
|
96
|
+
name,
|
|
97
|
+
checked,
|
|
98
|
+
disabled: isDisabled,
|
|
99
|
+
onChange: changeEvent,
|
|
100
|
+
onClick: clickEvent
|
|
101
|
+
}),
|
|
102
|
+
h('span', {
|
|
103
|
+
class: 'vxe-radio--label'
|
|
104
|
+
}, slots.default ? slots.default({}) : getFuncText(props.content))
|
|
105
|
+
]);
|
|
106
|
+
};
|
|
107
|
+
Object.assign($xeradiobutton, {
|
|
108
|
+
renderVN,
|
|
109
|
+
dispatchEvent
|
|
110
|
+
});
|
|
111
|
+
return renderVN;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineComponent, h, provide, inject, computed } from 'vue';
|
|
2
|
+
import XEUtils from 'xe-utils';
|
|
3
|
+
import globalConfigStore from '../../ui/src/globalStore';
|
|
4
|
+
import VxeRadioComponent from './radio';
|
|
5
|
+
import VxeRadioButtonComponent from './button';
|
|
6
|
+
import { useSize } from '../../hooks/size';
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
name: 'VxeRadioGroup',
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: [String, Number, Boolean],
|
|
11
|
+
disabled: Boolean,
|
|
12
|
+
type: String,
|
|
13
|
+
options: Array,
|
|
14
|
+
optionProps: Object,
|
|
15
|
+
strict: { type: Boolean, default: () => globalConfigStore.radioGroup.strict },
|
|
16
|
+
size: { type: String, default: () => globalConfigStore.radioGroup.size || globalConfigStore.size }
|
|
17
|
+
},
|
|
18
|
+
emits: [
|
|
19
|
+
'update:modelValue',
|
|
20
|
+
'change'
|
|
21
|
+
],
|
|
22
|
+
setup(props, context) {
|
|
23
|
+
const { slots, emit } = context;
|
|
24
|
+
const $xeform = inject('$xeForm', null);
|
|
25
|
+
const $xeformiteminfo = inject('$xeFormItemInfo', null);
|
|
26
|
+
const xID = XEUtils.uniqueId();
|
|
27
|
+
const $xeradiogroup = {
|
|
28
|
+
xID,
|
|
29
|
+
props,
|
|
30
|
+
context,
|
|
31
|
+
name: XEUtils.uniqueId('xegroup_')
|
|
32
|
+
};
|
|
33
|
+
const computePropsOpts = computed(() => {
|
|
34
|
+
return props.optionProps || {};
|
|
35
|
+
});
|
|
36
|
+
const computeLabelField = computed(() => {
|
|
37
|
+
const propsOpts = computePropsOpts.value;
|
|
38
|
+
return propsOpts.label || 'label';
|
|
39
|
+
});
|
|
40
|
+
const computeValueField = computed(() => {
|
|
41
|
+
const propsOpts = computePropsOpts.value;
|
|
42
|
+
return propsOpts.value || 'value';
|
|
43
|
+
});
|
|
44
|
+
const computeDisabledField = computed(() => {
|
|
45
|
+
const propsOpts = computePropsOpts.value;
|
|
46
|
+
return propsOpts.disabled || 'disabled';
|
|
47
|
+
});
|
|
48
|
+
let radioGroupMethods = {};
|
|
49
|
+
useSize(props);
|
|
50
|
+
const radioGroupPrivateMethods = {
|
|
51
|
+
handleChecked(params, evnt) {
|
|
52
|
+
emit('update:modelValue', params.label);
|
|
53
|
+
radioGroupMethods.dispatchEvent('change', params);
|
|
54
|
+
// 自动更新校验状态
|
|
55
|
+
if ($xeform && $xeformiteminfo) {
|
|
56
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, params.label);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
radioGroupMethods = {
|
|
61
|
+
dispatchEvent(type, params, evnt) {
|
|
62
|
+
emit(type, Object.assign({ $radioGroup: $xeradiogroup, $event: evnt }, params));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const renderVN = () => {
|
|
66
|
+
const { options, type } = props;
|
|
67
|
+
const defaultSlot = slots.default;
|
|
68
|
+
const valueField = computeValueField.value;
|
|
69
|
+
const labelField = computeLabelField.value;
|
|
70
|
+
const disabledField = computeDisabledField.value;
|
|
71
|
+
const btnComp = type === 'button' ? VxeRadioButtonComponent : VxeRadioComponent;
|
|
72
|
+
return h('div', {
|
|
73
|
+
class: 'vxe-radio-group'
|
|
74
|
+
}, defaultSlot
|
|
75
|
+
? defaultSlot({})
|
|
76
|
+
: (options
|
|
77
|
+
? options.map(item => {
|
|
78
|
+
return h(btnComp, {
|
|
79
|
+
label: item[valueField],
|
|
80
|
+
content: item[labelField],
|
|
81
|
+
disabled: item[disabledField]
|
|
82
|
+
});
|
|
83
|
+
})
|
|
84
|
+
: []));
|
|
85
|
+
};
|
|
86
|
+
Object.assign($xeradiogroup, radioGroupPrivateMethods, {
|
|
87
|
+
renderVN,
|
|
88
|
+
dispatchEvent
|
|
89
|
+
});
|
|
90
|
+
provide('$xeradiogroup', $xeradiogroup);
|
|
91
|
+
return renderVN;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { defineComponent, h, computed, inject } from 'vue';
|
|
2
|
+
import XEUtils from 'xe-utils';
|
|
3
|
+
import { getFuncText } from '../../ui/src/utils';
|
|
4
|
+
import globalConfigStore from '../../ui/src/globalStore';
|
|
5
|
+
import { useSize } from '../../hooks/size';
|
|
6
|
+
export default defineComponent({
|
|
7
|
+
name: 'VxeRadio',
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: [String, Number, Boolean],
|
|
10
|
+
label: { type: [String, Number, Boolean], default: null },
|
|
11
|
+
title: [String, Number],
|
|
12
|
+
content: [String, Number],
|
|
13
|
+
disabled: Boolean,
|
|
14
|
+
name: String,
|
|
15
|
+
strict: { type: Boolean, default: () => globalConfigStore.radio.strict },
|
|
16
|
+
size: { type: String, default: () => globalConfigStore.radio.size || globalConfigStore.size }
|
|
17
|
+
},
|
|
18
|
+
emits: [
|
|
19
|
+
'update:modelValue',
|
|
20
|
+
'change'
|
|
21
|
+
],
|
|
22
|
+
setup(props, context) {
|
|
23
|
+
const { slots, emit } = context;
|
|
24
|
+
const $xeform = inject('$xeForm', null);
|
|
25
|
+
const $xeformiteminfo = inject('$xeFormItemInfo', null);
|
|
26
|
+
const xID = XEUtils.uniqueId();
|
|
27
|
+
const $xeradio = {
|
|
28
|
+
xID,
|
|
29
|
+
props,
|
|
30
|
+
context
|
|
31
|
+
};
|
|
32
|
+
const computeSize = useSize(props);
|
|
33
|
+
const $xeradiogroup = inject('$xeradiogroup', null);
|
|
34
|
+
let radioMethods = {};
|
|
35
|
+
const computeDisabled = computed(() => {
|
|
36
|
+
return props.disabled || ($xeradiogroup && $xeradiogroup.props.disabled);
|
|
37
|
+
});
|
|
38
|
+
const computeName = computed(() => {
|
|
39
|
+
return $xeradiogroup ? $xeradiogroup.name : props.name;
|
|
40
|
+
});
|
|
41
|
+
const computeStrict = computed(() => {
|
|
42
|
+
return $xeradiogroup ? $xeradiogroup.props.strict : props.strict;
|
|
43
|
+
});
|
|
44
|
+
const computeChecked = computed(() => {
|
|
45
|
+
const { modelValue, label } = props;
|
|
46
|
+
return $xeradiogroup ? $xeradiogroup.props.modelValue === label : modelValue === label;
|
|
47
|
+
});
|
|
48
|
+
const handleValue = (label, evnt) => {
|
|
49
|
+
if ($xeradiogroup) {
|
|
50
|
+
$xeradiogroup.handleChecked({ label }, evnt);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
emit('update:modelValue', label);
|
|
54
|
+
radioMethods.dispatchEvent('change', { label }, evnt);
|
|
55
|
+
// 自动更新校验状态
|
|
56
|
+
if ($xeform && $xeformiteminfo) {
|
|
57
|
+
$xeform.triggerItemEvent(evnt, $xeformiteminfo.itemConfig.field, label);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const changeEvent = (evnt) => {
|
|
62
|
+
const isDisabled = computeDisabled.value;
|
|
63
|
+
if (!isDisabled) {
|
|
64
|
+
handleValue(props.label, evnt);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const clickEvent = (evnt) => {
|
|
68
|
+
const isDisabled = computeDisabled.value;
|
|
69
|
+
const isStrict = computeStrict.value;
|
|
70
|
+
if (!isDisabled && !isStrict) {
|
|
71
|
+
if (props.label === ($xeradiogroup ? $xeradiogroup.props.modelValue : props.modelValue)) {
|
|
72
|
+
handleValue(null, evnt);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
radioMethods = {
|
|
77
|
+
dispatchEvent(type, params, evnt) {
|
|
78
|
+
emit(type, Object.assign({ $radio: $xeradio, $event: evnt }, params));
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
Object.assign($xeradio, radioMethods);
|
|
82
|
+
const renderVN = () => {
|
|
83
|
+
const vSize = computeSize.value;
|
|
84
|
+
const isDisabled = computeDisabled.value;
|
|
85
|
+
const name = computeName.value;
|
|
86
|
+
const isChecked = computeChecked.value;
|
|
87
|
+
return h('label', {
|
|
88
|
+
class: ['vxe-radio', {
|
|
89
|
+
[`size--${vSize}`]: vSize,
|
|
90
|
+
'is--checked': isChecked,
|
|
91
|
+
'is--disabled': isDisabled
|
|
92
|
+
}],
|
|
93
|
+
title: props.title
|
|
94
|
+
}, [
|
|
95
|
+
h('input', {
|
|
96
|
+
class: 'vxe-radio--input',
|
|
97
|
+
type: 'radio',
|
|
98
|
+
name,
|
|
99
|
+
checked: isChecked,
|
|
100
|
+
disabled: isDisabled,
|
|
101
|
+
onChange: changeEvent,
|
|
102
|
+
onClick: clickEvent
|
|
103
|
+
}),
|
|
104
|
+
h('span', {
|
|
105
|
+
class: ['vxe-radio--icon', isChecked ? 'vxe-icon-radio-checked' : 'vxe-icon-radio-unchecked']
|
|
106
|
+
}),
|
|
107
|
+
h('span', {
|
|
108
|
+
class: 'vxe-radio--label'
|
|
109
|
+
}, slots.default ? slots.default({}) : getFuncText(props.content))
|
|
110
|
+
]);
|
|
111
|
+
};
|
|
112
|
+
$xeradio.renderVN = renderVN;
|
|
113
|
+
return $xeradio;
|
|
114
|
+
},
|
|
115
|
+
render() {
|
|
116
|
+
return this.renderVN();
|
|
117
|
+
}
|
|
118
|
+
});
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/*radio-group*/
|
|
2
|
+
.vxe-radio-group {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
vertical-align: middle;
|
|
5
|
+
line-height: 1;
|
|
6
|
+
font-size: 0;
|
|
7
|
+
}
|
|
8
|
+
.vxe-radio-group + .vxe-radio-group {
|
|
9
|
+
margin-left: 10px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/*radio*/
|
|
13
|
+
.vxe-radio {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
display: inline-block;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
line-height: 1;
|
|
19
|
+
}
|
|
20
|
+
.vxe-radio .vxe-radio--icon {
|
|
21
|
+
font-size: 1.4em;
|
|
22
|
+
}
|
|
23
|
+
.vxe-radio .vxe-radio--icon {
|
|
24
|
+
color: var(--vxe-ui-input-border-color);
|
|
25
|
+
vertical-align: middle;
|
|
26
|
+
font-weight: 700;
|
|
27
|
+
-webkit-user-select: none;
|
|
28
|
+
-moz-user-select: none;
|
|
29
|
+
user-select: none;
|
|
30
|
+
}
|
|
31
|
+
.vxe-radio.is--checked {
|
|
32
|
+
color: var(--vxe-ui-font-primary-color);
|
|
33
|
+
}
|
|
34
|
+
.vxe-radio.is--checked .vxe-radio--icon {
|
|
35
|
+
color: var(--vxe-ui-font-primary-color);
|
|
36
|
+
}
|
|
37
|
+
.vxe-radio:not(.is--disabled) {
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
.vxe-radio:not(.is--disabled):hover .vxe-radio--icon {
|
|
41
|
+
color: var(--vxe-ui-font-primary-color);
|
|
42
|
+
}
|
|
43
|
+
.vxe-radio.is--disabled {
|
|
44
|
+
color: var(--vxe-ui-font-disabled-color);
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
}
|
|
47
|
+
.vxe-radio.is--disabled .vxe-radio--icon {
|
|
48
|
+
color: var(--vxe-ui-input-disabled-color);
|
|
49
|
+
}
|
|
50
|
+
.vxe-radio .vxe-radio--label {
|
|
51
|
+
padding-left: 0.5em;
|
|
52
|
+
vertical-align: middle;
|
|
53
|
+
}
|
|
54
|
+
.vxe-radio > input[type=radio] {
|
|
55
|
+
position: absolute;
|
|
56
|
+
width: 0;
|
|
57
|
+
height: 0;
|
|
58
|
+
border: 0;
|
|
59
|
+
-webkit-appearance: none;
|
|
60
|
+
-moz-appearance: none;
|
|
61
|
+
appearance: none;
|
|
62
|
+
}
|
|
63
|
+
.vxe-radio .vxe-radio--label {
|
|
64
|
+
vertical-align: middle;
|
|
65
|
+
display: inline-block;
|
|
66
|
+
max-width: 50em;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
text-overflow: ellipsis;
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
}
|
|
71
|
+
.vxe-radio:not(.is--disabled) > input:focus + .vxe-radio--icon {
|
|
72
|
+
color: var(--vxe-primary-color);
|
|
73
|
+
}
|
|
74
|
+
.vxe-radio:not(.vxe-radio-button) + .vxe-radio {
|
|
75
|
+
margin-left: 10px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.vxe-radio-button .vxe-radio--label {
|
|
79
|
+
background-color: var(--vxe-ui-radio-button-default-background-color);
|
|
80
|
+
}
|
|
81
|
+
.vxe-radio-button:first-child .vxe-radio--label {
|
|
82
|
+
border-left: 1px solid var(--vxe-ui-input-border-color);
|
|
83
|
+
border-radius: var(--vxe-border-radius) 0 0 var(--vxe-border-radius);
|
|
84
|
+
}
|
|
85
|
+
.vxe-radio-button:last-child .vxe-radio--label {
|
|
86
|
+
border-radius: 0 var(--vxe-border-radius) var(--vxe-border-radius) 0;
|
|
87
|
+
}
|
|
88
|
+
.vxe-radio-button > input:checked + .vxe-radio--label {
|
|
89
|
+
color: #fff;
|
|
90
|
+
background-color: var(--vxe-primary-color);
|
|
91
|
+
border-color: var(--vxe-primary-color);
|
|
92
|
+
}
|
|
93
|
+
.vxe-radio-button .vxe-radio--label {
|
|
94
|
+
padding: 0 1em;
|
|
95
|
+
line-height: calc(var(--vxe-button-height-default) - 2px);
|
|
96
|
+
display: inline-block;
|
|
97
|
+
border-style: solid;
|
|
98
|
+
border-color: var(--vxe-ui-input-border-color);
|
|
99
|
+
border-width: 1px 1px 1px 0;
|
|
100
|
+
max-width: 50em;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
text-overflow: ellipsis;
|
|
103
|
+
white-space: nowrap;
|
|
104
|
+
}
|
|
105
|
+
.vxe-radio-button.is--disabled {
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
}
|
|
108
|
+
.vxe-radio-button.is--disabled > input:not(:checked) + .vxe-radio--label {
|
|
109
|
+
color: var(--vxe-ui-input-disabled-color);
|
|
110
|
+
}
|
|
111
|
+
.vxe-radio-button.is--disabled > input:checked + .vxe-radio--label {
|
|
112
|
+
border-color: var(--vxe-primary-lighten-color);
|
|
113
|
+
background-color: var(--vxe-primary-lighten-color);
|
|
114
|
+
}
|
|
115
|
+
.vxe-radio-button:not(.is--disabled) > input:focus + .vxe-radio--label {
|
|
116
|
+
border-color: var(--vxe-primary-color);
|
|
117
|
+
box-shadow: 0 0 0.2em 0 var(--vxe-primary-color);
|
|
118
|
+
}
|
|
119
|
+
.vxe-radio-button:not(.is--disabled):hover > input:not(:checked) + .vxe-radio--label {
|
|
120
|
+
color: var(--vxe-primary-color);
|
|
121
|
+
}
|
|
122
|
+
.vxe-radio-button.size--medium .vxe-radio--label {
|
|
123
|
+
line-height: calc(var(--vxe-button-height-medium) - 2px);
|
|
124
|
+
}
|
|
125
|
+
.vxe-radio-button.size--small .vxe-radio--label {
|
|
126
|
+
line-height: calc(var(--vxe-button-height-small) - 2px);
|
|
127
|
+
}
|
|
128
|
+
.vxe-radio-button.size--mini .vxe-radio--label {
|
|
129
|
+
line-height: calc(var(--vxe-button-height-mini) - 2px);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.vxe-radio {
|
|
133
|
+
font-size: var(--vxe-font-size);
|
|
134
|
+
}
|
|
135
|
+
.vxe-radio.size--medium {
|
|
136
|
+
font-size: var(--vxe-font-size-medium);
|
|
137
|
+
}
|
|
138
|
+
.vxe-radio.size--small {
|
|
139
|
+
font-size: var(--vxe-font-size-small);
|
|
140
|
+
}
|
|
141
|
+
.vxe-radio.size--mini {
|
|
142
|
+
font-size: var(--vxe-font-size-mini);
|
|
143
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vxe-radio-group{display:inline-block;vertical-align:middle;line-height:1;font-size:0}.vxe-radio-group+.vxe-radio-group{margin-left:10px}.vxe-radio{cursor:pointer;display:inline-block;vertical-align:middle;white-space:nowrap;line-height:1}.vxe-radio .vxe-radio--icon{font-size:1.4em}.vxe-radio .vxe-radio--icon{color:var(--vxe-ui-input-border-color);vertical-align:middle;font-weight:700;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vxe-radio.is--checked{color:var(--vxe-ui-font-primary-color)}.vxe-radio.is--checked .vxe-radio--icon{color:var(--vxe-ui-font-primary-color)}.vxe-radio:not(.is--disabled){cursor:pointer}.vxe-radio:not(.is--disabled):hover .vxe-radio--icon{color:var(--vxe-ui-font-primary-color)}.vxe-radio.is--disabled{color:var(--vxe-ui-font-disabled-color);cursor:not-allowed}.vxe-radio.is--disabled .vxe-radio--icon{color:var(--vxe-ui-input-disabled-color)}.vxe-radio .vxe-radio--label{padding-left:.5em;vertical-align:middle}.vxe-radio>input[type=radio]{position:absolute;width:0;height:0;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vxe-radio .vxe-radio--label{vertical-align:middle;display:inline-block;max-width:50em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-radio:not(.is--disabled)>input:focus+.vxe-radio--icon{color:var(--vxe-primary-color)}.vxe-radio:not(.vxe-radio-button)+.vxe-radio{margin-left:10px}.vxe-radio-button .vxe-radio--label{background-color:var(--vxe-ui-radio-button-default-background-color)}.vxe-radio-button:first-child .vxe-radio--label{border-left:1px solid var(--vxe-ui-input-border-color);border-radius:var(--vxe-border-radius) 0 0 var(--vxe-border-radius)}.vxe-radio-button:last-child .vxe-radio--label{border-radius:0 var(--vxe-border-radius) var(--vxe-border-radius) 0}.vxe-radio-button>input:checked+.vxe-radio--label{color:#fff;background-color:var(--vxe-primary-color);border-color:var(--vxe-primary-color)}.vxe-radio-button .vxe-radio--label{padding:0 1em;line-height:calc(var(--vxe-button-height-default) - 2px);display:inline-block;border-style:solid;border-color:var(--vxe-ui-input-border-color);border-width:1px 1px 1px 0;max-width:50em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-radio-button.is--disabled{cursor:not-allowed}.vxe-radio-button.is--disabled>input:not(:checked)+.vxe-radio--label{color:var(--vxe-ui-input-disabled-color)}.vxe-radio-button.is--disabled>input:checked+.vxe-radio--label{border-color:var(--vxe-primary-lighten-color);background-color:var(--vxe-primary-lighten-color)}.vxe-radio-button:not(.is--disabled)>input:focus+.vxe-radio--label{border-color:var(--vxe-primary-color);box-shadow:0 0 .2em 0 var(--vxe-primary-color)}.vxe-radio-button:not(.is--disabled):hover>input:not(:checked)+.vxe-radio--label{color:var(--vxe-primary-color)}.vxe-radio-button.size--medium .vxe-radio--label{line-height:calc(var(--vxe-button-height-medium) - 2px)}.vxe-radio-button.size--small .vxe-radio--label{line-height:calc(var(--vxe-button-height-small) - 2px)}.vxe-radio-button.size--mini .vxe-radio--label{line-height:calc(var(--vxe-button-height-mini) - 2px)}.vxe-radio{font-size:var(--vxe-font-size)}.vxe-radio.size--medium{font-size:var(--vxe-font-size-medium)}.vxe-radio.size--small{font-size:var(--vxe-font-size-small)}.vxe-radio.size--mini{font-size:var(--vxe-font-size-mini)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import VxeRadioButtonComponent from '../radio/src/button';
|
|
2
|
+
import { dynamicApp } from '../dynamics';
|
|
3
|
+
export const VxeRadioButton = Object.assign(VxeRadioButtonComponent, {
|
|
4
|
+
install: function (app) {
|
|
5
|
+
app.component(VxeRadioButtonComponent.name, VxeRadioButtonComponent);
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
export const RadioButton = VxeRadioButton;
|
|
9
|
+
dynamicApp.component(VxeRadioButtonComponent.name, VxeRadioButtonComponent);
|
|
10
|
+
export default VxeRadioButton;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import VxeRadioGroupComponent from '../radio/src/group';
|
|
2
|
+
import { dynamicApp } from '../dynamics';
|
|
3
|
+
export const VxeRadioGroup = Object.assign(VxeRadioGroupComponent, {
|
|
4
|
+
install: function (app) {
|
|
5
|
+
app.component(VxeRadioGroupComponent.name, VxeRadioGroupComponent);
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
export const RadioGroup = VxeRadioGroup;
|
|
9
|
+
dynamicApp.component(VxeRadioGroupComponent.name, VxeRadioGroupComponent);
|
|
10
|
+
export default VxeRadioGroup;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import VxeSelectComponent from './src/select';
|
|
2
|
+
import { dynamicApp } from '../dynamics';
|
|
3
|
+
export const VxeSelect = Object.assign(VxeSelectComponent, {
|
|
4
|
+
install: function (app) {
|
|
5
|
+
app.component(VxeSelectComponent.name, VxeSelectComponent);
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
export const Select = VxeSelect;
|
|
9
|
+
dynamicApp.component(VxeSelectComponent.name, VxeSelectComponent);
|
|
10
|
+
export default VxeSelect;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent, h, onUnmounted, provide, inject, ref, onMounted } from 'vue';
|
|
2
|
+
import { createOption, watchOption, destroyOption, assemOption } from './util';
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: 'VxeOptgroup',
|
|
5
|
+
props: {
|
|
6
|
+
label: { type: [String, Number, Boolean], default: '' },
|
|
7
|
+
visible: { type: Boolean, default: null },
|
|
8
|
+
className: [String, Function],
|
|
9
|
+
disabled: Boolean
|
|
10
|
+
},
|
|
11
|
+
setup(props, { slots }) {
|
|
12
|
+
const elem = ref();
|
|
13
|
+
const $xeselect = inject('$xeselect', {});
|
|
14
|
+
const option = createOption($xeselect, props);
|
|
15
|
+
const xeoption = { option };
|
|
16
|
+
option.options = [];
|
|
17
|
+
provide('xeoptgroup', xeoption);
|
|
18
|
+
watchOption(props, option);
|
|
19
|
+
onMounted(() => {
|
|
20
|
+
assemOption($xeselect, elem.value, option);
|
|
21
|
+
});
|
|
22
|
+
onUnmounted(() => {
|
|
23
|
+
destroyOption($xeselect, option);
|
|
24
|
+
});
|
|
25
|
+
return () => {
|
|
26
|
+
return h('div', {
|
|
27
|
+
ref: elem
|
|
28
|
+
}, slots.default ? slots.default() : []);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent, h, onUnmounted, inject, ref, onMounted } from 'vue';
|
|
2
|
+
import { createOption, watchOption, destroyOption, assemOption } from './util';
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: 'VxeOption',
|
|
5
|
+
props: {
|
|
6
|
+
value: null,
|
|
7
|
+
label: { type: [String, Number, Boolean], default: '' },
|
|
8
|
+
visible: { type: Boolean, default: null },
|
|
9
|
+
className: [String, Function],
|
|
10
|
+
disabled: Boolean
|
|
11
|
+
},
|
|
12
|
+
setup(props, { slots }) {
|
|
13
|
+
const elem = ref();
|
|
14
|
+
const $xeselect = inject('$xeselect', {});
|
|
15
|
+
const optgroup = inject('xeoptgroup', null);
|
|
16
|
+
const option = createOption($xeselect, props);
|
|
17
|
+
option.slots = slots;
|
|
18
|
+
watchOption(props, option);
|
|
19
|
+
onMounted(() => {
|
|
20
|
+
assemOption($xeselect, elem.value, option, optgroup);
|
|
21
|
+
});
|
|
22
|
+
onUnmounted(() => {
|
|
23
|
+
destroyOption($xeselect, option);
|
|
24
|
+
});
|
|
25
|
+
return () => {
|
|
26
|
+
return h('div', {
|
|
27
|
+
ref: elem
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import XEUtils from 'xe-utils';
|
|
2
|
+
export class OptionInfo {
|
|
3
|
+
constructor($xeselect, _vm) {
|
|
4
|
+
Object.assign(this, {
|
|
5
|
+
id: XEUtils.uniqueId('option_'),
|
|
6
|
+
value: _vm.value,
|
|
7
|
+
label: _vm.label,
|
|
8
|
+
visible: _vm.visible,
|
|
9
|
+
className: _vm.className,
|
|
10
|
+
disabled: _vm.disabled
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
update(name, value) {
|
|
14
|
+
this[name] = value;
|
|
15
|
+
}
|
|
16
|
+
}
|