React Slick with rows

时间:2017-08-24 09:58:53

标签: reactjs slick.js

我想在我的反应应用程序中添加光滑的轮播。 这是原始代码:

http://kenwheeler.github.io/slick/

我发现了反应灵敏,但在基本代码中,可以添加多行(响应)

在react-slick组件中,这可能不起作用 https://github.com/akiran/react-slick/issues/502

如何使用光滑的图库来回应原始代码中存在的所有选项。

3 个答案:

答案 0 :(得分:1)

您应将以下内容添加到您的设置变量中:

$JAVA_HOME\legal\jdk.internal.le\jline.md

答案 1 :(得分:-1)

I have implemented slick carousel in my react app. Please find below code : 

class SimpleSlider extends React.Component {
 render() {
      var settings = {
      dots: true,
      autoplay: true,
      arrows: true
    };

    return (
      <Slider {...settings}>
          <div><img src='../../src/assets/1.jpg' /></div>
          <div><img src='../../src/assets/2.jpg' /></div>
          <div><img src='../../src/assets/3.jpg' /></div>
          <div><img src='../../src/assets/4.jpg' /></div>
        </Slider>
    );
}
}

If you want to add rows dynamically you can add that as well, you will need to make single row as a template in JavaScript and append it inside <Slider> component dynamically. Hope this would be helpful to you.

答案 2 :(得分:-1)

巧妙地更新当前行,而不是查看的每一行 例如多行2显示den仍然必须一次移动两张幻灯片,但仅更新2张幻灯片而不是4