# Prompt 提示框

常用的提示框

# Alert

不会自动消失的非浮层元素,用于页面中展示重要的提示信息。

# 基础用法

基础用法。

这是一条提示信息
这是一条提示信息
这是一条提示信息
这是一条提示信息

使用titletypeicon属性来定义内容。

<j-alert title="这是一条提示信息" icon="icon-prompt-fill" type="success" />
<j-alert title="这是一条提示信息" icon="icon-prompt-fill" type="info" />
<j-alert title="这是一条提示信息" icon="icon-prompt-fill" type="warn" />
<j-alert title="这是一条提示信息" icon="icon-prompt-fill" type="error" />
<style>
  .j-alert {
    margin-bottom: 10px;
  }
</style>
显示代码 复制代码

# 是否重新打开

是否重新打开。

asdasda

使用openkey属性来定义。

<j-alert title="asdasda" icon="icon-prompt-fill" openkey="key" />
显示代码 复制代码

# Attributes

参数 说明 类型 可选值 默认值
title 内容 string -
type 类型 string success/warn/info/error warn
icon 图标类名 string
closable 是否可关闭 boolean true
center 是否居中 boolean false
openkey 为是否重新打开,提供key值缓存name string -

# Events

事件名称 说明 回调参数
close 关闭alert时触发的事件 -