import { defineComponent, PropType, ref, watch } from 'vue';
import './index.less';
import { Textarea as TTextarea } from 'tdesign-vue-next';
export default defineComponent({
  props: {
    modelValue: {
      type: String as PropType<string>,
    },
  },
  emits: ['update:modelValue'],
  setup(props, { emit }) {
    const keyword = ref('');
    watch(
      () => keyword.value,
      (v) => {
        emit('update:modelValue', v);
      }
    );
    return () => (
      <div class="custom-img-to-img-content">
        <div class="keyword">
          <div class="label">关键词</div>
          <TTextarea autosize={false} v-model={keyword.value}></TTextarea>
        </div>
      </div>
    );
  },
});
