Skip to content

Commit 5703aef

Browse files
committed
feat: edit table init
1 parent 8e091a1 commit 5703aef

23 files changed

Lines changed: 1073 additions & 14 deletions

File tree

chat2db-client/.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
"echarts",
3838
"favicons",
3939
"findstr",
40+
"fulltext",
4041
"gtag",
42+
"hexi",
4143
"Iconfont",
4244
"indexs",
4345
"JDBC",

chat2db-client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"start:web": "cross-env UMI_ENV=local cross-env APP_VERSION=${npm_config_app_version} umi dev"
2626
},
2727
"dependencies": {
28+
"@dnd-kit/modifiers": "^6.0.1",
2829
"ahooks": "^3.7.7",
2930
"ali-react-table": "^2.6.1",
3031
"antd": "^5.6.0",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@import '../../../styles/var.less';
2+
3+
.box {
4+
}
5+
6+
.formBox{
7+
width: 50%;
8+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import React, { memo, useState } from 'react';
2+
import styles from './index.less';
3+
import classnames from 'classnames';
4+
import {
5+
Form,
6+
Input,
7+
} from 'antd';
8+
9+
interface IProps {
10+
className?: string;
11+
}
12+
13+
export const basicInfo = {
14+
data: {}
15+
}
16+
17+
export default memo<IProps>(function BaseInfo({ className }) {
18+
const [form] = Form.useForm();
19+
20+
function onChangeForm(type: string) {
21+
basicInfo.data = {
22+
...form.getFieldsValue()
23+
}
24+
console.log(basicInfo)
25+
}
26+
27+
return <div className={classnames(className, styles.box)}>
28+
<div className={styles.formBox}>
29+
<Form
30+
form={form}
31+
initialValues={{ remember: true }}
32+
autoComplete="off"
33+
className={styles.form}
34+
>
35+
<Form.Item
36+
label="表名"
37+
name="name"
38+
>
39+
<Input onChange={() => { onChangeForm('name') }} />
40+
</Form.Item>
41+
<Form.Item
42+
label="注释"
43+
name="comment"
44+
>
45+
<Input onChange={() => { onChangeForm('comment') }} />
46+
</Form.Item>
47+
</Form>
48+
</div>
49+
</div>
50+
})
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@import '../../../styles/var.less';
2+
3+
.box {
4+
height: 500px;
5+
}
6+
7+
.columnListHeader {
8+
margin: 0px -10px 20px;
9+
button {
10+
margin: 0px 10px;
11+
}
12+
}
13+
14+
.editableCell {
15+
height: 28px;
16+
line-height: 28px;
17+
}

0 commit comments

Comments
 (0)