<template>
    <div class="export-file-main">
        <Button block color="linear-gradient(to right, #ff6034, #ee0a24)" @click="exportFile">导出</Button>
    </div>
</template>

<script setup>
import { Button } from 'vant';
import { downloadFile } from '@/utils/index'

const exportFile = ()=>{
    // 假设文件位于 public 文件夹下
    const filePath = '@/assets/导出文件.xlsx';
    // 调用下载函数
    downloadFile(filePath, '导出文件.xlsx');
}
</script>
<style lang="less" scoped>
.export-file-main {
    display: flex;
    flex-direction: row;
    justify-content: center;
}
</style>