mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
Merge branch 'rewhtie-master'
This commit is contained in:
commit
4b6d309897
@ -107,6 +107,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
|
|
||||||
|
<template v-if="animationSequence.length >= 2">
|
||||||
|
<Divider />
|
||||||
|
<Button @click="runAllAnimation()">
|
||||||
|
{{ animateIn ? '停止预览' : '预览全部'}}
|
||||||
|
</Button>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -171,7 +178,7 @@ const tabs: TabItem[] = [
|
|||||||
{ key: 'attention', label: '强调', color: '#e8b76a' },
|
{ key: 'attention', label: '强调', color: '#e8b76a' },
|
||||||
]
|
]
|
||||||
const activeTab = ref('in')
|
const activeTab = ref('in')
|
||||||
|
const animateIn = ref(false)
|
||||||
watch(() => handleElementId.value, () => {
|
watch(() => handleElementId.value, () => {
|
||||||
animationPoolVisible.value = false
|
animationPoolVisible.value = false
|
||||||
})
|
})
|
||||||
@ -248,6 +255,18 @@ const runAnimation = (elId: string, effect: string, duration: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 执行所有动画预览
|
||||||
|
const runAllAnimation = async () => {
|
||||||
|
animateIn.value = !animateIn.value
|
||||||
|
for (let i = 0; i < animationSequence.value.length; i++) {
|
||||||
|
if (!animateIn.value) break
|
||||||
|
const item = animationSequence.value[i]
|
||||||
|
if (item.index !== 1 && item.trigger !== 'meantime') await new Promise(resolve => setTimeout(resolve, item.duration + 100))
|
||||||
|
runAnimation(item.elId, item.effect, item.duration)
|
||||||
|
if (i >= animationSequence.value.length - 1) animateIn.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 修改元素动画持续时间
|
// 修改元素动画持续时间
|
||||||
const updateElementAnimationDuration = (id: string, duration: number) => {
|
const updateElementAnimationDuration = (id: string, duration: number) => {
|
||||||
if (duration < 100 || duration > 5000) return
|
if (duration < 100 || duration > 5000) return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user