<script setup lang="ts">
import { ref } from "vue";

defineProps({
  modelValue: String,
});

const emits = defineEmits<{
  (e: "update:modelValue", value: string): void;
}>();

const input = ref<HTMLInputElement | null>(null);

function focus() {
  input.value?.focus();
}

defineExpose({
  focus
});
</script>

<template>
  <a-row type="flex" style="align-items: center">
    <a-col style="width: 120px; text-align: right;">
      报告模板名称：
    </a-col>
    <a-col flex="1">
      <a-input
        :value="modelValue"
        @input="emits('update:modelValue', $event.target.value)"
        ref="input"
      />
    </a-col>
  </a-row>
</template>

<style scoped lang="scss">
</style>