<template>
  <div class="tableSearch flex-h">
    <div class="flex-item">
      <el-input
        :placeholder="value==undefined ? '请输入内容' : value"
        v-model="key"
        clearable>
      </el-input>
    </div>
    <el-button
        size="mini"
        type="primary" @click="search">搜索</el-button>
  </div>
</template>

<script>
export default {
  name: '',
  props: ['value'],
  data () {
    return {
      key: ''
    }
  },
  mounted () {
    this.$nextTick(function () {
      // console.log(this.value)
    })
  },
  methods: {
    search () { // 搜索
      this.$emit('exportSearchKey', this.key)
    },
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import "page.scss";
</style>
