Doc update
parent
1a01706a2c
commit
c5626eae96
|
@ -10,39 +10,11 @@ import Carousel from 'primevue/carousel';
|
|||
<h3>Getting Started</h3>
|
||||
<p>Carousel requires a collection of items as its value along with a template to render each item.</p>
|
||||
<CodeHighlight>
|
||||
<Carousel :value="cars"></Carousel>
|
||||
</CodeHighlight>
|
||||
|
||||
<h3>Templates</h3>
|
||||
<p>Carousel provides <i>header</i>, <i>item</i> and <i>footer</i> as the named templates to place content.</p>
|
||||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<Carousel :value="cars" :numVisible="4" :numScroll="3" :responsiveOptions="responsiveOptions">
|
||||
<template #header>
|
||||
<h2>Basic</h2>
|
||||
</template>
|
||||
<template #item="slotProps">
|
||||
<div class="car-details">
|
||||
<div class="p-grid p-nogutter">
|
||||
<div class="p-col-12">
|
||||
<img :src="'demo/images/car/' + slotProps.data.brand + '.png'" :alt="slotProps.data.brand" />
|
||||
</div>
|
||||
<div class="p-col-12 car-data">
|
||||
<div class="car-title">{{slotProps.data.brand}}</div>
|
||||
<div class="car-subtitle">{{slotProps.data.year}} | {{slotProps.data.color}}</div>
|
||||
|
||||
<div class="car-buttons">
|
||||
<Button icon="pi pi-search" class="p-button-secondary" />
|
||||
<Button icon="pi pi-star" class="p-button-secondary" />
|
||||
<Button icon="pi pi-cog" class="p-button-secondary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Carousel :value="cars">
|
||||
<template #item="slotProps">
|
||||
</template>
|
||||
</Carousel>
|
||||
</template>
|
||||
</CodeHighlight>
|
||||
</CodeHighlight>
|
||||
|
||||
<h3>Items per page and Scroll Items</h3>
|
||||
<p>Number of items per page is defined using the <i>numVisible</i> property whereas number of items to scroll is defined with the <i>numScroll</i> property.</p>
|
||||
|
@ -110,6 +82,7 @@ data() {
|
|||
|
||||
<h3>Header and Footer</h3>
|
||||
<p>Custom content projection is available using the <i>header</i> and <i>footer</i> templates.</p>
|
||||
|
||||
<CodeHighlight>
|
||||
<Carousel :value="cars" :numVisible="3" :numScroll="1" :responsiveOptions="responsiveOptions">
|
||||
<template #header>
|
||||
|
|
Loading…
Reference in New Issue