You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
823 B
33 lines
823 B
/* 轮播列表组件 */
|
|
import React from 'react';
|
|
import ScrollBoard from './scrollBoard';
|
|
import NoData from './noData';
|
|
import './index.less';
|
|
function CarouselList(props) {
|
|
const {
|
|
header = [], data = [], rowNum = 4, height, columnWidth, multiellipsis, waitTime = 2000, marginTop, ...restProps
|
|
} = props;
|
|
|
|
const config = {
|
|
header,
|
|
rowNum,
|
|
headerBGC: 'rgba(81, 200, 247, 0.2)',
|
|
oddRowBGC: 'transparent',
|
|
evenRowBGC: 'transparent',
|
|
headerHeight: 30,
|
|
data,
|
|
waitTime,
|
|
columnWidth: columnWidth || [],
|
|
};
|
|
|
|
return data.length > 0 ? (
|
|
<ScrollBoard
|
|
config={config}
|
|
style={{ height }}
|
|
className={multiellipsis ? 'scroll-board-multi' : 'scroll-board'}
|
|
{...restProps}
|
|
/>
|
|
) : <NoData marginTop={marginTop || 0} />;
|
|
}
|
|
|
|
export default CarouselList;
|
|
|