<template>
  <div id="unit" class="flex-row" style="height: 100%">
    <div class="basic-main">
      <role-list @select-changed="selected"
                 style="width:auto;"
                 v-ref:list></role-list>
    </div>
    <div  class="binary-right" style="width: 60%;" v-if="row">
      <role-compile-list  :data="row" v-if="row" :look='true'></role-compile-list>
    </div>
  </div>
</template>

<script>

  import {HttpResetClass} from 'vue-client'

  export default {
    title: '角色管理',

    props: ['data'],
    data () {
      return {
        row: null,
      }
    },
    methods: {
      async selected (obj) {
        delete obj.val.num
        this.row = null
        this.row = obj.val
      }
    },
    events: {
      //返回
      'cancel' () {
        this.row = null
      },
    }
  }

</script>
