首页 > 解决方案 > 如何只导出excel中选定的行?数据表

问题描述

问候。我为 VUEYE DATA TABLE 创建了一个表和一个使用插件。我只想将选定的行(复选框)导出到 Excel。我还希望在开始时选中所有复选框。我阅读了文档,但没有找到解决方案。看我的代码:

mounted() { 
    this.axios.get("http://127.0.0.1:8000/api/mytable").then(res=>{
       this.todos=res.data;
    })
}

    getChecked(rows){ 
  //only selected rows come out in the console and this is good but how to exprot only this?
  console.log("row" , rows);
},


 <vueye-table
 checkable
 tableStyle="bordered"
 :theme="theme3"
 :per-page-values="[5,10,25,50]"
 title="TODOS"
 :rows_data="todos"
 v-on:checked-rows="getChecked"
 v-on:row-click="onrowclick"
></vueye-table>

标签: javascriptvue.js

解决方案


推荐阅读