流程图大屏实现方案
实现流程图+大屏效果,可考虑采用 svg(可缩放矢量图形)的解决方案,通过动态调整线条走向和动画效果,呈现出符合视觉要求的效果。
<template> <svg width="600" height="400" viewBox="0 0 600 400"> <path class="path" :d="`M50,150 C150,100 350,500 1550,200`" /> </svg> </template> <script> import { ref, onMounted } from 'vue'; export default { setup() { const path = ref(); onMounted(() => { const pathElement = path.value; const animation = (delay = 1000, time = 10) => setTimeout(() => { pathElement.style.animationPlayState = 'running'; setTimeout(() => { pathElement.style.animationPlayState = 'paused'; animation(delay, time); }, time * 1000); }, delay); animation(); }); return { path }; }, }; </script>