<template>
	<u-checkbox-group
	            v-model="value"
	            placement="row"
	            @change="checkboxChange"
	        >
	            <u-checkbox
	                :customStyle="{marginRight: '8px'}"
	                v-for="(item, index) in checkData"
	                :key="index"
	                :label="item.name"
	                :name="item.id"
	            >
	            </u-checkbox>
	        </u-checkbox-group>
</template>

<script>
	export default {
		props: {
			checkData: {
				type: Array,
				default: []
			}
		},
		data() {
			return {
				value: []
			}
		},
		mounted() {
			this.$on('upDateCheck',(val)=>{
				this.value = val
			})
		},
		methods: {
			checkboxChange(val) {
				this.$emit('changeCheck', val)
			}
		}
	}
</script>

<style>
</style>