我想用 nativescript-carousel 视图插件创建一个动态轮播。
我使用以下代码:
<Carousel #carousel
[items]="fiches"
debug="true"
height="100%"
width="100%"
color="red"
backgroundColor="red"
indicatorOffset="0, -30"
indicatorColor="#fff000"
finite="true"
bounce="false"
showIndicator="true"
verticalAlignment="top"
android:indicatorAnimation="DROP"
>
<CarouselItem
height="red"
backgroundColor="red"
*ngFor="let item of fiches; let id=index"
[id]="'slide '+id"
verticalAlignment="center"
>
<GridLayout rows="*" cols="*, *">
<WebView height="100%" width="100%"
[src]="item.content" (loaded)="onWvloaded($event)">
</WebView>
</GridLayout>
</CarouselItem>
</Carousel>
第二张幻灯片已创建,但我看不到内容: