Skip to content

Commit

Permalink
fix(schema-form): update props issue
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Mar 28, 2022
1 parent adbda89 commit 62f7a4e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/core/schema-form/src/schema-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</template>

<script lang="ts" setup>
import { useAttrs, watchEffect } from 'vue';
import { useAttrs, watch } from 'vue';
import { pick } from 'lodash-es';
import { Form, Row } from 'ant-design-vue';
import SchemaFormItem from './schema-form-item.vue';
Expand Down Expand Up @@ -79,7 +79,10 @@
const formEvents = useFormEvents({ ...formState, emit, handleFormValues });
// 同步外部对props的修改
watchEffect(() => setSchemaFormProps(props));
watch(props, () => setSchemaFormProps(props), {
deep: true,
immediate: true,
});
// 当前组件所有的状态和方法
const instance = {
Expand Down

1 comment on commit 62f7a4e

@vercel
Copy link

@vercel vercel bot commented on 62f7a4e Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.