<template>
  <el-dropdown @command="exportBill" trigger="hover" v-if="exportTemplates.length > 0">
    <el-button type="primary" class="button-sty" size="mini">
      <span>{{ buttonName }}</span
      ><span class="line"></span> <i class="el-icon-arrow-down el-icon--right"></i>
    </el-button>
    <el-dropdown-menu slot="dropdown">
      <template v-for="(item, index) in exportTemplates">
        <el-dropdown-item
          v-if="exportTypes.includes(item.etType)"
          icon="el-icon-upload2"
          :command="item"
          :key="index"
        >
          {{ $t1(item.etName) }}
        </el-dropdown-item>
        <el-dropdown-item
          v-else-if="printTypes.includes(item.etType)"
          icon="el-icon-printer"
          :command="item"
          :key="index"
        >
          {{ $t1(item.etName) }}
        </el-dropdown-item>
      </template>
    </el-dropdown-menu>
  </el-dropdown>
</template>

<script>
import mixins from "./mixins.js";

export default {
  name: "baseInputExport",
  mixins: [mixins],
};
</script>

<style></style>
