<template>
  <base-form slot="content" ref="ruleForm" :data="searchData">
    <div slot="footer">
      <!-- <el-button icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">搜索</el-button> -->
      <el-button icon="el-icon-plus" class="xl-form-btn bgc2" @click="addHandle">添加</el-button>
    </div>
  </base-form>
</template>
<script>
export default {
  mixins,
  data() {
    return {
      searchData: [],
      isHidePut: false,
    }
  },
  computed: {
    name () {
      return this.parentData.$route.query.name || ''
    }
  },
  mounted () {
    this.getDef()
  },
  methods: {
    getDef (str) {
      let params = { ...this.$refs.ruleForm.baseForm }
      this.searchData = [
        // { label: '标题', key: 'title' },
      ]
      this.setDefaultValue(params, 'searchData')
    },
    addHandle() {
      this.$emit('add')
    },
    searchHandle() {
      const oldform = this.$refs.ruleForm.baseForm
      const newForm = { ...oldform }
      this.$emit('change', newForm)
    }
  }
}
</script>
