Skip to content

Commit

Permalink
fix(CropperAvatar): wrong type about the prop size (vbenjs#3635)
Browse files Browse the repository at this point in the history
  • Loading branch information
xachary authored Mar 2, 2024
1 parent ab55cbf commit aef90aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Form/src/components/FormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
formProps: Ref<FormProps>;
};
// 组件 CropperAvatar 的 size 属性类型为 number
// 此处补充一个兼容
if (schema.value.component === 'CropperAvatar' && typeof formProps.value.size === 'string') {
formProps.value.size = undefined;
}
const itemLabelWidthProp = useItemLabelWidth(schema, formProps);
const getValues = computed(() => {
Expand Down

0 comments on commit aef90aa

Please sign in to comment.