跳到正文

Separator

具备语义的水平或垂直分隔线,不附带视觉样式。

正在加载交互演示…

#导入

从 quickgui 导入 separator。

use quickgui::*;

#用法

separator(SeparatorOrientation::Horizontal).w(240.0)

#结构

  • separator::root

#API 参考

展开条目查看说明和完整签名。短横线表示声明中未记录默认值。

separator

查看源码
pub fn separator(orientation: SeparatorOrientation) -> Element

Create an unstyled semantic separator root. This shorthand is equivalent to `Separator::new(orientation).root_with(div())`. The caller still declares the rule's extent, because a zero-sized divider is a layout decision rather than a framework default.

Separator

查看源码
pub const fn new(orientation: SeparatorOrientation) -> Self

Declare a separator along `orientation`. Horizontal is the default, matching Base UI.

horizontalpub const fn horizontal() -> Self—

Declare a horizontal rule between vertically stacked content.

pub const fn horizontal() -> Self
查看源码
verticalpub const fn vertical() -> Self—

Declare a vertical rule between horizontally arranged content.

pub const fn vertical() -> Self
查看源码
axispub const fn axis(self) -> SeparatorOrientation—

Configures axis for this part.

pub const fn axis(self) -> SeparatorOrientation
查看源码

Separator::root_with

查看源码
pub fn root_with(self, root: Element) -> Element

Decorate an application-owned root without adding layout or appearance.

Separator::root

查看源码
pub fn root(self) -> Element

Create the unstyled root part. Use [`Self::root_with`] to supply an existing element.