diff --git a/src/modules/pages/connection/list/list_item/list_item.ts b/src/modules/pages/connection/list/list_item/list_item.ts index 3fb61b5..dbcdb5a 100644 --- a/src/modules/pages/connection/list/list_item/list_item.ts +++ b/src/modules/pages/connection/list/list_item/list_item.ts @@ -4,7 +4,7 @@ import './list_item.less'; import { ListItemModel, ListItemModelXtype } from './list_item.model'; import { PAGE_INDEX } from '@constants/constant'; import { hasRegistered } from '../list.service'; -import { connectionCanEdit, getTextByDatabaseType } from '../../../../app.service'; +import { connectionCanEdit, getTextByDatabaseType, getChartLength } from '../../../../app.service'; import { testConnection } from '../../../maintain/forms/form.server'; export const ListItemXtype = 'dec.dcm.connection.list_item'; @@ -71,6 +71,13 @@ export class ListItem extends BI.BasicButton { eventName: BI.SignEditor.EVENT_BLUR, action: () => { const newName = this.nameEditor.getValue(); + if (getChartLength(newName) > 200) { + BI.Msg.toast(BI.i18nText(BI.i18nText('Dec-Dcm_Connection_Cannot_Too_Lang')), { + level: 'error', + }); + + return; + } this.store.changeName(name, newName).then(re => { this.store.setIsEdit(false, name); if (re.errorCode) {