@@ -101,29 +101,36 @@ function computeDefaults(
101101 rootSchema ,
102102 formData
103103 ) ;
104- if ( schema . properties && matchSchema . properties ) {
105- // 对象 oneOf 需要合并原属性和 oneOf 属性
106- const mergeSchema = mergeObjects ( schema , matchSchema ) ;
107- delete mergeSchema . oneOf ;
108- schema = mergeSchema ;
109- } else {
110- schema = matchSchema ;
111- }
104+
105+ schema = mergeObjects ( schema , matchSchema ) ;
106+ delete schema . oneOf ;
107+
108+ // if (schema.properties && matchSchema.properties) {
109+ // // 对象 oneOf 需要合并原属性和 oneOf 属性
110+ // const mergeSchema = mergeObjects(schema, matchSchema);
111+ // delete mergeSchema.oneOf;
112+ // schema = mergeSchema;
113+ // } else {
114+ // schema = matchSchema;
115+ // }
112116 } else if ( 'anyOf' in schema ) {
113117 const matchSchema = retrieveSchema (
114118 schema . anyOf [ getMatchingOption ( formData , schema . anyOf , rootSchema ) ] ,
115119 rootSchema ,
116120 formData
117121 ) ;
118122
119- if ( schema . properties && matchSchema . properties ) {
120- // 对象 anyOf 需要合并原属性和 anyOf 属性
121- const mergeSchema = mergeObjects ( schema , matchSchema ) ;
122- delete mergeSchema . anyOf ;
123- schema = mergeSchema ;
124- } else {
125- schema = matchSchema ;
126- }
123+ schema = mergeObjects ( schema , matchSchema ) ;
124+ delete schema . anyOf ;
125+
126+ // if (schema.properties && matchSchema.properties) {
127+ // // 对象 anyOf 需要合并原属性和 anyOf 属性
128+ // const mergeSchema = mergeObjects(schema, matchSchema);
129+ // delete mergeSchema.anyOf;
130+ // schema = mergeSchema;
131+ // } else {
132+ // schema = matchSchema;
133+ // }
127134 }
128135 // Not defaults defined for this node, fallback to generic typed ones.
129136 if ( typeof defaults === 'undefined' ) {
0 commit comments