<template>
  <div class="page">
    <el-form :model="search" label-width="100px" size="small">
      <el-form-item label="用户名称：">
        <el-input style="width:80%" v-model="search.userChnName" placeholder="请输入用户名称" clearable></el-input>
      </el-form-item>
      <div class="btn">
        <el-button size="mini" type="primary" icon="el-icon-search" @click="searchClick(1)">搜索</el-button>
        <el-button size="mini" type="info" icon="el-icon-refresh" @click="searchClick(2)">重置</el-button>
        <el-button size="mini" type="success" icon="el-icon-plus" @click="searchClick(3)">新增</el-button>
        <el-button size="mini" type="danger" @click="searchClick(4)">全部激活</el-button>
      </div>
    </el-form>
  </div>
</template>
<script>
  export default {
    props: {
      search: {
        type: Object,
        default: () => {},
      },
      showButtons: {
        type: Object,
        default: () => {},
      },
    },
    data() {
      return {};
    },
    methods: {
      searchClick(val) {
        this.$emit("searchClick", val);
      }
    },
  };

</script>
<style lang="scss" scoped>
.page {
    width: 100%;
    background-color: #fff;
    padding: 10px 10px 0 10px;
    box-sizing: border-box;

    .el-form {
      display: flex;
      flex-wrap: wrap;

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

      .btn {
        text-align: right;
      }
    }
  }
</style>
