<template>
    <van-checkbox-group v-model="propsForm.result" @change='changeVal'>
        <van-checkbox :name="item.name" v-for='(item,index) in propsForm.list' :key="index">{{ item.name }}</van-checkbox>
    </van-checkbox-group>
</template>

<script>
export default {
  props: {
      propsForm: {
          type: Object
      },
  },
  data(){
      return{

      }
  },
  methods:{
      getValue: function() {
          let form = {};
          form["type"] = this.propsForm.type;
          form["result"] = this.propsForm.result;
          return form;
      },
      changeVal(){
          this.$emit("menu-comfirm", this.getValue());
      }
  }
}
</script>

<style lang="scss" scoped>
.van-checkbox-group{
    display: flex;
    flex-wrap: wrap;
    .van-checkbox{
        width: 50%;
        margin-bottom: .625rem;
    }
}
</style>