跳到主要内容

eo-resizable-box

<eo-resizable-box>

可以左右或上下调整尺寸的容器。

注意与 v2 构件 basic-bricks.resizable-box 的差别:

  • 移除属性 resizable,改为使用 disabled 控制是否可调整尺寸;
  • 放在 containers-NB 包,而不是 basic-bricks-NB。

Examples​

Basic​

Playground

Direction​

Playground

Sizing​

Playground

Dashboard​

Playground

Properties​

NameDescriptionTypeDefaultRequired
resizeDirection

调整方向

ResizeDirection "right"
storageKey

用于存放当前尺寸的 (local) storage key

string
defaultSize

默认尺寸(px)

number 200
minSize

最小尺寸(px)

number defaultSize
minSpace

留给其他部分的最小空间。

即:控制尺寸不超过 documentElement.clientWidth - minSpace(水平方向时)。

number 300
disabled

禁用 resize

boolean
variant"dashboard" | "default" "default"
boxStyleReact.CSSProperties
boxStyleWhenNotResizingReact.CSSProperties
syncSizeWithHostboolean

Type references​

ResizeDirection​

"left" | "right" | "top" | "bottom"