primevue-mirror/apps/showcase/doc/picklist/pt/PTViewer.vue

32 lines
782 B
Vue
Raw Normal View History

2024-09-18 13:09:24 +00:00
<template>
2024-09-20 12:22:44 +00:00
<DocPTViewer :docs="docs">
2024-09-18 13:09:24 +00:00
<PickList v-model="products" dataKey="id" breakpoint="1400px" class="w-full">
<template #option="{ option }">
{{ option.name }}
</template>
</PickList>
</DocPTViewer>
</template>
<script>
import { getPTOptions } from '@/components/doc/helpers';
import { ProductService } from '@/service/ProductService';
export default {
data() {
return {
products: null,
2024-09-20 12:22:44 +00:00
docs: [
2024-09-18 13:09:24 +00:00
{
data: getPTOptions('PickList'),
key: 'PickList'
}
]
};
},
mounted() {
ProductService.getProductsSmall().then((data) => (this.products = [data, []]));
}
};
</script>