1.0.1 • Published 2 years ago

@boringghost/excel v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

vue.config.js

module.exports = {
  lintOnSave: false,
  chainWebpack(config) {
    config.externals({ "./cptable": "var cptable" });
  },
};
buttonClick(){
const header = ['姓名', '性别', '年龄']
const data = [['毛毛', '小妖怪', '千年'], ['豆豆', '小怪物', '千年']]
const filename = '我的excel'
const multiHeader = [['我的资料', '', '']]
const merges = ['A1:C1']
const headerBG = ['d2d5db', 2]
const rowBG = [[3], ['ab652c']]
const filtBG = [[4], ['小怪物'], ['ee0030']]
const celWitdth = [100, 300, 300]

import('@boringghost/excel').then(excel => {
            excel.export_json_to_excel({
              header,
              data,
              filename,
              autoWidth: true, //非必填
              bookType: 'xlsx', //非必填
              multiHeader,
              merges,
              headerBG,
              rowBG,
              filtBG,
              celWitdth
   })
})
}

无聊的鬼_