Skip to content

Commit

Permalink
feat(input): add attrs on input
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaubree committed Jan 16, 2024
1 parent 54a429a commit 6bfaff6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/input/UInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { appConfig } from '~/config'
import type { Color, DeepPartial, Size } from '~/types'
import { classNames } from '~/utils'
defineOptions({
inheritAttrs: false,
})
const props = withDefaults(defineProps<{
type?: string
name?: string
Expand Down Expand Up @@ -43,6 +46,7 @@ const emit = defineEmits<{
}>()
const modelValue = defineModel<string | number | undefined | null>({ default: '' })
const attrs = useAttrs()
const slots = useSlots()
const input = ref<HTMLInputElement | null>(null)
Expand Down Expand Up @@ -120,6 +124,7 @@ onMounted(() => {
:autocomplete="autocomplete"
:spellcheck="spellcheck"
:class="inputClass"
v-bind="attrs"
@focus="emit('focus', $event)"
@blur="emit('blur', $event)"
@input="onInput"
Expand Down

0 comments on commit 6bfaff6

Please # to comment.