<template>
  <div class="">
    <toolbar @onSearch="filterData" />

    <div class="m-10 bg-w p-20 br-10">
      <el-button type="primary" icon="el-icon-plus" @click="handleSubmit"
        >新增</el-button
      >
      <base-table
        :columns="columns"
        :items="items"
        :pagination="pagination"
        :page-change="pageChange"
      />
    </div>
  </div>
</template>

<script>
import toolbar from './toolbar';
import mxFilterList from '@/mixins/filterList';

export default {
  name: 'RoleManagement',

  components: { toolbar },

  mixins: [
    mxFilterList({
      // fetchList: iGetList // 在下方data再声明一个 fetchList: iGetList 同等效果
    })
  ],

  data() {
    return {
      columns: [
        {
          key: 'id',
          name: 'ID',
          width: '60'
        },
        {
          key: 'photo',
          name: '图片',
          width: '240'
        },
        {
          key: 'region',
          name: '位置',
          minWidth: '120'
        },
        {
          key: 'region',
          name: '标题',
          minWidth: '180'
        },
        {
          key: 'region',
          name: '链接',
          minWidth: '240',
          showOverflowTooltip: true
        },
        {
          key: 'region',
          name: '排序',
          width: '60'
        },
        {
          key: 'region',
          name: '状态',
          width: '80'
        },
        {
          key: 'action',
          name: '操作',
          width: '120'
        }
      ]
    };
  }
};
</script>

<style type="scss" scoped></style>
