<template>
    <uni-easyinput @change="change" v-model="inputValue" 
        :placeholder="field.description || placeholder || `请输入${field.title}`" type="number" />
</template>
<script lang="ts" setup>

const emits = defineEmits(['update:modelValue'])
const props = defineProps({
    modelValue: {
        type: [Number]
    },
    placeholder: {
        type: String
    },
    readyonly: {
        type: Boolean,
        default: () => false
    },
    field: {
        type: Object,
        required: true
    },
})

const inputValue = ref(props.modelValue)

const change = (e: any) => {
    emits('update:modelValue', inputValue.value)
}
</script>
<style scoped lang="scss"></style>