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