New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@doraemon-ui/miniprogram.animation-group

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@doraemon-ui/miniprogram.animation-group

miniprogram animation-group component for doraemon-ui

latest
npmnpm
Version
0.0.1-alpha.1
Version published
Maintainers
2
Created
Source

AnimationGroup 动画组

将自定义的组件包裹在 animation-group 组件内,可以实现过渡/动画效果,预设 9 种过渡效果 fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, slideInUp, slideInDown, slideInLeft, slideInRight, zoom, punch 可选用。

在进入/离开的过渡中,会有 6 个 class 切换:

  • -enter: 进入过渡的开始状态,在过渡过程完成之后移除
  • -enter-active: 进入过渡的结束状态,在过渡过程完成之后移除
  • -enter-done: 进入过渡的完成状态
  • -exit: 离开过渡的开始状态,在过渡过程完成之后移除
  • -exit-active: 离开过渡的结束状态,在过渡过程完成之后移除
  • -exit-done: 离开过渡的完成状态

使用指南

在 page.json 中引入组件

json

示例代码

在开发者工具中预览效果

WXML

wxml

JAVASCRIPT

js

WXSS

wxss

API

AnimationGroup props

参数类型描述默认值
inboolean触发组件进入或离开过渡的状态false
classNamesany过渡的类名-
durationany过渡持续时间-
typestring过渡动效的类型transition
appearboolean首次挂载时是否触发进入过渡false
enterboolean是否启用进入过渡true
exitboolean是否启用离开过渡true
mountOnEnterboolean首次进入过渡时是否懒挂载组件true
unmountOnExitboolean离开过渡完成时是否卸载组件true
wrapClsstring自定义类名-
wrapStylestring,object自定义样式-
disableScrollboolean阻止移动触摸false
bind:clickfunction点击组件时触发的回调函数-
bind:enterfunction进入过渡的开始状态时触发的回调函数-
bind:enteringfunction进入过渡的结束状态时触发的回调函数-
bind:enteredfunction进入过渡的完成状态时触发的回调函数-
bind:exitfunction离开过渡的开始状态时触发的回调函数-
bind:exitingfunction离开过渡的结束状态时触发的回调函数-
bind:exitedfunction离开过渡的完成状态时触发的回调函数-
bind:changefunction监听状态变化的回调函数-

AnimationGroup slot

名称描述
-自定义内容

AnimationGroup externalClasses

名称描述
dora-class根节点样式类

Keywords

doraemon-ui

FAQs

Package last updated on 29 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts