mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-29 02:33:24 +08:00
feat(workflow): 为流程预览添加淡入动画效果
使用 motion-v 库为 iframe 容器添加淡入动画,提升用户体验
This commit is contained in:
@@ -5,6 +5,8 @@ import { useAppConfig } from '@vben/hooks';
|
|||||||
import { stringify } from '@vben/request';
|
import { stringify } from '@vben/request';
|
||||||
import { useAccessStore } from '@vben/stores';
|
import { useAccessStore } from '@vben/stores';
|
||||||
|
|
||||||
|
import { motion } from 'motion-v';
|
||||||
|
|
||||||
import { useWarmflowIframe } from './hook';
|
import { useWarmflowIframe } from './hook';
|
||||||
|
|
||||||
defineOptions({ name: 'FlowPreview' });
|
defineOptions({ name: 'FlowPreview' });
|
||||||
@@ -38,9 +40,15 @@ const { iframeRef } = useWarmflowIframe();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<iframe
|
<motion.div
|
||||||
ref="iframeRef"
|
:initial="{ opacity: 0 }"
|
||||||
:src="url"
|
:animate="{ opacity: 1 }"
|
||||||
class="h-[600px] w-full rounded-[6px] border"
|
:transition="{ duration: 0.5 }"
|
||||||
></iframe>
|
>
|
||||||
|
<iframe
|
||||||
|
ref="iframeRef"
|
||||||
|
:src="url"
|
||||||
|
class="h-[600px] w-full rounded-[6px] border"
|
||||||
|
></iframe>
|
||||||
|
</motion.div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user