mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
633 B
633 B
Clearable
Make input clearable when value is set.
<n-space vertical align="stretch">
<n-input
v-model:value="value"
type="input"
placeholder="Content is clearable"
clearable
/>
<n-input
v-model:value="value"
type="password"
placeholder="Content is clearable"
clearable
/>
<n-input
v-model:value="value"
type="textarea"
placeholder="Content is clearable"
round
clearable
/>
<n-button size="small" @click="value = 'Content is clearable'">Fill Content</n-button>
</n-space>
export default {
data () {
return {
value: null
}
}
}