

<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: "user",
  extends: base,
  components: {
    Curd
  },
  data () {
    return {
      columns: [
        {
          dataIndex: 'username',
          key: 'username',
          title: '用户名'
        },

        {
          dataIndex: 'email',
          key: 'email',
          title: '邮箱'
        },
        {
          dataIndex: 'phone',
          key: 'phone',
          title: '电话'
        },
        {
          dataIndex: 'roleId',
          key: 'roleId',
          title: '角色'
        }
      ],
      formItems: [
        {
          type: 'input',
          key: 'username',
          label: '用户名',
          isSearch: true,
          placeholder: '请输入用户名',
        },
        {
          type: 'input',
          key: 'password',
          label: '密码',
          placeholder: '请输入密码'
        },
        {
          type: 'input',
          key: 'email',
          label: '邮箱',
          placeholder: '请输入邮箱',
        },
        {
          type: 'input',
          key: 'phone',
          label: '电话',
          placeholder: '请输入电话',
        }
      ],
      apiConf: {
        listApi: '/api/User/List',
        deleteApi: '/api/User/DeleteUser',
        editApi: '/api/User/UpdateUser',
        addApi: '/api/User/Add',
      }
    }
  }
}
</script>
<style scoped lang="less">

</style>
