naive-ui/demo/documentation/components/card/enUS/closable.md

21 lines
290 B
Markdown
Raw Normal View History

2019-11-18 11:34:18 +08:00
# Closable
2020-01-27 20:00:39 +08:00
You may need when use it in modal.
2019-11-18 11:34:18 +08:00
```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;
}
```