import {LinkType} from '@ui/type'; import LeftItem from './left.item.component'; export const getLinks = (linkList: LinkType[], selectTitle = ''): any => { const links: any[] = []; linkList.forEach((item: LinkType) => { links.push({ type: LeftItem, extraCls: item.connectionName === selectTitle ? 'left-item-selected' : '', title: item.connectionName, id: item.connectionId, creator: item.creator, text: item.text ? item.text : '默认', }); }); return links; };