{% load static %}

<div id="v_id_{{ name }}">
        <input type="hidden" name="{{ name }}" value="{{ value }}" v-model="{{ name }}">
    <el-checkbox-group v-model="{{ name }}">
        <el-checkbox v-for="item in datas" :label="item.value" :key="item.value"><span v-text="item.label"></span></el-checkbox>
    </el-checkbox-group>
</div>
<script type="text/javascript">
    var {{ name }}_value='{{ value }}';
    var {{ name }}_choices={{ choices|safe }};
    var ttt=new Vue({el:'#v_id_{{ name }}',
        data:{
            '{{ name }}':{{ name }}_value.split(','),
            datas:[]
        },
        created:function (){
            {{ name }}_choices.forEach(item=>{
                this.datas.push({
                    value:""+item[0],
                    label:item[1],

                })
            });
        }
    });
</script>