2.2.1 • Published 5 years ago

rsuite-utils v2.2.1

Weekly downloads
845
License
MIT
Repository
github
Last release
5 years ago

rsuite-utils

Utilities for creating rsuite components

用于快速创建 RSUITE 组件,提供的常用工具

支持 react 0.14.9, >= 15.3.0, >= 16.0.0

Animation 动画

<Transition> 自定义过渡效果

import Transition from 'rsuite-utils/lib/Animation/Transition';
属性名称类型 (默认值)描述
inboolean进入
unmountOnExitboolean在退出时卸载组件
transitionAppearboolean初始显示的时候开启过渡效果
timeoutnumber (1000)动画过渡延迟时间
exitedClassNamestring退出动画过渡后 className
exitingClassNamestring退出动画过渡中 className
enteredClassNamestring进入动画过渡后 className
enteringClassNamestring进入动画过渡中 className
onEnter(node?: null, Element, Text) => void显示动画过渡的回调函数
onEntering(node?: null, Element, Text) => void显示中动画过渡的回调函数
onEntered(node?: null, Element, Text) => void显示后动画过渡的回调函数
onExit(node?: null, Element, Text) => void退出前动画过渡的回调函数
onExiting(node?: null, Element, Text) => void退出中动画过渡的回调函数
onExited(node?: null, Element, Text) => void退出后动画过渡的回调函数

<Collapse> 折叠效果

import Collapse from 'rsuite-utils/lib/Animation/Collapse';
属性名称类型 (默认值)描述
inboolean进入
unmountOnExitboolean在退出时卸载组件
transitionAppearboolean初始显示的时候开启过渡效果
timeoutnumber(300)动画过渡延迟时间
exitedClassNamestring ('collapse')退出动画过渡后 className
exitingClassNamestring ('collapsing')退出动画过渡中 className
enteredClassNamestring ('collapse in')进入动画过渡后 className
enteringClassNamestring ('collapsing')进入动画过渡中 className
onEnter(node?: null, Element, Text) => void显示前动画过渡的回调函数
onEntering(node?: null, Element, Text) => void显示中动画过渡的回调函数
onEntered(node?: null, Element, Text) => void显示后动画过渡的回调函数
onExit(node?: null, Element, Text) => void退出前动画过渡的回调函数
onExiting(node?: null, Element, Text) => void退出中动画过渡的回调函数
onExited(node?: null, Element, Text) => void退出后动画过渡的回调函数
rolestringHTML role
dimensionunion: 'height', 'width' ()=>('height', 'width')设置折叠尺寸类型
getDimensionValue()=>number自定义尺寸值

<Fade> 淡进淡出

import Fade from 'rsuite-utils/lib/Animation/Fade';
属性名称类型 (默认值)描述
inboolean进入
unmountOnExitboolean在退出时卸载组件
transitionAppearboolean初始显示的时候开启过渡效果
timeoutnumber (300)动画过渡延迟时间
exitedClassNamestring退出动画过渡后 className
exitingClassNamestring退出动画过渡中 className
enteredClassNamestring进入动画过渡后 className
enteringClassNamestring进入动画过渡中 className
onEnter(node?: null, Element, Text) => void显示动画过渡的回调函数
onEntering(node?: null, Element, Text) => void显示中动画过渡的回调函数
onEntered(node?: null, Element, Text) => void显示后动画过渡的回调函数
onExit(node?: null, Element, Text) => void退出前动画过渡的回调函数
onExiting(node?: null, Element, Text) => void退出中动画过渡的回调函数
onExited(node?: null, Element, Text) => void退出后动画过渡的回调函数

Overlay 浮层

<Overlay> 覆盖层

import Overlay from 'rsuite-utils/lib/Overlay/Overlay';
属性名称类型 (默认值)描述
showboolean显示
rootCloseboolean (true)启用 RootCloseWrapper 代理
animationunion: boolean, React.ElementType (Fade)动画
onEnter(node?: null, Element, Text) => void显示前动画过渡的回调函数
onEntering(node?: null, Element, Text) => void显示中动画过渡的回调函数
onEntered(node?: null, Element, Text) => void显示后动画过渡的回调函数
onExit(node?: null, Element, Text) => void退出前动画过渡的回调函数
onExiting(node?: null, Element, Text) => void退出中动画过渡的回调函数
onExited(node?: null, Element, Text) => void退出后动画过渡的回调函数

<OverlayTrigger> 覆盖层触发器

import OverlayTrigger from 'rsuite-utils/lib/Overlay/OverlayTrigger';
type PlacementAround = 'top' | 'right' | 'bottom' | 'left';
type PlacementEighPoints =
  | 'bottomStart'
  | 'bottomEnd'
  | 'topStart'
  | 'topEnd'
  | 'leftStart'
  | 'leftEnd'
  | 'rightStart'
  | 'rightEnd';
type Placement = PlacementAround | PlacementEighPoints;
属性名称类型 (默认值)描述
placementenum: Placement显示位置
triggerunion: 'click', 'hover', 'focus' (['hover','focus'])触发事件,可以通过数组配置多事件
delaynumber延迟时间
delayShownumber展示的延迟时间
delayHidenumber隐藏的延迟时间
speakerReact.Element展示的元素
onEnter(node?: null, Element, Text) => void显示前动画过渡的回调函数
onEntering(node?: null, Element, Text) => void显示中动画过渡的回调函数
onEntered(node?: null, Element, Text) => void显示后动画过渡的回调函数
onExit(node?: null, Element, Text) => void退出前动画过渡的回调函数
onExiting(node?: null, Element, Text) => void退出中动画过渡的回调函数
onExited(node?: null, Element, Text) => void退出后动画过渡的回调函数
defaultOpenboolean默认打开
openboolean打开(受控)

<RootCloseWrapper> 代理外部关闭事件

import RootCloseWrapper from 'rsuite-utils/lib/Overlay/RootCloseWrapper';
属性名称类型 (默认值)描述
onRootClose()=>void触发关闭的回调函数
2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.6.2

5 years ago

1.6.1

5 years ago

2.0.0-alpha.3

5 years ago

2.0.0-alpha.2

5 years ago

2.0.0-alpha.1

5 years ago

2.0.0-alpha.0

5 years ago

1.6.0

5 years ago

1.6.0-beta.1

5 years ago

1.6.0-beta

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.7

6 years ago

1.2.6

6 years ago

1.2.5

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-next.9

6 years ago

1.0.0-next.8

6 years ago

1.0.0-next.7

6 years ago

1.0.0-next.6

6 years ago

1.0.0-next.5

6 years ago

1.0.0-next.4

6 years ago

1.0.0-next.3

6 years ago

1.0.0-next.2

6 years ago

1.0.0-next.1

6 years ago

1.0.0-next

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.0

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.1

7 years ago