2024-04-04 22:20:42 +00:00
|
|
|
<template>
|
|
|
|
<textarea
|
|
|
|
ref="el"
|
|
|
|
v-model="value"
|
|
|
|
class="px-4 w-full min-h-48 text-base py-2.5 rounded text-k-text-input bg-k-bg-input"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
|
2024-04-23 21:01:27 +00:00
|
|
|
<script lang="ts" setup>
|
2024-04-04 22:20:42 +00:00
|
|
|
import { computed, ref } from 'vue'
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<{ modelValue?: any }>(), { modelValue: null })
|
|
|
|
const emit = defineEmits<{ (e: 'update:modelValue', value: any): void }>()
|
|
|
|
|
|
|
|
const value = computed({
|
|
|
|
get: () => props.modelValue,
|
2024-10-13 17:37:01 +00:00
|
|
|
set: value => emit('update:modelValue', value),
|
2024-04-04 22:20:42 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
const el = ref<HTMLTextAreaElement>()
|
|
|
|
|
|
|
|
defineExpose({
|
2024-10-13 17:37:01 +00:00
|
|
|
el,
|
2024-04-04 22:20:42 +00:00
|
|
|
})
|
|
|
|
</script>
|