Skip to content

Commit 54b2ffa

Browse files
committed
Merge branch 'dev' of github.com:chat2db/Chat2DB into dev
2 parents 96cf823 + 6b6b3b1 commit 54b2ffa

4 files changed

Lines changed: 18 additions & 14 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ const ColumnList = forwardRef((props: IProps, ref: ForwardedRef<IColumnListRef>)
138138
key: 'sort',
139139
width: '40px',
140140
align: 'center',
141+
fixed: 'left',
141142
},
142143
// {
143144
// title: 'O T',
@@ -481,6 +482,7 @@ const ColumnList = forwardRef((props: IProps, ref: ForwardedRef<IColumnListRef>)
481482
pagination={false}
482483
rowKey="key"
483484
columns={columns as any}
485+
scroll={{ x: '100%' }}
484486
dataSource={dataSource.filter((i) => i.editStatus !== EditColumnOperationType.Delete)}
485487
/>
486488
</SortableContext>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ const IndexList = forwardRef((props: IProps, ref: ForwardedRef<IIndexListRef>) =
180180
key: 'sort',
181181
width: '40px',
182182
align: 'center',
183+
fixed: 'left',
183184
},
184185
// {
185186
// title: i18n('editTable.label.index'),
@@ -193,6 +194,7 @@ const IndexList = forwardRef((props: IProps, ref: ForwardedRef<IIndexListRef>) =
193194
title: i18n('editTable.label.indexName'),
194195
dataIndex: 'name',
195196
width: '180px',
197+
fixed: 'left',
196198
render: (text: string, record: IIndexItem) => {
197199
const editable = isEditing(record);
198200
return editable ? (
@@ -207,7 +209,7 @@ const IndexList = forwardRef((props: IProps, ref: ForwardedRef<IIndexListRef>) =
207209
{
208210
title: i18n('editTable.label.indexType'),
209211
dataIndex: 'type',
210-
width: '180px',
212+
width: '100px',
211213
render: (text: string, record: IIndexItem) => {
212214
const editable = isEditing(record);
213215
return editable ? (
@@ -289,7 +291,7 @@ const IndexList = forwardRef((props: IProps, ref: ForwardedRef<IIndexListRef>) =
289291
_columns.splice(3, 0, {
290292
title: i18n('editTable.label.indexMethod'),
291293
dataIndex: 'method',
292-
width: '180px',
294+
width: '120px',
293295
render: (text: string, record: IIndexItem) => {
294296
const editable = isEditing(record);
295297
return editable ? (

chat2db-client/src/components/Console/MonacoEditor/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,16 @@ export const appendMonacoValue = (editor: any, text: any, range: IRangeType = 'e
324324
// decorations?: IModelDeltaDecoration[]: 一个数组类型的参数,用于指定插入的文本的装饰。可以用来设置文本的样式、颜色、背景色等。如果不需要设置装饰,可以忽略此参数。
325325
const decorations = [{}]; // 解决新增的文本默认背景色为灰色
326326
editor.executeEdits('setValue', [op], decorations);
327-
// const addedLastLine = editor.getModel().getLineCount();
327+
const addedLastLine = editor.getModel().getLineCount();
328328
// const addedLastLineLength = editor.getModel().getLineMaxColumn(lastLine);
329329

330-
// if (range === 'end') {
331-
// setTimeout(() => {
332-
// editor.revealLine(addedLastLine + 1);
333-
// editor.setPosition({ lineNumber: addedLastLine, column: addedLastLineLength });
334-
// editor.focus();
335-
// }, 0);
336-
// }
330+
if (range === 'end') {
331+
setTimeout(() => {
332+
editor.revealLine(addedLastLine + 1);
333+
// editor.setPosition({ lineNumber: addedLastLine, column: addedLastLineLength });
334+
// editor.focus();
335+
}, 0);
336+
}
337337
};
338338

339339
export default forwardRef(MonacoEditor);

chat2db-client/src/components/ShortcutKey/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ const shortcutsList = [
3636
keys: [keyboardKey.command, 'Enter'],
3737
},
3838
{
39-
title: i18n('common.text.saveConsole'),
40-
keys: [keyboardKey.command, 'S'],
39+
title: i18n('common.text.executeSelectedSQL'),
40+
keys: [keyboardKey.command, 'R'],
4141
},
4242
{
43-
title: i18n('common.text.refreshPage'),
44-
keys: [keyboardKey.command, 'R'],
43+
title: i18n('common.text.saveConsole'),
44+
keys: [keyboardKey.command, 'S'],
4545
},
4646
{
4747
title: i18n('common.button.createConsole'),

0 commit comments

Comments
 (0)