Empty

说明空视图的原因,并提供下一步操作。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 可用

用法

No meetings yet

Record a meeting and it is transcribed right here, on this device.

This folder is locked

Its notes and transcripts stay encrypted until you unlock it.

Touch ID unlocks it for this session.

导入

ts
import {
  SoneEmptyContentDirective,
  SoneEmptyDescriptionDirective,
  SoneEmptyDirective,
  SoneEmptyHeaderDirective,
  SoneEmptyMediaDirective,
  SoneEmptyStateComponent,
  SoneEmptyTitleDirective,
} from "@surface-one/angular/empty-state";

API 参考

SoneEmptyContentDirective指令

选择器
[soneEmptyContent]

SoneEmptyDescriptionDirective指令

选择器
[soneEmptyDescription]

SoneEmptyDirective指令

选择器
[soneEmpty]

SoneEmptyHeaderDirective指令

选择器
[soneEmptyHeader]

SoneEmptyMediaDirective指令

选择器
[soneEmptyMedia]
输入
名称类型 默认值
variantEmptyMediaVariant"default"

SoneEmptyStateComponent组件

`<sone-empty-state>` — spartan/ui Empty. Two ways to fill it, which combine: - **Slots** — project the parts (`[soneEmptyHeader]` › `[soneEmptyMedia]`, `[soneEmptyTitle]`, `[soneEmptyDescription]`, then `[soneEmptyContent]`). - **Composed** — set `icon`, `title`, `description` and `tone`, and the header is drawn for you; anything projected (actions in `[soneEmptyContent]`, a hint line) follows it. `tone`: `locked` defaults the icon to `lock`; `error` to `alert-circle` and announces with `role="alert"`; `loading` (or `busy`) swaps the media for a spinner and announces with `role="status"`. The effective tone is on the host as `data-tone`.

选择器
sone-empty-state
输入
名称类型 默认值
icon

The media glyph. Defaults to `lock` for `tone="locked"`, `alert-circle` for `"error"`.

ShellIcon | nullnull
titlestring | nullnull
descriptionstring | nullnull
toneEmptyStateTone"default"
busy

Shows the loading state (spinner, `role="status"`) whatever the `tone`.

booleanfalse

SoneEmptyTitleDirective指令

选择器
[soneEmptyTitle]