import{d as w,f as r,r as S,U as y,a2 as C,ad as v,af as _,k as T,G as J}from"./vue-vendor-CxLCUzY4.js";import{bp as e,aG as D,X as P,u as V}from"./index-Cy4uayzW.js";import{v as i}from"./antd-vue-vendor-CahNzUUa.js";import"./vxe-table-vendor-Cdi8WfTx.js";const R=w({__name:"JVxeDemo2",setup(z){const p=r(),{createMessage:h}=V(),l=r(!1),x=r([{title:"下拉框_字典表搜索",key:"select_dict_search",type:e.selectDictSearch,width:200,async:!0,dict:"sys_user,realname,username",tipsContent:"请输入查询条件"},{title:"JPopup",key:"popup",type:e.popup,width:180,popupCode:"demo",fieldConfig:[{source:"name",target:"popup"},{source:"sex",target:"popup_sex"},{source:"age",target:"popup_age"}]},{title:"JP-性别",key:"popup_sex",type:e.select,dictCode:"sex",disabled:!0,width:100},{title:"JP-年龄",key:"popup_age",type:e.normal,width:80},{title:"用户选择",key:"userSelect",type:e.userSelect,width:240},{title:"部门选择",key:"departSelect",type:e.departSelect,width:240},{title:"单选",key:"radio",type:e.radio,width:130,options:[{text:"男",value:"1"},{text:"女",value:"2"}],allowClear:!1},{title:"上传",key:"upload",type:e.upload,width:180,btnText:"点击上传",token:!0,responseName:"message",action:D},{title:"图片上传",key:"image",type:e.image,width:180,maxCount:6},{title:"文件上传",key:"file",type:e.file,width:180,maxCount:2},{title:"进度条",key:"progress",type:e.progress,minWidth:320}]),u=r([]),o=S({current:1,pageSize:10,pageSizeOptions:["10","20","30","100","200"],total:1e3});c(o.current,o.pageSize,!0);function k(t){o.current=t.current,o.pageSize=t.pageSize,c(t.current,t.pageSize,!0)}function b(){const t=p.value.getTableData();h.success("获取值成功，请看控制台输出")}function c(t,a,s=!1){s&&(l.value=!0);let n=Date.now(),d=[];for(let g=0;g<a;g++){let f=i(0,2);d.push({id:P(),select_dict_search:["admin","","jeecg"][i(0,2)],progress:i(0,100),radio:f?f.toString():null})}u.value=d;let m=Date.now()-n;s&&m<a&&setTimeout(()=>l.value=!1,a-m)}return(t,a)=>{const s=y("a-button"),n=y("JVxeTable");return C(),v(n,{ref_key:"tableRef",ref:p,toolbar:"","row-number":"","row-selection":"","keep-source":"",height:492,loading:l.value,dataSource:u.value,columns:x.value,pagination:o,style:{"margin-top":"8px"},onPageChange:k},{toolbarSuffix:_(()=>[T(s,{onClick:b},{default:_(()=>a[0]||(a[0]=[J("获取数据")])),_:1})]),_:1},8,["loading","dataSource","columns","pagination"])}}});export{R as default};
