zoukankan      html  css  js  c++  java
  • 导出excel的功能效果实现

    <el-button @click="exportExcel" >
    <i style="display: inline-block;">
    <img src="@/assets/img/export.png" alt>
    </i> 导出
    </el-button>
    ==============》
    methods: {
    exportExcel () {
    console.log(111)
    if (this.tableData.length) {
    this.exportLoading = true
    const params = {
    title: ['序号', '所属一级分区', '所属二级分区','时间(月)','供水量','环比上月'],
    key: ['category1', 'category2', 'category3','category4','category5'],
    data: this.tableData,
    autoWidth: true,
    filename: '供水量统计'
    }
    excel.export_array_to_excel(params)
    this.exportLoading = false
    } else {
    this.$Message.info('表格数据不能为空!')
    }
    }
    },
  • 相关阅读:
    java ppt4
    课后作业 2
    课后作业2
    java ppt题目
    CommandParameter设计
    《大道至简》第二章读后感
    8.多态
    7.接口与继承
    6.数组
    字符串
  • 原文地址:https://www.cnblogs.com/xiaoxiaoxun/p/11187509.html
Copyright © 2011-2022 走看看