mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
804 B
804 B
Disabled
Input can be disabled.
<n-space vertical align="stretch">
<n-input
v-model:value="value"
type="input"
size="small"
placeholder="Oops! It is disabled."
:disabled="!active"
round
/>
<n-input
v-model:value="value"
type="textarea"
size="small"
placeholder="Oops! It is disabled."
:disabled="!active"
round
/>
<n-input pair separator="to" v-model:value="value" clearable :disabled="!active">
<template v-slot:affix>
<n-icon><cash-icon /></n-icon>
</template>
</n-input>
<n-switch v-model:value="active" />
</n-space>
import CashIcon from 'naive-ui/lib/icons/cash-outline'
export default {
components: {
CashIcon
},
data () {
return {
active: false,
value: null
}
}
}