naive-ui/demo/documentation/components/input/enUS/disabled.demo.md
07akioni 487001d697 build: add changelog to site, refactor loader based on suffix
.demo.md for component demo
.demo-entry.md for demo entry
.md for common docs
2020-08-19 23:30:04 +08:00

46 lines
743 B
Markdown

# Disabled
Input can be disabled.
```html
<n-input
v-model="value"
type="input"
size="small"
placeholder="Oops! It is disabled."
:disabled="!active"
round
/>
<n-input
v-model="value"
type="textarea"
size="small"
placeholder="Oops! It is disabled."
:disabled="!active"
round
/>
<n-input pair separator="to" v-model="value" clearable :disabled="!active">
<template v-slot:affix>
<n-icon><cash-outline /></n-icon>
</template>
</n-input>
<n-switch v-model="active" />
```
```js
import cashOutline from 'naive-ui/lib/icons/cash-outline'
export default {
components: {
cashOutline
},
data() {
return {
active: false,
value: null
}
}
}
```
```css
.n-input {
margin-bottom: 8px;
}
```