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 89918a2 commit ff1da5e
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

0 comments on commit ff1da5e

Please sign in to comment.