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,768 @@
|
|
|
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 _globalStore = _interopRequireDefault(require("../../ui/src/globalStore"));
|
|
10
|
+
var _renderer = require("../../ui/src/renderer");
|
|
11
|
+
var _validators = require("../../ui/src/validators");
|
|
12
|
+
var _utils = require("../../ui/src/utils");
|
|
13
|
+
var _log = require("../../ui/src/log");
|
|
14
|
+
var _dom = require("../../ui/src/dom");
|
|
15
|
+
var _util = require("./util");
|
|
16
|
+
var _size = require("../../hooks/size");
|
|
17
|
+
var _tooltip = _interopRequireDefault(require("../../tooltip"));
|
|
18
|
+
var _formConfigItem = _interopRequireDefault(require("./form-config-item"));
|
|
19
|
+
var _index = _interopRequireDefault(require("../../loading/index"));
|
|
20
|
+
var _vn = require("../../ui/src/vn");
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
class Rule {
|
|
23
|
+
constructor(rule) {
|
|
24
|
+
Object.assign(this, {
|
|
25
|
+
$options: rule,
|
|
26
|
+
required: rule.required,
|
|
27
|
+
min: rule.min,
|
|
28
|
+
max: rule.min,
|
|
29
|
+
type: rule.type,
|
|
30
|
+
pattern: rule.pattern,
|
|
31
|
+
validator: rule.validator,
|
|
32
|
+
trigger: rule.trigger,
|
|
33
|
+
maxWidth: rule.maxWidth
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
get content() {
|
|
37
|
+
return (0, _utils.getFuncText)(this.$options.content || this.$options.message);
|
|
38
|
+
}
|
|
39
|
+
get message() {
|
|
40
|
+
return this.content;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const validErrorRuleValue = (rule, val) => {
|
|
44
|
+
const {
|
|
45
|
+
type,
|
|
46
|
+
min,
|
|
47
|
+
max,
|
|
48
|
+
pattern
|
|
49
|
+
} = rule;
|
|
50
|
+
const isNumType = type === 'number';
|
|
51
|
+
const numVal = isNumType ? _xeUtils.default.toNumber(val) : _xeUtils.default.getSize(val);
|
|
52
|
+
// 判断数值
|
|
53
|
+
if (isNumType && isNaN(val)) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
// 如果存在 min,判断最小值
|
|
57
|
+
if (!_xeUtils.default.eqNull(min) && numVal < _xeUtils.default.toNumber(min)) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
// 如果存在 max,判断最大值
|
|
61
|
+
if (!_xeUtils.default.eqNull(max) && numVal > _xeUtils.default.toNumber(max)) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
// 如果存在 pattern,正则校验
|
|
65
|
+
if (pattern && !(_xeUtils.default.isRegExp(pattern) ? pattern : new RegExp(pattern)).test(val)) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
};
|
|
70
|
+
function getResetValue(value, resetValue) {
|
|
71
|
+
if (_xeUtils.default.isArray(value)) {
|
|
72
|
+
resetValue = [];
|
|
73
|
+
}
|
|
74
|
+
return resetValue;
|
|
75
|
+
}
|
|
76
|
+
var _default = exports.default = (0, _vue.defineComponent)({
|
|
77
|
+
name: 'VxeForm',
|
|
78
|
+
props: {
|
|
79
|
+
collapseStatus: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: true
|
|
82
|
+
},
|
|
83
|
+
loading: Boolean,
|
|
84
|
+
data: Object,
|
|
85
|
+
size: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: () => _globalStore.default.form.size || _globalStore.default.size
|
|
88
|
+
},
|
|
89
|
+
span: {
|
|
90
|
+
type: [String, Number],
|
|
91
|
+
default: () => _globalStore.default.form.span
|
|
92
|
+
},
|
|
93
|
+
align: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: () => _globalStore.default.form.align
|
|
96
|
+
},
|
|
97
|
+
titleAlign: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: () => _globalStore.default.form.titleAlign
|
|
100
|
+
},
|
|
101
|
+
titleWidth: {
|
|
102
|
+
type: [String, Number],
|
|
103
|
+
default: () => _globalStore.default.form.titleWidth
|
|
104
|
+
},
|
|
105
|
+
titleColon: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: () => _globalStore.default.form.titleColon
|
|
108
|
+
},
|
|
109
|
+
titleAsterisk: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: () => _globalStore.default.form.titleAsterisk
|
|
112
|
+
},
|
|
113
|
+
titleOverflow: {
|
|
114
|
+
type: [Boolean, String],
|
|
115
|
+
default: null
|
|
116
|
+
},
|
|
117
|
+
vertical: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: null
|
|
120
|
+
},
|
|
121
|
+
className: [String, Function],
|
|
122
|
+
readonly: Boolean,
|
|
123
|
+
items: Array,
|
|
124
|
+
rules: Object,
|
|
125
|
+
preventSubmit: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
default: () => _globalStore.default.form.preventSubmit
|
|
128
|
+
},
|
|
129
|
+
validConfig: Object,
|
|
130
|
+
tooltipConfig: Object,
|
|
131
|
+
customLayout: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: () => _globalStore.default.form.customLayout
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
emits: ['update:collapseStatus', 'collapse', 'toggle-collapse', 'submit', 'submit-invalid', 'reset'],
|
|
137
|
+
setup(props, context) {
|
|
138
|
+
const {
|
|
139
|
+
slots,
|
|
140
|
+
emit
|
|
141
|
+
} = context;
|
|
142
|
+
const xID = _xeUtils.default.uniqueId();
|
|
143
|
+
const computeSize = (0, _size.useSize)(props);
|
|
144
|
+
const reactData = (0, _vue.reactive)({
|
|
145
|
+
collapseAll: props.collapseStatus,
|
|
146
|
+
staticItems: [],
|
|
147
|
+
formItems: []
|
|
148
|
+
});
|
|
149
|
+
const internalData = (0, _vue.reactive)({
|
|
150
|
+
tooltipTimeout: null,
|
|
151
|
+
tooltipStore: {
|
|
152
|
+
item: null,
|
|
153
|
+
visible: false
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
const $xegrid = (0, _vue.inject)('$xegrid', null);
|
|
157
|
+
const refElem = (0, _vue.ref)();
|
|
158
|
+
const refTooltip = (0, _vue.ref)();
|
|
159
|
+
let formMethods = {};
|
|
160
|
+
const computeValidOpts = (0, _vue.computed)(() => {
|
|
161
|
+
return Object.assign({}, _globalStore.default.form.validConfig, props.validConfig);
|
|
162
|
+
});
|
|
163
|
+
const computeTooltipOpts = (0, _vue.computed)(() => {
|
|
164
|
+
return Object.assign({}, _globalStore.default.tooltip, _globalStore.default.form.tooltipConfig, props.tooltipConfig);
|
|
165
|
+
});
|
|
166
|
+
const refMaps = {
|
|
167
|
+
refElem
|
|
168
|
+
};
|
|
169
|
+
const computeMaps = {
|
|
170
|
+
computeSize,
|
|
171
|
+
computeValidOpts,
|
|
172
|
+
computeTooltipOpts
|
|
173
|
+
};
|
|
174
|
+
const $xeform = {
|
|
175
|
+
xID,
|
|
176
|
+
props,
|
|
177
|
+
context,
|
|
178
|
+
reactData,
|
|
179
|
+
xegrid: $xegrid,
|
|
180
|
+
getRefMaps: () => refMaps,
|
|
181
|
+
getComputeMaps: () => computeMaps
|
|
182
|
+
};
|
|
183
|
+
const callSlot = (slotFunc, params) => {
|
|
184
|
+
if (slotFunc) {
|
|
185
|
+
if (_xeUtils.default.isString(slotFunc)) {
|
|
186
|
+
slotFunc = slots[slotFunc] || null;
|
|
187
|
+
}
|
|
188
|
+
if (_xeUtils.default.isFunction(slotFunc)) {
|
|
189
|
+
return (0, _vn.getSlotVNs)(slotFunc(params));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return [];
|
|
193
|
+
};
|
|
194
|
+
const loadItem = list => {
|
|
195
|
+
if (list.length) {
|
|
196
|
+
if (process.env.NODE_ENV === 'development') {
|
|
197
|
+
list.forEach(item => {
|
|
198
|
+
if (item.slots) {
|
|
199
|
+
_xeUtils.default.each(item.slots, func => {
|
|
200
|
+
if (!_xeUtils.default.isFunction(func)) {
|
|
201
|
+
if (!slots[func]) {
|
|
202
|
+
(0, _log.errLog)('vxe.error.notSlot', [func]);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
reactData.staticItems = _xeUtils.default.mapTree(list, item => (0, _util.createItem)($xeform, item), {
|
|
210
|
+
children: 'children'
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
return (0, _vue.nextTick)();
|
|
214
|
+
};
|
|
215
|
+
const getItems = () => {
|
|
216
|
+
const itemList = [];
|
|
217
|
+
_xeUtils.default.eachTree(reactData.formItems, item => {
|
|
218
|
+
itemList.push(item);
|
|
219
|
+
}, {
|
|
220
|
+
children: 'children'
|
|
221
|
+
});
|
|
222
|
+
return itemList;
|
|
223
|
+
};
|
|
224
|
+
const getItemByField = field => {
|
|
225
|
+
const rest = _xeUtils.default.findTree(reactData.formItems, item => item.field === field, {
|
|
226
|
+
children: 'children'
|
|
227
|
+
});
|
|
228
|
+
return rest ? rest.item : null;
|
|
229
|
+
};
|
|
230
|
+
const getCollapseStatus = () => {
|
|
231
|
+
return reactData.collapseAll;
|
|
232
|
+
};
|
|
233
|
+
const toggleCollapse = () => {
|
|
234
|
+
const status = !getCollapseStatus();
|
|
235
|
+
reactData.collapseAll = status;
|
|
236
|
+
emit('update:collapseStatus', status);
|
|
237
|
+
return (0, _vue.nextTick)();
|
|
238
|
+
};
|
|
239
|
+
const toggleCollapseEvent = evnt => {
|
|
240
|
+
toggleCollapse();
|
|
241
|
+
const status = getCollapseStatus();
|
|
242
|
+
formMethods.dispatchEvent('toggle-collapse', {
|
|
243
|
+
status,
|
|
244
|
+
collapse: status,
|
|
245
|
+
data: props.data
|
|
246
|
+
}, evnt);
|
|
247
|
+
formMethods.dispatchEvent('collapse', {
|
|
248
|
+
status,
|
|
249
|
+
collapse: status,
|
|
250
|
+
data: props.data
|
|
251
|
+
}, evnt);
|
|
252
|
+
};
|
|
253
|
+
const clearValidate = fieldOrItem => {
|
|
254
|
+
if (fieldOrItem) {
|
|
255
|
+
let fields = fieldOrItem;
|
|
256
|
+
if (!_xeUtils.default.isArray(fieldOrItem)) {
|
|
257
|
+
fields = [fieldOrItem];
|
|
258
|
+
}
|
|
259
|
+
fields.forEach(field => {
|
|
260
|
+
if (field) {
|
|
261
|
+
const item = (0, _util.handleFieldOrItem)($xeform, field);
|
|
262
|
+
if (item) {
|
|
263
|
+
item.showError = false;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
} else {
|
|
268
|
+
getItems().forEach(item => {
|
|
269
|
+
item.showError = false;
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
return (0, _vue.nextTick)();
|
|
273
|
+
};
|
|
274
|
+
const reset = () => {
|
|
275
|
+
const {
|
|
276
|
+
data
|
|
277
|
+
} = props;
|
|
278
|
+
const itemList = getItems();
|
|
279
|
+
if (data) {
|
|
280
|
+
itemList.forEach(item => {
|
|
281
|
+
const {
|
|
282
|
+
field,
|
|
283
|
+
resetValue,
|
|
284
|
+
itemRender
|
|
285
|
+
} = item;
|
|
286
|
+
if ((0, _utils.isEnableConf)(itemRender)) {
|
|
287
|
+
const compConf = _renderer.renderer.get(itemRender.name);
|
|
288
|
+
if (compConf && compConf.itemResetMethod) {
|
|
289
|
+
compConf.itemResetMethod({
|
|
290
|
+
data,
|
|
291
|
+
field,
|
|
292
|
+
property: field,
|
|
293
|
+
item,
|
|
294
|
+
$form: $xeform,
|
|
295
|
+
$grid: $xeform.xegrid
|
|
296
|
+
});
|
|
297
|
+
} else if (field) {
|
|
298
|
+
_xeUtils.default.set(data, field, resetValue === null ? getResetValue(_xeUtils.default.get(data, field), undefined) : _xeUtils.default.clone(resetValue, true));
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
return clearValidate();
|
|
304
|
+
};
|
|
305
|
+
const resetEvent = evnt => {
|
|
306
|
+
evnt.preventDefault();
|
|
307
|
+
reset();
|
|
308
|
+
formMethods.dispatchEvent('reset', {
|
|
309
|
+
data: props.data
|
|
310
|
+
}, evnt);
|
|
311
|
+
};
|
|
312
|
+
const handleFocus = fields => {
|
|
313
|
+
const el = refElem.value;
|
|
314
|
+
if (el) {
|
|
315
|
+
for (let i = 0; i < fields.length; i++) {
|
|
316
|
+
const property = fields[i];
|
|
317
|
+
const item = getItemByField(property);
|
|
318
|
+
if (item && (0, _utils.isEnableConf)(item.itemRender)) {
|
|
319
|
+
const {
|
|
320
|
+
itemRender
|
|
321
|
+
} = item;
|
|
322
|
+
const compConf = _renderer.renderer.get(itemRender.name);
|
|
323
|
+
let inputElem = null;
|
|
324
|
+
// 定位到第一个
|
|
325
|
+
if (!i) {
|
|
326
|
+
(0, _dom.scrollToView)(el.querySelector(`.${item.id}`));
|
|
327
|
+
}
|
|
328
|
+
// 如果指定了聚焦 class
|
|
329
|
+
if (itemRender.autofocus) {
|
|
330
|
+
inputElem = el.querySelector(`.${item.id} ${itemRender.autofocus}`);
|
|
331
|
+
}
|
|
332
|
+
// 渲染器的聚焦处理
|
|
333
|
+
if (!inputElem && compConf && compConf.autofocus) {
|
|
334
|
+
inputElem = el.querySelector(`.${item.id} ${compConf.autofocus}`);
|
|
335
|
+
}
|
|
336
|
+
if (inputElem) {
|
|
337
|
+
inputElem.focus();
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* 校验数据
|
|
346
|
+
* 按表格行、列顺序依次校验(同步或异步)
|
|
347
|
+
* 校验规则根据索引顺序依次校验,如果是异步则会等待校验完成才会继续校验下一列
|
|
348
|
+
* 如果校验失败则,触发回调或者 Promise<(ErrMap 校验不通过列的信息)>
|
|
349
|
+
* 如果是传回调方式这返回一个 (ErrMap 校验不通过列的信息)
|
|
350
|
+
*
|
|
351
|
+
* rule 配置:
|
|
352
|
+
* required=Boolean 是否必填
|
|
353
|
+
* min=Number 最小长度
|
|
354
|
+
* max=Number 最大长度
|
|
355
|
+
* validator=Function({ itemValue, rule, rules, data, property }) 自定义校验,接收一个 Promise
|
|
356
|
+
* trigger=change 触发方式
|
|
357
|
+
*/
|
|
358
|
+
const validItemRules = (validType, fields, val) => {
|
|
359
|
+
const {
|
|
360
|
+
data,
|
|
361
|
+
rules: formRules
|
|
362
|
+
} = props;
|
|
363
|
+
const errorMaps = {};
|
|
364
|
+
if (!_xeUtils.default.isArray(fields)) {
|
|
365
|
+
fields = [fields];
|
|
366
|
+
}
|
|
367
|
+
return Promise.all(fields.map(property => {
|
|
368
|
+
const errorRules = [];
|
|
369
|
+
const syncVailds = [];
|
|
370
|
+
if (property && formRules) {
|
|
371
|
+
const rules = _xeUtils.default.get(formRules, property);
|
|
372
|
+
if (rules) {
|
|
373
|
+
const itemValue = _xeUtils.default.isUndefined(val) ? _xeUtils.default.get(data, property) : val;
|
|
374
|
+
rules.forEach(rule => {
|
|
375
|
+
const {
|
|
376
|
+
type,
|
|
377
|
+
trigger,
|
|
378
|
+
required,
|
|
379
|
+
validator
|
|
380
|
+
} = rule;
|
|
381
|
+
if (validType === 'all' || !trigger || validType === trigger) {
|
|
382
|
+
if (validator) {
|
|
383
|
+
const validParams = {
|
|
384
|
+
itemValue,
|
|
385
|
+
rule,
|
|
386
|
+
rules,
|
|
387
|
+
data,
|
|
388
|
+
field: property,
|
|
389
|
+
property,
|
|
390
|
+
$form: $xeform
|
|
391
|
+
};
|
|
392
|
+
let customValid;
|
|
393
|
+
if (_xeUtils.default.isString(validator)) {
|
|
394
|
+
const gvItem = _validators.validators.get(validator);
|
|
395
|
+
if (gvItem) {
|
|
396
|
+
if (gvItem.itemValidatorMethod) {
|
|
397
|
+
customValid = gvItem.itemValidatorMethod(validParams);
|
|
398
|
+
} else {
|
|
399
|
+
if (process.env.NODE_ENV === 'development') {
|
|
400
|
+
(0, _log.warnLog)('vxe.error.notValidators', [validator]);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
} else {
|
|
404
|
+
if (process.env.NODE_ENV === 'development') {
|
|
405
|
+
(0, _log.errLog)('vxe.error.notValidators', [validator]);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
} else {
|
|
409
|
+
customValid = validator(validParams);
|
|
410
|
+
}
|
|
411
|
+
if (customValid) {
|
|
412
|
+
if (_xeUtils.default.isError(customValid)) {
|
|
413
|
+
errorRules.push(new Rule({
|
|
414
|
+
type: 'custom',
|
|
415
|
+
trigger,
|
|
416
|
+
content: customValid.message,
|
|
417
|
+
rule: new Rule(rule)
|
|
418
|
+
}));
|
|
419
|
+
} else if (customValid.catch) {
|
|
420
|
+
// 如果为异步校验(注:异步校验是并发无序的)
|
|
421
|
+
syncVailds.push(customValid.catch(e => {
|
|
422
|
+
errorRules.push(new Rule({
|
|
423
|
+
type: 'custom',
|
|
424
|
+
trigger,
|
|
425
|
+
content: e ? e.message : rule.content || rule.message,
|
|
426
|
+
rule: new Rule(rule)
|
|
427
|
+
}));
|
|
428
|
+
}));
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
} else {
|
|
432
|
+
const isArrType = type === 'array';
|
|
433
|
+
const isArrVal = _xeUtils.default.isArray(itemValue);
|
|
434
|
+
let hasEmpty = true;
|
|
435
|
+
if (isArrType || isArrVal) {
|
|
436
|
+
hasEmpty = !isArrVal || !itemValue.length;
|
|
437
|
+
} else if (_xeUtils.default.isString(itemValue)) {
|
|
438
|
+
hasEmpty = (0, _utils.eqEmptyValue)(itemValue.trim());
|
|
439
|
+
} else {
|
|
440
|
+
hasEmpty = (0, _utils.eqEmptyValue)(itemValue);
|
|
441
|
+
}
|
|
442
|
+
if (required ? hasEmpty || validErrorRuleValue(rule, itemValue) : !hasEmpty && validErrorRuleValue(rule, itemValue)) {
|
|
443
|
+
errorRules.push(new Rule(rule));
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return Promise.all(syncVailds).then(() => {
|
|
451
|
+
if (errorRules.length) {
|
|
452
|
+
errorMaps[property] = errorRules.map(rule => {
|
|
453
|
+
return {
|
|
454
|
+
$form: $xeform,
|
|
455
|
+
rule,
|
|
456
|
+
data,
|
|
457
|
+
field: property,
|
|
458
|
+
property
|
|
459
|
+
};
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
})).then(() => {
|
|
464
|
+
if (!_xeUtils.default.isEmpty(errorMaps)) {
|
|
465
|
+
return Promise.reject(errorMaps);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
};
|
|
469
|
+
let showErrTime;
|
|
470
|
+
const beginValidate = (itemList, type, callback) => {
|
|
471
|
+
const {
|
|
472
|
+
data,
|
|
473
|
+
rules: formRules
|
|
474
|
+
} = props;
|
|
475
|
+
const validOpts = computeValidOpts.value;
|
|
476
|
+
const validRest = {};
|
|
477
|
+
const validFields = [];
|
|
478
|
+
const itemValids = [];
|
|
479
|
+
clearTimeout(showErrTime);
|
|
480
|
+
if (data && formRules) {
|
|
481
|
+
itemList.forEach(item => {
|
|
482
|
+
const {
|
|
483
|
+
field
|
|
484
|
+
} = item;
|
|
485
|
+
if (field && !(0, _util.isHiddenItem)($xeform, item) && (0, _util.isActivetem)($xeform, item)) {
|
|
486
|
+
itemValids.push(validItemRules(type || 'all', field).then(() => {
|
|
487
|
+
item.errRule = null;
|
|
488
|
+
}).catch(errorMaps => {
|
|
489
|
+
const rest = errorMaps[field];
|
|
490
|
+
if (!validRest[field]) {
|
|
491
|
+
validRest[field] = [];
|
|
492
|
+
}
|
|
493
|
+
validRest[field].push(rest);
|
|
494
|
+
validFields.push(field);
|
|
495
|
+
item.errRule = rest[0].rule;
|
|
496
|
+
return Promise.reject(rest);
|
|
497
|
+
}));
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
return Promise.all(itemValids).then(() => {
|
|
501
|
+
if (callback) {
|
|
502
|
+
callback();
|
|
503
|
+
}
|
|
504
|
+
}).catch(() => {
|
|
505
|
+
return new Promise(resolve => {
|
|
506
|
+
showErrTime = window.setTimeout(() => {
|
|
507
|
+
itemList.forEach(item => {
|
|
508
|
+
if (item.errRule) {
|
|
509
|
+
item.showError = true;
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}, 20);
|
|
513
|
+
if (validOpts.autoPos !== false) {
|
|
514
|
+
(0, _vue.nextTick)(() => {
|
|
515
|
+
handleFocus(validFields);
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
if (callback) {
|
|
519
|
+
callback(validRest);
|
|
520
|
+
resolve();
|
|
521
|
+
} else {
|
|
522
|
+
resolve(validRest);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
if (callback) {
|
|
528
|
+
callback();
|
|
529
|
+
}
|
|
530
|
+
return Promise.resolve();
|
|
531
|
+
};
|
|
532
|
+
const validate = callback => {
|
|
533
|
+
clearValidate();
|
|
534
|
+
return beginValidate(getItems(), '', callback);
|
|
535
|
+
};
|
|
536
|
+
const validateField = (fieldOrItem, callback) => {
|
|
537
|
+
let fields = [];
|
|
538
|
+
if (_xeUtils.default.isArray(fieldOrItem)) {
|
|
539
|
+
fields = fieldOrItem;
|
|
540
|
+
} else {
|
|
541
|
+
fields = [fieldOrItem];
|
|
542
|
+
}
|
|
543
|
+
return beginValidate(fields.map(field => (0, _util.handleFieldOrItem)($xeform, field)), '', callback);
|
|
544
|
+
};
|
|
545
|
+
const submitEvent = evnt => {
|
|
546
|
+
evnt.preventDefault();
|
|
547
|
+
if (!props.preventSubmit) {
|
|
548
|
+
clearValidate();
|
|
549
|
+
beginValidate(getItems()).then(errMap => {
|
|
550
|
+
if (errMap) {
|
|
551
|
+
formMethods.dispatchEvent('submit-invalid', {
|
|
552
|
+
data: props.data,
|
|
553
|
+
errMap
|
|
554
|
+
}, evnt);
|
|
555
|
+
} else {
|
|
556
|
+
formMethods.dispatchEvent('submit', {
|
|
557
|
+
data: props.data
|
|
558
|
+
}, evnt);
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
const closeTooltip = () => {
|
|
564
|
+
const {
|
|
565
|
+
tooltipStore
|
|
566
|
+
} = internalData;
|
|
567
|
+
const $tooltip = refTooltip.value;
|
|
568
|
+
if (tooltipStore.visible) {
|
|
569
|
+
Object.assign(tooltipStore, {
|
|
570
|
+
item: null,
|
|
571
|
+
visible: false
|
|
572
|
+
});
|
|
573
|
+
if ($tooltip) {
|
|
574
|
+
$tooltip.close();
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
return (0, _vue.nextTick)();
|
|
578
|
+
};
|
|
579
|
+
const triggerTitleTipEvent = (evnt, params) => {
|
|
580
|
+
const {
|
|
581
|
+
item
|
|
582
|
+
} = params;
|
|
583
|
+
const {
|
|
584
|
+
tooltipStore
|
|
585
|
+
} = internalData;
|
|
586
|
+
const $tooltip = refTooltip.value;
|
|
587
|
+
const overflowElem = evnt.currentTarget.children[0];
|
|
588
|
+
const content = (overflowElem.textContent || '').trim();
|
|
589
|
+
const isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
|
|
590
|
+
clearTimeout(internalData.tooltipTimeout);
|
|
591
|
+
if (tooltipStore.item !== item) {
|
|
592
|
+
closeTooltip();
|
|
593
|
+
}
|
|
594
|
+
if (content && isCellOverflow) {
|
|
595
|
+
Object.assign(tooltipStore, {
|
|
596
|
+
item,
|
|
597
|
+
visible: true
|
|
598
|
+
});
|
|
599
|
+
if ($tooltip) {
|
|
600
|
+
$tooltip.open(overflowElem, content);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
const handleTitleTipLeaveEvent = () => {
|
|
605
|
+
const tooltipOpts = computeTooltipOpts.value;
|
|
606
|
+
let $tooltip = refTooltip.value;
|
|
607
|
+
if ($tooltip) {
|
|
608
|
+
$tooltip.setActived(false);
|
|
609
|
+
}
|
|
610
|
+
if (tooltipOpts.enterable) {
|
|
611
|
+
internalData.tooltipTimeout = setTimeout(() => {
|
|
612
|
+
$tooltip = refTooltip.value;
|
|
613
|
+
if ($tooltip && !$tooltip.isActived()) {
|
|
614
|
+
closeTooltip();
|
|
615
|
+
}
|
|
616
|
+
}, tooltipOpts.leaveDelay);
|
|
617
|
+
} else {
|
|
618
|
+
closeTooltip();
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
const triggerItemEvent = (evnt, field, itemValue) => {
|
|
622
|
+
if (field) {
|
|
623
|
+
return validItemRules(evnt ? ['blur'].includes(evnt.type) ? 'blur' : 'change' : 'all', field, itemValue).then(() => {
|
|
624
|
+
clearValidate(field);
|
|
625
|
+
}).catch(errorMaps => {
|
|
626
|
+
const rest = errorMaps[field];
|
|
627
|
+
const item = getItemByField(field);
|
|
628
|
+
if (rest && item) {
|
|
629
|
+
item.showError = true;
|
|
630
|
+
item.errRule = rest[0].rule;
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
return (0, _vue.nextTick)();
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* 更新项状态
|
|
638
|
+
* 如果组件值 v-model 发生 change 时,调用改函数用于更新某一项编辑状态
|
|
639
|
+
* 如果单元格配置了校验规则,则会进行校验
|
|
640
|
+
*/
|
|
641
|
+
const updateStatus = (scope, itemValue) => {
|
|
642
|
+
const {
|
|
643
|
+
field
|
|
644
|
+
} = scope;
|
|
645
|
+
return triggerItemEvent(new Event('change'), field, itemValue);
|
|
646
|
+
};
|
|
647
|
+
formMethods = {
|
|
648
|
+
dispatchEvent(type, params, evnt) {
|
|
649
|
+
emit(type, Object.assign({
|
|
650
|
+
$form: $xeform,
|
|
651
|
+
$grid: $xegrid,
|
|
652
|
+
$event: evnt
|
|
653
|
+
}, params));
|
|
654
|
+
},
|
|
655
|
+
reset,
|
|
656
|
+
validate,
|
|
657
|
+
validateField,
|
|
658
|
+
clearValidate,
|
|
659
|
+
updateStatus,
|
|
660
|
+
toggleCollapse,
|
|
661
|
+
getItems,
|
|
662
|
+
getItemByField,
|
|
663
|
+
closeTooltip
|
|
664
|
+
};
|
|
665
|
+
const formPrivateMethods = {
|
|
666
|
+
callSlot,
|
|
667
|
+
triggerItemEvent,
|
|
668
|
+
toggleCollapseEvent,
|
|
669
|
+
triggerTitleTipEvent,
|
|
670
|
+
handleTitleTipLeaveEvent
|
|
671
|
+
};
|
|
672
|
+
Object.assign($xeform, formMethods, formPrivateMethods);
|
|
673
|
+
const staticItemFlag = (0, _vue.ref)(0);
|
|
674
|
+
(0, _vue.watch)(() => reactData.staticItems.length, () => {
|
|
675
|
+
staticItemFlag.value++;
|
|
676
|
+
});
|
|
677
|
+
(0, _vue.watch)(() => reactData.staticItems, () => {
|
|
678
|
+
staticItemFlag.value++;
|
|
679
|
+
});
|
|
680
|
+
(0, _vue.watch)(staticItemFlag, () => {
|
|
681
|
+
reactData.formItems = reactData.staticItems;
|
|
682
|
+
});
|
|
683
|
+
const itemFlag = (0, _vue.ref)(0);
|
|
684
|
+
(0, _vue.watch)(() => props.items ? props.items.length : -1, () => {
|
|
685
|
+
itemFlag.value++;
|
|
686
|
+
});
|
|
687
|
+
(0, _vue.watch)(() => props.items, () => {
|
|
688
|
+
itemFlag.value++;
|
|
689
|
+
});
|
|
690
|
+
(0, _vue.watch)(itemFlag, () => {
|
|
691
|
+
loadItem(props.items || []);
|
|
692
|
+
});
|
|
693
|
+
(0, _vue.watch)(() => props.collapseStatus, value => {
|
|
694
|
+
reactData.collapseAll = !!value;
|
|
695
|
+
});
|
|
696
|
+
(0, _vue.onMounted)(() => {
|
|
697
|
+
(0, _vue.nextTick)(() => {
|
|
698
|
+
if (process.env.NODE_ENV === 'development') {
|
|
699
|
+
if (props.customLayout && props.items) {
|
|
700
|
+
(0, _log.errLog)('vxe.error.errConflicts', ['custom-layout', 'items']);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
loadItem(props.items || []);
|
|
704
|
+
});
|
|
705
|
+
});
|
|
706
|
+
const renderVN = () => {
|
|
707
|
+
const {
|
|
708
|
+
loading,
|
|
709
|
+
className,
|
|
710
|
+
data,
|
|
711
|
+
customLayout
|
|
712
|
+
} = props;
|
|
713
|
+
const {
|
|
714
|
+
formItems
|
|
715
|
+
} = reactData;
|
|
716
|
+
// const formItems: any[] = []
|
|
717
|
+
const vSize = computeSize.value;
|
|
718
|
+
const tooltipOpts = computeTooltipOpts.value;
|
|
719
|
+
const defaultSlot = slots.default;
|
|
720
|
+
return (0, _vue.h)('form', {
|
|
721
|
+
ref: refElem,
|
|
722
|
+
class: ['vxe-form', className ? _xeUtils.default.isFunction(className) ? className({
|
|
723
|
+
items: formItems,
|
|
724
|
+
data,
|
|
725
|
+
$form: $xeform
|
|
726
|
+
}) : className : '', {
|
|
727
|
+
[`size--${vSize}`]: vSize,
|
|
728
|
+
'is--loading': loading
|
|
729
|
+
}],
|
|
730
|
+
onSubmit: submitEvent,
|
|
731
|
+
onReset: resetEvent
|
|
732
|
+
}, [(0, _vue.h)('div', {
|
|
733
|
+
class: 'vxe-form--wrapper vxe-row'
|
|
734
|
+
}, customLayout ? defaultSlot ? defaultSlot({}) : [] : formItems.map((item, index) => {
|
|
735
|
+
return (0, _vue.h)(_formConfigItem.default, {
|
|
736
|
+
key: index,
|
|
737
|
+
itemConfig: item
|
|
738
|
+
});
|
|
739
|
+
})), (0, _vue.h)('div', {
|
|
740
|
+
class: 'vxe-form-slots',
|
|
741
|
+
ref: 'hideItem'
|
|
742
|
+
}, customLayout ? [] : defaultSlot ? defaultSlot({}) : []),
|
|
743
|
+
/**
|
|
744
|
+
* 加载中
|
|
745
|
+
*/
|
|
746
|
+
(0, _vue.h)(_index.default, {
|
|
747
|
+
class: 'vxe-form--loading',
|
|
748
|
+
modelValue: loading
|
|
749
|
+
}),
|
|
750
|
+
/**
|
|
751
|
+
* 工具提示
|
|
752
|
+
*/
|
|
753
|
+
(0, _vue.h)(_tooltip.default, {
|
|
754
|
+
ref: refTooltip,
|
|
755
|
+
...tooltipOpts
|
|
756
|
+
})]);
|
|
757
|
+
};
|
|
758
|
+
$xeform.renderVN = renderVN;
|
|
759
|
+
(0, _vue.provide)('$xeForm', $xeform);
|
|
760
|
+
(0, _vue.provide)('$xeformgather', null);
|
|
761
|
+
(0, _vue.provide)('$xeformitem', null);
|
|
762
|
+
(0, _vue.provide)('$xeFormItemInfo', null);
|
|
763
|
+
return $xeform;
|
|
764
|
+
},
|
|
765
|
+
render() {
|
|
766
|
+
return this.renderVN();
|
|
767
|
+
}
|
|
768
|
+
});
|