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

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

export default {
	name: 'Test',
	components: { BaseTable },
	data() {
		return {
			configs: [
				{ prop: 'createTime', name: i18n.t('createDate') },
				{ prop: 'name', name: i18n.t('name') },
				{
					label: i18n.t('addr'),
					children: [
						{ prop: 'province', name: '省' },
						{
							// prop: 'city',
							name: '市',
							children: [
								{ prop: 'county', name: '县' },
								{ prop: 'downtown', name: '镇' }
							]
						}
					]
				},
				{ prop: 'status', name: i18n.t('status'), 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>
