

<template>
  <div>
    <Curd
     :columns="columns"
     :api-conf="apiConf"
     :form-items="formItems"
    />
  </div>
</template>
<script>
import base from "~/templates/base";
import Curd from "../../components/smallCommon/Curd.vue";
export default {
  name: "role",
  extends: base,
  components: {
    Curd
  },
  data () {
    return {
      columns: [
        {
          dataIndex: 'roleName',
          key: 'roleName',
          title: '角色名'
        },

        {
          dataIndex: 'roleDescription',
          key: 'roleDescription',
          title: '角色描述'
        }
      ],
      formItems: [
        {
          type: 'input',
          key: 'roleName',
          label: '角色名',
          isSearch: true,
          placeholder: '请输入角色名',
        },

        {
          dataIndex: 'roleDescription',
          key: 'roleDescription',
          title: '角色描述'
        }
      ],
      apiConf: {
        listApi: '/api/Role/all',
        deleteApi: '/api/Role/remove',
        editApi: '/api/Role/update',
        addApi: '/api/Role/update',
      }
    }
  }
}
</script>
<style scoped lang="less">

</style>
