<!-- 复选框组件 created by LLQ 2019/5/8 -->
<template>
<div class="lbCheckBox">
	<md-checkbox v-if="checkBoxlist!=null&&type=='role'"  @change="changes" class="md-primary" v-for="item in checkBoxlist"  v-model="checklistboxs"
	:key="item.roleName" :value="item.roleId" :disabled="disabled">{{item.roleName}}</md-checkbox>
	<!-- 适用于多个checkbox -->
 <md-checkbox v-if="checkBoxlist!=null&&type!='role'"  @change="changes" class="md-primary" v-for="item in checkBoxlist"  v-model="checklistboxs"
 :key="item.dicValue" :value="item.dicKey">{{item.dicValue}}</md-checkbox>

 <!-- 适用于单个checkbox -->
 <md-checkbox v-if="checkBoxlist==null&&type!='role'"  @change="changes" class="md-primary"  v-model="checkboxs" >{{name}}</md-checkbox>
</div>

</template>

<script>
  import Vue from 'vue'
  import { MdCheckbox } from 'vue-material/dist/components'
  Vue.use(MdCheckbox)
	import { postApi, getApi } from "../../../api/commonApi"
	export default {
		name: "lbCheckBox",
		props: ['checkBoxlist','checklistboxs','checkboxs','name','type','disabled'],
		data() {
			return {
			}
		},
		components: {

    },
    watch: {
      checkboxs(value){

        console.log(value)
      }
    },
		mounted() {

		},
		created() {
		},
		methods: {
			changes(){
				this.$emit('changes')
			}


		}
	}
</script>

<style scoped>
	@import 'lbCheckBox.css';
</style>
<style>

</style>
