"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[901],{14145:function(j,m,t){t.r(m),t.d(m,{waitTime:function(){return D},waitTimePromise:function(){return p}});var v=t(97857),f=t.n(v),E=t(15009),o=t.n(E),h=t(99289),c=t.n(h),g=t(42127),b=t(96906),T=t(86120),P=t(67294),d=t(85893),p=function(){var u=c()(o()().mark(function a(){var e,r=arguments;return o()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=r.length>0&&r[0]!==void 0?r[0]:100,n.abrupt("return",new Promise(function(_){setTimeout(function(){_(!0)},e)}));case 2:case"end":return n.stop()}},a)}));return function(){return u.apply(this,arguments)}}(),D=function(){var u=c()(o()().mark(function a(){var e,r=arguments;return o()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return e=r.length>0&&r[0]!==void 0?r[0]:100,n.next=3,p(e);case 3:case"end":return n.stop()}},a)}));return function(){return u.apply(this,arguments)}}(),y=[{dataIndex:"id",valueType:"indexBorder",width:48},{title:"\u6635\u79F0",dataIndex:"userName",copyable:!0},{title:"\u7528\u6237\u8D26\u53F7",dataIndex:"userAccount",copyable:!0},{title:"\u5934\u50CF",dataIndex:"userAvatar",search:!1,render:function(a,e){return(0,d.jsx)("div",{children:(0,d.jsx)("img",{src:e.userAvatar,width:100})})}},{title:"\u89D2\u8272",dataIndex:"userRole",valueType:"select",valueEnum:{user:{text:"\u666E\u901A\u7528\u6237",status:"Default"},admin:{text:"\u7BA1\u7406\u5458",status:"Success"},ban:{text:"\u8FDD\u89C4\u88AB\u5C01",status:"Error"}}},{title:"\u521B\u5EFA\u65F6\u95F4",key:"createdTime",dataIndex:"createdTime",valueType:"dateTime",sorter:!0,search:!1},{title:"\u64CD\u4F5C",valueType:"option",key:"option",render:function(a,e,r,s){return[(0,d.jsx)("a",{onClick:function(){var _;s==null||(_=s.startEditable)===null||_===void 0||_.call(s,e.id)},children:"\u7F16\u8F91"},"editable"),(0,d.jsx)(b.Z,{onSelect:function(){return s==null?void 0:s.reload()},menus:[{key:"copy",name:"\u590D\u5236"},{key:"delete",name:"\u5220\u9664"}]},"actionGroup")]}}];m.default=function(){var u=(0,P.useRef)();return(0,d.jsx)(T.Z,{columns:y,actionRef:u,cardBordered:!0,request:c()(o()().mark(function a(){var e,r,s,n,_,i=arguments;return o()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return r=i.length>0&&i[0]!==void 0?i[0]:{},s=i.length>1?i[1]:void 0,n=i.length>2?i[2]:void 0,console.log(s,n),l.next=6,(0,g.fY)(r);case 6:return _=l.sent,l.abrupt("return",{data:(e=_.data)===null||e===void 0?void 0:e.records});case 8:case"end":return l.stop()}},a)})),editable:{type:"multiple"},columnsState:{persistenceKey:"pro-table-singe-demos",persistenceType:"localStorage",onChange:function(e){console.log("value: ",e)}},rowKey:"id",search:{labelWidth:"auto"},options:{setting:{listsHeight:400}},form:{syncToUrl:function(e,r){return r==="get"?f()(f()({},e),{},{created_at:[e.startTime,e.endTime]}):e}},pagination:{pageSize:10,onChange:function(e){return console.log(e)}},dateFormatter:"string",headerTitle:"\u7528\u6237\u5217\u8868"})}}}]);
