mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Demo update on source codes
This commit is contained in:
parent
84fb736e1f
commit
dad730398f
54 changed files with 1338 additions and 2013 deletions
|
@ -154,37 +154,24 @@ export default {
|
|||
</a>
|
||||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<template>
|
||||
<div>
|
||||
<div class="content-section introduction">
|
||||
<div class="feature-intro">
|
||||
<h1>SelectButton</h1>
|
||||
<p>SelectButton is a form component to choose a value from a list of options using button elements.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Single</h3>
|
||||
<SelectButton v-model="selectedCity" :options="cities" optionLabel="name" />
|
||||
<p>Selected City: <span style="font-weight: bold">{{selectedCity}}</span></p>
|
||||
|
||||
<div class="content-section implementation">
|
||||
<h3 class="first">Single</h3>
|
||||
<SelectButton v-model="selectedCity" :options="cities" optionLabel="name" />
|
||||
<p>Selected City: <span style="font-weight: bold">{{selectedCity}}</span></p>
|
||||
<h3>Multiple</h3>
|
||||
<SelectButton v-model="selectedCars" :options="cars" optionLabel="brand" :multiple="true" />
|
||||
<p>Selected Cars: <span style="font-weight: bold">{{selectedCars}}</span></p>
|
||||
|
||||
<h3>Multiple</h3>
|
||||
<SelectButton v-model="selectedCars" :options="cars" optionLabel="brand" :multiple="true" />
|
||||
<p>Selected Cars: <span style="font-weight: bold">{{selectedCars}}</span></p>
|
||||
|
||||
<h3>Custom Content</h3>
|
||||
<SelectButton v-model="selectedCar" :options="cars" optionLabel="brand">
|
||||
<template #option="slotProps">
|
||||
<div style="text-align: center; padding: 1em; width: 125px">
|
||||
<img :alt="slotProps.option.brand" :src="'demo/images/car/' + slotProps.option.brand + '.png'" style="width:48px" />
|
||||
<div style="margin-top: 1em">{{slotProps.option.brand}}</div>
|
||||
</div>
|
||||
</template>
|
||||
</SelectButton>
|
||||
<p>Selected Car: <span style="font-weight: bold">{{selectedCar}}</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<h3>Custom Content</h3>
|
||||
<SelectButton v-model="selectedCar" :options="cars" optionLabel="brand">
|
||||
<template #option="slotProps">
|
||||
<div style="text-align: center; padding: 1em; width: 125px">
|
||||
<img :alt="slotProps.option.brand" :src="'demo/images/car/' + slotProps.option.brand + '.png'" style="width:48px" />
|
||||
<div style="margin-top: 1em">{{slotProps.option.brand}}</div>
|
||||
</div>
|
||||
</template>
|
||||
</SelectButton>
|
||||
<p>Selected Car: <span style="font-weight: bold">{{selectedCar}}</span></p>
|
||||
</template>
|
||||
</CodeHighlight>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue