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/message/demo/duration.vue

39 lines
678 B

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: 1
title:
zh-CN: 修改延时
en-US: Customize duration
---
## zh-CN
自定义时长 `10s`默认时长为 `3s`
## en-US
Customize message display duration from default `3s` to `10s`.
</docs>
<template>
<a-button @click="success">Customized display duration</a-button>
</template>
<script lang="ts">
import { message } from 'ant-design-vue';
import { defineComponent } from 'vue';
export default defineComponent({
setup() {
const success = () => {
message.success(
'This is a prompt message for success, and it will disappear in 10 seconds',
10,
);
};
return {
success,
};
},
});
</script>