feat(chart): add presentation mode
Some checks failed
Package component / package (push) Failing after 50s

This commit is contained in:
李启源
2026-07-29 12:12:03 +08:00
parent 312e7fde52
commit f97ff24cdf
22 changed files with 478 additions and 26 deletions

View File

@@ -13,6 +13,7 @@ interface Props {
clipPathId: string
innerWidth: number
zoomable: boolean
interactive?: boolean
displayMode: WaveformDisplayMode
interactionMode?: WaveformInteractionMode
frameNumber?: string | number
@@ -38,6 +39,7 @@ interface Emits {
const props = withDefaults(defineProps<Props>(), {
interactionMode: 'zoom',
interactive: true,
cleanView: false,
zeroLine: () => ({ visible: false, color: '#98a2b3', width: 1, dash: '6 4' }),
})
@@ -116,9 +118,11 @@ const resolvedFrameStyle = computed(() => {
v-if="!track.isEmpty && track.hasVisibleSeries && displayMode === 'independent'"
class="waveform-track__overlay waveform-track__overlay--independent waveform-chart__overlay waveform-chart__overlay--independent"
:class="{
'is-zoomable': zoomable && interactionMode === 'zoom',
'is-annotating': interactionMode === 'annotation',
'is-zoomable': interactive && zoomable && interactionMode === 'zoom',
'is-annotating': interactive && interactionMode === 'annotation',
'is-presentation': !interactive,
}"
:data-interactive="interactive"
:data-independent-overlay-index="track.index"
:width="track.width ?? innerWidth"
:height="track.height"