<template>
  <div class="content-wrap" style="padding-top:20px;">
        <button @click="exportToDocx">导出</button>
  </div>
</template>

<script>
import { createDocument } from 'html-to-docx';
import {exportDocument} from "@/api/document";
import fs from 'fs';
  export default {
    data() {
      return {};
    },
    methods: {


          exportToDocx() {
              exportDocument({id:1}).then(res=>{
                  console.log("res",res);
              });

         },

    }
  };
</script>

<style>
  .content-wrap {
    display: flex;
    flex-direction: row;
  }
  .component-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 10px;
    height: 200px;
    width: 100px;
    border: 1px solid lightblue;
  }
  .content {
    height: 200px;
    flex: 1;
    border: 1px solid lightblue;
    padding: 10px;
    margin-left: 10px;
    position: relative;
  }
  .list {
    height: fit-content;
    width: fit-content;
    border: 1px solid grey;
    cursor: grab;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
    padding: 2px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .content .list {
    position: absolute;
  }
</style>
