ant-design-vue/components/alert/demo/custom-icon.vue

78 lines
1.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<docs>
---
order: 7
title:
zh-CN: 自定义图标
en-US: Custom Icon
---
## zh-CN
可以自定义关闭自定义的文字会替换原先的关闭 `Icon`
## en-US
Custom Icon make information more clear and more friendly.
</docs>
<template>
<a-alert message="showIcon = false" type="success">
<template #icon><smile-outlined /></template>
</a-alert>
<a-alert message="Success Tips" type="success" show-icon>
<template #icon><smile-outlined /></template>
</a-alert>
<a-alert message="Informational Notes" type="info" show-icon>
<template #icon><smile-outlined /></template>
</a-alert>
<a-alert message="Warning" type="warning" show-icon>
<template #icon><smile-outlined /></template>
</a-alert>
<a-alert message="Error" type="error" show-icon>
<template #icon><smile-outlined /></template>
</a-alert>
<a-alert
message="Success Tips"
description="Detailed description and advices about successful copywriting."
type="success"
show-icon
>
<template #icon><smile-outlined /></template>
</a-alert>
<a-alert
message="Informational Notes"
description="Additional description and informations about copywriting."
type="info"
show-icon
>
<template #icon><smile-outlined /></template>
</a-alert>
<a-alert
message="Warning"
description="This is a warning notice about copywriting."
type="warning"
show-icon
>
<template #icon><smile-outlined /></template>
</a-alert>
<a-alert
message="Error"
description="This is an error message about copywriting."
type="error"
show-icon
>
<template #icon><smile-outlined /></template>
</a-alert>
</template>
<script lang="ts">
import { SmileOutlined } from '@ant-design/icons-vue';
import { defineComponent } from 'vue';
export default defineComponent({
components: {
SmileOutlined,
},
});
</script>