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.
32 lines
512 B
32 lines
512 B
|
|
<cn>
|
|
#### 手动移除
|
|
手动关闭modal。
|
|
</cn>
|
|
|
|
<us>
|
|
#### Manual to destroy
|
|
Manually destroying a modal.
|
|
</us>
|
|
|
|
```html
|
|
<template>
|
|
<a-button @click="success">Success</a-button>
|
|
</template>
|
|
<script>
|
|
import { Modal } from 'antd'
|
|
export default {
|
|
methods: {
|
|
success() {
|
|
const modal = Modal.success({
|
|
title: 'This is a notification message',
|
|
content: 'This modal will be destroyed after 1 second',
|
|
});
|
|
setTimeout(() => modal.destroy(), 1000);
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
```
|
|
|