mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
57 lines
1.2 KiB
Vue
57 lines
1.2 KiB
Vue
|
<template>
|
||
|
<div class="block">
|
||
|
<el-timeline>
|
||
|
<el-timeline-item
|
||
|
v-for="(activity, index) in activities"
|
||
|
:key="index"
|
||
|
:icon="activity.icon"
|
||
|
:type="activity.type"
|
||
|
:color="activity.color"
|
||
|
:size="activity.size"
|
||
|
:hollow="activity.hollow"
|
||
|
:timestamp="activity.timestamp"
|
||
|
>
|
||
|
{{ activity.content }}
|
||
|
</el-timeline-item>
|
||
|
</el-timeline>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
activities: [
|
||
|
{
|
||
|
content: 'Custom icon',
|
||
|
timestamp: '2018-04-12 20:46',
|
||
|
size: 'large',
|
||
|
type: 'primary',
|
||
|
icon: 'el-icon-more',
|
||
|
},
|
||
|
{
|
||
|
content: 'Custom color',
|
||
|
timestamp: '2018-04-03 20:46',
|
||
|
color: '#0bbd87',
|
||
|
},
|
||
|
{
|
||
|
content: 'Custom size',
|
||
|
timestamp: '2018-04-03 20:46',
|
||
|
size: 'large',
|
||
|
},
|
||
|
{
|
||
|
content: 'Custom hollow',
|
||
|
timestamp: '2018-04-03 20:46',
|
||
|
type: 'primary',
|
||
|
hollow: true,
|
||
|
},
|
||
|
{
|
||
|
content: 'Default node',
|
||
|
timestamp: '2018-04-03 20:46',
|
||
|
},
|
||
|
],
|
||
|
}
|
||
|
},
|
||
|
}
|
||
|
</script>
|