<template>
  <div>
    <cms-tree-table
      :columns="columns"
      :margin-top="45"
      :fixed-height="fixedHeight"
      :request-call="this.$http.tables.treeTableUrl"
      :height="height"
      :tree-config="{
        children: 'children',
        hasChild: 'hasChild',
        expandAll: true
      }"
    >
    </cms-tree-table>
  </div>
</template>

<script>
import menu from './menu1.json'
import {
  dictionaryMix,
  formConfigMix,
  iframeMinix,
  mixTableConfig,
  mixTableConstants,
  pageInitMix
} from '@/comps/mixin/common-mixins'

export default {
  name: "tree-table-demo",
  mixins: [ mixTableConfig, dictionaryMix, formConfigMix, iframeMinix, pageInitMix, mixTableConstants ],
  data() {
    return {
      menuList: menu.data
    }
  },
  computed: {
    columns() {
      return [
        {
          ...mixTableConfig.checkbox,
        },
        {
          fixed: "left",
          title: '菜单名称',
          field: "menuName",
          treeNode: true,
          minWidth: 300,
        },
        {
          ...mixTableConfig.default,
          title: '菜单地址',
          field: "menuUrl",
          minWidth: 300,
        },
      ]
    }
  }

}
</script>

<style scoped>

</style>