Alerts

介绍

abp-alert 是创建alert的主要元素.

基本用法:

  1. <abp-alert alert-type="Primary">
  2. A simple primary alert—check it out!
  3. </abp-alert>

Demo

参阅alerts demo页面查看示例.

Attributes

alert-type

值做为alert的Type,应为以下值之一:

  • Default (默认值)
  • Primary
  • Secondary
  • Success
  • Danger
  • Warning
  • Info
  • Light
  • Dark

示例:

  1. <abp-alert alert-type="Warning">
  2. A simple warning alert—check it out!
  3. </abp-alert>

alert-link

alert的链接.

示例:

  1. <abp-alert alert-type="Danger">
  2. A simple danger alert with [an example link](/zh-Hans/abp/latest/UI/AspNetCore/Tag-Helpers/#). Give it a click if you like.
  3. </abp-alert>

dismissible

使alert可被忽略:

示例:

  1. <abp-alert alert-type="Warning" dismissible="true">
  2. Holy guacamole! You should check in on some of those fields below.
  3. </abp-alert>

Additional content

abp-alert还可以包含其他HTML元素,例如标题,段落和分隔符.

示例:

  1. <abp-alert alert-type="Success">
  2. <h4>Well done!</h4>
  3. <p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.</p>
  4. <hr>
  5. <p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
  6. </abp-alert>