mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
21 lines
290 B
Markdown
21 lines
290 B
Markdown
# Closable
|
|
You may need when use it in modal.
|
|
```html
|
|
<n-card title="Card" closable @close="handleClose">
|
|
Card Content
|
|
</n-card>
|
|
```
|
|
```js
|
|
export default {
|
|
methods: {
|
|
handleClose () {
|
|
this.$NMessage.info('Card Close')
|
|
}
|
|
}
|
|
}
|
|
```
|
|
```css
|
|
.n-card {
|
|
max-width: 300px;
|
|
}
|
|
``` |