<template>
  <div class="auto">
    <left-icon :model='functions'></left-icon>
  </div>
</template>

<script>
export default {
  props: ['functions', 'userid'],
  title: '左侧图标树',
  methods: {
    open (row) {
      if (row.link) {
        // this.$goto(row.link, {userid: this.functions, source: {isRead: 'modify'}}, 'home-page')
        this.$goto(row.link, {f: this.functions}, 'main')
      }
    }
  },
  events: {
    'select-changed': function (data) {
      // 事件回调内的 `this` 自动绑定到注册它的实例上
      this.open(data.val)
    }
  }
}
</script>
