From 821f1f8b47c5ffc8b88cd5358a6e5714038f0a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 13 Jul 2022 14:21:28 +0300 Subject: [PATCH] Refactor #2771 --- src/components/timeline/Timeline.d.ts | 11 ++++++++++- src/views/timeline/TimelineDoc.vue | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/timeline/Timeline.d.ts b/src/components/timeline/Timeline.d.ts index c5fe3acab..a984889e8 100644 --- a/src/components/timeline/Timeline.d.ts +++ b/src/components/timeline/Timeline.d.ts @@ -78,7 +78,16 @@ export interface TimelineSlots { /** * Custom connector template. */ - connector: () => VNode[]; + connector: (scope: { + /** + * Item data + */ + item: any; + /** + * Index of item + */ + index: number; + }) => VNode[]; } export declare type TimelineEmits = { diff --git a/src/views/timeline/TimelineDoc.vue b/src/views/timeline/TimelineDoc.vue index 08810b288..0f30ffd3b 100644 --- a/src/views/timeline/TimelineDoc.vue +++ b/src/views/timeline/TimelineDoc.vue @@ -201,7 +201,8 @@ export default { connector - - + item: Connector of the event
+ index: Index of the event