<template>
    <div class="section-list-node">
        <TreeNode 
            @handleExpand="handleExpand"
            @handleChecked="handleChecked"
            :showExpand="false"
            :showExpandIcon="false"
            :showChecked="true"
            :checked="checked">
            <template slot="content">{{data.name}}</template>
        </TreeNode>
    </div>
</template>
<script>
    /**
     * 内部群节点
     *  */
    import Node from '../mixins/node'
    export default {
        name: 'YYListNode',
        mixins: [Node],
        inject: ['root'],
        props: {
            data: {
                type: Object,
                default () {
                    return {}
                }
            },
            withMembers: {
                type: Boolean
            }
        },
        computed: {
            checked() {
                const data = this.root.selected.list['m' + this.data.id] || null
                return !!data
            }
        }
    }
</script>

