Added source code
parent
72d83e9ed1
commit
7ea8960805
|
@ -220,9 +220,12 @@ import PickList from 'primevue/picklist';
|
|||
</a>
|
||||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<OrderList v-model="cars" header="List of Cars" listStyle="height:auto" dataKey="vin">
|
||||
<template #header>
|
||||
List of Cars
|
||||
<PickList v-model="cars" dataKey="vin">
|
||||
<template #sourceHeader>
|
||||
Available
|
||||
</template>
|
||||
<template #targetHeader>
|
||||
Selected
|
||||
</template>
|
||||
<template #item="slotProps">
|
||||
<div class="p-caritem">
|
||||
|
@ -230,7 +233,7 @@ import PickList from 'primevue/picklist';
|
|||
<div>{{slotProps.item.brand}} - {{slotProps.item.year}} - {{slotProps.item.color}}</div>
|
||||
</div>
|
||||
</template>
|
||||
</OrderList>
|
||||
</PickList>
|
||||
</template>
|
||||
</CodeHighlight>
|
||||
|
||||
|
@ -248,7 +251,7 @@ export default {
|
|||
this.carService = new CarService();
|
||||
},
|
||||
mounted() {
|
||||
this.carService.getCarsSmall().then(data => this.cars = data.slice(0,5));
|
||||
this.carService.getCarsSmall().then(data => this.cars = [data.slice(0,5),[]]);
|
||||
}
|
||||
}
|
||||
</CodeHighlight>
|
||||
|
|
Loading…
Reference in New Issue