<template>
  <div class="page">
    <el-form :model="headerForm" ref="headerForm" label-width="70px" size="mini">
      <el-form-item label="姓名：" style="width:300px">
        <el-input v-model="headerForm.userName" placeholder="请输入用户姓名" clearable></el-input>
      </el-form-item>
      <div class="btn">
        <el-button  type="primary" size="mini" @click="searchClick"><i class="iconfont icon-sousuo"></i>查询
        </el-button>
      </div>
    </el-form>

    <div class="right">
      <el-button type="primary" size="mini" @click="openDialog(null)"><i
          class="iconfont icon-add"></i>新增</el-button>
      <el-button type="danger" size="mini" @click="deleteClick(null)"><i
          class="iconfont icon-delete"></i>删除</el-button>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {};
    },
    props: {
      headerForm: {
        type: Object,
        default: () => {},
      },
      showButtons: {
        type: Object,
        default: () => {},
      },
    },
    methods: {
      searchClick() {
        this.$emit("searchClick");
      },
      openDialog(val) {
        this.$emit("openDialog", val);
      },
      deleteClick(val) {
        this.$emit("deleteClick", val);
      },
    },
  };

</script>

<style lang="scss" scoped>
  .page {
    width: 100%;
    padding: 7px;
    box-sizing: border-box;

    display: flex;
    justify-content: space-between;

    .el-form {
      display: flex;
      flex-wrap: wrap;
      color: #fff;

      ::v-deep.el-form-item__label {
        // color: #92a5d3;
        letter-spacing: 2px;

      }

      .el-form-item {
        margin-bottom: 0px;
      }

    }

    .btnTwo {
      background: #FB3847;
      border-radius: 5px;
      border: none;
      color: #fff;
      margin-right: 5px;
    }
  }

</style>
