<template>
    <div>
        <dg-tree default-expand-all :data="menuData" node-key="id" :props="defaultProps"></dg-tree>
        <dg-button v-footer @click="$emit('close')">关闭</dg-button>
    </div>
</template>

<script>
import * as funcResourceApi from "@/api/func-resource.js"
export default {
    props: {
        row: Object
    },
    components: {},
    data() {
        return {
            defaultProps: {
                children: "children",
                label: "name"
            },
            menuData: []
        }
    },
    computed: {},
    methods: {},
    created() {
        funcResourceApi.getRoleMenu(this.row.id).then(res => {
            this.menuData = (res.data && res.data.content) || []
        })
    },
    mounted() {}
}
</script>

<style lang="scss"></style>
