naive-ui/demo/documentation/components/modal/enUS/basic.md

41 lines
1.2 KiB
Markdown
Raw Normal View History

2019-09-29 00:13:01 +08:00
# Basic
```html
<n-button
size="small"
@click="isActive = true"
>
Start Me up
</n-button>
2019-11-13 11:40:32 +08:00
<n-modal v-model="isActive" preset="confirm" title="lalala" :closable="false" cancel-text="test">
<template v-slot:footer>
<div slot="header">111</div>
</template>
2019-09-29 17:54:20 +08:00
<div style="background: rgb(46, 52, 68); padding: 24px; border-radius: 8px; color: white;">
2019-11-11 15:59:23 +08:00
<div>If1 you start me up, If you start me up, I'll never stop.</div>
2019-09-29 00:13:01 +08:00
<n-input v-model="inputValue" />
inputValue: {{ inputValue }}<br>
<n-tooltip>
<template v-slot:activator>
<n-button
size="small"
@click="isActive = false"
>
Close it
</n-button>
</template>
Why do you want to close it?
</n-tooltip>
<section class="markdown footer-part"><h2 id="api">API</h2><table><thead><tr><th>Property</th><th>Description</th><th>Type</th><th>Default</th><th>Version</th></tr></thead><tbody><tr><td>type</td><td>Type of button.</td><td>string</td><td><code>'default'</code></td><td></td></tr></tbody></table></section>
</div>
</n-modal>
```
```js
export default {
data () {
return {
isActive: false,
inputValue: ''
}
}
}
```