vft 0.0.509 → 0.0.511
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/affix/affix.vue2.js +2 -2
- package/es/components/alert/alert.vue2.js +1 -1
- package/es/components/autocomplete/autocomplete.vue2.js +1 -1
- package/es/components/avatar/avatar.vue2.js +2 -2
- package/es/components/avatar-stack/avatar-stack.vue2.js +7 -7
- package/es/components/backtop/backtop.vue2.js +1 -1
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +3 -3
- package/es/components/breadcrumb/breadcrumb.vue2.js +2 -2
- package/es/components/button/button-group.vue2.js +2 -2
- package/es/components/button/button.vue2.js +7 -7
- package/es/components/button/use-button.js +3 -3
- package/es/components/card/card.vue2.js +6 -6
- package/es/components/carousel/carousel-item.vue2.js +3 -3
- package/es/components/carousel/carousel.vue2.js +1 -1
- package/es/components/cascader/cascader.vue2.js +2 -2
- package/es/components/cascader-panel/index.vue2.js +1 -1
- package/es/components/cascader-panel/menu.vue2.js +6 -6
- package/es/components/cascader-panel/node.vue2.js +8 -8
- package/es/components/check-tag/check-tag.vue2.js +2 -2
- package/es/components/checkbox/checkbox-button.vue2.js +13 -13
- package/es/components/checkbox/checkbox-group.vue2.js +3 -3
- package/es/components/checkbox/checkbox.vue2.js +1 -1
- package/es/components/clamp/clamp.vue2.js +2 -2
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +4 -4
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +6 -6
- package/es/components/col/col.vue2.js +2 -2
- package/es/components/collapse/collapse-item.vue2.js +2 -2
- package/es/components/collapse/collapse.vue2.js +2 -2
- package/es/components/collapse-transition/collapse-transition.vue2.js +2 -2
- package/es/components/color-picker/color-picker.vue2.js +2 -2
- package/es/components/color-picker/components/alpha-slider.vue2.js +2 -2
- package/es/components/color-picker/components/hue-slider.vue.js +2 -2
- package/es/components/color-picker/components/predefine.vue.js +3 -3
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/config-provider.vue2.js +2 -2
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/container/aside.vue2.js +2 -2
- package/es/components/container/container.vue2.js +2 -2
- package/es/components/container/footer.vue2.js +2 -2
- package/es/components/container/header.vue2.js +2 -2
- package/es/components/container/main.vue2.js +2 -2
- package/es/components/context-menu/context-menu.vue2.js +1 -1
- package/es/components/countdown/countdown.vue2.js +2 -2
- package/es/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/es/components/date-picker/composables/use-basic-date-table.js +115 -115
- package/es/components/date-picker/composables/use-month-range-header.js +1 -1
- package/es/components/date-picker/composables/use-panel-date-range.js +1 -1
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +6 -6
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +5 -5
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +5 -5
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +12 -12
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +3 -3
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +12 -12
- package/es/components/date-picker/date-picker-com/panel-year-range.vue2.js +12 -12
- package/es/components/date-picker/props/basic-date-table.js +3 -3
- package/es/components/date-picker/props/basic-month-table.js +3 -3
- package/es/components/date-picker/props/basic-year-table.js +3 -3
- package/es/components/date-time-select/date-time-select.vue2.js +1 -1
- package/es/components/descriptions/description.vue2.js +1 -1
- package/es/components/descriptions/descriptions-row.vue2.js +10 -10
- package/es/components/dialog/dialog-content.vue2.js +3 -3
- package/es/components/dialog/dialog.vue2.js +5 -5
- package/es/components/divider/divider.vue2.js +5 -5
- package/es/components/drawer/drawer.vue2.js +4 -4
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item-impl.vue2.js +3 -3
- package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item.vue2.js +2 -2
- package/es/components/dropdown/dropdown-menu.vue2.js +2 -2
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +5 -5
- package/es/components/dropdown/index.d.ts +33 -33
- package/es/components/empty/empty.vue2.js +6 -6
- package/es/components/footer-layout/footer-layout.vue2.js +2 -2
- package/es/components/form/form-item.vue2.js +16 -16
- package/es/components/form/form.vue2.js +2 -2
- package/es/components/full-screen/full-screen.vue2.js +3 -3
- package/es/components/header-layout/header-layout.vue2.js +1 -1
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +3 -3
- package/es/components/icon/icon.vue2.js +3 -3
- package/es/components/icon-text/icon-text.vue2.js +1 -1
- package/es/components/iframe-layout/iframe-layout.vue2.js +4 -4
- package/es/components/iframe-layout/iframe-page.vue2.js +2 -2
- package/es/components/image/image.vue2.js +2 -2
- package/es/components/image-viewer/image-viewer.vue2.js +7 -7
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +206 -203
- package/es/components/input/input.vue2.js +6 -6
- package/es/components/input-number/input-number.vue2.js +4 -4
- package/es/components/input-tag/input-tag.vue2.js +7 -7
- package/es/components/link/link.vue2.js +1 -1
- package/es/components/list-cell/list-cell.vue2.js +1 -1
- package/es/components/logo/logo.vue2.js +10 -10
- package/es/components/md-comment/md-comment.vue2.js +2 -2
- package/es/components/md-container/md-container.vue2.js +2 -2
- package/es/components/md-container/toc.js +1 -1
- package/es/components/menu/menu-collapse-transition.vue.js +2 -2
- package/es/components/menu/menu-item-group.vue2.js +7 -7
- package/es/components/menu/menu-item.vue2.js +1 -1
- package/es/components/message/message.vue2.js +3 -3
- package/es/components/message-box/index.d.ts +4 -0
- package/es/components/message-box/index.js +14 -0
- package/es/components/message-box/message-box.vue.d.ts +103 -0
- package/es/components/message-box/message-box.vue.js +4 -0
- package/es/components/message-box/message-box.vue2.js +358 -0
- package/es/components/message-box/method.d.ts +3 -0
- package/es/components/message-box/method.js +101 -0
- package/es/components/message-box/style/css.d.ts +2 -0
- package/es/components/message-box/style/css.js +3 -0
- package/es/components/message-box/style/index.d.ts +2 -0
- package/es/components/message-box/style/index.js +3 -0
- package/es/components/message-box/types.d.ts +202 -0
- package/es/components/message-box/types.js +1 -0
- package/es/components/modal/index.d.ts +1 -0
- package/es/components/modal/modal-footer-action.vue2.js +11 -11
- package/es/components/modal/modal.vue.d.ts +1 -0
- package/es/components/modal/modal.vue2.js +30 -28
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +1 -1
- package/es/components/multiple-tabs/tab-content.vue2.js +2 -2
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +1 -1
- package/es/components/notification/notification.vue2.js +1 -1
- package/es/components/overlay/overlay.vue2.js +1 -1
- package/es/components/page-wrapper/page-wrapper.vue2.js +2 -2
- package/es/components/pagination/components/jumper.vue2.js +28 -29
- package/es/components/pagination/components/next.vue2.js +4 -4
- package/es/components/pagination/components/pager.vue2.js +1 -1
- package/es/components/pagination/components/prev.vue2.js +4 -4
- package/es/components/pagination/components/sizes.vue2.js +20 -21
- package/es/components/pagination/components/total.vue2.js +10 -11
- package/es/components/popconfirm/popconfirm.vue2.js +4 -4
- package/es/components/popover/popover.vue2.js +1 -1
- package/es/components/popper/arrow.vue2.js +2 -2
- package/es/components/popper/content.vue2.js +2 -2
- package/es/components/popper/trigger.vue2.js +4 -4
- package/es/components/progress/progress.vue2.js +1 -1
- package/es/components/progress-i/progress-i.vue2.js +2 -2
- package/es/components/qrcode/qrcode.vue2.js +1 -1
- package/es/components/radio/radio-button.vue2.js +2 -2
- package/es/components/radio/radio-group.vue2.js +3 -3
- package/es/components/radio/radio.vue2.js +2 -2
- package/es/components/rate/rate.vue2.js +6 -6
- package/es/components/router-view-content/router-view-content.vue2.js +7 -7
- package/es/components/roving-focus-group/roving-focus-group.vue2.js +2 -2
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +2 -2
- package/es/components/row/row.vue2.js +2 -2
- package/es/components/scrollbar/bar.vue2.js +2 -2
- package/es/components/scrollbar/scrollbar.vue2.js +7 -7
- package/es/components/scrollbar/thumb.vue2.js +2 -2
- package/es/components/search/search.vue2.js +8 -8
- package/es/components/segmented/segmented.vue2.js +7 -7
- package/es/components/select/group-item.vue.js +2 -2
- package/es/components/select/option-item.vue.js +2 -2
- package/es/components/select/select.vue.js +1 -1
- package/es/components/select/useSelect.js +1 -1
- package/es/components/skeleton/skeleton-item.vue2.js +2 -2
- package/es/components/skeleton/skeleton.vue2.js +8 -8
- package/es/components/slider/button.vue2.js +2 -2
- package/es/components/slider/slider.vue2.js +1 -1
- package/es/components/space/space.js +1 -1
- package/es/components/statistic/statistic.vue2.js +17 -17
- package/es/components/steps/item.vue2.js +11 -11
- package/es/components/steps/steps.vue2.js +2 -2
- package/es/components/super-form/super-form-action.vue2.js +47 -48
- package/es/components/super-form/super-form-item.vue2.js +204 -206
- package/es/components/super-form/super-form.vue2.js +7 -7
- package/es/components/super-form/use/helper.d.ts +1 -1
- package/es/components/super-form/use/helper.js +63 -63
- package/es/components/super-form/use/use-form.js +8 -8
- package/es/components/switch/switch.vue2.js +1 -1
- package/es/components/table/field.js +111 -130
- package/es/components/table/table.vue2.js +128 -133
- package/es/components/table/use/use-columns.js +26 -29
- package/es/components/table/use/use-data-source.js +59 -60
- package/es/components/tabs/tab-bar.vue2.js +2 -2
- package/es/components/tabs/tab-pane.vue2.js +6 -6
- package/es/components/teleport/teleport.vue2.js +2 -2
- package/es/components/time-picker/common/picker-range-trigger.vue2.js +2 -2
- package/es/components/time-picker/common/picker.vue2.js +8 -8
- package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +1 -1
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +4 -4
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +4 -4
- package/es/components/time-select/time-select.vue2.js +3 -3
- package/es/components/timeline/timeline-item.vue2.js +1 -1
- package/es/components/tooltip/content.vue2.js +6 -6
- package/es/components/tooltip/tooltip.vue2.js +1 -1
- package/es/components/tooltip/trigger.vue2.js +2 -2
- package/es/components/transfer/transfer-panel.vue2.js +8 -8
- package/es/components/transfer/transfer.vue2.js +5 -5
- package/es/components/tree/tree-node.vue.js +1 -1
- package/es/components/tree/tree.vue2.js +7 -7
- package/es/components/upload/upload-content.vue2.js +8 -8
- package/es/components/upload/upload-dragger.vue2.js +2 -2
- package/es/components/upload/upload-list.vue2.js +2 -2
- package/es/components/upload/upload.vue2.js +20 -20
- package/es/components/verify-code/verify-code.vue2.js +2 -2
- package/es/components/watermark/watermark.vue2.js +2 -2
- package/es/hooks/use-id/index.js +2 -2
- package/es/index.js +40 -39
- package/es/locale/index.js +6 -6
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/plugin.js +5 -3
- package/es/utils/helper.js +2 -2
- package/es/utils/ns-cover.js +1 -1
- package/es/utils/vue/vnode.js +3 -3
- package/lib/components/button/use-button.cjs +1 -1
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +2 -2
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-basic-date-table.d.ts +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
- 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.vue2.cjs +1 -1
- 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.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/dropdown/index.d.ts +33 -33
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/message-box/index.cjs +1 -0
- package/lib/components/message-box/index.d.ts +4 -0
- package/lib/components/message-box/message-box.vue.cjs +1 -0
- package/lib/components/message-box/message-box.vue.d.ts +103 -0
- package/lib/components/message-box/message-box.vue2.cjs +1 -0
- package/lib/components/message-box/method.cjs +1 -0
- package/lib/components/message-box/method.d.ts +3 -0
- package/lib/components/message-box/style/css.cjs +1 -0
- package/lib/components/message-box/style/css.d.ts +2 -0
- package/lib/components/message-box/style/index.cjs +1 -0
- package/lib/components/message-box/style/index.d.ts +2 -0
- package/lib/components/message-box/types.cjs +1 -0
- package/lib/components/message-box/types.d.ts +202 -0
- package/lib/components/modal/index.d.ts +1 -0
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue.d.ts +1 -0
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/useSelect.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/use/helper.cjs +1 -1
- package/lib/components/super-form/use/helper.d.ts +1 -1
- package/lib/components/super-form/use/use-form.cjs +1 -1
- package/lib/components/table/field.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/table/use/use-columns.cjs +1 -1
- package/lib/components/table/use/use-data-source.cjs +1 -1
- 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.vue2.cjs +1 -1
- package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/locale/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/plugin.cjs +1 -1
- package/package.json +2 -2
- package/theme-style/index.css +1 -1
- package/theme-style/src/table.scss +4 -0
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as me, ref as G, computed as H, watch as J, onMounted as Pe, nextTick as O, unref as d, useSlots as ke, createVNode as f, mergeProps as U, withDirectives as Ce, vShow as Se, isVNode as ve, createTextVNode as ie, resolveComponent as X } from "vue";
|
|
2
2
|
import "../alert/index.js";
|
|
3
3
|
import "../avatar/index.js";
|
|
4
4
|
import "../avatar-stack/index.js";
|
|
@@ -13,24 +13,24 @@ import "../clamp/index.js";
|
|
|
13
13
|
import "../client-only/index.js";
|
|
14
14
|
import "../clamp-toggle/index.js";
|
|
15
15
|
import "../clamp-tooltip/index.js";
|
|
16
|
-
import { VftCol as
|
|
16
|
+
import { VftCol as ne } from "../col/index.js";
|
|
17
17
|
import "../collapse-transition/index.js";
|
|
18
18
|
import "../color-picker/index.js";
|
|
19
19
|
import "../config-provider/index.js";
|
|
20
20
|
import "../container/index.js";
|
|
21
|
-
import { isBoolean as
|
|
21
|
+
import { isBoolean as Z, isFunction as k, singleAttrToObj as ae, isNullOrUndefined as xe, isArray as _, cloneDeep as Ae, isNull as Re, upperFirst as we, isString as Me } from "@vft/utils";
|
|
22
22
|
import "../context-menu/context-menu.vue2.js";
|
|
23
23
|
import { VftIcon as le } from "../icon/index.js";
|
|
24
24
|
import "../date-picker/index.js";
|
|
25
25
|
import "../date-time-select/index.js";
|
|
26
26
|
import "../descriptions/index.js";
|
|
27
27
|
import "../dialog/index.js";
|
|
28
|
-
import { VftDivider as
|
|
28
|
+
import { VftDivider as Ie } from "../divider/index.js";
|
|
29
29
|
import "../drawer/index.js";
|
|
30
30
|
import "../dropdown/index.js";
|
|
31
31
|
import "../empty/index.js";
|
|
32
32
|
import "../footer-layout/index.js";
|
|
33
|
-
import { VftFormItem as
|
|
33
|
+
import { VftFormItem as Te } from "../form/index.js";
|
|
34
34
|
import "../full-screen/index.js";
|
|
35
35
|
import "../header-layout/index.js";
|
|
36
36
|
import "../horizontal-menu/index.js";
|
|
@@ -70,7 +70,7 @@ import "../table/index.js";
|
|
|
70
70
|
import "../tabs/index.js";
|
|
71
71
|
import "../tag/index.js";
|
|
72
72
|
import "../time-picker/index.js";
|
|
73
|
-
import { VftTooltip as
|
|
73
|
+
import { VftTooltip as De } from "../tooltip/index.js";
|
|
74
74
|
import "../tree/index.js";
|
|
75
75
|
import "../tree-select/index.js";
|
|
76
76
|
import "../verify-code/index.js";
|
|
@@ -100,27 +100,27 @@ import "../md-container/index.js";
|
|
|
100
100
|
import "../md-tabs/index.js";
|
|
101
101
|
import "../md-vue-playground/index.js";
|
|
102
102
|
import "../infinite-scroll/index.js";
|
|
103
|
-
import { FormCompEnum as t, getComponent as
|
|
103
|
+
import { FormCompEnum as t, getComponent as se } from "../../utils/form-register.js";
|
|
104
104
|
import "@vueuse/core";
|
|
105
105
|
import "../config-provider/hooks/use-global-config.js";
|
|
106
|
-
import { debounce as
|
|
107
|
-
import { useNamespace as
|
|
106
|
+
import { debounce as qe } from "lodash-es";
|
|
107
|
+
import { useNamespace as Ke } from "../../hooks/use-namespace/index.js";
|
|
108
108
|
import "../../hooks/use-model-toggle/index.js";
|
|
109
109
|
import "@popperjs/core";
|
|
110
110
|
import "../../hooks/use-z-index/index.js";
|
|
111
111
|
import "../message/index.js";
|
|
112
|
+
import "../message-box/index.js";
|
|
112
113
|
import "../progress-i/index.js";
|
|
113
114
|
import "./index.js";
|
|
114
|
-
import { isRangePicker as Fe, isInput as
|
|
115
|
-
import { createPlaceholderMessage as
|
|
116
|
-
|
|
117
|
-
function
|
|
118
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !xe(e);
|
|
115
|
+
import { isRangePicker as Fe, isInput as Le, isDatePicker as Ve } from "./component-map.js";
|
|
116
|
+
import { createPlaceholderMessage as ce } from "./use/helper.js";
|
|
117
|
+
function ee(e) {
|
|
118
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ve(e);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const je = me({
|
|
121
121
|
inheritAttrs: !1
|
|
122
|
-
}),
|
|
123
|
-
...
|
|
122
|
+
}), Jo = /* @__PURE__ */ me({
|
|
123
|
+
...je,
|
|
124
124
|
__name: "super-form-item",
|
|
125
125
|
props: {
|
|
126
126
|
schema: {},
|
|
@@ -132,9 +132,7 @@ const Be = fe({
|
|
|
132
132
|
formActionType: {}
|
|
133
133
|
},
|
|
134
134
|
setup(e) {
|
|
135
|
-
const {
|
|
136
|
-
t: b
|
|
137
|
-
} = je(), K = Le("super-form"), F = X(), k = B(() => {
|
|
135
|
+
const q = Ke("super-form"), F = G(), P = H(() => {
|
|
138
136
|
const {
|
|
139
137
|
mergeDynamicData: r
|
|
140
138
|
} = e.formProps;
|
|
@@ -150,15 +148,15 @@ const Be = fe({
|
|
|
150
148
|
elRef: F,
|
|
151
149
|
formActionType: e.formActionType
|
|
152
150
|
};
|
|
153
|
-
}),
|
|
151
|
+
}), fe = /* @__PURE__ */ new Set([t.Select, t.Radio, t.Checkbox, t.RadioButton, t.CheckboxButton, t.Cascader, t.AutoComplete]), L = /* @__PURE__ */ new Set([t.Select, t.Radio, t.RadioButton, t.Checkbox, t.CheckboxButton, t.Cascader, t.AutoComplete]), z = /* @__PURE__ */ new Set([t.Tree, t.TreeSelect]), Y = () => e.schema.type && fe.has(e.schema.type) ? {
|
|
154
152
|
options: []
|
|
155
|
-
} : {}, p =
|
|
156
|
-
async function
|
|
153
|
+
} : {}, p = G(Y());
|
|
154
|
+
async function ue() {
|
|
157
155
|
const {
|
|
158
156
|
componentProps: r = {}
|
|
159
157
|
} = e.schema;
|
|
160
|
-
if (
|
|
161
|
-
const o =
|
|
158
|
+
if (k(r)) {
|
|
159
|
+
const o = Y();
|
|
162
160
|
p.value = o;
|
|
163
161
|
try {
|
|
164
162
|
const i = r({
|
|
@@ -169,38 +167,38 @@ const Be = fe({
|
|
|
169
167
|
...o,
|
|
170
168
|
...n ?? {}
|
|
171
169
|
};
|
|
172
|
-
|
|
170
|
+
L.has(e.schema.type) && (!a.options || !Array.isArray(a.options)) && (a.options = []), p.value = a;
|
|
173
171
|
} catch (i) {
|
|
174
|
-
console.error("componentProps 执行错误:", i), p.value =
|
|
172
|
+
console.error("componentProps 执行错误:", i), p.value = Y();
|
|
175
173
|
}
|
|
176
174
|
} else
|
|
177
|
-
p.value = r,
|
|
175
|
+
p.value = r, L.has(e.schema.type) && (!p.value.options || !Array.isArray(p.value.options)) && (p.value.options = []);
|
|
178
176
|
}
|
|
179
|
-
|
|
177
|
+
J(() => e.schema.componentProps, (r, o) => (r || o) && ue(), {
|
|
180
178
|
immediate: !0
|
|
181
|
-
}),
|
|
179
|
+
}), Pe(() => {
|
|
182
180
|
if (e.schema.type === t.Tree) {
|
|
183
181
|
const r = e.formModel[e.schema.field], o = p.value, i = o?.defaultCheckedKeys, n = o?.includeHalfChecked;
|
|
184
|
-
i && Array.isArray(i) && i.length > 0 && (!r || !Array.isArray(r) || r.length === 0) && (n ?
|
|
182
|
+
i && Array.isArray(i) && i.length > 0 && (!r || !Array.isArray(r) || r.length === 0) && (n ? O(() => {
|
|
185
183
|
if (F.value) {
|
|
186
184
|
const a = F.value;
|
|
187
185
|
if (a?.getHalfCheckedKeys) {
|
|
188
186
|
const u = [...a.getHalfCheckedKeys() || [], ...i];
|
|
189
187
|
e.setFormModel(e.schema.field, u, e.schema);
|
|
190
|
-
const
|
|
191
|
-
e.formModel[
|
|
188
|
+
const C = Symbol.for(`${e.schema.field}_checkedKeys`);
|
|
189
|
+
e.formModel[C] = [...i];
|
|
192
190
|
} else
|
|
193
191
|
e.setFormModel(e.schema.field, [...i], e.schema);
|
|
194
192
|
}
|
|
195
193
|
}) : e.setFormModel(e.schema.field, [...i], e.schema));
|
|
196
194
|
}
|
|
197
195
|
});
|
|
198
|
-
let
|
|
199
|
-
const
|
|
196
|
+
let A = null;
|
|
197
|
+
const N = G(!1), $ = async (r, o) => {
|
|
200
198
|
try {
|
|
201
199
|
const i = {
|
|
202
200
|
...p.value
|
|
203
|
-
}, n =
|
|
201
|
+
}, n = L.has(e.schema.type);
|
|
204
202
|
p.value = {
|
|
205
203
|
...i,
|
|
206
204
|
loading: !0,
|
|
@@ -209,7 +207,7 @@ const Be = fe({
|
|
|
209
207
|
options: []
|
|
210
208
|
} : {}
|
|
211
209
|
};
|
|
212
|
-
const a = await r(d(
|
|
210
|
+
const a = await r(d(P)), {
|
|
213
211
|
type: m
|
|
214
212
|
} = e.schema, u = n ? Array.isArray(a) ? a : [] : a;
|
|
215
213
|
n ? p.value = {
|
|
@@ -217,7 +215,7 @@ const Be = fe({
|
|
|
217
215
|
options: u,
|
|
218
216
|
requestResult: a,
|
|
219
217
|
loading: !1
|
|
220
|
-
} :
|
|
218
|
+
} : z.has(m) ? p.value = {
|
|
221
219
|
...i,
|
|
222
220
|
data: Array.isArray(a) ? a : a || [],
|
|
223
221
|
requestResult: a,
|
|
@@ -226,10 +224,10 @@ const Be = fe({
|
|
|
226
224
|
...i,
|
|
227
225
|
requestResult: a,
|
|
228
226
|
loading: !1
|
|
229
|
-
}, o && await o(a, d(
|
|
227
|
+
}, o && await o(a, d(P));
|
|
230
228
|
} catch (i) {
|
|
231
229
|
console.error("fetchRemoteData 执行错误:", i);
|
|
232
|
-
const n =
|
|
230
|
+
const n = L.has(e.schema.type), a = z.has(e.schema.type);
|
|
233
231
|
p.value = {
|
|
234
232
|
...p.value,
|
|
235
233
|
loading: !1,
|
|
@@ -243,13 +241,13 @@ const Be = fe({
|
|
|
243
241
|
} : {}
|
|
244
242
|
};
|
|
245
243
|
} finally {
|
|
246
|
-
await
|
|
244
|
+
await O();
|
|
247
245
|
}
|
|
248
|
-
},
|
|
246
|
+
}, te = () => {
|
|
249
247
|
const r = p.value?.request;
|
|
250
248
|
if (r)
|
|
251
|
-
if (
|
|
252
|
-
|
|
249
|
+
if (k(r))
|
|
250
|
+
$(r);
|
|
253
251
|
else {
|
|
254
252
|
const {
|
|
255
253
|
watchFields: o = [],
|
|
@@ -261,40 +259,40 @@ const Be = fe({
|
|
|
261
259
|
if (!a) return;
|
|
262
260
|
const u = Array.isArray(o) && o.length > 0;
|
|
263
261
|
if (i?.immediate && !u) {
|
|
264
|
-
|
|
262
|
+
N.value || (N.value = !0, $(a, m));
|
|
265
263
|
return;
|
|
266
264
|
}
|
|
267
265
|
const {
|
|
268
|
-
immediate:
|
|
266
|
+
immediate: C,
|
|
269
267
|
...h
|
|
270
|
-
} = i, y = o.map((
|
|
271
|
-
|
|
268
|
+
} = i, y = o.map((s) => () => e.formModel[s]), g = n > 0 ? qe(() => {
|
|
269
|
+
$(a, m);
|
|
272
270
|
}, n) : () => {
|
|
273
|
-
|
|
271
|
+
$(a, m);
|
|
274
272
|
};
|
|
275
|
-
|
|
273
|
+
A = J(y, g, h), i?.immediate && (N.value || (N.value = !0, $(a, m)));
|
|
276
274
|
}
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
r.isIfShow && r.isShow && (o == null || !o.isIfShow || !o.isShow) ?
|
|
280
|
-
|
|
281
|
-
}) : (!r.isIfShow || !r.isShow) && (
|
|
275
|
+
}, de = H(() => E());
|
|
276
|
+
J(de, (r, o) => {
|
|
277
|
+
r.isIfShow && r.isShow && (o == null || !o.isIfShow || !o.isShow) ? O(() => {
|
|
278
|
+
A && (A(), A = null), te();
|
|
279
|
+
}) : (!r.isIfShow || !r.isShow) && (N.value = !1, A && (A(), A = null));
|
|
282
280
|
}, {
|
|
283
281
|
immediate: !0
|
|
284
|
-
}),
|
|
282
|
+
}), J(() => p.value?.request, () => {
|
|
285
283
|
const {
|
|
286
284
|
isIfShow: r,
|
|
287
285
|
isShow: o
|
|
288
|
-
} =
|
|
289
|
-
r && o &&
|
|
290
|
-
|
|
286
|
+
} = E();
|
|
287
|
+
r && o && O(() => {
|
|
288
|
+
A && (A(), A = null), te();
|
|
291
289
|
});
|
|
292
290
|
});
|
|
293
|
-
const
|
|
291
|
+
const K = H(() => {
|
|
294
292
|
let r = {
|
|
295
293
|
...p.value
|
|
296
294
|
};
|
|
297
|
-
if (
|
|
295
|
+
if (L.has(e.schema.type) && (!r.options || !Array.isArray(r.options)) && (r.options = []), z.has(e.schema.type) && (!r.data || !Array.isArray(r.data)) && (r.data = []), e.schema.type === t.Tree) {
|
|
298
296
|
const n = e.formModel[e.schema.field];
|
|
299
297
|
if (Array.isArray(n) && r.data?.length > 0)
|
|
300
298
|
if (r.includeHalfChecked) {
|
|
@@ -331,47 +329,47 @@ const Be = fe({
|
|
|
331
329
|
}], [t.TimeRangePicker, {
|
|
332
330
|
type: t.TimePicker,
|
|
333
331
|
"is-range": !0,
|
|
334
|
-
"start-placeholder":
|
|
335
|
-
"end-placeholder":
|
|
332
|
+
"start-placeholder": "开始时间",
|
|
333
|
+
"end-placeholder": "结束时间"
|
|
336
334
|
}], [t.DateTimeRangePicker, {
|
|
337
335
|
type: t.DateTimeRangePicker,
|
|
338
|
-
"start-placeholder":
|
|
339
|
-
"end-placeholder":
|
|
336
|
+
"start-placeholder": "开始日期",
|
|
337
|
+
"end-placeholder": "结束日期"
|
|
340
338
|
}], [t.DateRangePicker, {
|
|
341
339
|
type: t.DateRangePicker,
|
|
342
|
-
"start-placeholder":
|
|
343
|
-
"end-placeholder":
|
|
340
|
+
"start-placeholder": "开始日期",
|
|
341
|
+
"end-placeholder": "结束日期"
|
|
344
342
|
}], [t.MonthRangePicker, {
|
|
345
343
|
type: t.MonthRangePicker,
|
|
346
|
-
"start-placeholder":
|
|
347
|
-
"end-placeholder":
|
|
344
|
+
"start-placeholder": "开始月份",
|
|
345
|
+
"end-placeholder": "结束月份"
|
|
348
346
|
}]]);
|
|
349
347
|
e.schema.type && o.has(e.schema.type) && (r = Object.assign(o.get(e.schema.type) || {}, r));
|
|
350
348
|
const i = r;
|
|
351
|
-
return e.formProps.inputMaxLength && e.schema.type === t.Input && !i?.maxlength && (i.maxlength = e.formProps.inputMaxLength),
|
|
352
|
-
}),
|
|
349
|
+
return e.formProps.inputMaxLength && e.schema.type === t.Input && !i?.maxlength && (i.maxlength = e.formProps.inputMaxLength), L.has(e.schema.type) && (!i.options || !Array.isArray(i.options)) && (i.options = []), z.has(e.schema.type) && (!i.data || !Array.isArray(i.data)) && (i.data = []), i;
|
|
350
|
+
}), he = H(() => {
|
|
353
351
|
const {
|
|
354
352
|
disabled: r
|
|
355
353
|
} = e.formProps, {
|
|
356
354
|
dynamicDisabled: o
|
|
357
355
|
} = e.schema, {
|
|
358
356
|
disabled: i = !1
|
|
359
|
-
} = d(
|
|
357
|
+
} = d(K);
|
|
360
358
|
let n = !!r || i;
|
|
361
|
-
return
|
|
359
|
+
return Z(o) && (n = o), k(o) && (n = o(d(P))), n;
|
|
362
360
|
});
|
|
363
|
-
function
|
|
361
|
+
function E() {
|
|
364
362
|
const {
|
|
365
363
|
show: r,
|
|
366
364
|
ifShow: o
|
|
367
365
|
} = e.schema;
|
|
368
366
|
let i = !0, n = !0;
|
|
369
|
-
return
|
|
367
|
+
return Z(r) && (i = r), Z(o) && (n = o), k(r) && (i = r(d(P))), k(o) && (n = o(d(P))), {
|
|
370
368
|
isShow: i,
|
|
371
369
|
isIfShow: n
|
|
372
370
|
};
|
|
373
371
|
}
|
|
374
|
-
function
|
|
372
|
+
function pe() {
|
|
375
373
|
const {
|
|
376
374
|
rules: r = [],
|
|
377
375
|
type: o = t.Input,
|
|
@@ -380,48 +378,48 @@ const Be = fe({
|
|
|
380
378
|
title: a,
|
|
381
379
|
dynamicRule: m,
|
|
382
380
|
required: u,
|
|
383
|
-
dynamicRuleAdd:
|
|
384
|
-
} = e.schema, h =
|
|
385
|
-
if (!h && (
|
|
381
|
+
dynamicRuleAdd: C = !0
|
|
382
|
+
} = e.schema, h = k(u) ? u(d(P)) : u, y = e.formModel[e.schema.field];
|
|
383
|
+
if (!h && (xe(y) || y === "" || _(y) && !y.length))
|
|
386
384
|
return [];
|
|
387
385
|
const g = n || a;
|
|
388
|
-
if (
|
|
389
|
-
return m(d(
|
|
390
|
-
let
|
|
386
|
+
if (k(m) && !C)
|
|
387
|
+
return m(d(P));
|
|
388
|
+
let s = Ae(_(r) ? r : [r]);
|
|
391
389
|
const {
|
|
392
|
-
rulesMessageJoinLabel:
|
|
393
|
-
} = e.formProps,
|
|
394
|
-
function
|
|
395
|
-
const
|
|
396
|
-
return c === void 0 ||
|
|
390
|
+
rulesMessageJoinLabel: R
|
|
391
|
+
} = e.formProps, b = Reflect.has(e.schema, "rulesMessageJoinLabel") ? i : R, w = ce(o, `${b ? g : ""}`);
|
|
392
|
+
function M(l, c) {
|
|
393
|
+
const x = l.message || w;
|
|
394
|
+
return c === void 0 || Re(c) || o === t.CheckboxSingle && !c || Array.isArray(c) && c.length === 0 || typeof c == "string" && c.trim() === "" || typeof c == "object" && Reflect.has(c, "checked") && Reflect.has(c, "halfChecked") && Array.isArray(c.checked) && Array.isArray(c.halfChecked) && c.checked.length === 0 && c.halfChecked.length === 0 ? Promise.reject(x) : Promise.resolve();
|
|
397
395
|
}
|
|
398
|
-
const
|
|
399
|
-
(!
|
|
396
|
+
const V = [t.Radio, t.Select, t.RadioSingle, t.RadioButton, t.Checkbox, t.CheckboxSingle, t.CheckboxButton, t.AutoComplete, t.Cascader, t.ColorPicker, t.Upload, t.Slider].includes(o);
|
|
397
|
+
(!s || s.length === 0 || h) && (s = [{
|
|
400
398
|
required: h,
|
|
401
|
-
validator:
|
|
402
|
-
trigger:
|
|
403
|
-
}, ...
|
|
404
|
-
const
|
|
405
|
-
if (
|
|
406
|
-
const
|
|
399
|
+
validator: M,
|
|
400
|
+
trigger: V ? "change" : "blur"
|
|
401
|
+
}, ...s]);
|
|
402
|
+
const W = s.findIndex((l) => Reflect.has(l, "required") && !Reflect.has(l, "validator"));
|
|
403
|
+
if (W !== -1) {
|
|
404
|
+
const l = s[W], {
|
|
407
405
|
isShow: c
|
|
408
|
-
} =
|
|
409
|
-
c || (
|
|
406
|
+
} = E();
|
|
407
|
+
c || (l.required = !1), o && (l.message = l.message || w);
|
|
410
408
|
}
|
|
411
|
-
const
|
|
412
|
-
function j(
|
|
413
|
-
const
|
|
414
|
-
return ["min", "all"].includes(
|
|
409
|
+
const v = s.findIndex((l) => l.min), D = s.findIndex((l) => l.max);
|
|
410
|
+
function j(l, c, x = "all") {
|
|
411
|
+
const S = s[c], B = S.isNumber ? isNaN(l) ? l?.length || 0 : Number(l) : l?.length || 0;
|
|
412
|
+
return ["min", "all"].includes(x) && B < S.min ? Promise.reject(`${g}至少${S.min}个字符`) : ["max", "all"].includes(x) && B > S.max ? Promise.reject(`${g}最多${S.max}个字符`) : Promise.resolve();
|
|
415
413
|
}
|
|
416
|
-
(
|
|
417
|
-
const
|
|
418
|
-
if (
|
|
419
|
-
let
|
|
420
|
-
|
|
414
|
+
(v !== -1 || D !== -1) && (v !== -1 && D !== -1 && !s[v].validator && !s[v].message ? s[v].validator = (l, c) => j(c, v) : v !== -1 && !s[v].validator && !s[v].message ? s[v].validator = (l, c) => j(c, v, "min") : D !== -1 && !s[D].validator && !s[D].message && (s[D].validator = (l, c) => j(c, D, "max")));
|
|
415
|
+
const T = s.findIndex((l) => l.len);
|
|
416
|
+
if (T !== -1 && (s[T].validator = (l, c) => c?.length !== s[T].len ? Promise.reject(`${g}必须为${s[T].len}个字符`) : Promise.resolve()), k(m) && C) {
|
|
417
|
+
let l = m(d(P));
|
|
418
|
+
l = _(l) ? l : [l], s = s.concat(l);
|
|
421
419
|
}
|
|
422
|
-
return
|
|
420
|
+
return s;
|
|
423
421
|
}
|
|
424
|
-
const
|
|
422
|
+
const ye = () => {
|
|
425
423
|
const {
|
|
426
424
|
renderComponentContent: r,
|
|
427
425
|
type: o = t.Input,
|
|
@@ -430,95 +428,95 @@ const Be = fe({
|
|
|
430
428
|
valueField: a,
|
|
431
429
|
label: m,
|
|
432
430
|
title: u,
|
|
433
|
-
placeholderJoinLabel:
|
|
431
|
+
placeholderJoinLabel: C = !0
|
|
434
432
|
} = e.schema;
|
|
435
433
|
let h = n;
|
|
436
|
-
|
|
437
|
-
const y = `on${
|
|
438
|
-
autoSetPlaceHolder:
|
|
439
|
-
size:
|
|
440
|
-
} = e.formProps,
|
|
434
|
+
Le(o) ? h = "input" : Ve(o) || o === t.TimePicker || o === t.InputTag || o === t.AutoComplete || o === t.Cascader || o === t.ColorPicker || o === t.Slider || o === t.TreeSelect ? h = "update:modelValue" : o === t.Upload ? h = "update:fileList" : o === t.Tree && (h = "check");
|
|
435
|
+
const y = `on${we(h)}`, g = se(o), {
|
|
436
|
+
autoSetPlaceHolder: s,
|
|
437
|
+
size: R
|
|
438
|
+
} = e.formProps, b = {
|
|
441
439
|
clearable: !0,
|
|
442
|
-
...d(
|
|
440
|
+
...d(K)
|
|
443
441
|
};
|
|
444
|
-
if (o !== t.Search && (
|
|
445
|
-
const
|
|
446
|
-
|
|
442
|
+
if (o !== t.Search && (b.size = d(K)?.size || R, b.disabled = d(he)), !b.disabled && s && !Fe(o) && o) {
|
|
443
|
+
const l = m || u;
|
|
444
|
+
b.placeholder = d(K)?.placeholder || ce(o, C && Me(l) ? l : "");
|
|
447
445
|
}
|
|
448
|
-
const
|
|
449
|
-
[y]: (...
|
|
450
|
-
const [c] =
|
|
451
|
-
let
|
|
446
|
+
const M = b[y], I = b.onClear, V = {
|
|
447
|
+
[y]: (...l) => {
|
|
448
|
+
const [c] = l;
|
|
449
|
+
let x;
|
|
452
450
|
if (o === t.Tree && h === "check") {
|
|
453
|
-
const [,
|
|
454
|
-
if (
|
|
455
|
-
const
|
|
456
|
-
e.formModel[
|
|
451
|
+
const [, S] = l, B = d(K)?.includeHalfChecked;
|
|
452
|
+
if (B ? x = [...S?.halfCheckedKeys || [], ...S?.checkedKeys || []] : x = S?.checkedKeys || [], B) {
|
|
453
|
+
const be = Symbol.for(`${i}_checkedKeys`);
|
|
454
|
+
e.formModel[be] = S?.checkedKeys || [];
|
|
457
455
|
}
|
|
458
456
|
} else {
|
|
459
|
-
const
|
|
460
|
-
|
|
457
|
+
const S = c ? c.target : null;
|
|
458
|
+
x = S ? S.value : c;
|
|
461
459
|
}
|
|
462
|
-
e.setFormModel(i,
|
|
463
|
-
|
|
460
|
+
e.setFormModel(i, x, e.schema), M && k(M) && O(() => {
|
|
461
|
+
M(...l);
|
|
464
462
|
});
|
|
465
463
|
},
|
|
466
464
|
// 监听 clear 事件,清除错误信息
|
|
467
|
-
onClear: (...
|
|
465
|
+
onClear: (...l) => {
|
|
468
466
|
e.updateSchema([{
|
|
469
467
|
field: i,
|
|
470
468
|
itemProps: {
|
|
471
469
|
error: ""
|
|
472
470
|
}
|
|
473
|
-
}]), e.formActionType?.clearValidate?.(i),
|
|
471
|
+
}]), e.formActionType?.clearValidate?.(i), I && k(I) && I(...l);
|
|
474
472
|
}
|
|
475
|
-
},
|
|
473
|
+
}, W = o === t.Tree ? {} : {
|
|
476
474
|
[a || "model-value"]: e.formModel[i]
|
|
477
475
|
}, {
|
|
478
|
-
[y]:
|
|
479
|
-
...
|
|
480
|
-
} =
|
|
481
|
-
...
|
|
482
|
-
|
|
483
|
-
...
|
|
476
|
+
[y]: v,
|
|
477
|
+
...D
|
|
478
|
+
} = b, j = {
|
|
479
|
+
...D,
|
|
480
|
+
...V,
|
|
481
|
+
...W
|
|
484
482
|
};
|
|
485
483
|
if (!r && o !== t.Upload)
|
|
486
|
-
return f(g,
|
|
484
|
+
return f(g, U({
|
|
487
485
|
ref: F
|
|
488
486
|
}, j), null);
|
|
489
|
-
let
|
|
490
|
-
if (
|
|
487
|
+
let T;
|
|
488
|
+
if (T = k(r) ? {
|
|
491
489
|
...r({
|
|
492
|
-
...d(
|
|
490
|
+
...d(P),
|
|
493
491
|
elRef: F
|
|
494
492
|
})
|
|
495
493
|
} : {
|
|
496
494
|
default: () => r
|
|
497
495
|
}, o === t.Upload && !r) {
|
|
498
496
|
const {
|
|
499
|
-
drag:
|
|
500
|
-
} = d(
|
|
501
|
-
|
|
502
|
-
default: () => f(
|
|
497
|
+
drag: l
|
|
498
|
+
} = d(K);
|
|
499
|
+
T = l ? {
|
|
500
|
+
default: () => f(X("vft-icon"), {
|
|
503
501
|
icon: "icon-arrow-upload"
|
|
504
502
|
}, null)
|
|
505
503
|
} : {
|
|
506
|
-
default: () => f(
|
|
504
|
+
default: () => f(X("vft-button"), {
|
|
507
505
|
type: "primary"
|
|
508
506
|
}, {
|
|
509
|
-
default: () => [f(
|
|
507
|
+
default: () => [f(X("vft-icon"), {
|
|
510
508
|
icon: "icon-arrow-upload"
|
|
511
509
|
}, null)]
|
|
512
510
|
})
|
|
513
511
|
};
|
|
514
512
|
}
|
|
515
|
-
return f(g,
|
|
513
|
+
return f(g, U({
|
|
516
514
|
ref: F
|
|
517
|
-
}, j),
|
|
518
|
-
default: () => [
|
|
515
|
+
}, j), ee(T) ? T : {
|
|
516
|
+
default: () => [T]
|
|
519
517
|
});
|
|
520
518
|
};
|
|
521
|
-
function
|
|
519
|
+
function Q() {
|
|
522
520
|
const {
|
|
523
521
|
showLabel: r = !0,
|
|
524
522
|
label: o,
|
|
@@ -527,50 +525,50 @@ const Be = fe({
|
|
|
527
525
|
labelRequired: a,
|
|
528
526
|
helpIcon: m,
|
|
529
527
|
helpTooltip: u,
|
|
530
|
-
labelSuffix:
|
|
528
|
+
labelSuffix: C
|
|
531
529
|
} = e.schema, {
|
|
532
530
|
labelSuffix: h = ""
|
|
533
|
-
} = e.formProps, y =
|
|
531
|
+
} = e.formProps, y = C ?? h, g = o || i, s = g ? f("span", null, [a && f("span", {
|
|
534
532
|
class: "label-required"
|
|
535
|
-
}, [
|
|
536
|
-
class:
|
|
537
|
-
}, [y])]) : null,
|
|
533
|
+
}, [ie("*")]), f("span", null, [g]), y && f("span", {
|
|
534
|
+
class: q.m("label-suffix")
|
|
535
|
+
}, [y])]) : null, R = () => {
|
|
538
536
|
if (!m && !u) return null;
|
|
539
|
-
const
|
|
537
|
+
const b = H(() => ae(m, "icon", {
|
|
540
538
|
size: 20,
|
|
541
539
|
pointer: !0,
|
|
542
540
|
icon: "icon-help"
|
|
543
541
|
}));
|
|
544
542
|
if (u) {
|
|
545
|
-
const
|
|
543
|
+
const w = H(() => ae(u, "content", {
|
|
546
544
|
placement: "right-start"
|
|
547
545
|
}));
|
|
548
|
-
return f(
|
|
546
|
+
return f(De, U({
|
|
549
547
|
className: "box-item"
|
|
550
|
-
},
|
|
551
|
-
default: () => [f(le,
|
|
548
|
+
}, w.value), {
|
|
549
|
+
default: () => [f(le, b.value, null)]
|
|
552
550
|
});
|
|
553
551
|
}
|
|
554
|
-
return f(le,
|
|
552
|
+
return f(le, b.value, null);
|
|
555
553
|
};
|
|
556
|
-
return r &&
|
|
554
|
+
return r && s ? n ? f("div", {
|
|
557
555
|
class: "label-content"
|
|
558
|
-
}, [f("div", null, [
|
|
556
|
+
}, [f("div", null, [s, ie(" "), f("span", {
|
|
559
557
|
class: "sub-label"
|
|
560
|
-
}, [n])]),
|
|
558
|
+
}, [n])]), R()]) : f("div", {
|
|
561
559
|
class: "label-content"
|
|
562
|
-
}, [f("div", null, [
|
|
560
|
+
}, [f("div", null, [s]), R()]) : void 0;
|
|
563
561
|
}
|
|
564
|
-
const
|
|
565
|
-
function
|
|
562
|
+
const oe = ke();
|
|
563
|
+
function re(r, o = "default", i) {
|
|
566
564
|
if (!r || !Reflect.has(r, o))
|
|
567
565
|
return null;
|
|
568
|
-
if (!
|
|
566
|
+
if (!k(r[o]))
|
|
569
567
|
return console.error(`${o} is not a function!`), null;
|
|
570
568
|
const n = r[o];
|
|
571
569
|
return n ? n(i) : null;
|
|
572
570
|
}
|
|
573
|
-
function
|
|
571
|
+
function ge() {
|
|
574
572
|
const {
|
|
575
573
|
required: r,
|
|
576
574
|
itemProps: o,
|
|
@@ -579,48 +577,48 @@ const Be = fe({
|
|
|
579
577
|
field: a,
|
|
580
578
|
suffix: m,
|
|
581
579
|
prefix: u,
|
|
582
|
-
prefixParentStyle:
|
|
580
|
+
prefixParentStyle: C
|
|
583
581
|
} = e.schema, {
|
|
584
582
|
autoCleanErrorMessage: h,
|
|
585
583
|
compFullWidth: y
|
|
586
|
-
} = e.formProps, g = () => i ?
|
|
584
|
+
} = e.formProps, g = () => i ? re(oe, i, d(P)) : n ? n(d(P)) : ye(), s = !!m, R = !!u, b = k(m) ? m(d(P)) : m, w = k(u) ? u(d(P)) : u, M = () => {
|
|
587
585
|
e.updateSchema([{
|
|
588
586
|
field: a,
|
|
589
587
|
itemProps: {
|
|
590
588
|
error: ""
|
|
591
589
|
}
|
|
592
590
|
}]);
|
|
593
|
-
},
|
|
591
|
+
}, I = k(r) ? r(d(P)) : r, V = () => f(Te, U({
|
|
594
592
|
style: {
|
|
595
593
|
marginRight: e.formProps.customLayout ? "10px" : 0
|
|
596
594
|
},
|
|
597
595
|
prop: a,
|
|
598
596
|
class: [{
|
|
599
|
-
[
|
|
597
|
+
[q.is("suffix")]: s
|
|
600
598
|
}, {
|
|
601
|
-
[
|
|
602
|
-
},
|
|
599
|
+
[q.is("comp-full-width")]: y
|
|
600
|
+
}, q.e("item")]
|
|
603
601
|
}, o, {
|
|
604
602
|
label: o?.label || o?.title,
|
|
605
|
-
"onUpdate:error": h ?
|
|
603
|
+
"onUpdate:error": h ? M : () => {
|
|
606
604
|
},
|
|
607
|
-
rules:
|
|
608
|
-
required:
|
|
605
|
+
rules: pe(),
|
|
606
|
+
required: I
|
|
609
607
|
}), {
|
|
610
608
|
default: () => [f("div", {
|
|
611
|
-
class:
|
|
609
|
+
class: q.e("container")
|
|
612
610
|
}, [f("div", {
|
|
613
|
-
class:
|
|
614
|
-
}, [g(),
|
|
615
|
-
class:
|
|
616
|
-
}, [
|
|
617
|
-
label:
|
|
611
|
+
class: q.e("content")
|
|
612
|
+
}, [g(), s && f("span", {
|
|
613
|
+
class: q.m("suffix")
|
|
614
|
+
}, [b])])])],
|
|
615
|
+
label: Q() ? () => Q() : void 0
|
|
618
616
|
});
|
|
619
|
-
return
|
|
620
|
-
style:
|
|
617
|
+
return R ? f("div", {
|
|
618
|
+
style: C
|
|
621
619
|
}, [f("span", {
|
|
622
|
-
class:
|
|
623
|
-
}, [
|
|
620
|
+
class: q.m("prefix")
|
|
621
|
+
}, [w]), V()]) : V();
|
|
624
622
|
}
|
|
625
623
|
return () => {
|
|
626
624
|
let r;
|
|
@@ -632,44 +630,44 @@ const Be = fe({
|
|
|
632
630
|
render: m,
|
|
633
631
|
quickColSpan: u
|
|
634
632
|
} = e.schema;
|
|
635
|
-
if (!
|
|
633
|
+
if (!se(a) && !n && !m)
|
|
636
634
|
return null;
|
|
637
635
|
const {
|
|
638
|
-
baseColProps:
|
|
636
|
+
baseColProps: C = {},
|
|
639
637
|
quickColSpan: h
|
|
640
638
|
} = e.formProps, y = h ? {
|
|
641
639
|
span: Math.ceil(24 / h),
|
|
642
|
-
...
|
|
640
|
+
...C
|
|
643
641
|
} : {
|
|
644
|
-
...
|
|
642
|
+
...C
|
|
645
643
|
}, g = u ? {
|
|
646
644
|
span: Math.ceil(24 / u),
|
|
647
645
|
...o
|
|
648
646
|
} : {
|
|
649
647
|
...o
|
|
650
|
-
},
|
|
648
|
+
}, s = {
|
|
651
649
|
...y,
|
|
652
650
|
...g
|
|
653
651
|
}, {
|
|
654
|
-
isIfShow:
|
|
655
|
-
isShow:
|
|
656
|
-
} =
|
|
652
|
+
isIfShow: R,
|
|
653
|
+
isShow: b
|
|
654
|
+
} = E(), w = d(P), M = () => i ? re(oe, i, w) : n ? n(w) : ge();
|
|
657
655
|
if (a === t.Divider) {
|
|
658
|
-
let
|
|
659
|
-
return f(
|
|
656
|
+
let I;
|
|
657
|
+
return f(ne, U({
|
|
660
658
|
span: 24
|
|
661
659
|
}, g), {
|
|
662
|
-
default: () => [f(
|
|
663
|
-
default: () => [
|
|
660
|
+
default: () => [f(Ie, d(K), ee(I = Q()) ? I : {
|
|
661
|
+
default: () => [I]
|
|
664
662
|
})]
|
|
665
663
|
});
|
|
666
664
|
}
|
|
667
|
-
return
|
|
665
|
+
return R && (e.formProps.customLayout ? M() : Ce(f(ne, s, ee(r = M()) ? r : {
|
|
668
666
|
default: () => [r]
|
|
669
|
-
}), [[
|
|
667
|
+
}), [[Se, b]]));
|
|
670
668
|
};
|
|
671
669
|
}
|
|
672
670
|
});
|
|
673
671
|
export {
|
|
674
|
-
|
|
672
|
+
Jo as default
|
|
675
673
|
};
|