编程语言
首页 > 编程语言> > javascript-如何在ember-cli-slick中使用“ asNavFor”选项

javascript-如何在ember-cli-slick中使用“ asNavFor”选项

作者:互联网

我正在尝试在余烬应用程序中实现slick slider,我通过ember observer找到了ember-cli-slick,我必须使用Slider Syncing option.在jquery中可以通过使用以下option.but在ember中如何引用类名?

asNavFor:“.slider-nav”

解决方法:

要安装ember-cli-slick,请运行以下命令

ember install ember-cli-slick

您可以通过类似以下的参数为滑动滑块提供所有设置.

{{#slick-slider slidesToShow=1 slidesToScroll=1 arrows=false fade=true asNavFor="slider-nav" class="slider-for"}}
  <div class="box"> <img src="https://static2.businessinsider.com/image/4f3433986bb3f7b67a00003c/a-parasite-found-in-cats-could-be-manipulating-our-brains.jpg"> </div>
  <div class="box"> <img src="https://static2.businessinsider.com/image/4f3433986bb3f7b67a00003c/a-parasite-found-in-cats-could-be-manipulating-our-brains.jpg"> </div>
  <div class="box"> <img src="https://static2.businessinsider.com/image/4f3433986bb3f7b67a00003c/a-parasite-found-in-cats-could-be-manipulating-our-brains.jpg"> </div>
  <div class="box"> <img src="https://static2.businessinsider.com/image/4f3433986bb3f7b67a00003c/a-parasite-found-in-cats-could-be-manipulating-our-brains.jpg"> </div>
{{/slick-slider}}

我尚未测试asNavFor功能是否正常工作.但这就是我们需要为滑动滑块组件提供设置的方式.

标签:ember-js,ember-cli,slider,ember-addon,javascript
来源: https://codeday.me/bug/20191118/2025722.html