2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>Sample implementation with custom content and styled markers.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<div class="card">
|
|
|
|
<Timeline :value="events" align="alternate" class="customized-timeline">
|
|
|
|
<template #marker="slotProps">
|
2024-05-20 12:14:38 +00:00
|
|
|
<span class="flex w-8 h-8 items-center justify-center text-white rounded-full z-10 shadow-sm" :style="{ backgroundColor: slotProps.item.color }">
|
2023-02-28 08:29:30 +00:00
|
|
|
<i :class="slotProps.item.icon"></i>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
<template #content="slotProps">
|
2024-05-20 12:14:38 +00:00
|
|
|
<Card class="mt-4">
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #title>
|
|
|
|
{{ slotProps.item.status }}
|
|
|
|
</template>
|
|
|
|
<template #subtitle>
|
|
|
|
{{ slotProps.item.date }}
|
|
|
|
</template>
|
|
|
|
<template #content>
|
2024-05-20 12:14:38 +00:00
|
|
|
<img v-if="slotProps.item.image" :src="`https://primefaces.org/cdn/primevue/images/product/${slotProps.item.image}`" :alt="slotProps.item.name" width="200" class="shadow-sm" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<p>
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate
|
|
|
|
neque quas!
|
|
|
|
</p>
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button label="Read more" text></Button>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
</Card>
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" :dependencies="{ sass: '1.45.0', 'sass-loader': '8.0.2' }" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
events: [
|
|
|
|
{ status: 'Ordered', date: '15/10/2020 10:30', icon: 'pi pi-shopping-cart', color: '#9C27B0', image: 'game-controller.jpg' },
|
|
|
|
{ status: 'Processing', date: '15/10/2020 14:00', icon: 'pi pi-cog', color: '#673AB7' },
|
|
|
|
{ status: 'Shipped', date: '15/10/2020 16:15', icon: 'pi pi-shopping-cart', color: '#FF9800' },
|
|
|
|
{ status: 'Delivered', date: '16/10/2020 10:00', icon: 'pi pi-check', color: '#607D8B' }
|
|
|
|
],
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
<Timeline :value="events" align="alternate" class="customized-timeline">
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #marker="slotProps">
|
2024-05-20 12:14:38 +00:00
|
|
|
<span class="flex w-8 h-8 items-center justify-center text-white rounded-full z-10 shadow-sm" :style="{ backgroundColor: slotProps.item.color }">
|
2023-02-28 08:29:30 +00:00
|
|
|
<i :class="slotProps.item.icon"></i>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
<template #content="slotProps">
|
2024-05-20 12:14:38 +00:00
|
|
|
<Card class="mt-4">
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #title>
|
|
|
|
{{ slotProps.item.status }}
|
|
|
|
</template>
|
|
|
|
<template #subtitle>
|
|
|
|
{{ slotProps.item.date }}
|
|
|
|
</template>
|
|
|
|
<template #content>
|
2024-05-20 12:14:38 +00:00
|
|
|
<img v-if="slotProps.item.image" :src="\`/images/product/\${slotProps.item.image}\`" :alt="slotProps.item.name" width="200" class="shadow-sm" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<p>
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate
|
|
|
|
neque quas!
|
|
|
|
</p>
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button label="Read more" text></Button>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
</Card>
|
|
|
|
</template>
|
2023-10-15 09:38:39 +00:00
|
|
|
</Timeline>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card">
|
|
|
|
<Timeline :value="events" align="alternate" class="customized-timeline">
|
|
|
|
<template #marker="slotProps">
|
2024-05-20 12:14:38 +00:00
|
|
|
<span class="flex w-8 h-8 items-center justify-center text-white rounded-full z-10 shadow-sm" :style="{ backgroundColor: slotProps.item.color }">
|
2023-02-28 08:29:30 +00:00
|
|
|
<i :class="slotProps.item.icon"></i>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
<template #content="slotProps">
|
2024-05-20 12:14:38 +00:00
|
|
|
<Card class="mt-4">
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #title>
|
|
|
|
{{ slotProps.item.status }}
|
|
|
|
</template>
|
|
|
|
<template #subtitle>
|
|
|
|
{{ slotProps.item.date }}
|
|
|
|
</template>
|
|
|
|
<template #content>
|
2024-05-20 12:14:38 +00:00
|
|
|
<img v-if="slotProps.item.image" :src="\`https://primefaces.org/cdn/primevue/images/product/\${slotProps.item.image}\`" :alt="slotProps.item.name" width="200" class="shadow-sm" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<p>
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate
|
|
|
|
neque quas!
|
|
|
|
</p>
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button label="Read more" text></Button>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
</Card>
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
events: [
|
|
|
|
{ status: 'Ordered', date: '15/10/2020 10:30', icon: 'pi pi-shopping-cart', color: '#9C27B0', image: 'game-controller.jpg' },
|
|
|
|
{ status: 'Processing', date: '15/10/2020 14:00', icon: 'pi pi-cog', color: '#673AB7' },
|
|
|
|
{ status: 'Shipped', date: '15/10/2020 16:15', icon: 'pi pi-shopping-cart', color: '#FF9800' },
|
|
|
|
{ status: 'Delivered', date: '16/10/2020 10:00', icon: 'pi pi-check', color: '#607D8B' }
|
|
|
|
]
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
<\/script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@media screen and (max-width: 960px) {
|
|
|
|
::v-deep(.customized-timeline) {
|
|
|
|
.p-timeline-event:nth-child(even) {
|
2023-10-17 19:27:27 +00:00
|
|
|
flex-direction: row;
|
2023-02-28 08:29:30 +00:00
|
|
|
|
|
|
|
.p-timeline-event-content {
|
2023-10-17 19:27:27 +00:00
|
|
|
text-align: left;
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-timeline-event-opposite {
|
|
|
|
flex: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-10-15 09:38:39 +00:00
|
|
|
</style>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card">
|
|
|
|
<Timeline :value="events" align="alternate" class="customized-timeline">
|
|
|
|
<template #marker="slotProps">
|
2024-05-20 12:14:38 +00:00
|
|
|
<span class="flex w-8 h-8 items-center justify-center text-white rounded-full z-10 shadow-sm" :style="{ backgroundColor: slotProps.item.color }">
|
2023-02-28 08:29:30 +00:00
|
|
|
<i :class="slotProps.item.icon"></i>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
<template #content="slotProps">
|
2024-05-20 12:14:38 +00:00
|
|
|
<Card class="mt-4">
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #title>
|
|
|
|
{{ slotProps.item.status }}
|
|
|
|
</template>
|
|
|
|
<template #subtitle>
|
|
|
|
{{ slotProps.item.date }}
|
|
|
|
</template>
|
|
|
|
<template #content>
|
2024-05-20 12:14:38 +00:00
|
|
|
<img v-if="slotProps.item.image" :src="\`https://primefaces.org/cdn/primevue/images/product/\${slotProps.item.image}\`" :alt="slotProps.item.name" width="200" class="shadow-sm" />
|
2023-02-28 08:29:30 +00:00
|
|
|
<p>
|
|
|
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate
|
|
|
|
neque quas!
|
|
|
|
</p>
|
2023-03-03 12:15:20 +00:00
|
|
|
<Button label="Read more" text></Button>
|
2023-02-28 08:29:30 +00:00
|
|
|
</template>
|
|
|
|
</Card>
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
const events = ref([
|
|
|
|
{ status: 'Ordered', date: '15/10/2020 10:30', icon: 'pi pi-shopping-cart', color: '#9C27B0', image: 'game-controller.jpg' },
|
|
|
|
{ status: 'Processing', date: '15/10/2020 14:00', icon: 'pi pi-cog', color: '#673AB7' },
|
|
|
|
{ status: 'Shipped', date: '15/10/2020 16:15', icon: 'pi pi-shopping-cart', color: '#FF9800' },
|
|
|
|
{ status: 'Delivered', date: '16/10/2020 10:00', icon: 'pi pi-check', color: '#607D8B' }
|
|
|
|
]);
|
|
|
|
|
|
|
|
<\/script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@media screen and (max-width: 960px) {
|
|
|
|
::v-deep(.customized-timeline) {
|
|
|
|
.p-timeline-event:nth-child(even) {
|
2023-10-17 19:27:27 +00:00
|
|
|
flex-direction: row;
|
2023-02-28 08:29:30 +00:00
|
|
|
|
|
|
|
.p-timeline-event-content {
|
2023-10-17 19:27:27 +00:00
|
|
|
text-align: left;
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-timeline-event-opposite {
|
|
|
|
flex: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-01 14:36:59 +00:00
|
|
|
</style>
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
2023-10-24 12:35:30 +00:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@media screen and (max-width: 960px) {
|
|
|
|
::v-deep(.customized-timeline) {
|
|
|
|
.p-timeline-event:nth-child(even) {
|
|
|
|
flex-direction: row !important;
|
|
|
|
|
|
|
|
.p-timeline-event-content {
|
|
|
|
text-align: left !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-timeline-event-opposite {
|
|
|
|
flex: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|