<template>
  <div class="UpExcelSlcw">
    <el-upload
      class="upload-demo"
      action="https://topic.smcic.net/record/pre-task/importExcel"
      :on-preview="handlePreview"
      accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
      :file-list="fileList"
    >
      <el-button size="small" type="primary">点击上传</el-button>
      <div slot="tip" class="el-upload__tip">只能上传excel文件</div>
    </el-upload>
  </div>
</template>

<script>
export default {
  name: 'UpExcelSlcw',
  data() {
    return {
      fileList: [],
    };
  },
  props: [],
  mixins: [],
  watch: {},
  mounted() {},
  computed: {},
  filters: {},
  methods: {
    handlePreview(file) {
      console.log(file);
    },

  },
  beforeUnmount() {},
  components: {},
};
</script>

<style scoped>
.UpExcelSlcw {
  padding: 2em 1em 0 1em;
}
.upload-demo {
  text-align: center;
}
</style>
