<template>
    <div class="hc-page-box">
        <HcCard title="表单组件测试">
            <hc-form-checkbox-group :datas="['1','2']" :objs="[{key: '3',name: '复选框3'}, {key: '4',name: '复选框4'}]" :val="formData.key_1__9_1" keyname="key_1__9_1" @change="checkboxGroupChange"></hc-form-checkbox-group>
        </HcCard>
    </div>
</template>

<script setup>
import { ref } from "vue";
import HcFormCheckboxGroup from "~com/plugins/table-form/hc-form-checkbox-group.vue"

const formData = ref({
    key_1__9_1: '1,2'
})

const checkboxGroupChange = (val, key) => {
    console.log(val)
    console.log(key)

    console.log(`formData.${key} = ${val}`)
}
</script>

<style lang="scss" scoped>

</style>
