primevue-mirror/doc/skeleton/DataTableDoc.vue

136 lines
3.6 KiB
Vue
Raw Normal View History

2023-02-28 13:35:10 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Sample DataTable implementation using different Skeleton components and PrimeFlex CSS utilities.</p>
</DocSectionText>
<div class="card">
<DataTable :value="products">
<Column field="code" header="Code">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="name" header="Name">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="category" header="Category">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="quantity" header="Quantity">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
</DataTable>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
<DataTable :value="products">
2023-02-28 13:35:10 +00:00
<Column field="code" header="Code">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="name" header="Name">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="category" header="Category">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="quantity" header="Quantity">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
</DataTable>`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 13:35:10 +00:00
<div class="card">
<DataTable :value="products">
<Column field="code" header="Code">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="name" header="Name">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="category" header="Category">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="quantity" header="Quantity">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
</DataTable>
</div>
</template>
<script>
export default {
data() {
return {
products: new Array(4)
};
}
}
<\/script>`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 13:35:10 +00:00
<div class="card">
<DataTable :value="products">
<Column field="code" header="Code">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="name" header="Name">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="category" header="Category">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
<Column field="quantity" header="Quantity">
<template #body>
<Skeleton></Skeleton>
</template>
</Column>
</DataTable>
</div>
</template>
<script setup>
import { ref } from 'vue';
const products = ref(new Array(4));
<\/script>`
},
products: new Array(4)
};
}
};
</script>