<template>
  <div id="topInfo">
    <el-row>
      <el-col :span="24">
        <el-col :span="20" class="menu">
          <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item>所在位置：</el-breadcrumb-item>
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>{{ topTitle }}</el-breadcrumb-item>
          </el-breadcrumb>
        </el-col>
        <span v-if="display === 'block'">
          <el-col :span="4" class="btn">
            <el-button>批量导出</el-button>
            <el-button @click="add">创建任务</el-button>
          </el-col>
        </span>
        <span v-else> </span>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'topInfo',
  props: {
    topTitle: null,
    display: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    add() {
      this.$emit('add');
    },
  },
};
</script>

<style lang="less" scoped>
.menu {
  padding: 14px 0;
}
.btn {
  padding: 5px 0;
  text-align: right;
}
/deep/.btn .el-button {
  background: red;
  color: #fff;
}
</style>
