<template>
	<div class="tableInner">
		<el-select v-model="list[itemProp]" @change="changeInput">
			<el-option
				v-for="item in QArr"
				:key="item.id"
				:label="item.name"
				:value="item.id"></el-option>
		</el-select>
	</div>
</template>
<script>
export default {
	name: 'InputArea',
	props: {
		injectData: {
			type: Object,
			default: () => ({}),
		},
		itemProp: {
			type: String,
		},
	},
	data() {
		return {
			list: this.injectData,
			QArr: [
				{
					name: 'A',
					id: 0,
				},
				{
					name: 'B',
					id: 1,
				},
				{
					name: 'C',
					id: 2,
				},
			],
		};
	},
	methods: {
		changeInput() {
			this.list.sType = 1;
			this.$emit('emitData', this.list);
		},
	},
};
</script>
<style scoped>
.tableInner >>> .el-input__inner {
  color: #409EFF;
  border: 1px rgb(232, 231, 231) solid;
  padding: 0;
  text-align: center;
  height: 30px;
}
</style>
