<template>
    <el-checkbox-group
            v-bind="$attrs"
            v-on="$listeners"
    >
        <el-checkbox
                v-for="item in options"
                :key="item[valueKey]"
                :label="item[valueKey]"
                :value="item[labelKey]"
        >
            {{ item[labelKey] }}
        </el-checkbox>
    </el-checkbox-group>
</template>

<script>
export default {
    props: {
        options: {
            type: Array,
            default: () => []
        },
        filter: Function,
        labelKey: {
            type: String,
            default() {
                return this.$ELEMENT.dictSelect?.labelKey || 'dictLabel'
            }
        },
        valueKey: {
            type: String,
            default() {
                return this.$ELEMENT.dictSelect?.valueKey || 'dictValue'
            }
        },
    },
    created() {
        console.log(this.options)
    }
}
</script>

<style scoped>

</style>