<template>
	<span v-if="_readonly" v-text="value"></span>
	<Input
    v-else
    v-bind="_fieldProps"
    v-model="value"
    :placeholder="_placeholder"
    :disabled="disabled"
    type="textarea"
    :rows="$Attrs.rows || 2" 
  />
</template>
<script setup>
import { inject, watch, useAttrs, defineEmits,onMounted } from 'vue';
import { useFieldBasics } from '../usefieldBasics';
import { Input } from '@king-design/vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const $Attrs = useAttrs();
const formInfo = inject('formInfo');
const emit = defineEmits(['change']);

const { value, _placeholder, _readonly, _fieldProps, onLinkage, disabled } = useFieldBasics(
	$Attrs,
	formInfo,
	route,
	emit
);
onMounted(async () => {
	onLinkage();
});
</script>
<style lang="less">
</style>
