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,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
9
|
+
var _iconStore = _interopRequireDefault(require("../../ui/src/iconStore"));
|
|
10
|
+
var _renderer = require("../../ui/src/renderer");
|
|
11
|
+
var _utils = require("../../ui/src/utils");
|
|
12
|
+
var _vn = require("../../ui/src/vn");
|
|
13
|
+
var _i18n = require("../../ui/src/i18n");
|
|
14
|
+
var _render = require("./render");
|
|
15
|
+
var _util = require("./util");
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
const VxeFormConfigItem = (0, _vue.defineComponent)({
|
|
18
|
+
name: 'VxeFormConfigItem',
|
|
19
|
+
props: {
|
|
20
|
+
itemConfig: Object
|
|
21
|
+
},
|
|
22
|
+
setup(props) {
|
|
23
|
+
const $xeform = (0, _vue.inject)('$xeForm', {});
|
|
24
|
+
const xeformiteminfo = {
|
|
25
|
+
itemConfig: props.itemConfig
|
|
26
|
+
};
|
|
27
|
+
(0, _vue.provide)('$xeFormItemInfo', xeformiteminfo);
|
|
28
|
+
const renderVN = () => {
|
|
29
|
+
const {
|
|
30
|
+
reactData
|
|
31
|
+
} = $xeform;
|
|
32
|
+
const {
|
|
33
|
+
data,
|
|
34
|
+
rules,
|
|
35
|
+
span: allSpan,
|
|
36
|
+
align: allAlign,
|
|
37
|
+
titleAlign: allTitleAlign,
|
|
38
|
+
titleWidth: allTitleWidth,
|
|
39
|
+
titleColon: allTitleColon,
|
|
40
|
+
titleAsterisk: allTitleAsterisk,
|
|
41
|
+
titleOverflow: allTitleOverflow,
|
|
42
|
+
vertical: allVertical
|
|
43
|
+
} = $xeform.props;
|
|
44
|
+
const {
|
|
45
|
+
computeValidOpts
|
|
46
|
+
} = $xeform.getComputeMaps();
|
|
47
|
+
const item = props.itemConfig;
|
|
48
|
+
const {
|
|
49
|
+
collapseAll
|
|
50
|
+
} = reactData;
|
|
51
|
+
const validOpts = computeValidOpts.value;
|
|
52
|
+
const {
|
|
53
|
+
slots,
|
|
54
|
+
title,
|
|
55
|
+
visible,
|
|
56
|
+
folding,
|
|
57
|
+
field,
|
|
58
|
+
collapseNode,
|
|
59
|
+
itemRender,
|
|
60
|
+
showError,
|
|
61
|
+
errRule,
|
|
62
|
+
className,
|
|
63
|
+
titleOverflow,
|
|
64
|
+
vertical,
|
|
65
|
+
children,
|
|
66
|
+
showTitle,
|
|
67
|
+
contentClassName,
|
|
68
|
+
contentStyle,
|
|
69
|
+
titleClassName,
|
|
70
|
+
titleStyle
|
|
71
|
+
} = item;
|
|
72
|
+
const compConf = (0, _utils.isEnableConf)(itemRender) ? _renderer.renderer.get(itemRender.name) : null;
|
|
73
|
+
const itemClassName = compConf ? compConf.itemClassName : '';
|
|
74
|
+
const itemStyle = compConf ? compConf.itemStyle : null;
|
|
75
|
+
const itemContentClassName = compConf ? compConf.itemContentClassName : '';
|
|
76
|
+
const itemContentStyle = compConf ? compConf.itemContentStyle : null;
|
|
77
|
+
const itemTitleClassName = compConf ? compConf.itemTitleClassName : '';
|
|
78
|
+
const itemTitleStyle = compConf ? compConf.itemTitleStyle : null;
|
|
79
|
+
const defaultSlot = slots ? slots.default : null;
|
|
80
|
+
const titleSlot = slots ? slots.title : null;
|
|
81
|
+
const span = item.span || allSpan;
|
|
82
|
+
const align = item.align || allAlign;
|
|
83
|
+
const titleAlign = _xeUtils.default.eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign;
|
|
84
|
+
const titleWidth = _xeUtils.default.eqNull(item.titleWidth) ? allTitleWidth : item.titleWidth;
|
|
85
|
+
const titleColon = _xeUtils.default.eqNull(item.titleColon) ? allTitleColon : item.titleColon;
|
|
86
|
+
const titleAsterisk = _xeUtils.default.eqNull(item.titleAsterisk) ? allTitleAsterisk : item.titleAsterisk;
|
|
87
|
+
const itemOverflow = _xeUtils.default.isUndefined(titleOverflow) || _xeUtils.default.isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
|
|
88
|
+
const itemVertical = _xeUtils.default.isUndefined(vertical) || _xeUtils.default.isNull(vertical) ? allVertical : vertical;
|
|
89
|
+
const ovEllipsis = itemOverflow === 'ellipsis';
|
|
90
|
+
const ovTitle = itemOverflow === 'title';
|
|
91
|
+
const ovTooltip = itemOverflow === true || itemOverflow === 'tooltip';
|
|
92
|
+
const hasEllipsis = ovTitle || ovTooltip || ovEllipsis;
|
|
93
|
+
const params = {
|
|
94
|
+
data,
|
|
95
|
+
field,
|
|
96
|
+
property: field,
|
|
97
|
+
item,
|
|
98
|
+
$form: $xeform,
|
|
99
|
+
$grid: $xeform.xegrid
|
|
100
|
+
};
|
|
101
|
+
if (visible === false) {
|
|
102
|
+
return (0, _vue.createCommentVNode)();
|
|
103
|
+
}
|
|
104
|
+
let isRequired = false;
|
|
105
|
+
if (rules) {
|
|
106
|
+
const itemRules = rules[field];
|
|
107
|
+
if (itemRules) {
|
|
108
|
+
isRequired = itemRules.some(rule => rule.required);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// 如果为项集合
|
|
112
|
+
const isGather = children && children.length > 0;
|
|
113
|
+
if (isGather) {
|
|
114
|
+
const childVNs = children.map((childItem, index) => {
|
|
115
|
+
return (0, _vue.h)(VxeFormConfigItem, {
|
|
116
|
+
key: index,
|
|
117
|
+
itemConfig: childItem
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
return childVNs.length ? (0, _vue.h)('div', {
|
|
121
|
+
class: ['vxe-form--gather vxe-row', item.id, span ? `vxe-col--${span} is--span` : '', className ? _xeUtils.default.isFunction(className) ? className(params) : className : '']
|
|
122
|
+
}, childVNs) : (0, _vue.createCommentVNode)();
|
|
123
|
+
}
|
|
124
|
+
let contentVNs = [];
|
|
125
|
+
if (defaultSlot) {
|
|
126
|
+
contentVNs = $xeform.callSlot(defaultSlot, params);
|
|
127
|
+
} else if (compConf && compConf.renderItemContent) {
|
|
128
|
+
contentVNs = (0, _vn.getSlotVNs)(compConf.renderItemContent(itemRender, params));
|
|
129
|
+
} else if (field) {
|
|
130
|
+
contentVNs = [_xeUtils.default.toValueString(_xeUtils.default.get(data, field))];
|
|
131
|
+
}
|
|
132
|
+
if (collapseNode) {
|
|
133
|
+
contentVNs.push((0, _vue.h)('div', {
|
|
134
|
+
class: 'vxe-form--item-trigger-node',
|
|
135
|
+
onClick: $xeform.toggleCollapseEvent
|
|
136
|
+
}, [(0, _vue.h)('span', {
|
|
137
|
+
class: 'vxe-form--item-trigger-text'
|
|
138
|
+
}, collapseAll ? (0, _i18n.getI18n)('vxe.form.unfolding') : (0, _i18n.getI18n)('vxe.form.folding')), (0, _vue.h)('i', {
|
|
139
|
+
class: ['vxe-form--item-trigger-icon', collapseAll ? _iconStore.default.FORM_FOLDING : _iconStore.default.FORM_UNFOLDING]
|
|
140
|
+
})]));
|
|
141
|
+
}
|
|
142
|
+
if (errRule && validOpts.showMessage) {
|
|
143
|
+
contentVNs.push((0, _vue.h)('div', {
|
|
144
|
+
class: 'vxe-form--item-valid',
|
|
145
|
+
style: errRule.maxWidth ? {
|
|
146
|
+
width: `${errRule.maxWidth}px`
|
|
147
|
+
} : null
|
|
148
|
+
}, errRule.content));
|
|
149
|
+
}
|
|
150
|
+
const ons = ovTooltip ? {
|
|
151
|
+
onMouseenter(evnt) {
|
|
152
|
+
$xeform.triggerTitleTipEvent(evnt, params);
|
|
153
|
+
},
|
|
154
|
+
onMouseleave: $xeform.handleTitleTipLeaveEvent
|
|
155
|
+
} : {};
|
|
156
|
+
return (0, _vue.h)('div', {
|
|
157
|
+
class: ['vxe-form--item', item.id, span ? `vxe-col--${span} is--span` : '', className ? _xeUtils.default.isFunction(className) ? className(params) : className : '', itemClassName ? _xeUtils.default.isFunction(itemClassName) ? itemClassName(params) : itemClassName : '', {
|
|
158
|
+
'is--title': title,
|
|
159
|
+
'is--colon': titleColon,
|
|
160
|
+
'is--vertical': itemVertical,
|
|
161
|
+
'is--asterisk': titleAsterisk,
|
|
162
|
+
'is--required': isRequired,
|
|
163
|
+
'is--hidden': folding && collapseAll,
|
|
164
|
+
'is--active': (0, _util.isActivetem)($xeform, item),
|
|
165
|
+
'is--error': showError
|
|
166
|
+
}],
|
|
167
|
+
style: _xeUtils.default.isFunction(itemStyle) ? itemStyle(params) : itemStyle
|
|
168
|
+
}, [(0, _vue.h)('div', {
|
|
169
|
+
class: 'vxe-form--item-inner'
|
|
170
|
+
}, [showTitle !== false && (title || titleSlot) ? (0, _vue.h)('div', {
|
|
171
|
+
class: ['vxe-form--item-title', titleAlign ? `align--${titleAlign}` : '', hasEllipsis ? 'is--ellipsis' : '', itemTitleClassName ? _xeUtils.default.isFunction(itemTitleClassName) ? itemTitleClassName(params) : itemTitleClassName : '', titleClassName ? _xeUtils.default.isFunction(titleClassName) ? titleClassName(params) : titleClassName : ''],
|
|
172
|
+
style: Object.assign({}, _xeUtils.default.isFunction(itemTitleStyle) ? itemTitleStyle(params) : itemTitleStyle, _xeUtils.default.isFunction(titleStyle) ? titleStyle(params) : titleStyle, titleWidth ? {
|
|
173
|
+
width: isNaN(titleWidth) ? titleWidth : `${titleWidth}px`
|
|
174
|
+
} : null),
|
|
175
|
+
title: ovTitle ? (0, _utils.getFuncText)(title) : null,
|
|
176
|
+
...ons
|
|
177
|
+
}, (0, _render.renderTitle)($xeform, item)) : null, (0, _vue.h)('div', {
|
|
178
|
+
class: ['vxe-form--item-content', align ? `align--${align}` : '', itemContentClassName ? _xeUtils.default.isFunction(itemContentClassName) ? itemContentClassName(params) : itemContentClassName : '', contentClassName ? _xeUtils.default.isFunction(contentClassName) ? contentClassName(params) : contentClassName : ''],
|
|
179
|
+
style: Object.assign({}, _xeUtils.default.isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, _xeUtils.default.isFunction(contentStyle) ? contentStyle(params) : contentStyle)
|
|
180
|
+
}, contentVNs)])]);
|
|
181
|
+
};
|
|
182
|
+
const $xeformconfigitem = {
|
|
183
|
+
renderVN
|
|
184
|
+
};
|
|
185
|
+
(0, _vue.provide)('$xeFormGather', null);
|
|
186
|
+
return $xeformconfigitem;
|
|
187
|
+
},
|
|
188
|
+
render() {
|
|
189
|
+
return this.renderVN();
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
var _default = exports.default = VxeFormConfigItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_iconStore=_interopRequireDefault(require("../../ui/src/iconStore")),_renderer=require("../../ui/src/renderer"),_utils=require("../../ui/src/utils"),_vn=require("../../ui/src/vn"),_i18n=require("../../ui/src/i18n"),_render=require("./render"),_util=require("./util");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const VxeFormConfigItem=(0,_vue.defineComponent)({name:"VxeFormConfigItem",props:{itemConfig:Object},setup(G){const L=(0,_vue.inject)("$xeForm",{});var e={itemConfig:G.itemConfig},e=((0,_vue.provide)("$xeFormItemInfo",e),{renderVN:()=>{var e=L["reactData"],{data:t,rules:i,span:l,align:n,titleAlign:r,titleWidth:s,titleColon:u,titleAsterisk:o,titleOverflow:a,vertical:d}=L.props,f=L.getComputeMaps()["computeValidOpts"],m=G.itemConfig,e=e["collapseAll"],f=f.value,{slots:_,title:v,visible:c,folding:b,field:x,collapseNode:k,itemRender:g,showError:D,errRule:p,className:h,titleOverflow:C,vertical:U,children:F,showTitle:j,contentClassName:N,contentStyle:q,titleClassName:y,titleStyle:I}=m,S=(0,_utils.isEnableConf)(g)?_renderer.renderer.get(g.name):null,O=S?S.itemClassName:"",V=S?S.itemStyle:null,T=S?S.itemContentClassName:"",w=S?S.itemContentStyle:null,A=S?S.itemTitleClassName:"",M=S?S.itemTitleStyle:null,E=_?_.default:null,_=_?_.title:null,l=m.span||l,n=m.align||n,r=_xeUtils.default.eqNull(m.titleAlign)?r:m.titleAlign,s=_xeUtils.default.eqNull(m.titleWidth)?s:m.titleWidth,u=_xeUtils.default.eqNull(m.titleColon)?u:m.titleColon,o=_xeUtils.default.eqNull(m.titleAsterisk)?o:m.titleAsterisk,a=_xeUtils.default.isUndefined(C)||_xeUtils.default.isNull(C)?a:C,C=_xeUtils.default.isUndefined(U)||_xeUtils.default.isNull(U)?d:U,d="title"===a,U=!0===a||"tooltip"===a,a=d||U||"ellipsis"===a;const R={data:t,field:x,property:x,item:m,$form:L,$grid:L.xegrid};if(!1===c)return(0,_vue.createCommentVNode)();let W=!1;if(i&&(c=i[x])&&(W=c.some(e=>e.required)),F&&0<F.length)return(i=F.map((e,t)=>(0,_vue.h)(VxeFormConfigItem,{key:t,itemConfig:e}))).length?(0,_vue.h)("div",{class:["vxe-form--gather vxe-row",m.id,l?`vxe-col--${l} is--span`:"",h?_xeUtils.default.isFunction(h)?h(R):h:""]},i):(0,_vue.createCommentVNode)();let $=[];E?$=L.callSlot(E,R):S&&S.renderItemContent?$=(0,_vn.getSlotVNs)(S.renderItemContent(g,R)):x&&($=[_xeUtils.default.toValueString(_xeUtils.default.get(t,x))]),k&&$.push((0,_vue.h)("div",{class:"vxe-form--item-trigger-node",onClick:L.toggleCollapseEvent},[(0,_vue.h)("span",{class:"vxe-form--item-trigger-text"},e?(0,_i18n.getI18n)("vxe.form.unfolding"):(0,_i18n.getI18n)("vxe.form.folding")),(0,_vue.h)("i",{class:["vxe-form--item-trigger-icon",e?_iconStore.default.FORM_FOLDING:_iconStore.default.FORM_UNFOLDING]})])),p&&f.showMessage&&$.push((0,_vue.h)("div",{class:"vxe-form--item-valid",style:p.maxWidth?{width:p.maxWidth+"px"}:null},p.content));c=U?{onMouseenter(e){L.triggerTitleTipEvent(e,R)},onMouseleave:L.handleTitleTipLeaveEvent}:{};return(0,_vue.h)("div",{class:["vxe-form--item",m.id,l?`vxe-col--${l} is--span`:"",h?_xeUtils.default.isFunction(h)?h(R):h:"",O?_xeUtils.default.isFunction(O)?O(R):O:"",{"is--title":v,"is--colon":u,"is--vertical":C,"is--asterisk":o,"is--required":W,"is--hidden":b&&e,"is--active":(0,_util.isActivetem)(L,m),"is--error":D}],style:_xeUtils.default.isFunction(V)?V(R):V},[(0,_vue.h)("div",{class:"vxe-form--item-inner"},[!1!==j&&(v||_)?(0,_vue.h)("div",{class:["vxe-form--item-title",r?"align--"+r:"",a?"is--ellipsis":"",A?_xeUtils.default.isFunction(A)?A(R):A:"",y?_xeUtils.default.isFunction(y)?y(R):y:""],style:Object.assign({},_xeUtils.default.isFunction(M)?M(R):M,_xeUtils.default.isFunction(I)?I(R):I,s?{width:isNaN(s)?s:s+"px"}:null),title:d?(0,_utils.getFuncText)(v):null,...c},(0,_render.renderTitle)(L,m)):null,(0,_vue.h)("div",{class:["vxe-form--item-content",n?"align--"+n:"",T?_xeUtils.default.isFunction(T)?T(R):T:"",N?_xeUtils.default.isFunction(N)?N(R):N:""],style:Object.assign({},_xeUtils.default.isFunction(w)?w(R):w,_xeUtils.default.isFunction(q)?q(R):q)},$)])])}});return(0,_vue.provide)("$xeFormGather",null),e},render(){return this.renderVN()}});var _default=exports.default=VxeFormConfigItem;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
var _log = require("../../ui/src/log");
|
|
9
|
+
var _util = require("./util");
|
|
10
|
+
var _formItem = require("./form-item");
|
|
11
|
+
var _default = exports.default = (0, _vue.defineComponent)({
|
|
12
|
+
name: 'VxeFormGather',
|
|
13
|
+
props: _formItem.formItemProps,
|
|
14
|
+
setup(props, {
|
|
15
|
+
slots
|
|
16
|
+
}) {
|
|
17
|
+
const refElem = (0, _vue.ref)();
|
|
18
|
+
const $xeForm = (0, _vue.inject)('$xeForm', {});
|
|
19
|
+
const parentFormGather = (0, _vue.inject)('$xeFormGather', null);
|
|
20
|
+
const defaultSlot = slots.default;
|
|
21
|
+
const formItem = (0, _vue.reactive)((0, _util.createItem)($xeForm, props));
|
|
22
|
+
formItem.children = [];
|
|
23
|
+
const formItemInfo = {
|
|
24
|
+
itemConfig: formItem
|
|
25
|
+
};
|
|
26
|
+
(0, _vue.provide)('$xeFormItemInfo', formItemInfo);
|
|
27
|
+
(0, _util.watchItem)(props, formItem);
|
|
28
|
+
(0, _vue.onMounted)(() => {
|
|
29
|
+
(0, _util.assemItem)($xeForm, refElem.value, formItem, parentFormGather);
|
|
30
|
+
});
|
|
31
|
+
(0, _vue.onUnmounted)(() => {
|
|
32
|
+
(0, _util.destroyItem)($xeForm, formItem);
|
|
33
|
+
});
|
|
34
|
+
if (process.env.NODE_ENV === 'development') {
|
|
35
|
+
(0, _vue.nextTick)(() => {
|
|
36
|
+
if ($xeForm && $xeForm.props.customLayout) {
|
|
37
|
+
(0, _log.errLog)('vxe.error.errConflicts', ['custom-layout', '<form-gather ...>']);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const renderVN = () => {
|
|
42
|
+
return (0, _vue.h)('div', {
|
|
43
|
+
ref: refElem
|
|
44
|
+
}, defaultSlot ? defaultSlot() : []);
|
|
45
|
+
};
|
|
46
|
+
const $xeFormGather = {
|
|
47
|
+
formItem,
|
|
48
|
+
renderVN
|
|
49
|
+
};
|
|
50
|
+
(0, _vue.provide)('$xeFormGather', $xeFormGather);
|
|
51
|
+
(0, _vue.provide)('$xeFormItem', null);
|
|
52
|
+
return $xeFormGather;
|
|
53
|
+
},
|
|
54
|
+
render() {
|
|
55
|
+
return this.renderVN();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_log=require("../../ui/src/log"),_util=require("./util"),_formItem=require("./form-item"),_default=exports.default=(0,_vue.defineComponent)({name:"VxeFormGather",props:_formItem.formItemProps,setup(e,{slots:r}){const t=(0,_vue.ref)(),o=(0,_vue.inject)("$xeForm",{}),u=(0,_vue.inject)("$xeFormGather",null),m=r.default,i=(0,_vue.reactive)((0,_util.createItem)(o,e));i.children=[];r={itemConfig:i},(0,_vue.provide)("$xeFormItemInfo",r),(0,_util.watchItem)(e,i),(0,_vue.onMounted)(()=>{(0,_util.assemItem)(o,t.value,i,u)}),(0,_vue.onUnmounted)(()=>{(0,_util.destroyItem)(o,i)}),"development"===process.env.NODE_ENV&&(0,_vue.nextTick)(()=>{o&&o.props.customLayout&&(0,_log.errLog)("vxe.error.errConflicts",["custom-layout","<form-gather ...>"])}),r={formItem:i,renderVN:()=>(0,_vue.h)("div",{ref:t},m?m():[])};return(0,_vue.provide)("$xeFormGather",r),(0,_vue.provide)("$xeFormItem",null),r},render(){return this.renderVN()}});
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formItemProps = exports.default = void 0;
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
var _xeUtils = _interopRequireDefault(require("xe-utils"));
|
|
9
|
+
var _iconStore = _interopRequireDefault(require("../../ui/src/iconStore"));
|
|
10
|
+
var _renderer = require("../../ui/src/renderer");
|
|
11
|
+
var _utils = require("../../ui/src/utils");
|
|
12
|
+
var _vn = require("../../ui/src/vn");
|
|
13
|
+
var _i18n = require("../../ui/src/i18n");
|
|
14
|
+
var _util = require("./util");
|
|
15
|
+
var _render = require("./render");
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
const formItemProps = exports.formItemProps = {
|
|
18
|
+
title: String,
|
|
19
|
+
field: String,
|
|
20
|
+
span: [String, Number],
|
|
21
|
+
align: String,
|
|
22
|
+
titleAlign: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
titleWidth: {
|
|
27
|
+
type: [String, Number],
|
|
28
|
+
default: null
|
|
29
|
+
},
|
|
30
|
+
titleColon: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
34
|
+
titleAsterisk: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: null
|
|
37
|
+
},
|
|
38
|
+
showTitle: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true
|
|
41
|
+
},
|
|
42
|
+
vertical: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: null
|
|
45
|
+
},
|
|
46
|
+
className: [String, Function],
|
|
47
|
+
contentClassName: [String, Function],
|
|
48
|
+
contentStyle: [Object, Function],
|
|
49
|
+
titleClassName: [String, Function],
|
|
50
|
+
titleStyle: [Object, Function],
|
|
51
|
+
titleOverflow: {
|
|
52
|
+
type: [Boolean, String],
|
|
53
|
+
default: null
|
|
54
|
+
},
|
|
55
|
+
titlePrefix: Object,
|
|
56
|
+
titleSuffix: Object,
|
|
57
|
+
resetValue: {
|
|
58
|
+
default: null
|
|
59
|
+
},
|
|
60
|
+
visibleMethod: Function,
|
|
61
|
+
visible: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: null
|
|
64
|
+
},
|
|
65
|
+
folding: Boolean,
|
|
66
|
+
collapseNode: Boolean,
|
|
67
|
+
itemRender: Object
|
|
68
|
+
};
|
|
69
|
+
var _default = exports.default = (0, _vue.defineComponent)({
|
|
70
|
+
name: 'VxeFormItem',
|
|
71
|
+
props: formItemProps,
|
|
72
|
+
setup(props, {
|
|
73
|
+
slots
|
|
74
|
+
}) {
|
|
75
|
+
const refElem = (0, _vue.ref)();
|
|
76
|
+
const $xeform = (0, _vue.inject)('$xeForm', {});
|
|
77
|
+
const formGather = (0, _vue.inject)('$xeformgather', null);
|
|
78
|
+
const formItem = (0, _vue.reactive)((0, _util.createItem)($xeform, props));
|
|
79
|
+
formItem.slots = slots;
|
|
80
|
+
const formItemInfo = {
|
|
81
|
+
itemConfig: formItem
|
|
82
|
+
};
|
|
83
|
+
(0, _vue.provide)('$xeFormItemInfo', formItemInfo);
|
|
84
|
+
(0, _util.watchItem)(props, formItem);
|
|
85
|
+
(0, _vue.onMounted)(() => {
|
|
86
|
+
(0, _util.assemItem)($xeform, refElem.value, formItem, formGather);
|
|
87
|
+
});
|
|
88
|
+
(0, _vue.onUnmounted)(() => {
|
|
89
|
+
(0, _util.destroyItem)($xeform, formItem);
|
|
90
|
+
});
|
|
91
|
+
const renderItem = ($xeform, item) => {
|
|
92
|
+
const {
|
|
93
|
+
props,
|
|
94
|
+
reactData
|
|
95
|
+
} = $xeform;
|
|
96
|
+
const {
|
|
97
|
+
data,
|
|
98
|
+
rules,
|
|
99
|
+
titleAlign: allTitleAlign,
|
|
100
|
+
titleWidth: allTitleWidth,
|
|
101
|
+
titleColon: allTitleColon,
|
|
102
|
+
titleAsterisk: allTitleAsterisk,
|
|
103
|
+
titleOverflow: allTitleOverflow,
|
|
104
|
+
vertical: allVertical
|
|
105
|
+
} = props;
|
|
106
|
+
const {
|
|
107
|
+
collapseAll
|
|
108
|
+
} = reactData;
|
|
109
|
+
const {
|
|
110
|
+
computeValidOpts
|
|
111
|
+
} = $xeform.getComputeMaps();
|
|
112
|
+
const validOpts = computeValidOpts.value;
|
|
113
|
+
const {
|
|
114
|
+
slots,
|
|
115
|
+
title,
|
|
116
|
+
visible,
|
|
117
|
+
folding,
|
|
118
|
+
field,
|
|
119
|
+
collapseNode,
|
|
120
|
+
itemRender,
|
|
121
|
+
showError,
|
|
122
|
+
errRule,
|
|
123
|
+
className,
|
|
124
|
+
titleOverflow,
|
|
125
|
+
vertical,
|
|
126
|
+
showTitle,
|
|
127
|
+
contentClassName,
|
|
128
|
+
contentStyle,
|
|
129
|
+
titleClassName,
|
|
130
|
+
titleStyle
|
|
131
|
+
} = item;
|
|
132
|
+
const compConf = (0, _utils.isEnableConf)(itemRender) ? _renderer.renderer.get(itemRender.name) : null;
|
|
133
|
+
const itemClassName = compConf ? compConf.itemClassName : '';
|
|
134
|
+
const itemStyle = compConf ? compConf.itemStyle : null;
|
|
135
|
+
const itemContentClassName = compConf ? compConf.itemContentClassName : '';
|
|
136
|
+
const itemContentStyle = compConf ? compConf.itemContentStyle : null;
|
|
137
|
+
const itemTitleClassName = compConf ? compConf.itemTitleClassName : '';
|
|
138
|
+
const itemTitleStyle = compConf ? compConf.itemTitleStyle : null;
|
|
139
|
+
const defaultSlot = slots ? slots.default : null;
|
|
140
|
+
const titleSlot = slots ? slots.title : null;
|
|
141
|
+
const span = item.span || props.span;
|
|
142
|
+
const align = item.align || props.align;
|
|
143
|
+
const titleAlign = _xeUtils.default.eqNull(item.titleAlign) ? allTitleAlign : item.titleAlign;
|
|
144
|
+
const titleWidth = _xeUtils.default.eqNull(item.titleWidth) ? allTitleWidth : item.titleWidth;
|
|
145
|
+
const titleColon = _xeUtils.default.eqNull(item.titleColon) ? allTitleColon : item.titleColon;
|
|
146
|
+
const titleAsterisk = _xeUtils.default.eqNull(item.titleAsterisk) ? allTitleAsterisk : item.titleAsterisk;
|
|
147
|
+
const itemOverflow = _xeUtils.default.isUndefined(titleOverflow) || _xeUtils.default.isNull(titleOverflow) ? allTitleOverflow : titleOverflow;
|
|
148
|
+
const itemVertical = _xeUtils.default.isUndefined(vertical) || _xeUtils.default.isNull(vertical) ? allVertical : vertical;
|
|
149
|
+
const ovEllipsis = itemOverflow === 'ellipsis';
|
|
150
|
+
const ovTitle = itemOverflow === 'title';
|
|
151
|
+
const ovTooltip = itemOverflow === true || itemOverflow === 'tooltip';
|
|
152
|
+
const hasEllipsis = ovTitle || ovTooltip || ovEllipsis;
|
|
153
|
+
const params = {
|
|
154
|
+
data,
|
|
155
|
+
field,
|
|
156
|
+
property: field,
|
|
157
|
+
item,
|
|
158
|
+
$form: $xeform,
|
|
159
|
+
$grid: $xeform.xegrid
|
|
160
|
+
};
|
|
161
|
+
let isRequired = false;
|
|
162
|
+
if (visible === false) {
|
|
163
|
+
return (0, _vue.createCommentVNode)();
|
|
164
|
+
}
|
|
165
|
+
if (rules) {
|
|
166
|
+
const itemRules = rules[field];
|
|
167
|
+
if (itemRules) {
|
|
168
|
+
isRequired = itemRules.some(rule => rule.required);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
let contentVNs = [];
|
|
172
|
+
if (defaultSlot) {
|
|
173
|
+
contentVNs = $xeform.callSlot(defaultSlot, params);
|
|
174
|
+
} else if (compConf && compConf.renderItemContent) {
|
|
175
|
+
contentVNs = (0, _vn.getSlotVNs)(compConf.renderItemContent(itemRender, params));
|
|
176
|
+
} else if (field) {
|
|
177
|
+
contentVNs = [`${_xeUtils.default.get(data, field)}`];
|
|
178
|
+
}
|
|
179
|
+
if (collapseNode) {
|
|
180
|
+
contentVNs.push((0, _vue.h)('div', {
|
|
181
|
+
class: 'vxe-form--item-trigger-node',
|
|
182
|
+
onClick: $xeform.toggleCollapseEvent
|
|
183
|
+
}, [(0, _vue.h)('span', {
|
|
184
|
+
class: 'vxe-form--item-trigger-text'
|
|
185
|
+
}, collapseAll ? (0, _i18n.getI18n)('vxe.form.unfolding') : (0, _i18n.getI18n)('vxe.form.folding')), (0, _vue.h)('i', {
|
|
186
|
+
class: ['vxe-form--item-trigger-icon', collapseAll ? _iconStore.default.FORM_FOLDING : _iconStore.default.FORM_UNFOLDING]
|
|
187
|
+
})]));
|
|
188
|
+
}
|
|
189
|
+
if (errRule && validOpts.showMessage) {
|
|
190
|
+
contentVNs.push((0, _vue.h)('div', {
|
|
191
|
+
class: 'vxe-form--item-valid',
|
|
192
|
+
style: errRule.maxWidth ? {
|
|
193
|
+
width: `${errRule.maxWidth}px`
|
|
194
|
+
} : null
|
|
195
|
+
}, errRule.message));
|
|
196
|
+
}
|
|
197
|
+
const ons = ovTooltip ? {
|
|
198
|
+
onMouseenter(evnt) {
|
|
199
|
+
$xeform.triggerTitleTipEvent(evnt, params);
|
|
200
|
+
},
|
|
201
|
+
onMouseleave: $xeform.handleTitleTipLeaveEvent
|
|
202
|
+
} : {};
|
|
203
|
+
return (0, _vue.h)('div', {
|
|
204
|
+
ref: refElem,
|
|
205
|
+
class: ['vxe-form--item', item.id, span ? `vxe-col--${span} is--span` : '', className ? _xeUtils.default.isFunction(className) ? className(params) : className : '', itemClassName ? _xeUtils.default.isFunction(itemClassName) ? itemClassName(params) : itemClassName : '', {
|
|
206
|
+
'is--title': title,
|
|
207
|
+
'is--colon': titleColon,
|
|
208
|
+
'is--vertical': itemVertical,
|
|
209
|
+
'is--asterisk': titleAsterisk,
|
|
210
|
+
'is--required': isRequired,
|
|
211
|
+
'is--hidden': folding && collapseAll,
|
|
212
|
+
'is--active': (0, _util.isActivetem)($xeform, item),
|
|
213
|
+
'is--error': showError
|
|
214
|
+
}],
|
|
215
|
+
style: _xeUtils.default.isFunction(itemStyle) ? itemStyle(params) : itemStyle
|
|
216
|
+
}, [(0, _vue.h)('div', {
|
|
217
|
+
class: 'vxe-form--item-inner'
|
|
218
|
+
}, [showTitle !== false && (title || titleSlot) ? (0, _vue.h)('div', {
|
|
219
|
+
class: ['vxe-form--item-title', titleAlign ? `align--${titleAlign}` : '', hasEllipsis ? 'is--ellipsis' : '', itemTitleClassName ? _xeUtils.default.isFunction(itemTitleClassName) ? itemTitleClassName(params) : itemTitleClassName : '', titleClassName ? _xeUtils.default.isFunction(titleClassName) ? titleClassName(params) : titleClassName : ''],
|
|
220
|
+
style: Object.assign({}, _xeUtils.default.isFunction(itemTitleStyle) ? itemTitleStyle(params) : itemTitleStyle, _xeUtils.default.isFunction(titleStyle) ? titleStyle(params) : titleStyle, titleWidth ? {
|
|
221
|
+
width: isNaN(titleWidth) ? titleWidth : `${titleWidth}px`
|
|
222
|
+
} : null),
|
|
223
|
+
title: ovTitle ? (0, _utils.getFuncText)(title) : null,
|
|
224
|
+
...ons
|
|
225
|
+
}, (0, _render.renderTitle)($xeform, item)) : null, (0, _vue.h)('div', {
|
|
226
|
+
class: ['vxe-form--item-content', align ? `align--${align}` : '', itemContentClassName ? _xeUtils.default.isFunction(itemContentClassName) ? itemContentClassName(params) : itemContentClassName : '', contentClassName ? _xeUtils.default.isFunction(contentClassName) ? contentClassName(params) : contentClassName : ''],
|
|
227
|
+
style: Object.assign({}, _xeUtils.default.isFunction(itemContentStyle) ? itemContentStyle(params) : itemContentStyle, _xeUtils.default.isFunction(contentStyle) ? contentStyle(params) : contentStyle)
|
|
228
|
+
}, contentVNs)])]);
|
|
229
|
+
};
|
|
230
|
+
const renderVN = () => {
|
|
231
|
+
const formProps = $xeform ? $xeform.props : null;
|
|
232
|
+
return formProps && formProps.customLayout ? renderItem($xeform, formItem) : (0, _vue.h)('div', {
|
|
233
|
+
ref: refElem
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
const $xeformitem = {
|
|
237
|
+
formItem,
|
|
238
|
+
renderVN
|
|
239
|
+
};
|
|
240
|
+
(0, _vue.provide)('$xeformitem', $xeformitem);
|
|
241
|
+
(0, _vue.provide)('$xeformgather', null);
|
|
242
|
+
return $xeformitem;
|
|
243
|
+
},
|
|
244
|
+
render() {
|
|
245
|
+
return this.renderVN();
|
|
246
|
+
}
|
|
247
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formItemProps=exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_iconStore=_interopRequireDefault(require("../../ui/src/iconStore")),_renderer=require("../../ui/src/renderer"),_utils=require("../../ui/src/utils"),_vn=require("../../ui/src/vn"),_i18n=require("../../ui/src/i18n"),_util=require("./util"),_render=require("./render");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const formItemProps=exports.formItemProps={title:String,field:String,span:[String,Number],align:String,titleAlign:{type:String,default:null},titleWidth:{type:[String,Number],default:null},titleColon:{type:Boolean,default:null},titleAsterisk:{type:Boolean,default:null},showTitle:{type:Boolean,default:!0},vertical:{type:Boolean,default:null},className:[String,Function],contentClassName:[String,Function],contentStyle:[Object,Function],titleClassName:[String,Function],titleStyle:[Object,Function],titleOverflow:{type:[Boolean,String],default:null},titlePrefix:Object,titleSuffix:Object,resetValue:{default:null},visibleMethod:Function,visible:{type:Boolean,default:null},folding:Boolean,collapseNode:Boolean,itemRender:Object};var _default=exports.default=(0,_vue.defineComponent)({name:"VxeFormItem",props:formItemProps,setup(e,{slots:t}){const W=(0,_vue.ref)(),E=(0,_vue.inject)("$xeForm",{}),l=(0,_vue.inject)("$xeformgather",null),L=(0,_vue.reactive)((0,_util.createItem)(E,e));L.slots=t;t={itemConfig:L};(0,_vue.provide)("$xeFormItemInfo",t),(0,_util.watchItem)(e,L),(0,_vue.onMounted)(()=>{(0,_util.assemItem)(E,W.value,L,l)}),(0,_vue.onUnmounted)(()=>{(0,_util.destroyItem)(E,L)});t={formItem:L,renderVN:()=>{var l=E?E.props:null;if(l&&l.customLayout){var i=E,l=L,{props:n,reactData:r}=i,{data:s,rules:u,titleAlign:o,titleWidth:a,titleColon:d,titleAsterisk:f,titleOverflow:m,vertical:c}=n,r=r["collapseAll"],v=(v=i.getComputeMaps()["computeValidOpts"]).value,{slots:_,title:p,visible:x,folding:V,field:g,collapseNode:k,itemRender:h,showError:D,errRule:N,className:F,titleOverflow:U,vertical:S,showTitle:P,contentClassName:y,contentStyle:C,titleClassName:q,titleStyle:I}=l,O=(0,_utils.isEnableConf)(h)?_renderer.renderer.get(h.name):null,b=O?O.itemClassName:"",j=O?O.itemStyle:null,w=O?O.itemContentClassName:"",A=O?O.itemContentStyle:null,M=O?O.itemTitleClassName:"",T=O?O.itemTitleStyle:null,B=_?_.default:null,_=_?_.title:null,R=l.span||n.span,n=l.align||n.align,o=_xeUtils.default.eqNull(l.titleAlign)?o:l.titleAlign,a=_xeUtils.default.eqNull(l.titleWidth)?a:l.titleWidth,d=_xeUtils.default.eqNull(l.titleColon)?d:l.titleColon,f=_xeUtils.default.eqNull(l.titleAsterisk)?f:l.titleAsterisk,m=_xeUtils.default.isUndefined(U)||_xeUtils.default.isNull(U)?m:U,U=_xeUtils.default.isUndefined(S)||_xeUtils.default.isNull(S)?c:S,S=!0===m||"tooltip"===m,m=(c="title"===m)||S||"ellipsis"===m;const $={data:s,field:g,property:g,item:l,$form:i,$grid:i.xegrid};let e=!1;if(!1===x)return(0,_vue.createCommentVNode)();u&&(x=u[g])&&(e=x.some(e=>e.required));let t=[];return B?t=i.callSlot(B,$):O&&O.renderItemContent?t=(0,_vn.getSlotVNs)(O.renderItemContent(h,$)):g&&(t=[""+_xeUtils.default.get(s,g)]),k&&t.push((0,_vue.h)("div",{class:"vxe-form--item-trigger-node",onClick:i.toggleCollapseEvent},[(0,_vue.h)("span",{class:"vxe-form--item-trigger-text"},r?(0,_i18n.getI18n)("vxe.form.unfolding"):(0,_i18n.getI18n)("vxe.form.folding")),(0,_vue.h)("i",{class:["vxe-form--item-trigger-icon",r?_iconStore.default.FORM_FOLDING:_iconStore.default.FORM_UNFOLDING]})])),N&&v.showMessage&&t.push((0,_vue.h)("div",{class:"vxe-form--item-valid",style:N.maxWidth?{width:N.maxWidth+"px"}:null},N.message)),u=S?{onMouseenter(e){i.triggerTitleTipEvent(e,$)},onMouseleave:i.handleTitleTipLeaveEvent}:{},(0,_vue.h)("div",{ref:W,class:["vxe-form--item",l.id,R?`vxe-col--${R} is--span`:"",F?_xeUtils.default.isFunction(F)?F($):F:"",b?_xeUtils.default.isFunction(b)?b($):b:"",{"is--title":p,"is--colon":d,"is--vertical":U,"is--asterisk":f,"is--required":e,"is--hidden":V&&r,"is--active":(0,_util.isActivetem)(i,l),"is--error":D}],style:_xeUtils.default.isFunction(j)?j($):j},[(0,_vue.h)("div",{class:"vxe-form--item-inner"},[!1!==P&&(p||_)?(0,_vue.h)("div",{class:["vxe-form--item-title",o?"align--"+o:"",m?"is--ellipsis":"",M?_xeUtils.default.isFunction(M)?M($):M:"",q?_xeUtils.default.isFunction(q)?q($):q:""],style:Object.assign({},_xeUtils.default.isFunction(T)?T($):T,_xeUtils.default.isFunction(I)?I($):I,a?{width:isNaN(a)?a:a+"px"}:null),title:c?(0,_utils.getFuncText)(p):null,...u},(0,_render.renderTitle)(i,l)):null,(0,_vue.h)("div",{class:["vxe-form--item-content",n?"align--"+n:"",w?_xeUtils.default.isFunction(w)?w($):w:"",y?_xeUtils.default.isFunction(y)?y($):y:""],style:Object.assign({},_xeUtils.default.isFunction(A)?A($):A,_xeUtils.default.isFunction(C)?C($):C)},t)])])}return(0,_vue.h)("div",{ref:W})}};return(0,_vue.provide)("$xeformitem",t),(0,_vue.provide)("$xeformgather",null),t},render(){return this.renderVN()}});
|