dshh
This commit is contained in:
parent
109158165c
commit
50f5086e2d
@ -8,23 +8,14 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Checkbox,
|
Checkbox,
|
||||||
} from "@douyinfe/semi-ui";
|
} from "@douyinfe/semi-ui";
|
||||||
import { IconRowsStroked, IconDeleteStroked } from "@douyinfe/semi-icons";
|
import {
|
||||||
|
IconRowsStroked,
|
||||||
|
IconDeleteStroked,
|
||||||
|
IconLoopTextStroked,
|
||||||
|
} from "@douyinfe/semi-icons";
|
||||||
import { Cardinality, Constraint } from "../data/data";
|
import { Cardinality, Constraint } from "../data/data";
|
||||||
|
|
||||||
// import { Table } from "@douyinfe/semi-ui";
|
|
||||||
|
|
||||||
export default function ReferenceOverview(props) {
|
export default function ReferenceOverview(props) {
|
||||||
// const columns = [
|
|
||||||
// {
|
|
||||||
// title: "Primary",
|
|
||||||
// dataIndex: "primary",
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: "Foreign",
|
|
||||||
// dataIndex: "foreign",
|
|
||||||
// },
|
|
||||||
// ];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Collapse>
|
<Collapse>
|
||||||
{props.relationships.map((r, i) => (
|
{props.relationships.map((r, i) => (
|
||||||
@ -39,25 +30,19 @@ export default function ReferenceOverview(props) {
|
|||||||
>
|
>
|
||||||
<Form>
|
<Form>
|
||||||
<Form.Input initValue={r.name} field="name" label="Name" />
|
<Form.Input initValue={r.name} field="name" label="Name" />
|
||||||
|
<div className="flex justify-between items-center my-1">
|
||||||
{/* <Table
|
<div className="me-1">
|
||||||
columns={columns}
|
<strong>Primary: </strong>
|
||||||
dataSource={[
|
{props.tables[r.startTableId].name}
|
||||||
{
|
</div>
|
||||||
key: "1",
|
<div className="mx-1">
|
||||||
primary: props.tables[r.startTableId].name,
|
<strong>Foreign: </strong>
|
||||||
foreign: props.tables[r.endTableId].name,
|
{props.tables[r.endTableId].name}
|
||||||
},
|
</div>
|
||||||
{
|
<div className="ms-1">
|
||||||
key: "2",
|
<Button icon={<IconLoopTextStroked />}>Swap</Button>
|
||||||
primary: props.tables[r.startTableId].fields[r.startFieldId].name,
|
</div>
|
||||||
foreign: props.tables[r.endTableId].fields[r.endFieldId].name,
|
</div>
|
||||||
},
|
|
||||||
]}
|
|
||||||
pagination={false}
|
|
||||||
bordered
|
|
||||||
/> */}
|
|
||||||
|
|
||||||
<Form.Select
|
<Form.Select
|
||||||
optionList={Object.values(Cardinality).map((v) => ({
|
optionList={Object.values(Cardinality).map((v) => ({
|
||||||
label: v,
|
label: v,
|
||||||
@ -94,7 +79,7 @@ export default function ReferenceOverview(props) {
|
|||||||
></Form.Select>
|
></Form.Select>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<div className="flex justify-between items-center my-3">
|
<div className="flex justify-between items-center my-2">
|
||||||
<label htmlFor="unique" className="font-medium text-black">
|
<label htmlFor="unique" className="font-medium text-black">
|
||||||
Mandetory
|
Mandetory
|
||||||
</label>
|
</label>
|
||||||
|
Loading…
Reference in New Issue
Block a user