2023-02-28 08:29:30 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>TimeLine orientation is controlled with the <i>layout</i> property, default is <i>vertical</i> having <i>horizontal</i> as the alternative.</p>
|
|
|
|
</DocSectionText>
|
|
|
|
<div class="card flex flex-column gap-3">
|
|
|
|
<Timeline :value="events" layout="horizontal" align="top">
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
<Timeline :value="events" layout="horizontal" align="bottom">
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
<Timeline :value="events" layout="horizontal" align="alternate">
|
|
|
|
<template #opposite> </template>
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
events: ['2020', '2021', '2022', '2023'],
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
<Timeline :value="events" layout="horizontal" align="top">
|
2023-02-28 08:29:30 +00:00
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
<Timeline :value="events" layout="horizontal" align="bottom">
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
<Timeline :value="events" layout="horizontal" align="alternate">
|
|
|
|
<template #opposite> </template>
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</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 flex flex-column gap-3">
|
|
|
|
<Timeline :value="events" layout="horizontal" align="top">
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
<Timeline :value="events" layout="horizontal" align="bottom">
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
<Timeline :value="events" layout="horizontal" align="alternate">
|
|
|
|
<template #opposite> </template>
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
events: ['2020', '2021', '2022', '2023']
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2023-02-28 08:29:30 +00:00
|
|
|
<div class="card flex flex-column gap-3">
|
|
|
|
<Timeline :value="events" layout="horizontal" align="top">
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
<Timeline :value="events" layout="horizontal" align="bottom">
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
|
|
|
|
<Timeline :value="events" layout="horizontal" align="alternate">
|
|
|
|
<template #opposite> </template>
|
|
|
|
<template #content="slotProps">
|
|
|
|
{{ slotProps.item }}
|
|
|
|
</template>
|
|
|
|
</Timeline>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
const events = ref(['2020', '2021', '2022', '2023']);
|
2023-10-15 09:38:39 +00:00
|
|
|
<\/script>
|
|
|
|
`
|
2023-02-28 08:29:30 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|