<template>
	<x-table-select v-model="value" v-bind="item.options" style="width: 100%;">
		<template #header="{data, form, submit}">
			<el-form :inline="true" :model="data" v-if="form && form.length>0">
				<el-form-item style="margin-bottom:0px;" v-for="(i,index) in form" :key="index">
					<el-input v-model="data[i.name]" :placeholder="i.placeholder"></el-input>
				</el-form-item>
				<el-form-item style="margin-bottom:0px;">
					<el-button type="primary" @click="submit">查询</el-button>
				</el-form-item>
			</el-form>
		</template>
		<el-table-column v-for="(_item, _index) in item.options.column" :key="_index" v-bind="_item"></el-table-column>
	</x-table-select>
</template>

<script>
	export default {
		name: 'tableselectRender',
		props: {
			modelValue: [String, Number, Boolean, Date, Object, Array],
			item: { type: Object, default: () => {} }
		},
		data() {
			return {
				value: this.modelValue,
			}
		},
		watch:{
			value(val){
				this.$emit("update:modelValue", val)
			}
		},
		mounted() {

		},
		methods: {
		}
	}
</script>

<style>
</style>
