Skip to content

Commit 569c817

Browse files
committed
fix: 修正未考虑属性自身必填的情况
1 parent ffb7ce3 commit 569c817

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/parsers/ComponentsParser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export class ComponentsParser extends BaseParser {
6666
...this.inheritProps(schema),
6767
name,
6868
type,
69-
required,
69+
// {type: 'string', required: true}
70+
required: (schema.required as boolean | undefined) || required,
7071
kind: 'origin',
7172
};
7273
}

0 commit comments

Comments
 (0)