Skip to content

Commit

Permalink
Revert "feat: 传值问题修复"
Browse files Browse the repository at this point in the history
This reverts commit 6f8452f.
# Reviewed, transaction id: 19700
  • Loading branch information
hyunfa committed Sep 29, 2024
1 parent 6f8452f commit 454267c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions frontend/src/components/RussianDolls/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ interface IItem {
required: boolean;
description: string;
property: string;
prop: string;
default: any;
isAdd: boolean;
'ui:component': {
Expand Down Expand Up @@ -124,9 +123,9 @@ export function getConvertible(schema: IItem) {

export const getRealProp = (parentProp?: string, prop: string): string => (parentProp ? `${parentProp}.${prop}` : prop);

export function formatSchema(schema: IItem, parentProp = '', level = 0, key?: string): Doll {
export function formatSchema(schema: IItem, parentProp = '', level = 0): Doll {
const { type = 'string', properties = {} } = schema;
const prop = key ? key : schema.prop || schema.title;
const prop = schema.prop || schema.title;
const property = parentProp ? `${parentProp}.${prop}` : prop;
// console.log(parentProp, '+', prop, '=', property);
const baseItem: Doll = {
Expand Down Expand Up @@ -163,7 +162,7 @@ export function formatSchema(schema: IItem, parentProp = '', level = 0, key?: st
baseItem.children = [formatSchema(schema.items || {}, `${property}`, newLevel)];
// properties = schema.items || {}
} else {
baseItem.children = Object.keys(properties).map(key => formatSchema(Object.assign({ title: key }, { ...properties[key] }), `${property}`, newLevel, key));
baseItem.children = Object.keys(properties).map(key => formatSchema(Object.assign({ title: key }, { ...properties[key] }), `${property}`, newLevel));
}
// console.log(property, 'cccccccc');
}
Expand Down

0 comments on commit 454267c

Please sign in to comment.