You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/alert/demo/smooth-closed.vue

43 lines
632 B

<docs>
---
order: 8
title:
zh-CN: 平滑地卸载
en-US: Smoothly Unmount
---
## zh-CN
平滑自然的卸载提示
## en-US
Smoothly and unaffectedly unmount Alert.
</docs>
<template>
<a-alert
v-if="visible"
message="Alert Message Text"
type="success"
closable
:after-close="handleClose"
/>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
export default defineComponent({
setup() {
const visible = ref<boolean>(true);
const handleClose = () => {
visible.value = false;
};
return {
visible,
handleClose,
};
},
});
</script>