import React, { useState, useEffect } from 'react'; import { IOTBottomProps } from './interface'; import './style/index.less'; const prefixCls = 'iot-suction-bottom'; const getItem = (len: number) => { const itemLen = len; const itemWidth = Math.floor((1 / itemLen) * 100) + '%'; const style = { gridTemplateColumns: `repeat(${itemLen}, ${itemWidth})`, }; // console.log(style); return style; }; const IOTSuctionBottom: React.FC = ({ id, list, handler, ...rest }) => { return (
{list.map((item: any, index: number) => { return (
{ if (item['disable']) return; handler(item); }} key={index} style={{ position: 'relative' }} >
{ item.textShow && (
{item.text}
) }
); })}
); }; export default IOTSuctionBottom;