import React, { memo } from 'react'; import { Carousel } from 'zarm'; import styles from './index.less'; import { ICarouselConfig } from './schema'; import logo from 'editorAssets/01-轮播.png'; import { getLink } from 'editorUtils/tool'; const XCarousel = memo((props: ICarouselConfig) => { const { direction, swipeable, autoPlay, isTpl, imgList, index } = props; const contentRender = () => { return imgList.map((item, i) => { return (
0 ? item.imgUrl[0].url : ''} alt="" />
); }); }; const getHtml = () => { let html = '
'; return html; } const itemRender = () => { return imgList.map((img, i) => { return (
  • 0 ? img.imgUrl[0].url : "") + ')', backgroundSize: 'cover', opacity: 1, display: 'list-item' }}> {img?.title}
  • ); }); } return ( <> {isTpl ? (
    ) : (
    { // console.log(`onChange: ${index}`); }} direction={direction} swipeable={swipeable} autoPlay={autoPlay} loop className='__home_banner__' data-html={getHtml()} style={{ height: 'inherit' }} > {contentRender()}
    )} ); }); export default XCarousel;