Alert

用于重要信息的提示框,包含标题、描述、操作和五种色调。

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

用法

Heads up

Summaries are generated on this device by default.

Export complete

Weekly sync.md was saved to your notes folder.

3 items are in a locked folder

Unlock the folder to restore or delete them.

Ivy noticed a follow-up

“Send the budget draft by Friday” was added to Tasks.

导入

ts
import {
  SoneAlertActionDirective,
  SoneAlertDescriptionDirective,
  SoneAlertDirective,
  SoneAlertTitleDirective,
} from "@surface-one/angular/alert";

API 参考

SoneAlertActionDirective指令

选择器
[soneAlertAction]

SoneAlertDescriptionDirective指令

选择器
[soneAlertDescription]

SoneAlertDirective组件

An attribute COMPONENT (still `[soneAlert]`, still `SoneAlertDirective`): the close button of a `dismissible` alert has to be rendered on the server too, which a directive cannot do. The children are projected unchanged.

选择器
[soneAlert]
输入
名称类型 默认值
variantAlertVariant"default"
dismissible

Adds a close button at the end; the owner removes the alert on `(dismissed)`.

booleanfalse
closeLabel

The close button's accessible name.

—$localize`Dismiss`
actionsAlign

Where `[soneAlertAction]` sits against a title + description: `start` (top), `center` or `end` (bottom). `null` keeps the default (top with a title, centred on a one-line alert).

AlertActionsAlign | nullnull
输出
名称类型
dismissed

The close button was pressed.

void

SoneAlertTitleDirective指令

选择器
[soneAlertTitle]