mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
487001d697
.demo.md for component demo .demo-entry.md for demo entry .md for common docs
743 B
743 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-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" />
import cashOutline from 'naive-ui/lib/icons/cash-outline'
export default {
components: {
cashOutline
},
data() {
return {
active: false,
value: null
}
}
}
.n-input {
margin-bottom: 8px;
}