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

33 lines
835 B
Vue
Raw Normal View History

2024-09-18 13:09:24 +00:00
<template>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="ptViewerDoc">
<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,
ptViewerDoc: [
{
data: getPTOptions('PickList'),
key: 'PickList'
}
]
};
},
mounted() {
ProductService.getProductsSmall().then((data) => (this.products = [data, []]));
}
};
</script>