Skip to content
On this page

Alert 警告提示

常用的警告提示。

基础用法

使用 type 来定义提示的样式。

展开代码
vue
<script setup lang="ts">
import { Alert } from 'wviewui'
</script>

<template>
  <Alert>默认警告</Alert>
  <Alert type="success">成功警告</Alert>
  <Alert type="warning">严重警告</Alert>
  <Alert type="info">通知警告</Alert>
  <Alert type="danger">危险警告</Alert>
</template>

<style scoped></style>

调整尺寸

使用 size 属性配置尺寸,可使用 largesmallmini 三种值

展开代码
vue
<script setup lang="ts">
import { Alert } from 'wviewui'
</script>

<template>
  <Alert>默认警告</Alert>
  <Alert type="success" size="mini">成功警告</Alert>
  <Alert type="warning" size="small">严重警告</Alert>
  <Alert type="info">通知警告</Alert>
  <Alert type="danger" size="large">危险警告</Alert>
</template>

<style scoped></style>

Attributes

参数说明类型可选值默认值
type类型stringsuccess / info / warning / danger
size尺寸stringlarge / small / mini

Released under the MIT License.