mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
chore: Update Input component to accept string or number values for modelValue
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
type Size = 'small' | 'medium' | 'large'
|
||||
interface Props {
|
||||
modelValue: string
|
||||
modelValue: string | number
|
||||
size?: Size
|
||||
type?: 'text' | 'password' | 'email' | 'number'
|
||||
min?: number
|
||||
@@ -11,7 +11,7 @@ const props = withDefaults(defineProps<Props>(), { size: 'medium' })
|
||||
|
||||
defineEmits(['update:modelValue', 'enter'])
|
||||
|
||||
const modelValue = ref<string>('')
|
||||
const modelValue = ref<string | number>('')
|
||||
|
||||
onMounted(() => {
|
||||
modelValue.value = props.modelValue
|
||||
|
||||
Reference in New Issue
Block a user