Appearance
Input
Size
<script setup lang="ts">
import { ref } from 'vue'
import { DuInput } from 'doggy-ui-v3'
const value1 = ref<string>('')
const value2 = ref<string>('')
</script>
<template>
<div style="display: flex; align-items: flex-end">
<du-input v-model="value1" size="small" style="width: 100px; margin-right: 1em" />
<du-input v-model="value2" size="default" style="width: 120px" />
</div>
</template>
Clearable
<script setup lang="ts">
import { ref } from 'vue'
import { DuInput } from 'doggy-ui-v3'
const value = ref<string>('')
</script>
<template>
<du-input v-model="value" clearable />
</template>
Modifier
<script setup lang="ts">
import { ref } from 'vue'
import { DuInput } from 'doggy-ui-v3'
const value1 = ref<string>('')
const value2 = ref<number>(0)
const value3 = ref<string>('')
</script>
<template>
<du-input v-model.trim="value1" style="margin-bottom: 0.5em" />
<du-input v-model.number="value2" style="margin-bottom: 0.5em" />
<du-input v-model.capitalize="value3" />
</template>
API
Props
| Name | Description | Type | Default |
|---|---|---|---|
| model-value / v-model | binding value | string | number | - |
| size | input size | 'default' | 'small' | 'default' |
| clearable | is input clearable | boolean | false |
modelModifiers
| Value | Description |
|---|---|
| trim | remove white space at start and end |
| number | must input number |
| capitalize | capitalized the first letter |