|
@@ -234,7 +234,7 @@
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
import { Form, Col, Row, Tabs, TabPane, Divider } from 'ant-design-vue';
|
|
import { Form, Col, Row, Tabs, TabPane, Divider } from 'ant-design-vue';
|
|
import { isBoolean, isFunction, upperFirst, cloneDeep } from 'lodash-es';
|
|
import { isBoolean, isFunction, upperFirst, cloneDeep } from 'lodash-es';
|
|
- import { computed, onMounted, unref, inject, Ref, watch, ref } from 'vue';
|
|
|
|
|
|
+ import { computed, onMounted, unref, inject, Ref, watch, ref, nextTick } from 'vue';
|
|
import { componentMap } from '/@/components/Form/src/componentMap';
|
|
import { componentMap } from '/@/components/Form/src/componentMap';
|
|
import { checkedValueComponents } from '/@/components/Form/src/helper';
|
|
import { checkedValueComponents } from '/@/components/Form/src/helper';
|
|
import { useItemLabelWidth } from '/@/components/Form/src/hooks/useLabelWidth';
|
|
import { useItemLabelWidth } from '/@/components/Form/src/hooks/useLabelWidth';
|
|
@@ -269,7 +269,6 @@
|
|
},
|
|
},
|
|
isUpdate: {
|
|
isUpdate: {
|
|
type: Boolean,
|
|
type: Boolean,
|
|
- default: false,
|
|
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
@@ -277,7 +276,6 @@
|
|
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) => {
|
|
@@ -443,6 +441,9 @@
|
|
// emit('update:value', defaultValue);
|
|
// emit('update:value', defaultValue);
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ formModel.isUpdate = props.isUpdate;
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
const formComponent = (schema) => {
|
|
const formComponent = (schema) => {
|