<template>
	<div style="background: #ccc; width: 800px; height: 800px;">
		<base-table :table-head-configs="configs" :data="dataList" />
	</div>
</template>

<script>
import BaseTable from '@/components/base-table'

export default {
	name: 'Test',
	components: { BaseTable },
	data() {
		return {
			configs: [
				{ prop: 'createTime', name: '创建日期' },
				{ prop: 'name', name: '名称' },
				{
					label: '地址',
					children: [
						{ prop: 'province', name: '省' },
						{
							// prop: 'city',
							name: '市',
							children: [
								{ prop: 'county', name: '县' },
								{ prop: 'downtown', name: '镇' }
							]
						}
					]
				},
				{ prop: 'status', name: '状态', filter: val => ['激活', '注销'][val] }
			],
			dataList: [
				{ createTime: '2022-01-01', name: '奥特曼', province: '北京', city: '昌平', county: '怀宁', downtown: '石牌', status: 0 },
				{ createTime: '2022-01-02', name: '盈江', province: '上海', city: '徐家汇', status: 1 }
			]
		}
	}
}
</script>
