vft 0.0.249 → 0.0.252
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/dist/index.css +1 -1
- package/es/components/alert/alert.vue.d.ts +1 -11
- package/es/components/alert/alert.vue2.js +13 -65
- package/es/components/alert/index.d.ts +28 -76
- package/es/components/autocomplete/autocomplete.vue.d.ts +14 -14
- package/es/components/autocomplete/autocomplete.vue2.js +194 -199
- package/es/components/autocomplete/index.d.ts +42 -42
- package/es/components/backtop/backtop.vue.d.ts +1 -15
- package/es/components/backtop/backtop.vue2.js +17 -106
- package/es/components/backtop/index.d.ts +3 -9
- package/es/components/backtop/types.d.ts +14 -0
- package/es/components/backtop/types.js +1 -0
- package/es/components/button/button-custom.d.ts +1 -1
- package/es/components/button/button.vue.d.ts +3 -50
- package/es/components/button/button.vue2.js +1 -1
- package/es/components/button/index.d.ts +39 -40
- package/es/components/button/types.d.ts +47 -1
- package/es/components/button/use-button.d.ts +5 -5
- package/es/components/card/index.d.ts +3 -3
- package/es/components/carousel/carousel.vue.d.ts +1 -1
- package/es/components/carousel/index.d.ts +18 -18
- package/es/components/carousel/use-carousel.js +2 -3
- package/es/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/es/components/checkbox/index.d.ts +42 -42
- package/es/components/color-picker/components/hue-slider.vue.d.ts +3 -3
- package/es/components/color-picker/components/predefine.vue.d.ts +3 -3
- package/es/components/color-picker/components/sv-panel.vue.d.ts +3 -3
- package/es/components/config-provider/hooks/use-global-config.d.ts +3 -3
- package/es/components/context-menu/context-menu.vue2.js +36 -124
- package/es/components/context-menu/index.js +5 -101
- package/es/components/context-menu/types.d.ts +1 -1
- package/es/components/context-menu/types.js +1 -98
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +188 -0
- package/es/components/date-picker/composables/use-basic-date-table.js +183 -0
- package/es/components/date-picker/composables/use-month-range-header.d.ts +1 -1
- package/es/components/date-picker/composables/use-panel-date-range.d.ts +29 -0
- package/es/components/date-picker/composables/use-panel-date-range.js +72 -0
- package/es/components/date-picker/composables/use-range-picker.d.ts +46 -42
- package/es/components/date-picker/composables/use-range-picker.js +65 -52
- package/es/components/date-picker/composables/use-shortcut.js +4 -4
- package/es/components/date-picker/composables/use-year-range-header.d.ts +16 -0
- package/es/components/date-picker/composables/use-year-range-header.js +35 -0
- package/es/components/date-picker/constants.d.ts +2 -15
- package/es/components/date-picker/constants.js +3 -16
- package/es/components/date-picker/date-picker-com/basic-cell-render.d.ts +3 -1
- package/es/components/date-picker/date-picker-com/basic-cell-render.js +16 -19
- package/es/components/date-picker/date-picker-com/basic-date-table.vue.d.ts +14 -23
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +73 -176
- package/es/components/date-picker/date-picker-com/basic-month-table.vue.d.ts +2 -2
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +93 -71
- package/es/components/date-picker/date-picker-com/basic-year-table.vue.d.ts +50 -9
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +108 -57
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue.d.ts +13 -3
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +329 -277
- package/es/components/date-picker/date-picker-com/panel-date-range.vue.d.ts +16 -3
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +422 -281
- package/es/components/date-picker/date-picker-com/panel-month-range.vue.d.ts +6 -3
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +137 -113
- package/es/components/date-picker/date-picker-com/panel-year-range.vue.d.ts +35 -0
- package/es/components/date-picker/date-picker-com/panel-year-range.vue.js +4 -0
- package/es/components/date-picker/date-picker-com/panel-year-range.vue2.js +210 -0
- package/es/components/date-picker/date-picker.d.ts +70 -40
- package/es/components/date-picker/date-picker.js +59 -50
- package/es/components/date-picker/date-picker.type.d.ts +2 -1
- package/es/components/date-picker/index.d.ts +126 -68
- package/es/components/date-picker/index.js +7 -7
- package/es/components/date-picker/instance.d.ts +9 -0
- package/es/components/date-picker/instance.js +1 -0
- package/es/components/date-picker/panel-utils.d.ts +48 -0
- package/es/components/date-picker/panel-utils.js +9 -6
- package/es/components/date-picker/props/basic-cell.d.ts +2 -1
- package/es/components/date-picker/props/basic-date-table.d.ts +7 -2
- package/es/components/date-picker/props/basic-date-table.js +6 -5
- package/es/components/date-picker/props/basic-month-table.d.ts +3 -2
- package/es/components/date-picker/props/basic-year-table.d.ts +23 -5
- package/es/components/date-picker/props/basic-year-table.js +5 -6
- package/es/components/date-picker/props/date-picker.d.ts +26 -12
- package/es/components/date-picker/props/date-picker.js +3 -0
- package/es/components/date-picker/props/panel-date-pick.d.ts +6 -1
- package/es/components/date-picker/props/panel-date-range.d.ts +7 -1
- package/es/components/date-picker/props/panel-month-range.d.ts +3 -1
- package/es/components/date-picker/props/panel-month-range.js +7 -3
- package/es/components/date-picker/props/panel-year-range.d.ts +14 -0
- package/es/components/date-picker/props/panel-year-range.js +17 -0
- package/es/components/date-picker/props/shared.d.ts +9 -2
- package/es/components/date-picker/props/shared.js +29 -12
- package/es/components/date-picker/style/css.d.ts +4 -0
- package/es/components/date-picker/style/css.js +5 -0
- package/es/components/date-picker/utils.d.ts +9 -2
- package/es/components/date-picker/utils.js +66 -33
- package/es/components/date-time-select/date-time-select.vue2.js +1 -1
- package/es/components/date-time-select/index.d.ts +1 -0
- package/es/components/date-time-select/types.d.ts +4 -0
- package/es/components/dialog/dialog-content.vue2.js +2 -3
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +4 -4
- package/es/components/dropdown/dropdown-item-impl.vue.js +12 -12
- package/es/components/dropdown/dropdown-item-impl.vue2.js +6 -6
- package/es/components/dropdown/dropdown.vue.d.ts +6 -29
- package/es/components/dropdown/dropdown.vue2.js +146 -149
- package/es/components/footer-layout/footer-layout.vue2.js +19 -108
- package/es/components/form/form-item.vue.d.ts +2 -3
- package/es/components/form/form-item.vue2.js +140 -135
- package/es/components/form/form-label-wrap.js +27 -27
- package/es/components/form/form.vue2.js +71 -65
- package/es/components/form/hooks/use-form-common-props.js +3 -4
- package/es/components/form/hooks/use-form-item.js +12 -13
- package/es/components/form/index.d.ts +75 -48
- package/es/components/form/types.d.ts +7 -1
- package/es/components/form/utils.d.ts +1 -1
- package/es/components/form/utils.js +33 -28
- package/es/components/header-layout/header-layout.vue2.js +26 -114
- package/es/components/icon/icon.vue2.js +20 -19
- package/es/components/icon/index.d.ts +0 -1
- package/es/components/icon/index.js +3 -4
- package/es/components/index.js +323 -319
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/link/index.d.ts +3 -3
- package/es/components/md-code-demo/md-code-demo.js +12 -13
- package/es/components/md-container/md-container.vue2.js +52 -138
- package/es/components/md-vue-playground/md-vue-playground.vue2.js +17 -17
- package/es/components/menu/index.js +1 -1
- package/es/components/menu/menu-item.vue.d.ts +1 -1
- package/es/components/menu/menu-item.vue2.js +45 -132
- package/es/components/menu/sub-menu.vue.d.ts +2 -1
- package/es/components/menu/sub-menu.vue2.js +76 -163
- package/es/components/modal/index.d.ts +33 -45
- package/es/components/modal/modal-footer-action.vue2.js +26 -112
- package/es/components/modal/modal.vue.d.ts +2 -2
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +57 -144
- package/es/components/multiple-tabs/tab-content.vue2.js +19 -113
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +37 -132
- package/es/components/popconfirm/index.d.ts +24 -24
- package/es/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/es/components/popover/index.d.ts +5 -5
- package/es/components/popover/popover.vue.d.ts +2 -2
- package/es/components/popper/composables/use-content.js +2 -3
- package/es/components/popper/trigger.vue2.js +7 -8
- package/es/components/progress/index.d.ts +3 -3
- package/es/components/result/result.vue.d.ts +1 -1
- package/es/components/result/result.vue2.js +20 -109
- package/es/components/roving-focus-group/index.js +11 -11
- package/es/components/roving-focus-group/roving-focus-group.vue.js +5 -5
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -3
- package/es/components/scrollbar/index.js +9 -10
- package/es/components/select/defaults.d.ts +99 -15
- package/es/components/select/defaults.js +90 -12
- package/es/components/select/group-item.vue.d.ts +10 -5
- package/es/components/select/group-item.vue.js +9 -19
- package/es/components/select/group-item.vue2.js +4 -2
- package/es/components/select/index.d.ts +2782 -0
- package/es/components/select/index.js +2 -2
- package/es/components/select/option-item.vue.d.ts +40 -26
- package/es/components/select/option-item.vue.js +12 -12
- package/es/components/select/option-item.vue2.js +15 -12
- package/es/components/select/select-dropdown.d.ts +29 -3
- package/es/components/select/select-dropdown.js +120 -129
- package/es/components/select/select.types.d.ts +19 -11
- package/es/components/select/select.vue.d.ts +2778 -0
- package/es/components/select/select.vue.js +261 -251
- package/es/components/select/select.vue2.js +49 -45
- package/es/components/select/token.d.ts +10 -12
- package/es/components/select/token.js +4 -2
- package/es/components/select/useAllowCreate.d.ts +3 -3
- package/es/components/select/useAllowCreate.js +32 -29
- package/es/components/select/useOption.d.ts +3 -3
- package/es/components/select/useProps.d.ts +21 -0
- package/es/components/select/useProps.js +22 -0
- package/es/components/select/useSelect.d.ts +940 -121
- package/es/components/select/useSelect.js +396 -302
- package/es/components/side-menu/side-menu.vue2.js +77 -165
- package/es/components/steps/index.d.ts +12 -12
- package/es/components/super-form/component-map.js +52 -141
- package/es/components/super-form/style/css.js +4 -4
- package/es/components/super-form/super-form-action.vue2.js +39 -126
- package/es/components/super-form/super-form-item.vue2.js +161 -248
- package/es/components/super-form/super-form.vue.d.ts +1 -1
- package/es/components/super-form/super-form.vue2.js +116 -202
- package/es/components/super-form/types.d.ts +3 -1
- package/es/components/switch/index.d.ts +6 -6
- package/es/components/table/field.js +82 -176
- package/es/components/table/index.d.ts +24 -24
- package/es/components/table/table.vue.d.ts +1 -1
- package/es/components/tabs/tab-nav.vue.d.ts +2 -2
- package/es/components/tabs/tab-nav.vue2.js +98 -187
- package/es/components/tabs/tabs.vue.d.ts +2 -1
- package/es/components/time-picker/common/picker-range-trigger.vue.d.ts +84 -0
- package/es/components/time-picker/common/picker-range-trigger.vue.js +4 -0
- package/es/components/time-picker/common/picker-range-trigger.vue2.js +100 -0
- package/es/components/time-picker/common/picker.vue.d.ts +71 -41
- package/es/components/time-picker/common/picker.vue2.js +285 -289
- package/es/components/time-picker/common/props.d.ts +76 -12
- package/es/components/time-picker/common/props.js +78 -35
- package/es/components/time-picker/composables/use-time-panel.d.ts +4 -4
- package/es/components/time-picker/composables/use-time-picker.d.ts +28 -29
- package/es/components/time-picker/constants.d.ts +5 -0
- package/es/components/time-picker/constants.js +15 -10
- package/es/components/time-picker/index.d.ts +120 -74
- package/es/components/time-picker/index.js +28 -23
- package/es/components/time-picker/props/basic-time-spinner.d.ts +5 -4
- package/es/components/time-picker/props/panel-time-picker.d.ts +2 -1
- package/es/components/time-picker/props/panel-time-range.d.ts +2 -1
- package/es/components/time-picker/props/shared.d.ts +4 -5
- package/es/components/time-picker/style/css.d.ts +3 -0
- package/es/components/time-picker/style/css.js +3 -0
- package/es/components/time-picker/style/index.d.ts +3 -0
- package/es/components/time-picker/style/index.js +3 -0
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue.d.ts +6 -6
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +135 -128
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +4 -4
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +36 -35
- package/es/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +4 -4
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +109 -108
- package/es/components/time-picker/time-picker.d.ts +60 -37
- package/es/components/time-picker/time-picker.js +28 -30
- package/es/components/time-picker/utils.d.ts +5 -2
- package/es/components/time-picker/utils.js +17 -16
- package/es/components/time-select/time-select.vue.d.ts +1 -1
- package/es/components/timeline/index.d.ts +6 -6
- package/es/components/tooltip/content.vue2.js +47 -48
- package/es/components/tooltip/index.d.ts +3 -3
- package/es/components/tooltip/tooltip.vue.d.ts +1 -1
- package/es/components/tooltip/tooltip.vue2.js +77 -78
- package/es/components/tooltip/utils.js +4 -5
- package/es/components/tree/tree-node.vue.d.ts +33 -33
- package/es/components/tree/tree-node.vue.js +11 -11
- package/es/components/tree/tree-node.vue2.js +15 -15
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +1 -1
- package/es/components/upload/upload.vue.d.ts +1 -1
- package/es/components/virtual-list/builders/build-grid.d.ts +9 -9
- package/es/components/virtual-list/builders/build-grid.js +222 -214
- package/es/components/virtual-list/builders/build-list.d.ts +13 -13
- package/es/components/virtual-list/builders/build-list.js +206 -198
- package/es/components/virtual-list/components/dynamic-size-grid.d.ts +6 -6
- package/es/components/virtual-list/components/dynamic-size-grid.js +12 -12
- package/es/components/virtual-list/components/dynamic-size-list.d.ts +13 -12
- package/es/components/virtual-list/components/dynamic-size-list.js +7 -7
- package/es/components/virtual-list/components/fixed-size-grid.d.ts +6 -6
- package/es/components/virtual-list/components/fixed-size-list.d.ts +13 -12
- package/es/components/virtual-list/components/fixed-size-list.js +8 -8
- package/es/components/virtual-list/components/scrollbar.js +59 -66
- package/es/components/virtual-list/defaults.d.ts +0 -4
- package/es/components/virtual-list/defaults.js +11 -15
- package/es/components/virtual-list/hooks/use-cache.d.ts +1 -1
- package/es/components/virtual-list/hooks/use-cache.js +6 -6
- package/es/components/virtual-list/hooks/use-wheel.js +1 -1
- package/es/components/virtual-list/index.d.ts +6 -4
- package/es/components/virtual-list/index.js +4 -4
- package/es/components/virtual-list/props.d.ts +11 -7
- package/es/components/virtual-list/props.js +24 -30
- package/es/components/virtual-list/types.d.ts +1 -1
- package/es/components/virtual-list/utils.d.ts +1 -2
- package/es/components/virtual-list/utils.js +16 -18
- package/es/hooks/index.d.ts +3 -1
- package/es/hooks/index.js +49 -46
- package/es/hooks/use-calc-input-width/index.d.ts +7 -0
- package/es/hooks/use-calc-input-width/index.js +17 -0
- package/es/hooks/use-composition/index.d.ts +12 -0
- package/es/hooks/use-composition/index.js +28 -0
- package/es/hooks/use-delayed-toggle/index.d.ts +8 -4
- package/es/hooks/use-delayed-toggle/index.js +52 -17
- package/es/hooks/use-empty-values/index.d.ts +16 -0
- package/es/hooks/use-empty-values/index.js +37 -0
- package/es/hooks/use-focus-controller/index.d.ts +27 -0
- package/es/hooks/use-focus-controller/index.js +38 -0
- package/es/hooks/use-id/index.d.ts +1 -1
- package/es/hooks/use-id/index.js +11 -11
- package/es/hooks/use-namespace/index.d.ts +5 -6
- package/es/hooks/use-namespace/index.js +13 -15
- package/es/index.js +459 -451
- package/es/package.json.d.ts +2 -2
- package/es/package.json.js +1 -1
- package/es/utils/helper.d.ts +1 -0
- package/es/utils/helper.js +3 -2
- package/es/utils/index.js +49 -48
- package/lib/components/alert/alert.vue.d.ts +1 -11
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/alert/index.d.ts +28 -76
- package/lib/components/autocomplete/autocomplete.vue.d.ts +14 -14
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/autocomplete/index.d.ts +42 -42
- package/lib/components/backtop/backtop.vue.d.ts +1 -15
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/backtop/index.d.ts +3 -9
- package/lib/components/backtop/types.cjs +1 -0
- package/lib/components/backtop/types.d.ts +14 -0
- package/lib/components/button/button-custom.d.ts +1 -1
- package/lib/components/button/button.vue.d.ts +3 -50
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/button/index.d.ts +39 -40
- package/lib/components/button/types.d.ts +47 -1
- package/lib/components/button/use-button.d.ts +5 -5
- package/lib/components/card/index.d.ts +3 -3
- package/lib/components/carousel/carousel.vue.d.ts +1 -1
- package/lib/components/carousel/index.d.ts +18 -18
- package/lib/components/carousel/use-carousel.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/lib/components/checkbox/index.d.ts +42 -42
- package/lib/components/color-picker/components/hue-slider.vue.d.ts +3 -3
- package/lib/components/color-picker/components/predefine.vue.d.ts +3 -3
- package/lib/components/color-picker/components/sv-panel.vue.d.ts +3 -3
- package/lib/components/config-provider/hooks/use-global-config.d.ts +3 -3
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/context-menu/index.cjs +1 -1
- package/lib/components/context-menu/types.cjs +1 -1
- package/lib/components/context-menu/types.d.ts +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -0
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +188 -0
- package/lib/components/date-picker/composables/use-month-range-header.d.ts +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -0
- package/lib/components/date-picker/composables/use-panel-date-range.d.ts +29 -0
- package/lib/components/date-picker/composables/use-range-picker.cjs +1 -1
- package/lib/components/date-picker/composables/use-range-picker.d.ts +46 -42
- package/lib/components/date-picker/composables/use-shortcut.cjs +1 -1
- package/lib/components/date-picker/composables/use-year-range-header.cjs +1 -0
- package/lib/components/date-picker/composables/use-year-range-header.d.ts +16 -0
- package/lib/components/date-picker/constants.cjs +1 -1
- package/lib/components/date-picker/constants.d.ts +2 -15
- package/lib/components/date-picker/date-picker-com/basic-cell-render.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-cell-render.d.ts +3 -1
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue.d.ts +14 -23
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue.d.ts +2 -2
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue.d.ts +50 -9
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue.d.ts +13 -3
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue.d.ts +16 -3
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue.d.ts +6 -3
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-year-range.vue.cjs +1 -0
- package/lib/components/date-picker/date-picker-com/panel-year-range.vue.d.ts +35 -0
- package/lib/components/date-picker/date-picker-com/panel-year-range.vue2.cjs +1 -0
- package/lib/components/date-picker/date-picker.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +70 -40
- package/lib/components/date-picker/date-picker.type.d.ts +2 -1
- package/lib/components/date-picker/index.cjs +1 -1
- package/lib/components/date-picker/index.d.ts +126 -68
- package/lib/components/date-picker/instance.cjs +1 -0
- package/lib/components/date-picker/instance.d.ts +9 -0
- package/lib/components/date-picker/panel-utils.cjs +1 -1
- package/lib/components/date-picker/panel-utils.d.ts +48 -0
- package/lib/components/date-picker/props/basic-cell.d.ts +2 -1
- package/lib/components/date-picker/props/basic-date-table.cjs +1 -1
- package/lib/components/date-picker/props/basic-date-table.d.ts +7 -2
- package/lib/components/date-picker/props/basic-month-table.d.ts +3 -2
- package/lib/components/date-picker/props/basic-year-table.cjs +1 -1
- package/lib/components/date-picker/props/basic-year-table.d.ts +23 -5
- package/lib/components/date-picker/props/date-picker.d.ts +26 -12
- package/lib/components/date-picker/props/panel-date-pick.d.ts +6 -1
- package/lib/components/date-picker/props/panel-date-range.d.ts +7 -1
- package/lib/components/date-picker/props/panel-month-range.cjs +1 -1
- package/lib/components/date-picker/props/panel-month-range.d.ts +3 -1
- package/lib/components/date-picker/props/panel-year-range.cjs +1 -0
- package/lib/components/date-picker/props/panel-year-range.d.ts +14 -0
- package/lib/components/date-picker/props/shared.cjs +1 -1
- package/lib/components/date-picker/props/shared.d.ts +9 -2
- package/lib/components/date-picker/style/css.cjs +1 -1
- package/lib/components/date-picker/style/css.d.ts +4 -0
- package/lib/components/date-picker/utils.cjs +1 -1
- package/lib/components/date-picker/utils.d.ts +9 -2
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/date-time-select/index.d.ts +1 -0
- package/lib/components/date-time-select/types.d.ts +4 -0
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +4 -4
- package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +6 -29
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue.d.ts +2 -3
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/form/form-label-wrap.cjs +1 -1
- package/lib/components/form/form.vue2.cjs +1 -1
- package/lib/components/form/hooks/use-form-common-props.cjs +1 -1
- package/lib/components/form/hooks/use-form-item.cjs +1 -1
- package/lib/components/form/index.d.ts +75 -48
- package/lib/components/form/types.d.ts +7 -1
- package/lib/components/form/utils.cjs +1 -1
- package/lib/components/form/utils.d.ts +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon/index.cjs +1 -1
- package/lib/components/icon/index.d.ts +0 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/link/index.d.ts +3 -3
- package/lib/components/md-code-demo/md-code-demo.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue.d.ts +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue.d.ts +2 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/modal/index.d.ts +33 -45
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +2 -2
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +24 -24
- package/lib/components/popconfirm/popconfirm.vue.d.ts +2 -2
- package/lib/components/popover/index.d.ts +5 -5
- package/lib/components/popover/popover.vue.d.ts +2 -2
- package/lib/components/popper/composables/use-content.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/progress/index.d.ts +3 -3
- package/lib/components/result/result.vue.d.ts +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
- package/lib/components/scrollbar/index.cjs +1 -1
- package/lib/components/select/defaults.cjs +1 -1
- package/lib/components/select/defaults.d.ts +99 -15
- package/lib/components/select/group-item.vue.cjs +1 -1
- package/lib/components/select/group-item.vue.d.ts +10 -5
- package/lib/components/select/group-item.vue2.cjs +1 -1
- package/lib/components/select/index.cjs +1 -1
- package/lib/components/select/index.d.ts +2782 -0
- package/lib/components/select/option-item.vue.cjs +1 -1
- package/lib/components/select/option-item.vue.d.ts +40 -26
- package/lib/components/select/option-item.vue2.cjs +1 -1
- package/lib/components/select/select-dropdown.cjs +1 -1
- package/lib/components/select/select-dropdown.d.ts +29 -3
- package/lib/components/select/select.types.d.ts +19 -11
- package/lib/components/select/select.vue.cjs +1 -1
- package/lib/components/select/select.vue.d.ts +2778 -0
- package/lib/components/select/select.vue2.cjs +1 -1
- package/lib/components/select/token.cjs +1 -1
- package/lib/components/select/token.d.ts +10 -12
- package/lib/components/select/useAllowCreate.cjs +1 -1
- package/lib/components/select/useAllowCreate.d.ts +3 -3
- package/lib/components/select/useOption.d.ts +3 -3
- package/lib/components/select/useProps.cjs +1 -0
- package/lib/components/select/useProps.d.ts +21 -0
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/select/useSelect.d.ts +940 -121
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/steps/index.d.ts +12 -12
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/style/css.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/super-form.vue.d.ts +1 -1
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +3 -1
- package/lib/components/switch/index.d.ts +6 -6
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/index.d.ts +24 -24
- package/lib/components/table/table.vue.d.ts +1 -1
- package/lib/components/tabs/tab-nav.vue.d.ts +2 -2
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue.d.ts +2 -1
- package/lib/components/time-picker/common/picker-range-trigger.vue.cjs +1 -0
- package/lib/components/time-picker/common/picker-range-trigger.vue.d.ts +84 -0
- package/lib/components/time-picker/common/picker-range-trigger.vue2.cjs +1 -0
- package/lib/components/time-picker/common/picker.vue.d.ts +71 -41
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
- package/lib/components/time-picker/common/props.cjs +1 -1
- package/lib/components/time-picker/common/props.d.ts +76 -12
- package/lib/components/time-picker/composables/use-time-panel.d.ts +4 -4
- package/lib/components/time-picker/composables/use-time-picker.d.ts +28 -29
- package/lib/components/time-picker/constants.cjs +1 -1
- package/lib/components/time-picker/constants.d.ts +5 -0
- package/lib/components/time-picker/index.cjs +1 -1
- package/lib/components/time-picker/index.d.ts +120 -74
- package/lib/components/time-picker/props/basic-time-spinner.d.ts +5 -4
- package/lib/components/time-picker/props/panel-time-picker.d.ts +2 -1
- package/lib/components/time-picker/props/panel-time-range.d.ts +2 -1
- package/lib/components/time-picker/props/shared.d.ts +4 -5
- package/lib/components/time-picker/style/css.cjs +1 -1
- package/lib/components/time-picker/style/css.d.ts +3 -0
- package/lib/components/time-picker/style/index.cjs +1 -1
- package/lib/components/time-picker/style/index.d.ts +3 -0
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue.d.ts +6 -6
- package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue.d.ts +4 -4
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue.d.ts +4 -4
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker.cjs +1 -1
- package/lib/components/time-picker/time-picker.d.ts +60 -37
- package/lib/components/time-picker/utils.cjs +1 -1
- package/lib/components/time-picker/utils.d.ts +5 -2
- package/lib/components/time-select/time-select.vue.d.ts +1 -1
- package/lib/components/timeline/index.d.ts +6 -6
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tooltip/index.d.ts +3 -3
- package/lib/components/tooltip/tooltip.vue.d.ts +1 -1
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/utils.cjs +1 -1
- package/lib/components/tree/tree-node.vue.cjs +1 -1
- package/lib/components/tree/tree-node.vue.d.ts +33 -33
- package/lib/components/tree/tree-node.vue2.cjs +1 -1
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -1
- package/lib/components/virtual-list/builders/build-grid.cjs +1 -1
- package/lib/components/virtual-list/builders/build-grid.d.ts +9 -9
- package/lib/components/virtual-list/builders/build-list.cjs +1 -1
- package/lib/components/virtual-list/builders/build-list.d.ts +13 -13
- package/lib/components/virtual-list/components/dynamic-size-grid.cjs +1 -1
- package/lib/components/virtual-list/components/dynamic-size-grid.d.ts +6 -6
- package/lib/components/virtual-list/components/dynamic-size-list.cjs +1 -1
- package/lib/components/virtual-list/components/dynamic-size-list.d.ts +13 -12
- package/lib/components/virtual-list/components/fixed-size-grid.d.ts +6 -6
- package/lib/components/virtual-list/components/fixed-size-list.cjs +1 -1
- package/lib/components/virtual-list/components/fixed-size-list.d.ts +13 -12
- package/lib/components/virtual-list/components/scrollbar.cjs +1 -1
- package/lib/components/virtual-list/defaults.cjs +1 -1
- package/lib/components/virtual-list/defaults.d.ts +0 -4
- package/lib/components/virtual-list/hooks/use-cache.cjs +1 -1
- package/lib/components/virtual-list/hooks/use-cache.d.ts +1 -1
- package/lib/components/virtual-list/hooks/use-wheel.cjs +1 -1
- package/lib/components/virtual-list/index.cjs +1 -1
- package/lib/components/virtual-list/index.d.ts +6 -4
- package/lib/components/virtual-list/props.cjs +1 -1
- package/lib/components/virtual-list/props.d.ts +11 -7
- package/lib/components/virtual-list/types.d.ts +1 -1
- package/lib/components/virtual-list/utils.cjs +1 -1
- package/lib/components/virtual-list/utils.d.ts +1 -2
- package/lib/hooks/index.cjs +1 -1
- package/lib/hooks/index.d.ts +3 -1
- package/lib/hooks/use-calc-input-width/index.cjs +1 -0
- package/lib/hooks/use-calc-input-width/index.d.ts +7 -0
- package/lib/hooks/use-composition/index.cjs +1 -0
- package/lib/hooks/use-composition/index.d.ts +12 -0
- package/lib/hooks/use-delayed-toggle/index.cjs +1 -1
- package/lib/hooks/use-delayed-toggle/index.d.ts +8 -4
- package/lib/hooks/use-empty-values/index.cjs +1 -0
- package/lib/hooks/use-empty-values/index.d.ts +16 -0
- package/lib/hooks/use-focus-controller/index.cjs +1 -0
- package/lib/hooks/use-focus-controller/index.d.ts +27 -0
- package/lib/hooks/use-id/index.cjs +2 -2
- package/lib/hooks/use-id/index.d.ts +1 -1
- package/lib/hooks/use-namespace/index.cjs +1 -1
- package/lib/hooks/use-namespace/index.d.ts +5 -6
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +2 -2
- package/lib/utils/helper.cjs +1 -1
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/common/var.scss +41 -0
- package/theme-style/src/date-picker/date-picker.scss +31 -31
- package/theme-style/src/date-picker/date-range-picker.scss +60 -37
- package/theme-style/src/date-picker/date-table.scss +20 -20
- package/theme-style/src/date-picker/month-table.scss +40 -25
- package/theme-style/src/date-picker/picker-panel.scss +27 -28
- package/theme-style/src/date-picker/picker.scss +60 -56
- package/theme-style/src/date-picker/time-picker.scss +21 -21
- package/theme-style/src/date-picker/time-range-picker.scss +6 -6
- package/theme-style/src/date-picker/time-spinner.scss +24 -22
- package/theme-style/src/date-picker/year-table.scss +61 -14
- package/theme-style/src/option-group.scss +7 -28
- package/theme-style/src/option.scss +46 -12
- package/theme-style/src/select-dropdown-v2.scss +31 -37
- package/theme-style/src/select.scss +136 -220
- package/theme-style/src/tabs.scss +6 -66
- package/theme-style/src/tabss.scss +4 -4
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-option-group.css +1 -1
- package/theme-style/vft-option.css +1 -1
- package/theme-style/vft-select-dropdown-v2.css +1 -1
- package/theme-style/vft-select.css +1 -1
- package/theme-style/vft-tabs.css +1 -1
- package/theme-style/vft-tabss.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/web-types.json +1 -1
- package/es/components/select/useInput.d.ts +0 -5
- package/es/components/select/useInput.js +0 -20
- package/es/components/select/util.d.ts +0 -2
- package/es/components/select/util.js +0 -18
- package/lib/components/select/useInput.cjs +0 -1
- package/lib/components/select/useInput.d.ts +0 -5
- package/lib/components/select/util.cjs +0 -1
- package/lib/components/select/util.d.ts +0 -2
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { refDebounced as
|
|
3
|
-
import { addUnit as
|
|
1
|
+
import { defineComponent as Y, useSlots as ye, inject as A, ref as g, computed as a, watch as D, reactive as Se, toRefs as Ie, provide as _e, onMounted as Ve, onBeforeUnmount as qe, createElementBlock as we, openBlock as E, unref as f, normalizeClass as h, createVNode as L, createElementVNode as T, withCtx as k, createBlock as Ce, createCommentVNode as G, resolveDynamicComponent as Fe, normalizeStyle as K, renderSlot as M, createTextVNode as ke, toDisplayString as U, TransitionGroup as Me, nextTick as Re } from "vue";
|
|
2
|
+
import { refDebounced as We } from "@vueuse/core";
|
|
3
|
+
import { addUnit as O, isBoolean as xe, getProp as R, isFunction as ze } from "@vft/utils";
|
|
4
|
+
import { castArray as H } from "../../utils/helper.js";
|
|
4
5
|
import "../../utils/ns-cover.js";
|
|
5
|
-
import {
|
|
6
|
-
import { useId as
|
|
6
|
+
import { isArray as J, clone as Q } from "lodash-es";
|
|
7
|
+
import { useId as $e } from "../../hooks/use-id/index.js";
|
|
7
8
|
import { useNamespace as Be } from "../../hooks/use-namespace/index.js";
|
|
8
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
10
|
import "@popperjs/core";
|
|
10
11
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import
|
|
12
|
-
import { formContextKey as Ne, formItemContextKey as
|
|
13
|
-
import
|
|
14
|
-
import { useFormSize as
|
|
15
|
-
const
|
|
12
|
+
import Pe from "async-validator";
|
|
13
|
+
import { formContextKey as Ne, formItemContextKey as X } from "./constants.js";
|
|
14
|
+
import je from "./form-label-wrap.js";
|
|
15
|
+
import { useFormSize as Ae } from "./hooks/use-form-common-props.js";
|
|
16
|
+
const De = ["role", "aria-labelledby"], Ee = Y({
|
|
16
17
|
name: "vft-form-item"
|
|
17
|
-
}),
|
|
18
|
-
...
|
|
18
|
+
}), ot = /* @__PURE__ */ Y({
|
|
19
|
+
...Ee,
|
|
19
20
|
props: {
|
|
20
21
|
label: {},
|
|
21
22
|
labelWidth: { default: "" },
|
|
23
|
+
labelPosition: {},
|
|
22
24
|
prop: {},
|
|
23
25
|
required: { type: Boolean, default: void 0 },
|
|
24
26
|
rules: {},
|
|
@@ -30,197 +32,200 @@ const je = ["role", "aria-labelledby"], De = J({
|
|
|
30
32
|
size: {}
|
|
31
33
|
},
|
|
32
34
|
emits: ["update:error"],
|
|
33
|
-
setup(
|
|
34
|
-
const t =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (o?.labelPosition === "top")
|
|
35
|
+
setup(Z, { expose: ee, emit: te }) {
|
|
36
|
+
const t = Z, re = te, W = ye(), o = A(Ne, void 0), oe = A(X, void 0), y = Ae(void 0, { formItem: !1 }), s = Be("form-item"), S = $e().value, d = g([]), c = g(""), le = We(c, 100), n = g(""), x = g();
|
|
37
|
+
let z, v = !1;
|
|
38
|
+
const b = a(
|
|
39
|
+
() => t.labelPosition || o?.labelPosition
|
|
40
|
+
), $ = a(() => {
|
|
41
|
+
if (b.value === "top")
|
|
41
42
|
return {};
|
|
42
|
-
const e =
|
|
43
|
+
const e = O(t.labelWidth || o?.labelWidth || "");
|
|
43
44
|
return e ? { width: e } : {};
|
|
44
|
-
}),
|
|
45
|
-
if (
|
|
45
|
+
}), ae = a(() => {
|
|
46
|
+
if (b.value === "top" || o?.inline)
|
|
46
47
|
return {};
|
|
47
|
-
if (!t.label && !t.labelWidth &&
|
|
48
|
+
if (!t.label && !t.labelWidth && ue)
|
|
48
49
|
return {};
|
|
49
|
-
const e =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return !t.label && !R.label ? { marginLeft: e } : {};
|
|
53
|
-
}), oe = a(() => [
|
|
50
|
+
const e = O(t.labelWidth || o?.labelWidth || "");
|
|
51
|
+
return !t.label && !W.label ? { marginLeft: e } : {};
|
|
52
|
+
}), se = a(() => [
|
|
54
53
|
s.b(),
|
|
55
|
-
s.m(
|
|
56
|
-
s.is("error",
|
|
57
|
-
s.is("validating",
|
|
58
|
-
s.is("success",
|
|
59
|
-
s.is("required",
|
|
54
|
+
s.m(y.value),
|
|
55
|
+
s.is("error", c.value === "error"),
|
|
56
|
+
s.is("validating", c.value === "validating"),
|
|
57
|
+
s.is("success", c.value === "success"),
|
|
58
|
+
s.is("required", fe.value || t.required),
|
|
60
59
|
s.is("no-asterisk", o?.hideRequiredAsterisk),
|
|
61
60
|
o?.requireAsteriskPosition === "right" ? "asterisk-right" : "asterisk-left",
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
{
|
|
62
|
+
[s.m("feedback")]: o?.statusIcon,
|
|
63
|
+
[s.m(`label-${b.value}`)]: b.value
|
|
64
|
+
}
|
|
65
|
+
]), ie = a(
|
|
66
|
+
() => xe(t.inlineMessage) ? t.inlineMessage : o?.inlineMessage || !1
|
|
67
|
+
), ne = a(() => [
|
|
66
68
|
s.e("error"),
|
|
67
|
-
{ [s.em("error", "inline")]:
|
|
68
|
-
]),
|
|
69
|
+
{ [s.em("error", "inline")]: ie.value }
|
|
70
|
+
]), B = a(() => t.prop ? J(t.prop) ? t.prop.join(".") : t.prop : ""), I = a(() => !!(t.label || W.label)), _ = a(() => t.for ?? (d.value.length === 1 ? d.value[0] : void 0)), V = a(() => !_.value && I.value), ue = !!oe, q = a(() => {
|
|
69
71
|
const e = o?.model;
|
|
70
72
|
if (!(!e || !t.prop))
|
|
71
|
-
return
|
|
72
|
-
}),
|
|
73
|
+
return R(e, t.prop).value;
|
|
74
|
+
}), w = a(() => {
|
|
73
75
|
const { required: e } = t, r = [];
|
|
74
76
|
t.rules && r.push(
|
|
75
|
-
...
|
|
77
|
+
...H(t.rules).map((l) => (l.trigger = l.trigger || "blur", l))
|
|
76
78
|
);
|
|
77
79
|
const i = o?.rules;
|
|
78
80
|
if (i && t.prop) {
|
|
79
|
-
const l =
|
|
81
|
+
const l = R(
|
|
80
82
|
i,
|
|
81
83
|
t.prop
|
|
82
84
|
).value;
|
|
83
|
-
l && r.push(...
|
|
85
|
+
l && r.push(...H(l));
|
|
84
86
|
}
|
|
85
87
|
if (e !== void 0) {
|
|
86
|
-
const l = r.map((
|
|
88
|
+
const l = r.map((u, p) => [u, p]).filter(([u]) => Object.keys(u).includes("required"));
|
|
87
89
|
if (l.length > 0)
|
|
88
|
-
for (const [
|
|
89
|
-
|
|
90
|
+
for (const [u, p] of l)
|
|
91
|
+
u.required !== e && (r[p] = { ...u, required: e });
|
|
90
92
|
else
|
|
91
93
|
r.push({ required: e });
|
|
92
94
|
}
|
|
93
95
|
return r;
|
|
94
|
-
}),
|
|
95
|
-
() =>
|
|
96
|
-
),
|
|
97
|
-
() =>
|
|
98
|
-
),
|
|
96
|
+
}), de = a(() => w.value.length > 0), ce = (e) => w.value.filter((i) => !i.trigger || !e ? !0 : J(i.trigger) ? i.trigger.includes(e) : i.trigger === e).map(({ trigger: i, ...l }) => l), fe = a(
|
|
97
|
+
() => w.value.some((e) => e.required)
|
|
98
|
+
), me = a(
|
|
99
|
+
() => le.value === "error" && t.showMessage && (o?.showMessage ?? !0)
|
|
100
|
+
), P = a(
|
|
99
101
|
() => `${t.label || ""}${o?.labelSuffix || ""}`
|
|
100
|
-
),
|
|
101
|
-
|
|
102
|
-
},
|
|
102
|
+
), m = (e) => {
|
|
103
|
+
c.value = e;
|
|
104
|
+
}, pe = (e) => {
|
|
103
105
|
const { errors: r, fields: i } = e;
|
|
104
|
-
(!r || !i) && console.error(e),
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
const r =
|
|
109
|
-
return new
|
|
106
|
+
(!r || !i) && console.error(e), m("error"), n.value = r ? r?.[0]?.message ?? `${t.prop} is required` : "", o?.emit("validate", t.prop, !1, n.value);
|
|
107
|
+
}, ve = () => {
|
|
108
|
+
m("success"), o?.emit("validate", t.prop, !0, "");
|
|
109
|
+
}, be = async (e) => {
|
|
110
|
+
const r = B.value;
|
|
111
|
+
return new Pe({
|
|
110
112
|
[r]: e
|
|
111
|
-
}).validate({ [r]:
|
|
113
|
+
}).validate({ [r]: q.value }, { firstFields: !0 }).then(() => (ve(), !0)).catch((l) => (pe(l), Promise.reject(l)));
|
|
112
114
|
}, N = async (e, r) => {
|
|
113
115
|
if (v || !t.prop)
|
|
114
116
|
return !1;
|
|
115
|
-
const i =
|
|
116
|
-
if (!
|
|
117
|
+
const i = ze(r);
|
|
118
|
+
if (!de.value)
|
|
117
119
|
return r?.(!1), !1;
|
|
118
|
-
const l =
|
|
119
|
-
return l.length === 0 ? (r?.(!0), !0) : (
|
|
120
|
-
const { fields:
|
|
121
|
-
return r?.(!1,
|
|
120
|
+
const l = ce(e);
|
|
121
|
+
return l.length === 0 ? (r?.(!0), !0) : (m("validating"), be(l).then(() => (r?.(!0), !0)).catch((u) => {
|
|
122
|
+
const { fields: p } = u;
|
|
123
|
+
return r?.(!1, p), i ? !1 : Promise.reject(p);
|
|
122
124
|
}));
|
|
123
|
-
},
|
|
124
|
-
t.error &&
|
|
125
|
-
},
|
|
125
|
+
}, C = () => {
|
|
126
|
+
t.error && re("update:error", ""), m(""), n.value = "", v = !1;
|
|
127
|
+
}, j = async () => {
|
|
126
128
|
const e = o?.model;
|
|
127
129
|
if (!e || !t.prop) return;
|
|
128
|
-
const r =
|
|
129
|
-
v = !0, r.value =
|
|
130
|
-
}, ve = (e) => {
|
|
131
|
-
u.value.includes(e) || u.value.push(e);
|
|
130
|
+
const r = R(e, t.prop);
|
|
131
|
+
v = !0, r.value = Q(z), await Re(), C(), v = !1;
|
|
132
132
|
}, ge = (e) => {
|
|
133
|
-
|
|
133
|
+
d.value.includes(e) || d.value.push(e);
|
|
134
|
+
}, he = (e) => {
|
|
135
|
+
d.value = d.value.filter((r) => r !== e);
|
|
134
136
|
};
|
|
135
|
-
|
|
137
|
+
D(
|
|
136
138
|
() => t.error,
|
|
137
139
|
(e) => {
|
|
138
|
-
|
|
140
|
+
n.value = e || "", m(e ? "error" : "");
|
|
139
141
|
},
|
|
140
142
|
{ immediate: !0 }
|
|
141
|
-
),
|
|
143
|
+
), D(
|
|
142
144
|
() => t.validateStatus,
|
|
143
|
-
(e) =>
|
|
145
|
+
(e) => m(e || "")
|
|
144
146
|
);
|
|
145
|
-
const
|
|
146
|
-
...
|
|
147
|
-
$el:
|
|
148
|
-
size:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
147
|
+
const F = Se({
|
|
148
|
+
...Ie(t),
|
|
149
|
+
$el: x,
|
|
150
|
+
size: y,
|
|
151
|
+
validateMessage: n,
|
|
152
|
+
validateState: c,
|
|
153
|
+
labelId: S,
|
|
154
|
+
inputIds: d,
|
|
155
|
+
isGroup: V,
|
|
156
|
+
hasLabel: I,
|
|
157
|
+
fieldValue: q,
|
|
158
|
+
addInputId: ge,
|
|
159
|
+
removeInputId: he,
|
|
160
|
+
resetField: j,
|
|
161
|
+
clearValidate: C,
|
|
162
|
+
validate: N,
|
|
163
|
+
propString: B
|
|
159
164
|
});
|
|
160
|
-
return
|
|
161
|
-
t.prop && (o?.addField(
|
|
162
|
-
}),
|
|
163
|
-
o?.removeField(
|
|
164
|
-
}),
|
|
165
|
-
size:
|
|
166
|
-
validateMessage:
|
|
167
|
-
validateState:
|
|
165
|
+
return _e(X, F), Ve(() => {
|
|
166
|
+
t.prop && (o?.addField(F), z = Q(q.value));
|
|
167
|
+
}), qe(() => {
|
|
168
|
+
o?.removeField(F);
|
|
169
|
+
}), ee({
|
|
170
|
+
size: y,
|
|
171
|
+
validateMessage: n,
|
|
172
|
+
validateState: c,
|
|
168
173
|
validate: N,
|
|
169
|
-
clearValidate:
|
|
170
|
-
resetField:
|
|
171
|
-
}), (e, r) => (
|
|
174
|
+
clearValidate: C,
|
|
175
|
+
resetField: j
|
|
176
|
+
}), (e, r) => (E(), we("div", {
|
|
172
177
|
ref_key: "formItemRef",
|
|
173
|
-
ref:
|
|
174
|
-
class: h(
|
|
175
|
-
role:
|
|
176
|
-
"aria-labelledby":
|
|
178
|
+
ref: x,
|
|
179
|
+
class: h(se.value),
|
|
180
|
+
role: V.value ? "group" : void 0,
|
|
181
|
+
"aria-labelledby": V.value ? f(S) : void 0
|
|
177
182
|
}, [
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
"is-auto-width": z.value.width === "auto",
|
|
183
|
+
L(f(je), {
|
|
184
|
+
"is-auto-width": $.value.width === "auto",
|
|
181
185
|
"update-all": f(o)?.labelWidth === "auto"
|
|
182
186
|
}, {
|
|
183
|
-
default:
|
|
184
|
-
(
|
|
185
|
-
|
|
187
|
+
default: k(() => [
|
|
188
|
+
I.value ? (E(), Ce(Fe(_.value ? "label" : "div"), {
|
|
189
|
+
key: 0,
|
|
190
|
+
id: f(S),
|
|
186
191
|
for: _.value,
|
|
187
192
|
class: h(f(s).e("label")),
|
|
188
|
-
style:
|
|
193
|
+
style: K($.value)
|
|
189
194
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
192
|
-
|
|
195
|
+
default: k(() => [
|
|
196
|
+
M(e.$slots, "label", { label: P.value }, () => [
|
|
197
|
+
ke(U(P.value), 1)
|
|
193
198
|
])
|
|
194
199
|
]),
|
|
195
200
|
_: 3
|
|
196
|
-
}, 8, ["id", "for", "class", "style"]))
|
|
201
|
+
}, 8, ["id", "for", "class", "style"])) : G("", !0)
|
|
197
202
|
]),
|
|
198
203
|
_: 3
|
|
199
|
-
}, 8, ["is-auto-width", "update-all"])
|
|
200
|
-
|
|
204
|
+
}, 8, ["is-auto-width", "update-all"]),
|
|
205
|
+
T("div", {
|
|
201
206
|
class: h(f(s).e("content")),
|
|
202
|
-
style:
|
|
207
|
+
style: K(ae.value)
|
|
203
208
|
}, [
|
|
204
|
-
|
|
205
|
-
|
|
209
|
+
M(e.$slots, "default"),
|
|
210
|
+
L(Me, {
|
|
206
211
|
name: `${f(s).namespace.value}-zoom-in-top`
|
|
207
212
|
}, {
|
|
208
|
-
default:
|
|
209
|
-
|
|
213
|
+
default: k(() => [
|
|
214
|
+
me.value ? M(e.$slots, "error", {
|
|
210
215
|
key: 0,
|
|
211
|
-
error:
|
|
216
|
+
error: n.value
|
|
212
217
|
}, () => [
|
|
213
|
-
|
|
214
|
-
class: h(
|
|
215
|
-
},
|
|
216
|
-
]) :
|
|
218
|
+
T("div", {
|
|
219
|
+
class: h(ne.value)
|
|
220
|
+
}, U(n.value), 3)
|
|
221
|
+
]) : G("", !0)
|
|
217
222
|
]),
|
|
218
223
|
_: 3
|
|
219
224
|
}, 8, ["name"])
|
|
220
225
|
], 6)
|
|
221
|
-
], 10,
|
|
226
|
+
], 10, De));
|
|
222
227
|
}
|
|
223
228
|
});
|
|
224
229
|
export {
|
|
225
|
-
|
|
230
|
+
ot as default
|
|
226
231
|
};
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { defineComponent as g, inject as
|
|
2
|
-
import { useResizeObserver as
|
|
1
|
+
import { defineComponent as g, inject as f, ref as p, onMounted as C, onBeforeUnmount as w, onUpdated as x, watch as N, computed as A, createVNode as c, Fragment as E, nextTick as P } from "vue";
|
|
2
|
+
import { useResizeObserver as y } from "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
|
-
import { throwError as
|
|
4
|
+
import { throwError as M } from "../../utils/error.js";
|
|
5
5
|
import "../../utils/ns-cover.js";
|
|
6
6
|
import "lodash-es";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as F } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import { formContextKey as
|
|
12
|
-
const h = "VftLabelWrap",
|
|
11
|
+
import { formContextKey as B, formItemContextKey as I } from "./constants.js";
|
|
12
|
+
const h = "VftLabelWrap", q = /* @__PURE__ */ g({
|
|
13
13
|
name: h,
|
|
14
14
|
props: {
|
|
15
15
|
isAutoWidth: Boolean,
|
|
16
16
|
updateAll: Boolean
|
|
17
17
|
},
|
|
18
18
|
setup(n, {
|
|
19
|
-
slots:
|
|
19
|
+
slots: i
|
|
20
20
|
}) {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const b =
|
|
21
|
+
const r = f(B, void 0), l = f(I);
|
|
22
|
+
l || M(h, "usage: <vft-form-item><label-wrap /></vft-form-item>");
|
|
23
|
+
const b = F("form"), t = p(), a = p(0), W = () => {
|
|
24
24
|
if (t.value?.firstElementChild) {
|
|
25
25
|
const e = window.getComputedStyle(t.value.firstElementChild).width;
|
|
26
26
|
return Math.ceil(Number.parseFloat(e));
|
|
27
27
|
} else
|
|
28
28
|
return 0;
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
}, s = (e = "update") => {
|
|
30
|
+
P(() => {
|
|
31
|
+
i.default && n.isAutoWidth && (e === "update" ? a.value = W() : e === "remove" && r?.deregisterLabelWidth(a.value));
|
|
32
32
|
});
|
|
33
|
-
},
|
|
33
|
+
}, m = () => s("update");
|
|
34
34
|
return C(() => {
|
|
35
|
-
|
|
35
|
+
m();
|
|
36
36
|
}), w(() => {
|
|
37
|
-
|
|
38
|
-
}), x(() =>
|
|
39
|
-
n.updateAll &&
|
|
40
|
-
}),
|
|
41
|
-
if (!
|
|
37
|
+
s("remove");
|
|
38
|
+
}), x(() => m()), N(a, (e, o) => {
|
|
39
|
+
n.updateAll && r?.registerLabelWidth(e, o);
|
|
40
|
+
}), y(A(() => t.value?.firstElementChild ?? null), m), () => {
|
|
41
|
+
if (!i) return null;
|
|
42
42
|
const {
|
|
43
43
|
isAutoWidth: e
|
|
44
44
|
} = n;
|
|
45
45
|
if (e) {
|
|
46
|
-
const o =
|
|
46
|
+
const o = r?.autoLabelWidth, v = l?.hasLabel, u = {};
|
|
47
47
|
if (v && o && o !== "auto") {
|
|
48
|
-
const
|
|
49
|
-
|
|
48
|
+
const d = Math.max(0, Number.parseInt(o, 10) - a.value), L = (l.labelPosition || r.labelPosition) === "left" ? "marginRight" : "marginLeft";
|
|
49
|
+
d && (u[L] = `${d}px`);
|
|
50
50
|
}
|
|
51
51
|
return c("div", {
|
|
52
52
|
ref: t,
|
|
53
53
|
class: [b.be("item", "label-wrap")],
|
|
54
|
-
style:
|
|
55
|
-
}, [
|
|
54
|
+
style: u
|
|
55
|
+
}, [i.default?.()]);
|
|
56
56
|
} else
|
|
57
57
|
return c(E, {
|
|
58
58
|
ref: t
|
|
59
|
-
}, [
|
|
59
|
+
}, [i.default?.()]);
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
export {
|
|
64
|
-
|
|
64
|
+
q as default
|
|
65
65
|
};
|