Skip to content

Commit 11927df

Browse files
committed
edit table
1 parent de447e0 commit 11927df

19 files changed

Lines changed: 516 additions & 205 deletions

File tree

chat2db-client/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = {
5656
// allow: ['info', 'error', 'warn'],
5757
// },
5858
// ],
59-
'no-duplicate-imports': 2, // 禁止重复 import
59+
'no-duplicate-imports': [2], // 禁止重复 import
6060
'newline-per-chained-call': 2, // 链式调用必须换行
6161
'no-underscore-dangle': 2, // 禁止标识符中有悬空下划线
6262
'eol-last': 2, // 文件以单一的换行符结束

chat2db-client/.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"AZUREAI",
2727
"bgcolor",
2828
"Cascader",
29+
"charsets",
2930
"chatgpt",
3031
"CLICKHOUSE",
3132
"Consolas",

chat2db-client/src/blocks/DatabaseTableEditor/BaseInfo/index.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,20 @@ const BaseInfo = forwardRef((props: IProps, ref: ForwardedRef<IBaseInfoRef>) =>
3737
return (
3838
<div className={classnames(className, styles.box)}>
3939
<div className={styles.formBox}>
40-
<Form form={form} initialValues={{ remember: true }} autoComplete="off" className={styles.form}>
41-
<Form.Item label={i18n('editTable.label.tableName')} name="name">
40+
<Form
41+
// labelCol={{
42+
// style: { width: 90 },
43+
// }}
44+
layout="vertical"
45+
form={form}
46+
initialValues={{ remember: true }}
47+
autoComplete="off"
48+
className={styles.form}
49+
>
50+
<Form.Item label={`${i18n('editTable.label.tableName')}:`} name="name">
4251
<Input />
4352
</Form.Item>
44-
<Form.Item label={i18n('editTable.label.comment')} name="comment">
53+
<Form.Item label={`${i18n('editTable.label.comment')}:`} name="comment">
4554
<Input />
4655
</Form.Item>
4756
</Form>

chat2db-client/src/blocks/DatabaseTableEditor/ColumnList/index.less

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import '../../../styles/var.less';
22

3-
.box {
3+
.columnList {
44
height: 100%;
55
padding: 10px;
66
box-sizing: border-box;
@@ -10,16 +10,39 @@
1010

1111
.columnListHeader {
1212
margin: 0px -5px 10px;
13+
flex-shrink: 0;
1314
button {
1415
margin: 0px 5px;
1516
}
1617
}
1718

19+
.formBox {
20+
height: 0px;
21+
flex: 1;
22+
display: flex;
23+
flex-direction: column;
24+
}
25+
1826
.tableBox {
1927
flex: 1;
2028
overflow: auto;
2129
}
2230

31+
.otherInfo {
32+
margin: 10px -10px 0px;
33+
padding: 10px;
34+
height: 200px;
35+
display: flex;
36+
align-items: center;
37+
justify-content: center;
38+
border-top: 1px solid var(--color-border);
39+
}
40+
41+
.otherInfoFormBox {
42+
min-height: 140px;
43+
width: 400px;
44+
}
45+
2346
.editableCell {
2447
height: 28px;
2548
line-height: 26px;

0 commit comments

Comments
 (0)