SusTimeline

Вертикальный event log — dots / lines / titles из Items.
Пакет
SusKit · Молекулы (коммерческий)
Свойства
| Имя | Тип | По умолчанию | |
|---|---|---|---|
Density | Prop<string> | "default" | v-model |
Side | Prop<string> | "start" | v-model |
Слоты
Слотов нет.
События
Публичных событий нет.
Хуки стиля
Контракт USS-классов — внешний вид переопределяется без правки C#. Состояния переключаются этими классами:
sus-timelinesus-timeline__bodysus-timeline__dividersus-timeline__dotsus-timeline__dot--dangersus-timeline__dot--infosus-timeline__dot--primarysus-timeline__dot--secondarysus-timeline__dot--successsus-timeline__dot--warningsus-timeline__iconsus-timeline__itemsus-timeline__item--endsus-timeline__linesus-timeline__listsus-timeline__oppositesus-timeline__subtitlesus-timeline__titlesus-timeline--density-comfortablesus-timeline--density-compactsus-timeline--side-alternatesus-timeline--side-end
Использование
Items задаются в коде (List<TimelineItem>).
csharp
var timeline = new SusTimeline();
timeline.Items.Value = new List<SusTimeline.TimelineItem>
{
new() { Title = "Match start", Subtitle = "00:00", Color = "primary", Icon = "play" },
new() { Title = "Objective taken", Subtitle = "02:14", Color = "info" },
new() { Title = "Boss down", Subtitle = "08:40", Color = "success", Icon = "check" },
};
timeline.Density.Value = "default";
timeline.Side.Value = "start";xml
<template>
<sus:SusTimeline :Density="Density.Value"
:Side="Side.Value" />
</template>
<script>
public Prop<string> Density = new("default");
public Prop<string> Side = new("start");
// Populate Items in code.
</script>| Prop | Role |
|---|---|
Items | List<TimelineItem> — строки |
Density | default · compact · comfortable |
Side | start · end · alternate |
Заметки
- Поля элемента:
Title,Subtitle,Icon,Color, опциональноSideна элемент (start/end). - Цвета точки:
primary·secondary·success·danger·warning·info. Side="alternate"чередует body слева/справа по индексу;Sideэлемента переопределяет.