<template>
	<u-checkbox-group v-model="ckList"  placement="column" @change="CheckboxChange">
			<slot></slot>
	</u-checkbox-group>
</template>

<script>
	export default {
		data() {
			return {
				ckList: []
			}
		},
		props: {
		    value: String,
			disabled: {
				type: Boolean,
				default: false
			}
		},
		watch:{
			value:{
				handler (val) {
					this.ckList = val.split(',')	
				},
				immediate: true,
				deep: false
			}
		}, 
		methods:{
			CheckboxChange(evt) {
				this.$emit('input', this.ckList.join(','))
			},
		}
	}
</script>

