| | |
| | | nextTick, |
| | | onUnmounted, |
| | | ref, |
| | | toRaw, |
| | | useTemplateRef, |
| | | watch, |
| | | } from 'vue'; |
| | |
| | | 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, |