Appearance
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
属性配置尺寸,可使用 large
、 small
和 mini
三种值
展开代码
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 | 类型 | string | success / info / warning / danger | — |
size | 尺寸 | string | large / small / mini | — |