<template>
  <div class="page">
    <LayoutTable :data='tableData' :config='tableConfig' />
  </div>
</template>

<script>
import table from '@/assets/mixins/table';

export default {
  mixins: [table],
  data() {
    return {
      config: {
        search: [
          {
            name: 'name',
            type: 'text',
            label: '资源名称',
          },
          {
            name: 'authType',
            type: 'select',
            label: '权限类型',
          },
        ],
        columns: [
          {
            type: 'selection',
            width: 60,
          },
          {
            prop: 'id',
            label: 'ID',
            width: 60,
          },
          {
            prop: 'name',
            label: '名称',
          },
          {
            prop: 'url',
            label: '资源',
          },
          {
            prop: 'authType',
            label: '认证类型',
            width: 140,
            formatter: this.formatter,
          }, 
          // {
          //   prop: 'userType',
          //   label: '用户类型',
          //   width: 100,
          //   formatter: this.formatter,
          // }, 
          {
            label: '操作',
            witdh: 120,
            formatter: (row)=> {
              return (
                <table-buttons row={row} onEdit={this.toEdit} onDel={this.toDel} />
              )
            },
          },
        ],
      },
    }
  }
}
</script>

