所以我正在使用ngx-bootstrap。当我使用单张图像轮播时,它可以完美工作,但在多张图像中,我得到的只是左边的第一张图像,没有别的。
<p>
If `true` - carousel indicators indicate slides chunks works ONLY if singleSlideOffset = FALSE
</p>
<carousel [itemsPerSlide]="itemsPerSlide"
[singleSlideOffset]="false"
[interval]="false"
[indicatorsByChunk]="true">
<slide *ngFor="let slide of slides; let index=index">
<img [src]="slide.image" alt="image slide" style="display: block; width: 100%;">
<div class="carousel-caption">
<h4>Slide {{index}}</h4>
</div>
</slide>
</carousel>
下面是角度代码
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent { itemsPerSlide = 3;
singleSlideOffset = false;
noWrap = false;
slides = [
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'},
{image: 'https://images-na.ssl-images-amazon.com/images/I/81GfZasnt9L._SL1371_.jpg'}
];
}
此代码正确来自ngx引导程序文档和我从Google挑选的图像。如果文档代码不起作用,我知道这不是一个好兆头,但也许我遗漏了一些东西,如果有人遇到类似问题可以帮助我,我将感到非常高兴。
答案 0 :(得分:1)
您好,只需在幻灯片中添加此类library("dplyr")
library("officer")
my_text1 <- paste("example text \u2705 some Umlaute ö ä ü")
output <- read_docx()
output <- output %>%
body_add_par(my_text1, style = 'Normal')
print(output, target = "example.docx")
,为我工作:):
my_text2 <- paste("& symbol and example text \u2705 some Umlaute ö ä ü")
output <- read_docx()
output <- output %>%
body_add_par(my_text2, style = 'Normal')
print(output, target = "example.docx")
如果愿意,可以将以下CSS添加到幻灯片中:
mx-auto
答案 1 :(得分:0)
像这样删除添加的属性
<carousel>
<slide *ngFor="let slide of slides; let index=index">
<img [src]="slide.image" alt="image slide" style="display: block; width: 100%;">
<div class="carousel-caption">
<h4>Slide {{index}}</h4>
</div>
</slide>
</carousel>