vue-json-csv icon indicating copy to clipboard operation
vue-json-csv copied to clipboard

No data to export

Open ddiegommachado opened this issue 6 years ago • 0 comments

Hi everyone

Download not working.

My code: HTML

<download-csv
       @click="exportGraph"
       class="btn btn-success"
       :data="wellsExporteds"
       name="Lista de Poços.csv"
     >Exportar Póleo</download-csv>

SCRIPT

<script>
import exportCsv from "../plugins/exportCsv";

methods: {

async exportGraph() {
      let exportWellId = new Array();

      exportWellId.push(this.idwell);

      const exportPoil = axios.create({
        withCredentials: true
      });
      exportPoil
        .post("http://localhost:8000/gerenciamento/ExportarPoleo", {
          well_ids: exportWellId
        })
        .then(response => {
          this.wellsExporteds = response.data;
          console.log(this.wellsExporteds);
        });
    }
}
</script>

NUXT CONFIG plugins: ["~/plugins/main.js", "~/plugins/exportCsv.js"],

ddiegommachado avatar Oct 02 '19 19:10 ddiegommachado