<template>
  <q-input :label="placeholder"  v-model="inputValue"/>
</template>

<script lang="ts">
import { defineComponent,ref,watchEffect } from 'vue';

export default defineComponent({
  name: 'InputText',
  props: {
    placeholder: {
      type: String,
      default: '',
    },
    modelValue: {
      type: String,
      default: '',
    },
  },

  setup(props, { emit }) {
    const inputValue = ref(props.modelValue);

    watchEffect(() => {
      emit('update:modelValue', inputValue.value);
    });

    return {
      inputValue,
    };
  },
});
</script>
