| | |
| | | nextTick, |
| | | onUnmounted, |
| | | ref, |
| | | toRaw, |
| | | useTemplateRef, |
| | | watch, |
| | | } from 'vue'; |
| | | |
| | | import { ChevronsDown, CircleAlert } from '..\..\..\..\base\icons\src'; |
| | | import { ChevronsDown, CircleAlert } from '../../../../base/icons/src'; |
| | | import { |
| | | Button, |
| | | FormControl, |
| | |
| | | VbenCollapsible, |
| | | VbenRenderContent, |
| | | VbenTooltip, |
| | | } from '..\..\..\shadcn-ui\src'; |
| | | import { cn, isFunction, isObject, isString } from '..\..\..\..\base\shared\src\utils'; |
| | | } from '../../../shadcn-ui/src'; |
| | | import { cn, isFunction, isObject, isString } from '../../../../base/shared/src/utils'; |
| | | |
| | | import { toTypedSchema } from '@vee-validate/zod'; |
| | | import { useFieldError, useFormValues } from 'vee-validate'; |
| | |
| | | return formApi; |
| | | } |
| | | |
| | | const FieldComponent = computed(() => { |
| | | const finalComponent = isString(component) |
| | | ? componentMap.value[component] |
| | | : component; |
| | | if (!finalComponent) { |
| | | // 组件未注册 |
| | | console.warn(`Component ${component} is not registered`); |
| | | } |
| | | return finalComponent; |
| | | }); |
| | | const FieldComponent = isString(component) |
| | | ? computed(() => { |
| | | const comp = componentMap.value[component]; |
| | | if (!comp) { |
| | | console.warn(`Component ${component} is not registered`); |
| | | } |
| | | return comp; |
| | | }) |
| | | : toRaw(component); |
| | | |
| | | const { |
| | | dynamicComponentProps, |