/* empty css             *//* empty css                  */import{_ as e}from"./index-a921dba7.js";import{e as t}from"./exportExcel-331c8441.js";import{h as a}from"./moment-5c1f5c63.js";import{d as s,x as o,o as r,l as p,w as i,z as n,b as m,m as l,a9 as _,a4 as u,S as y}from"./index-2b50ecca.js";/* empty css                 *//* empty css                   */const c=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 c=s,d=()=>{const e=l([]);_[c.api_type](c.api,c.extro_params).then((s=>{const o=s.data;1e4===o.code&&(e.value=o.data,e.value.length>0?t(e.value,`${c.sheet_name}${a().format("YYYY-MM-DD HH:mm:ss")}`,c.title_obj,c.sheet_name):u.warning("暂无数据"))}))};return o((()=>{})),(t,a)=>{const o=e,l=y;return r(),p(l,{type:s.button_type,onClick:d,size:"default"},{default:i((()=>[s.is_show_icon?(r(),p(o,{key:0,name:"document-arrow-up",className:"w-4 h-4 mr-1 -ml-1"})):n("",!0),m(" 导出 ")])),_:1},8,["type"])}}});export{c as _};
