|
@@ -267,13 +267,17 @@
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
},
|
|
|
+ isUpdate: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
const formModel = inject<Recordable>('formModel');
|
|
|
const formProps = inject<Ref<FormProps>>('formProps');
|
|
|
const tabActiveKey = inject<Ref<number>>('tabActiveKey', ref(0));
|
|
|
const activeKey = ref<number>(0);
|
|
|
-
|
|
|
+ formModel.isUpdate = props.isUpdate;
|
|
|
watch(
|
|
|
() => tabActiveKey?.value,
|
|
|
(val) => {
|
|
@@ -350,7 +354,11 @@
|
|
|
let { componentProps = {} } = props.schema;
|
|
|
if (isFunction(componentProps)) {
|
|
|
componentProps =
|
|
|
- componentProps({ schema: props.schema, formModel, formActionType: props.formApi }) ?? {};
|
|
|
+ componentProps({
|
|
|
+ schema: props.schema,
|
|
|
+ formModel,
|
|
|
+ formActionType: props.formApi,
|
|
|
+ }) ?? {};
|
|
|
} else {
|
|
|
if (componentProps['events']) {
|
|
|
for (const eventKey in componentProps['events']) {
|