|
|
@@ -307,7 +307,7 @@ class AddSchemaInput extends Component {
|
|
|
...varobj,
|
|
|
schemaName: value,
|
|
|
schemaData: {
|
|
|
- value,
|
|
|
+ name: value,
|
|
|
tables: []
|
|
|
}
|
|
|
}
|
|
|
@@ -345,7 +345,7 @@ class ShowSchemaList extends Component {
|
|
|
schemas.splice(targetSchemaIndex, 1);
|
|
|
this.setState({
|
|
|
schemas
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
if (this.state.schemas.length !== 0) {
|
|
|
this.setState({
|
|
|
@@ -380,7 +380,6 @@ class ShowSchemaList extends Component {
|
|
|
if (error) {
|
|
|
return 'error!';
|
|
|
}
|
|
|
- console.log(data);
|
|
|
if (data.schema_by_props.length === 0)
|
|
|
return (
|
|
|
<div>
|
|
|
@@ -393,19 +392,19 @@ class ShowSchemaList extends Component {
|
|
|
<div>
|
|
|
{
|
|
|
data.schema_by_props.map((schema) => {
|
|
|
- return <div key={schema.schemaName} className='title' onClick={this.switchSchema(schema.schemaName)}>
|
|
|
+ return <div key={schema.schemaData.name} className='title' onClick={this.switchSchema(schema.schemaData.name)}>
|
|
|
<Row>
|
|
|
- <Col span={20}>{schema.schemaName}</Col>
|
|
|
+ <Col span={20}>{schema.schemaData.name}</Col>
|
|
|
<Col span={4}>
|
|
|
<Button onClick={() => this.setState({currentTable: 'add'})} type="primary"
|
|
|
shape="circle" icon="plus" size='small'/>
|
|
|
- <DeleteSchemaButton schemaName={schema.schemaName} deleteSchema={this.deleteSchema}/>
|
|
|
+ <DeleteSchemaButton schemaName={schema.schemaData.name} deleteSchema={this.deleteSchema}/>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
{
|
|
|
- schema.tables.map((table) =>
|
|
|
+ schema.schemaData.tables.map((table) =>
|
|
|
<p onClick={this.switchTable(table.name)} key={table.name} className='show'>
|
|
|
<Icon type="ordered-list" theme="outlined"/> {table.name}
|
|
|
<span className='remark'><i> {table.remark}</i></span>
|