import vue from 'vue'
import importExcel from './importExcel.vue'

const ImportExcel = vue.extend(importExcel)
function uploadExcel (baseUrl, excelConfig) {
  const uploadDom = new ImportExcel({
    el: window.document.createElement('div')
  })
  document.body.querySelector('#content').appendChild(uploadDom.$el)
  uploadDom.baseUrl = baseUrl
  uploadDom.excelConfig = excelConfig
  uploadDom.dialogVisible = true
}

export default uploadExcel
