<template>
    <view class="mt-[20rpx]">
        <view class="text-base font-medium mb-[20rpx]">忽略的元素</view>
        <u-input
            type="text"
            :cursor-spacing="120"
            v-model="value"
            maxlength="200"
            placeholder="输入图片中不想出现的词，例如tree、fish等"
            :customStyle="{
                padding: '0 20rpx',
                borderRadius: '8rpx',
                backgroundColor: '#F8F8FB'
            }"
        ></u-input>
    </view>
</template>

<script setup lang="ts">
import { computed } from 'vue'

const emit = defineEmits<{
    (event: 'update:modelValue', value: string): void
}>()

const props = withDefaults(
    defineProps<{
        modelValue?: any
    }>(),
    {
        modelValue: ''
    }
)

const value = computed({
    get: () => {
        return props.modelValue
    },
    set: (val) => {
        emit('update:modelValue', val)
    }
})
</script>