Skip to content

Alert 警告提示

用于页面内展示重要状态或提示信息。

js
import { Alert } from '@kupola/components/alert'

const alert = Alert({
  title: '注意',
  description: '该操作会影响当前配置。',
  type: 'warning',
  closable: true,
})

document.body.appendChild(alert.element)

常用选项

选项说明
title标题
description描述
typenormal / success / warning / danger / info
closable是否可关闭
onClose关闭回调

方法

  • dismiss()
  • destroy()