2023-07-27 06:42:04 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<DocSectionCode :code="code" :service="['ProductService']" embedded />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
|
|
|
composition: `
|
|
|
|
<template>
|
|
|
|
<div class="card">
|
|
|
|
<PickList v-model="products" listStyle="height:342px" dataKey="id">
|
|
|
|
<template #sourceheader> Available </template>
|
|
|
|
<template #targetheader> Selected </template>
|
|
|
|
<template #item="slotProps">
|
|
|
|
<div class="flex flex-wrap p-2 items-center gap-3">
|
2023-08-01 03:09:11 +00:00
|
|
|
<img class="w-16 shadow-md shrink-0 rounded" :src="'https://primefaces.org/cdn/primevue/images/product/' + slotProps.item.image" :alt="slotProps.item.name" />
|
2023-07-27 06:42:04 +00:00
|
|
|
<div class="flex-1 flex flex-col gap-2">
|
2023-08-01 03:09:11 +00:00
|
|
|
<span class="font-bold text-gray-700 dark:text-white/80">{{ slotProps.item.name }}</span>
|
2023-07-27 06:42:04 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-08-01 03:09:11 +00:00
|
|
|
<i class="pi pi-tag text-sm text-gray-700 dark:text-white/80"></i>
|
|
|
|
<span class="text-gray-700 dark:text-white/80">{{ slotProps.item.category }}</span>
|
2023-07-27 06:42:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-08-01 03:09:11 +00:00
|
|
|
<span class="font-bold text-gray-700 dark:text-white/80">$ {{ slotProps.item.price }}</span>
|
2023-07-27 06:42:04 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</PickList>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref, onMounted } from 'vue';
|
|
|
|
import { ProductService } from '@/service/ProductService'
|
|
|
|
|
|
|
|
const products = ref(null);
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
ProductService.getProductsSmall().then((data) => (products.value = [data, []]));
|
|
|
|
});
|
|
|
|
<\/script>`,
|
|
|
|
data: `
|
|
|
|
/* ProductService */
|
|
|
|
{
|
|
|
|
id: '1000',
|
|
|
|
code: 'f230fh0g3',
|
|
|
|
name: 'Bamboo Watch',
|
|
|
|
description: 'Product Description',
|
|
|
|
image: '/bamboo-watch.jpg',
|
|
|
|
price: 65,
|
|
|
|
category: 'Accessories',
|
|
|
|
quantity: 24,
|
|
|
|
inventoryStatus: 'INSTOCK',
|
|
|
|
rating: 5
|
|
|
|
},
|
|
|
|
...
|
|
|
|
`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|