/* empty css             *//* empty css                  */import{_ as e}from"./index-2a89b0c2.js";import{e as t}from"./exportExcel-331c8441.js";import{h as a}from"./moment-19b77ecd.js";import{d as s,x as o,o as r,l as p,w as n,z as i,b as m,m as _,ac as l,a7 as u,W as c}from"./index-41bf27b7.js";/* empty css                   */const y=s({__name:"index",props:{api:{type:String,require:!0},extro_params:{type:Object},title_obj:{type:Object,require:!0},sheet_name:{type:String,require:!0},api_type:{type:String,default:"get"},is_show_icon:{type:Boolean,default:!0},button_type:{type:String,default:"primary"}},setup(s){const y=s,d=()=>{const e=_([]);l[y.api_type](y.api,y.extro_params).then((s=>{const o=s.data;1e4===o.code&&(e.value=o.data,e.value.length>0?t(e.value,`${y.sheet_name}${a().format("YYYY-MM-DD HH:mm:ss")}`,y.title_obj,y.sheet_name):u.warning("暂无数据"))}))};return o((()=>{})),(t,a)=>{const o=e,_=c;return r(),p(_,{type:s.button_type,onClick:d,size:"default"},{default:n((()=>[s.is_show_icon?(r(),p(o,{key:0,name:"document-arrow-up",className:"w-4 h-4 mr-1 -ml-1"})):i("",!0),m(" 导出 ")])),_:1},8,["type"])}}});export{y as _};
