最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Angular引入swiper后autoplay失效的解決辦法詳解

 更新時(shí)間:2023年09月19日 10:00:32   作者:秋刀魚Bin  
這篇文章主要介紹了Angular引入swiper后autoplay失效的解決辦法詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪

angular引入swiper

由于angular不熟,最近在修改一個(gè)NG-ZORRO的項(xiàng)目。

期間為了引入swiper,按照網(wǎng)上的安裝引入方式(這步就不說了,應(yīng)該都能搜到),引入后發(fā)現(xiàn)autoplay怎么設(shè)置都沒效果,試了很多辦法,后面去swiperjs官網(wǎng)看了才發(fā)現(xiàn)這段話。

基礎(chǔ)功能導(dǎo)入

import { Swiper, Autoplay } from 'swiper';
Swiper.use([Autoplay]);
export class TestComponent {
    swiper: Swiper;
    constructor(){}
    ngAfterViewInit() {
      this.swiper = new Swiper('.swiper-container', {
        slidesPerView: 3,
        initialSlide :1,
        centeredSlides: true,
        loop: true,
        observer: true,
        observeParents: true,
        autoplay:{ 
          delay:2000,
          disableOnInteraction:false,
          stopOnLastSlide: false,
        }, 
      });
    }
  }

結(jié)束收工!_(:з」∠)_

以上就是Angular引入swiper后autoplay失效的解決辦法詳解的詳細(xì)內(nèi)容,更多關(guān)于Angular引入swiper autoplay失效的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評(píng)論

中宁县| 凤翔县| 玛沁县| 来安县| 达尔| 萍乡市| 织金县| 黄平县| 弥渡县| 邯郸市| 万年县| 嘉义市| 平江县| 鹿泉市| 雅江县| 绍兴市| 加查县| 霞浦县| 朝阳县| 大庆市| 玉龙| 图片| 民县| 安达市| 亳州市| 平武县| 云阳县| 麻栗坡县| 江安县| 且末县| 清苑县| 泰安市| 罗田县| 开鲁县| 昌宁县| 神池县| 分宜县| 黄龙县| 虞城县| 呼伦贝尔市| 光泽县|