<template>
	<view class="condition">
		
		<tm-trees :options="options"
		 :defaultOpen="defaultOpen" 
		 :defaultChecked="defaultChecked"
		 v-on:checked-keys="checkedHandle"></tm-trees>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				options: [
					{key: 'zhuyuan',label: '住院', children: [
						{key: 'ICU',label: 'ICU', children: []},
						{key: 'RCC',label: 'RCC', children: []},
						{key: 'shengchan',label: '生产', children: [{
							key: 'ziranchan',label: '自然产'
						}]},
					]},{key: 'zhuyuan',label: '住院', children: [
						{key: 'ICU',label: 'ICU', children: []},
						{key: 'RCC',label: 'RCC', children: []},
						{key: 'shengchan',label: '生产', children: [{
							key: 'ziranchan',label: '自然产'
						}]},
					]}
				],
				defaultOpen: ['zhuyuan'],
				defaultChecked: ['ICU']
			}
		},
		methods: {
			checkedHandle: function(keys) {
				console.log(keys);
			}
		}
	}
</script>

<style lang="less">
</style>
