From 59fcac86c4fd53a5b293fab4e9f527064b49d872 Mon Sep 17 00:00:00 2001 From: xiaoming <1923740402@qq.com> Date: Sat, 21 Oct 2023 15:00:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0`AnimateCss`=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=E7=BB=84=E4=BB=B6`ReAnimateSelector`=20(#764?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 添加`AnimateCss`选择器组件`ReAnimateSelector` * chore: update --- locales/en.yaml | 1 + locales/zh-CN.yaml | 1 + src/components/ReAnimateSelector/index.ts | 7 + .../ReAnimateSelector/src/animate.ts | 114 ++++++++++++++++ .../ReAnimateSelector/src/index.vue | 127 ++++++++++++++++++ src/router/modules/components.ts | 9 ++ src/views/components/animatecss/index.vue | 32 +++++ 7 files changed, 291 insertions(+) create mode 100644 src/components/ReAnimateSelector/index.ts create mode 100644 src/components/ReAnimateSelector/src/animate.ts create mode 100644 src/components/ReAnimateSelector/src/index.vue create mode 100644 src/views/components/animatecss/index.vue diff --git a/locales/en.yaml b/locales/en.yaml index cf9858c04..f4c8abcd1 100644 --- a/locales/en.yaml +++ b/locales/en.yaml @@ -46,6 +46,7 @@ menus: hssplitPane: Split Pane hsbutton: Button Components hscropping: Picture Cropping + hsanimatecss: AnimateCss Selector hscountTo: Digital Animation hsselector: Selector Components hsflowChart: Flow Chart diff --git a/locales/zh-CN.yaml b/locales/zh-CN.yaml index a04e3539e..27f836063 100644 --- a/locales/zh-CN.yaml +++ b/locales/zh-CN.yaml @@ -46,6 +46,7 @@ menus: hssplitPane: 切割面板 hsbutton: 按钮组件 hscropping: 图片裁剪 + hsanimatecss: AnimateCss选择器组件 hscountTo: 数字动画 hsselector: 选择器组件 hsflowChart: 流程图 diff --git a/src/components/ReAnimateSelector/index.ts b/src/components/ReAnimateSelector/index.ts new file mode 100644 index 000000000..8b0293cd6 --- /dev/null +++ b/src/components/ReAnimateSelector/index.ts @@ -0,0 +1,7 @@ +import reAnimateSelector from "./src/index.vue"; +import { withInstall } from "@pureadmin/utils"; + +/** [animate.css](https://animate.style/) 选择器组件 */ +export const ReAnimateSelector = withInstall(reAnimateSelector); + +export default ReAnimateSelector; diff --git a/src/components/ReAnimateSelector/src/animate.ts b/src/components/ReAnimateSelector/src/animate.ts new file mode 100644 index 000000000..2b0593c7f --- /dev/null +++ b/src/components/ReAnimateSelector/src/animate.ts @@ -0,0 +1,114 @@ +export const animates = [ + /* Attention seekers */ + "bounce", + "flash", + "pulse", + "rubberBand", + "shakeX", + "headShake", + "swing", + "tada", + "wobble", + "jello", + "heartBeat", + /* Back entrances */ + "backInDown", + "backInLeft", + "backInRight", + "backInUp", + /* Back exits */ + "backOutDown", + "backOutLeft", + "backOutRight", + "backOutUp", + /* Bouncing entrances */ + "bounceIn", + "bounceInDown", + "bounceInLeft", + "bounceInRight", + "bounceInUp", + /* Bouncing exits */ + "bounceOut", + "bounceOutDown", + "bounceOutLeft", + "bounceOutRight", + "bounceOutUp", + /* Fading entrances */ + "fadeIn", + "fadeInDown", + "fadeInDownBig", + "fadeInLeft", + "fadeInLeftBig", + "fadeInRight", + "fadeInRightBig", + "fadeInUp", + "fadeInUpBig", + "fadeInTopLeft", + "fadeInTopRight", + "fadeInBottomLeft", + "fadeInBottomRight", + /* Fading exits */ + "fadeOut", + "fadeOutDown", + "fadeOutDownBig", + "fadeOutLeft", + "fadeOutLeftBig", + "fadeOutRight", + "fadeOutRightBig", + "fadeOutUp", + "fadeOutUpBig", + "fadeOutTopLeft", + "fadeOutTopRight", + "fadeOutBottomRight", + "fadeOutBottomLeft", + /* Flippers */ + "flip", + "flipInX", + "flipInY", + "flipOutX", + "flipOutY", + /* Lightspeed */ + "lightSpeedInRight", + "lightSpeedInLeft", + "lightSpeedOutRight", + "lightSpeedOutLeft", + /* Rotating entrances */ + "rotateIn", + "rotateInDownLeft", + "rotateInDownRight", + "rotateInUpLeft", + "rotateInUpRight", + /* Rotating exits */ + "rotateOut", + "rotateOutDownLeft", + "rotateOutDownRight", + "rotateOutUpLeft", + "rotateOutUpRight", + /* Specials */ + "hinge", + "jackInTheBox", + "rollIn", + "rollOut", + /* Zooming entrances */ + "zoomIn", + "zoomInDown", + "zoomInLeft", + "zoomInRight", + "zoomInUp", + /* Zooming exits */ + "zoomOut", + "zoomOutDown", + "zoomOutLeft", + "zoomOutRight", + "zoomOutUp", + /* Sliding entrances */ + "slideInDown", + "slideInLeft", + "slideInRight", + "slideInUp", + /* Sliding exits */ + "slideOutDown", + "slideOutLeft", + "slideOutRight", + "slideOutUp" +]; diff --git a/src/components/ReAnimateSelector/src/index.vue b/src/components/ReAnimateSelector/src/index.vue new file mode 100644 index 000000000..e2f44053b --- /dev/null +++ b/src/components/ReAnimateSelector/src/index.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/router/modules/components.ts b/src/router/modules/components.ts index 8958d3c92..06f73bdeb 100644 --- a/src/router/modules/components.ts +++ b/src/router/modules/components.ts @@ -105,6 +105,15 @@ export default { title: $t("menus.hscropping") } }, + { + path: "/components/animatecss", + name: "AnimateCss", + component: () => import("@/views/components/animatecss/index.vue"), + meta: { + title: $t("menus.hsanimatecss"), + extraIcon: "IF-pure-iconfont-new svg" + } + }, { path: "/components/countTo", name: "CountTo", diff --git a/src/views/components/animatecss/index.vue b/src/views/components/animatecss/index.vue new file mode 100644 index 000000000..63a43919c --- /dev/null +++ b/src/views/components/animatecss/index.vue @@ -0,0 +1,32 @@ + + +