<template>
  <div id="unit" class="flex-row">
    <fun-list @isclick="selected"
              class="basic-main" style="width:auto;" v-ref:funlist>
    </fun-list>
    <div class="binary-right" style="width: 40%;" v-if="row">
      <function v-if="row" :look='true':data="row" :parent="row.parent"></function>
    </div>
  </div>
</template>

<script>

  import {HttpResetClass} from 'vue-client'


  export default {
    title: '功能管理',
    props: ['data'],
    data () {
      return {
        row: null,
      }
    },
    methods: {
      //选中数据实现两边数据绑定
      async selected (obj) {
        let rowdata=obj.val.data
        rowdata.parent==obj.val.parent
        this.row = null
        this.row = rowdata
      },
    },
    watch: {

    },
    events: {
      //返回
      'cancel' () {
        this.row = null
      },
    },
  }

</script>
