<template>
  <el-button
    type="primary"
    size="small"
    icon="el-icon-download"
    @click="exportFn"
    >导出</el-button
  >
</template>

<script>
  import { exportTable } from '@/api/system/file/index.js';
  export default {
    props: {
      apiUrl: '',
      fileName: '',
      params: {
        default: () => {
          return {};
        }
      }
    },
    //注册组件
    data() {
      return {};
    },

    created() {},
    methods: {
      exportFn() {
        exportTable({
          api: this.apiUrl,
          fileName: this.fileName,
          data:this.params
        });
      }
    }
  };
</script>

<style lang="scss"></style>
