Skip to content

Commit 2c8cfbe

Browse files
committed
更换图标
1 parent 2c3600f commit 2c8cfbe

5 files changed

Lines changed: 25 additions & 22 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ if (__ENV__ === 'local') {
99
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
1010
@font-face {
1111
font-family: 'iconfont'; /* Project id 3633546 */
12-
src: url('//at.alicdn.com/t/c/font_3633546_26r1r56bfkj.woff2?t=1691821503781') format('woff2'),
13-
url('//at.alicdn.com/t/c/font_3633546_26r1r56bfkj.woff?t=1691821503781') format('woff'),
14-
url('//at.alicdn.com/t/c/font_3633546_26r1r56bfkj.ttf?t=1691821503781') format('truetype');
12+
src: url('//at.alicdn.com/t/c/font_3633546_72e0owin532.woff2?t=1691843170071') format('woff2'),
13+
url('//at.alicdn.com/t/c/font_3633546_72e0owin532.woff?t=1691843170071') format('woff'),
14+
url('//at.alicdn.com/t/c/font_3633546_72e0owin532.ttf?t=1691843170071') format('truetype');
1515
}
1616
`;
1717
let style = document.createElement('style');

chat2db-client/src/components/Loading/LoadingContent/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface IProps<T> {
1414

1515
export default function LoadingContent<T>(props: PropsWithChildren<IProps<T>>) {
1616
const { children, className, data = true, handleEmpty = false, empty, isLoading, coverLoading } = props;
17-
const isEmpty = !isLoading && handleEmpty && !(data as any).length;
17+
const isEmpty = !isLoading && handleEmpty && !(data as any)?.length;
1818

1919
const renderContent = () => {
2020
if ((isLoading || !data) && !coverLoading) {

chat2db-client/src/constants/common.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ export const operationTypeConfig: {
5050
icon: '\ue619'
5151
},
5252
[OperationType.VIEW]: {
53-
icon: '\ue647'
53+
icon: '\ue70c'
5454
},
5555
[OperationType.FUNCTION]: {
56-
icon: '\ue6fd'
56+
icon: '\ue76a'
5757
},
5858
[OperationType.PROCEDURE]: {
59-
icon: '\ue647'
59+
icon: '\ue73c'
6060
},
6161

6262
[OperationType.TRIGGER]: {
63-
icon: '\ue647'
63+
icon: '\ue64a'
6464
}
6565
}

chat2db-client/src/pages/main/workspace/components/Tree/treeConfig.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ export const switchIcon: Partial<{ [key in TreeNodeType]: { icon: string, unfold
4141
icon: '\ue65b'
4242
},
4343
[TreeNodeType.VIEW]: {
44-
icon: '\ue647'
44+
icon: '\ue70c'
4545
},
4646
[TreeNodeType.FUNCTION]: {
47-
icon: '\ue6fd'
47+
icon: '\ue76a'
4848
},
4949
[TreeNodeType.PROCEDURE]: {
50-
icon: '\ue647'
50+
icon: '\ue73c'
5151
},
5252
[TreeNodeType.TRIGGER]: {
53-
icon: '\ue647'
53+
icon: '\ue64a'
5454
},
5555
}
5656

@@ -243,7 +243,7 @@ export const treeConfig: { [key in TreeNodeType]: ITreeConfigItem } = {
243243
},
244244

245245
[TreeNodeType.VIEWS]: {
246-
icon: '\ue647',
246+
icon: '\ue70c',
247247
getChildren: (params) => {
248248
return new Promise((r: (value: ITreeNode[]) => void, j) => {
249249
mysqlServer.getViewList(params).then(res => {
@@ -269,7 +269,7 @@ export const treeConfig: { [key in TreeNodeType]: ITreeConfigItem } = {
269269
},
270270

271271
[TreeNodeType.FUNCTIONS]: {
272-
icon: '\ue647',
272+
icon: '\ue76a',
273273
getChildren: (params) => {
274274
return new Promise((r: (value: ITreeNode[]) => void, j) => {
275275
mysqlServer.getFunctionList(params).then(res => {
@@ -296,11 +296,11 @@ export const treeConfig: { [key in TreeNodeType]: ITreeConfigItem } = {
296296
},
297297

298298
[TreeNodeType.FUNCTION]: {
299-
icon: '\ue6fd',
299+
icon: '\ue76a',
300300
},
301301

302302
[TreeNodeType.PROCEDURES]: {
303-
icon: '\ue647',
303+
icon: '\ue73c',
304304
getChildren: (params) => {
305305
return new Promise((r: (value: ITreeNode[]) => void, j) => {
306306
mysqlServer.getProcedureList(params).then(res => {
@@ -327,11 +327,11 @@ export const treeConfig: { [key in TreeNodeType]: ITreeConfigItem } = {
327327
},
328328

329329
[TreeNodeType.PROCEDURE]: {
330-
icon: '\ue611'
330+
icon: '\ue73c'
331331
},
332332

333333
[TreeNodeType.TRIGGERS]: {
334-
icon: '\ue647',
334+
icon: '\ue64a',
335335
getChildren: (params) => {
336336
return new Promise((r: (value: ITreeNode[]) => void, j) => {
337337
mysqlServer.getTriggerList(params).then(res => {
@@ -358,11 +358,11 @@ export const treeConfig: { [key in TreeNodeType]: ITreeConfigItem } = {
358358
},
359359

360360
[TreeNodeType.TRIGGER]: {
361-
icon: '\ue611'
361+
icon: '\ue64a'
362362
},
363363

364364
[TreeNodeType.VIEW]: {
365-
icon: '\ue647',
365+
icon: '\ue70c',
366366
getChildren: (params) => {
367367
return new Promise((r: (value: ITreeNode[]) => void, j) => {
368368
const list = [

chat2db-client/src/pages/main/workspace/components/WorkspaceRight/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ const WorkspaceRight = memo<IProps>(function (props) {
3434
return;
3535
}
3636

37+
dispatch({
38+
type: 'workspace/setConsoleList',
39+
payload: [],
40+
})
41+
3742
if (doubleClickTreeNodeData.treeNodeType === TreeNodeType.VIEW) {
3843
const { extraParams } = doubleClickTreeNodeData;
3944
const { databaseName, schemaName, tableName, dataSourceId } = extraParams || {};
@@ -141,8 +146,6 @@ const WorkspaceRight = memo<IProps>(function (props) {
141146
// 如果发现当前列表里并没有newActiveConsoleId
142147
setActiveConsoleId(openConsoleList?.[openConsoleList?.length - 1].id);
143148
}
144-
145-
146149
}
147150
}, [openConsoleList]);
148151

0 commit comments

Comments
 (0)