vue中 element-ui中 submit表单action下载(示例)

< form name= "orderform" style= "display:inline-block;" action= "http://dev.womaoapp.com/fwas-wishingLamp-admin/sys/wishingOrderRest/orderExportExcel" method= "post" >
< input v-show=" false" style= "visiable:hidden;" type= "text" name= "wishingLampId" v-model=" form. wishingLampId" >
< input v-show=" false" style= "visiable:hidden;" type= "text" name= "orderNo" v-model=" form. orderNo" >
< input v-show=" false" style= "visiable:hidden;" type= "text" name= "channelId" v-model=" form. channelId" >
< input v-show=" false" style= "visiable:hidden;" type= "text" name= "startTime" v-model=" form. startTime" >
< input v-show=" false" style= "visiable:hidden;" type= "text" name= "endTime" v-model=" form. endTime" >
<!-- <input style="height:40px;background:#C8C9CC;border-radius:3px;" @click="daochu" type="button" value="批量导出" /> -->
< el-button display= "inline-block" class= "filter-item" type= "primary" :loading=" downloadLoading" icon= "el-icon-download" @click=" handleDownload" >导出 </ el-button >
</ form >
下边是method中的方法

handleDownload () {
document. orderform. submit()
},

又综合看了下  上边的方法感觉比较low 原生的可能和vue中element-ui中的方法在一块还是有点低端和格格不入,参考一些资料之后,又重新更新了一篇,参考借鉴。element-ui中下载excel文件 重新更新方法链接 点击打开链接

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值