UNPKG

mldong-flow-designer-plus

Version:

本项目包含了作者为B站课堂视频[《工作流设计器开发最佳实践》](https://www.bilibili.com/cheese/play/ss24484)的过程源码。教程中开发的组件也可用于实际生产环境中。以下是和使用文档和课程章节说明。 ## 实战项目 [演示地址](https://flow-pro.mldong.com/)

190 lines (189 loc) 3.87 kB
import { K as Keyframe } from "./motionUtil-C3pKw7LX.js"; import { i as initMotion } from "./motion-CKgd-zx5.js"; const zoomIn = new Keyframe("antZoomIn", { "0%": { transform: "scale(0.2)", opacity: 0 }, "100%": { transform: "scale(1)", opacity: 1 } }); const zoomOut = new Keyframe("antZoomOut", { "0%": { transform: "scale(1)" }, "100%": { transform: "scale(0.2)", opacity: 0 } }); const zoomBigIn = new Keyframe("antZoomBigIn", { "0%": { transform: "scale(0.8)", opacity: 0 }, "100%": { transform: "scale(1)", opacity: 1 } }); const zoomBigOut = new Keyframe("antZoomBigOut", { "0%": { transform: "scale(1)" }, "100%": { transform: "scale(0.8)", opacity: 0 } }); const zoomUpIn = new Keyframe("antZoomUpIn", { "0%": { transform: "scale(0.8)", transformOrigin: "50% 0%", opacity: 0 }, "100%": { transform: "scale(1)", transformOrigin: "50% 0%" } }); const zoomUpOut = new Keyframe("antZoomUpOut", { "0%": { transform: "scale(1)", transformOrigin: "50% 0%" }, "100%": { transform: "scale(0.8)", transformOrigin: "50% 0%", opacity: 0 } }); const zoomLeftIn = new Keyframe("antZoomLeftIn", { "0%": { transform: "scale(0.8)", transformOrigin: "0% 50%", opacity: 0 }, "100%": { transform: "scale(1)", transformOrigin: "0% 50%" } }); const zoomLeftOut = new Keyframe("antZoomLeftOut", { "0%": { transform: "scale(1)", transformOrigin: "0% 50%" }, "100%": { transform: "scale(0.8)", transformOrigin: "0% 50%", opacity: 0 } }); const zoomRightIn = new Keyframe("antZoomRightIn", { "0%": { transform: "scale(0.8)", transformOrigin: "100% 50%", opacity: 0 }, "100%": { transform: "scale(1)", transformOrigin: "100% 50%" } }); const zoomRightOut = new Keyframe("antZoomRightOut", { "0%": { transform: "scale(1)", transformOrigin: "100% 50%" }, "100%": { transform: "scale(0.8)", transformOrigin: "100% 50%", opacity: 0 } }); const zoomDownIn = new Keyframe("antZoomDownIn", { "0%": { transform: "scale(0.8)", transformOrigin: "50% 100%", opacity: 0 }, "100%": { transform: "scale(1)", transformOrigin: "50% 100%" } }); const zoomDownOut = new Keyframe("antZoomDownOut", { "0%": { transform: "scale(1)", transformOrigin: "50% 100%" }, "100%": { transform: "scale(0.8)", transformOrigin: "50% 100%", opacity: 0 } }); const zoomMotion = { zoom: { inKeyframes: zoomIn, outKeyframes: zoomOut }, "zoom-big": { inKeyframes: zoomBigIn, outKeyframes: zoomBigOut }, "zoom-big-fast": { inKeyframes: zoomBigIn, outKeyframes: zoomBigOut }, "zoom-left": { inKeyframes: zoomLeftIn, outKeyframes: zoomLeftOut }, "zoom-right": { inKeyframes: zoomRightIn, outKeyframes: zoomRightOut }, "zoom-up": { inKeyframes: zoomUpIn, outKeyframes: zoomUpOut }, "zoom-down": { inKeyframes: zoomDownIn, outKeyframes: zoomDownOut } }; const initZoomMotion = (token, motionName) => { const { antCls } = token; const motionCls = `${antCls}-${motionName}`; const { inKeyframes, outKeyframes } = zoomMotion[motionName]; return [initMotion(motionCls, inKeyframes, outKeyframes, motionName === "zoom-big-fast" ? token.motionDurationFast : token.motionDurationMid), { [` ${motionCls}-enter, ${motionCls}-appear `]: { transform: "scale(0)", opacity: 0, animationTimingFunction: token.motionEaseOutCirc, "&-prepare": { transform: "none" } }, [`${motionCls}-leave`]: { animationTimingFunction: token.motionEaseInOutCirc } }]; }; export { initZoomMotion as i, zoomIn as z }; //# sourceMappingURL=zoom-D-B752tZ.js.map