|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<Form v-bind="{ ...$attrs, ...$props }" ref="formElRef" :model="formModel"> |
|
|
|
<Row :class="getProps.compact ? 'compact-form-row' : ''"> |
|
|
|
<Row :class="getProps.compact ? 'compact-form-row' : ''" :style="getRowWrapStyleRef"> |
|
|
|
<slot name="formHeader" /> |
|
|
|
<template v-for="schema in getSchema" :key="schema.field"> |
|
|
|
<FormItem |
|
|
|
@ -71,6 +71,11 @@ |
|
|
|
const schemaRef = ref<Nullable<FormSchema[]>>(null); |
|
|
|
const formElRef = ref<Nullable<FormActionType>>(null); |
|
|
|
|
|
|
|
const getRowWrapStyleRef = computed((): any => { |
|
|
|
const { baseRowStyle } = unref(getProps); |
|
|
|
return baseRowStyle || {}; |
|
|
|
}); |
|
|
|
|
|
|
|
const getMergePropsRef = computed( |
|
|
|
(): FormProps => { |
|
|
|
return deepMerge(cloneDeep(props), unref(propsRef)); |
|
|
|
@ -207,6 +212,7 @@ |
|
|
|
getActionPropsRef, |
|
|
|
defaultValueRef, |
|
|
|
advanceState, |
|
|
|
getRowWrapStyleRef, |
|
|
|
getProps, |
|
|
|
formElRef, |
|
|
|
getSchema, |
|
|
|
|