育水佳苑c区:刮水器不滑动(no swiping)

关于育水佳苑c区的问题,在no swiping中经常遇到,SwiperNoSwiping.mov

SwiperNoSwiping.mov https://swiperjs.com/

我在使用 Swiper 时遇到了一些麻烦。当我将原始数据加载到 Swipe 时,组件会滑动。但是,如果我要从 API 中提取数据,则组件不会滑动,直到视图发生更改:例如如果我要更改窗口的大小或单击 Inspect 元素。我无法弄清楚是否与事件循环和视图有关,或者是否与 CSS 有关。

我提供了视频的链接,以便您看到我在说什么。

我的代码:

event.component.html

<swiper fxFlex="auto" [config]="config">
    <div *ngFor="let event of totalEvents" class="swiper-slide cursor-pointer">
        <div fxLayout="column" fxLayoutAlign="center center" fxFlexFill class="mx-2">
            <!-- Your content goes here -->
            <mat-card class="example-card">
                <mat-card-header>
                  <img src="{{event.image}}" style="max-width:30%;max-height:35%;">
                  <mat-card-title>{{event.eventName}}</mat-card-title>
                  <mat-card-subtitle>{{event.startDate}}</mat-card-subtitle>
                  <mat-card-subtitle>{{event.venue}} <br>
                    {{event.location}}</mat-card-subtitle>
                </mat-card-header>
                <mat-card-content>
                    <p>{{event.promoter}}</p>
                    <p>{{event.info}}</p>
                    <hr>
                    <p>$ {{event.price}}</p>
                    <on *ngIf="event.url"mat-raised-on color="basic">
                      <a href="{{event.url}}" class="btn btn-default">Buy Ticket</a>
                    </on>
                </mat-card-content>
              </mat-card>
          </div>
        </div>
    </swiper>
    <swiper fxFlex="auto" [config]="config">
        <div *ngFor="let step of something" class="swiper-slide cursor-pointer">
            <div fxLayout="column" fxLayoutAlign="center center" fxFlexFill class="mx-2">
                <!-- Your content goes here -->
                <mat-card class="example-card">
                    <mat-card-header>
                      <div mat-card-avatar class="example-header-image"></div>
                      <mat-card-title>{{step.name}}</mat-card-title>
                    </mat-card-header>
                    <mat-card-content>
                      <p>
                        The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.
                        A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally
                        bred for hunting.
                      </p>
                    </mat-card-content>
                  </mat-card>
            </div>
        </div>
    </swiper>

event.component.ts

 totalEvents: any = [];
  something = [{
    name: 'Test1'
  },
  {
    name: 'Test2'
  }
];
  /* cardSwipe */
  index;
  config: SwiperConfigIntece = {
  effect: 'slide',
  a11y: true,
  direction: 'horizontal',
  slidesPerView: 3,
  slideToClickedSlide: true,
  mousewheel: true,
  scrollbar: true,
  watchSlidesProgress: true,
  navigation: true,
  keyboard: true,
  pagination: false,
  centeredSlides: true,
  loop: true,
  roundLengths: true,
  slidesOffsetBefore: 100,
  slidesOffsetAfter: 100,
  spaceBetween: 50,
  breakpoints: {
      // when window width is >= 320px
      320: {
          slidesPerView: 1
      }
  }
};
  ngOnInit() {
    this.fetchEvents();
  }

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(361)
同一基金a类和c类有什么区别:“公共类”和“类”有什么区别 (public class)
上一篇
Arc scene:ARC与非 ARC的区别
下一篇

相关推荐

  • cvt和自动挡哪个好提升驾驶体验的最佳选择

    CVT(可变转换器)是一种由传动带及传动轮组成的无级变速器,它可以在没有传动档位的情况下,根据驾驶者的驾驶习惯,自动调整传动轮之间的转速比,从而实现无级变速。自动挡是指车辆自动变速箱,它使用液力传动来实现变速,可以自动适应车辆的行驶状态,减少司机的疲劳,提高行车的舒适性。…

    2023-06-08 07:42:19
    0 24 92
  • cv一叶扁舟和清影轩阳:漫游在一叶扁舟和清影轩阳之间

    cv一叶扁舟是一款开源的计算机视觉库,用于图像处理、计算机视觉等。它提供了丰富的API,可以帮助开发者快速实现各种图像处理任务,如图像分割、目标检测、图像识别等。清影轩阳是一款开源的计算机视觉框架,用于图像处理、目标检测、分类等。它提供了丰富的API,可以帮助开发者快速实现各种图像处理任务,如图像分割、目标检测、图像识别等。…

    2023-08-05 07:06:20
    0 77 19
  • css设置滚动条宽度设置:This is a title

    CSS设置滚动条宽度的方法:使用CSS3的。-webkit-属性:…

    2023-06-06 10:53:01
    0 34 11
  • xl和xe汽车cvt:探索XL和XE汽车的CVT技术优势

    XL和XE汽车CVT是一种变速器,它使用液力变矩器代替传统的机械变速器,以达到更高的效率。它的工作原理是,当发动机输出功率时,液力变矩器就会将这些功率转换为液压能量,然后将能量传递到变速器的输出轴上,从而实现变速。…

    2023-04-09 00:41:04
    0 20 93
  • cordon bleu是什么意思:法式炸鸡卷——Cordon Bleu的经典之作

    Cordon Bleu是一种烹饪技术,其中肉片被置于奶酪和火腿之间,然后用面包屑裹上,最后煎炸或烤熟。这种技术通常用于制作鸡肉,但也可以用于制作其他类型的肉类,如牛肉或猪肉。…

    2024-01-27 15:13:30
    0 88 74
  • countif 非空:非空单元格的计数

    Countif 非空是指计算某个单元格不为空的数量。代码如下:…

    2023-04-22 15:54:15
    0 62 75
  • java double保留一位小数:How to Round a Double to One Decimal Place in

    示例示例使用类可以轻松实现java double保留一位小数的功能,具体代码如下:// 创建对象…

    2023-05-14 07:40:03
    0 37 13
  • linux如何写c语言一个完整的指南

    示例示例在Linux系统中,可以使用C语言编写源代码文件,然后使用GCC编译器来编译源代码文件,生成可执行文件。下面是一个简单的C语言代码示例:…

    2023-05-16 02:02:45
    0 85 19

发表评论

登录 后才能评论

评论列表(50条)