import './index.less'; import { FileTextOutlined, PlaySquareOutlined } from '@ant-design/icons'; import { TableContent } from '../tableContent'; import { Tabs, ConfigProvider } from 'antd'; import classNames from 'classnames'; import React, { useContext } from 'react'; const { TabPane } = Tabs; const LeftList = (props) => { const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const prefixCls = getPrefixCls('panda-gis-tipLeft'); const { leftSetting } = props; return ( <div className={classNames(`${prefixCls}-ullist`)}> <Tabs tabPosition="left"> {leftSetting.map((item, index) => { if (!item.active) return; if (item.name == 'dataList') { return ( <TabPane tab={ <div> <FileTextOutlined /> </div> } key={index} > <TableContent data={item.data} /> </TabPane> ); } else if (item.name == 'media') { return ( <TabPane tab={ <div> <PlaySquareOutlined /> </div> } key={index} > 多媒体 </TabPane> ); } })} </Tabs> </div> ); }; export { LeftList };