naive-ui/demo/documentation/components/input/enUS/disabled.md
2019-10-10 14:30:36 +08:00

482 B

Disabled

Input can be disabled.

<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-switch v-model="active" />
export default {
  data() {
    return {
      active: false,
      value: null
    }
  }
}
.n-input {
  margin-bottom: 8px;
}