👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
13 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[1963],{73715:function(F,h){var t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};h.Z=t},82574:function(F,h,t){var x=t(33346),r=t(50959),j=t(5590),O=t(69164),d=function(A,Z){return r.createElement(O.Z,(0,x.Z)((0,x.Z)({},A),{},{ref:Z,icon:j.Z}))};d.displayName="DownOutlined",h.Z=r.forwardRef(d)},19791:function(F,h,t){t.d(h,{Z:function(){return A}});var x=t(33346),r=t(50959),j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},O=j,d=t(69164),s=function(I,k){return r.createElement(d.Z,(0,x.Z)((0,x.Z)({},I),{},{ref:k,icon:O}))};s.displayName="LikeOutlined";var A=r.forwardRef(s)},1861:function(F,h,t){var x=t(33346),r=t(50959),j=t(73715),O=t(69164),d=function(A,Z){return r.createElement(O.Z,(0,x.Z)((0,x.Z)({},A),{},{ref:Z,icon:j.Z}))};d.displayName="UpOutlined",h.Z=r.forwardRef(d)},83032:function(F,h,t){t.d(h,{O:function(){return x}});var x=Array.from({length:12}).map(function(r,j){return{value:"cat".concat(j+1),label:"\u7C7B\u76EE".concat(j+1)}})},89489:function(F,h,t){t.r(h),t.d(h,{default:function(){return Qe}});var x=t(77117),r=t.n(x),j=t(28152),O=t.n(j),d=t(33346),s=t(50959),A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"}}]},name:"star",theme:"outlined"},Z=A,I=t(69164),k=function(a,n){return s.createElement(I.Z,(0,d.Z)((0,d.Z)({},a),{},{ref:n,icon:Z}))};k.displayName="StarOutlined";var ue=s.forwardRef(k),me=t(19791),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},ge=ve,Q=function(a,n){return s.createElement(I.Z,(0,d.Z)((0,d.Z)({},a),{},{ref:n,icon:ge}))};Q.displayName="MessageOutlined";var he=s.forwardRef(Q),xe=t(52225),q=function(a,n){return s.createElement(I.Z,(0,d.Z)((0,d.Z)({},a),{},{ref:n,icon:xe.Z}))};q.displayName="LoadingOutlined";var fe=s.forwardRef(q),_=t(27533),W=t(67190),pe=t(47100),ee=t(50304),V=t(32413),ye=t(23870),te=t(82099),K=t(90543),w=t(28566),je=t(21757),Oe=t(5726),Te=t.n(Oe),Se=t(21320),T=t.n(Se),N=t(8700),Ee=(0,N.kc)(function(l){var a=l.token;return{description:{maxWidth:"720px",lineHeight:"22px"},extra:T()({marginTop:"16px",color:a.colorTextSecondary,lineHeight:"22px","& > em":{marginLeft:"16px",color:a.colorTextDisabled,fontStyle:"normal"}},"@media screen and (max-width: ".concat(a.screenXS,"px)"),{"& > em":{display:"block",marginTop:"8px",marginLeft:"0"}})}}),Ae=Ee,e=t(11527),Ce=function(a){var n=a.data,i=n.content,u=n.updatedAt,c=n.avatar,m=n.owner,v=n.href,C=Ae(),S=C.styles;return(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:S.description,children:i}),(0,e.jsxs)("div",{className:S.extra,children:[(0,e.jsx)(je.C,{src:c,size:"small"}),(0,e.jsx)("a",{href:v,children:m})," \u53D1\u5E03\u5728 ",(0,e.jsx)("a",{href:v,children:v}),(0,e.jsx)("em",{children:Te()(u).format("YYYY-MM-DD HH:mm")})]})]})},Le=Ce,Me=t(95530),Ze=t.n(Me),Re=t(84875),ae=t.n(Re),De=(0,N.kc)(function(l){var a=l.token;return{standardFormRow:{display:"flex",width:"100%",marginBottom:"16px",paddingBottom:"16px",borderBottom:"1px dashed ".concat(a.colorSplit),".ant-form-item, .ant-legacy-form-item":{marginRight:"24px"},".ant-form-item-label, .ant-legacy-form-item-label":{label:{marginRight:"0",color:a.colorText}},".ant-form-item-label, .ant-legacy-form-item-label, .ant-form-item-control, .ant-legacy-form-item-control":{padding:"0",lineHeight:"32px"}},label:{flex:"0 0 auto",marginRight:"24px",color:a.colorTextHeading,fontSize:a.fontSize,textAlign:"right","& > span":{display:"inline-block",height:"32px",lineHeight:"32px","&::after":{content:"'\uFF1A'"}}},content:{flex:"1 1 0",".ant-form-item, .ant-legacy-form-item":{"&:last-child":{display:"block",marginRight:"0"}}},standardFormRowLast:{marginBottom:"0",paddingBottom:"0",border:"none"},standardFormRowBlock:{".ant-form-item, .ant-legacy-form-item, div.ant-form-item-control-wrapper, div.ant-legacy-form-item-control-wrapper":{display:"block"}},standardFormRowGrid:{".ant-form-item, .ant-legacy-form-item, div.ant-form-item-control-wrapper, div.ant-legacy-form-item-control-wrapper":{display:"block"},".ant-form-item-label, .ant-legacy-form-item-label":{float:"left"}}}}),Be=De,Fe=["title","children","last","block","grid"],Ie=function(a){var n,i=a.title,u=a.children,c=a.last,m=a.block,v=a.grid,C=Ze()(a,Fe),S=Be(),f=S.styles,R=ae()(f.standardFormRow,(n={},T()(n,f.standardFormRowBlock,m),T()(n,f.standardFormRowLast,c),T()(n,f.standardFormRowGrid,v),n));return(0,e.jsxs)("div",r()(r()({className:R},C),{},{children:[i&&(0,e.jsx)("div",{className:f.label,children:(0,e.jsx)("span",{children:i})}),(0,e.jsx)("div",{className:f.content,children:u})]}))},$=Ie,ze=t(67855),ke=t.n(ze),we=t(1861),Ne=t(82574),Pe=t(96771),be=(0,N.kc)(function(l){var a=l.token;return{tagSelect:{position:"relative",maxHeight:"32px",marginLeft:"-8px",overflow:"hidden",lineHeight:"32px",transition:"all 0.3s",userSelect:"none",".ant-tag":{marginRight:"24px",padding:"0 8px",fontSize:a.fontSize}},trigger:{position:"absolute",top:"0",right:"0","span.anticon":{fontSize:"12px"}},expanded:{maxHeight:"200px",transition:"all 0.3s"},hasExpandTag:{paddingRight:"50px"}}}),He=be,ne=w.Z.CheckableTag,le=function(a){var n=a.children,i=a.checked,u=a.onChange,c=a.value;return(0,e.jsx)(ne,{checked:!!i,onChange:function(v){return u&&u(c,v)},children:n},c)};le.isTagSelectOption=!0;var re=function(a){var n,i=He(),u=i.styles,c=a.children,m=a.hideCheckAll,v=m===void 0?!1:m,C=a.className,S=a.style,f=a.expandable,R=a.actionsText,D=R===void 0?{}:R,Y=(0,s.useState)(!1),z=O()(Y,2),L=z[0],b=z[1],X=(0,Pe.C8)(a.defaultValue||[],{value:a.value,defaultValue:a.defaultValue,onChange:a.onChange}),H=O()(X,2),o=H[0],g=H[1],U=function(y){return y&&y.type&&(y.type.isTagSelectOption||y.type.displayName==="TagSelectOption")},B=function(){var y=s.Children.toArray(c),M=y.filter(function(E){return U(E)}).map(function(E){return E.props.value});return M||[]},qe=function(y){var M=[];y&&(M=B()),g(M)},_e=function(y,M){var E=ke()(o||[]),J=E.indexOf(y);M&&J===-1?E.push(y):!M&&J>-1&&E.splice(J,1),g(E)},et=B().length===(o==null?void 0:o.length),oe=D.expandText,tt=oe===void 0?"\u5C55\u5F00":oe,de=D.collapseText,at=de===void 0?"\u6536\u8D77":de,ce=D.selectAllText,nt=ce===void 0?"\u5168\u90E8":ce,lt=ae()(u.tagSelect,C,(n={},T()(n,u.hasExpandTag,f),T()(n,u.expanded,L),n));return(0,e.jsxs)("div",{className:lt,style:S,children:[v?null:(0,e.jsx)(ne,{checked:et,onChange:qe,children:nt},"tag-select-__all__"),c&&s.Children.map(c,function(p){return U(p)?s.cloneElement(p,{key:"tag-select-".concat(p.props.value),value:p.props.value,checked:o&&o.indexOf(p.props.value)>-1,onChange:_e}):p}),f&&(0,e.jsx)("a",{className:u.trigger,onClick:function(){b(!L)},children:L?(0,e.jsxs)(e.Fragment,{children:[at," ",(0,e.jsx)(we.Z,{})]}):(0,e.jsxs)(e.Fragment,{children:[tt,(0,e.jsx)(Ne.Z,{})]})})]})};re.Option=le;var se=re,Ue=t(13448),ie=t.n(Ue),We=t(74815),Ve=t.n(We);function Ke(l){return G.apply(this,arguments)}function G(){return G=Ve()(ie()().mark(function l(a){return ie()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,_.request)("/api/fake_list",{params:a}));case 1:case"end":return i.stop()}},l)})),G.apply(this,arguments)}var $e=(0,N.kc)(function(l){var a,n=l.token;return{listItemMetaTitle:{color:n.colorTextHeading},listItemExtra:T()({width:"272px",height:"1px"},"@media screen and (max-width: ".concat(n.screenLG,"px)"),{width:"0",height:"1px"}),selfTrigger:(a={marginLeft:"12px"},T()(a,"@media screen and (max-width: ".concat(n.screenXS,"px)"),{display:"block",marginLeft:"0"}),T()(a,"@media screen and (max-width: ".concat(n.screenMD,"px)"),{display:"block",marginLeft:"0"}),a)}}),Ge=$e,Ye=t(83032),P=W.Z.Item,Xe=5,Je=function(){var a=W.Z.useForm(),n=O()(a,1),i=n[0],u=Ge(),c=u.styles,m=(0,_.useRequest)(function(){return Ke({count:Xe})},{loadMore:!0}),v=m.data,C=m.reload,S=m.loading,f=m.loadMore,R=m.loadingMore,D=(v==null?void 0:v.list)||[],Y=function(){i.setFieldsValue({owner:["wzj"]})},z=[{id:"wzj",name:"\u6211\u81EA\u5DF1"},{id:"wjh",name:"\u5434\u5BB6\u8C6A"},{id:"zxx",name:"\u5468\u661F\u661F"},{id:"zly",name:"\u8D75\u4E3D\u9896"},{id:"ym",name:"\u59DA\u660E"}],L=function(g){var U=g.type,B=g.text;switch(U){case"star-o":return(0,e.jsxs)("span",{children:[(0,e.jsx)(ue,{style:{marginRight:8}}),B]});case"like-o":return(0,e.jsxs)("span",{children:[(0,e.jsx)(me.Z,{style:{marginRight:8}}),B]});case"message":return(0,e.jsxs)("span",{children:[(0,e.jsx)(he,{style:{marginRight:8}}),B]});default:return null}},b={wrapperCol:{xs:{span:24},sm:{span:24},md:{span:12}}},X=D.length>0&&(0,e.jsx)("div",{style:{textAlign:"center",marginTop:16},children:(0,e.jsx)(pe.ZP,{onClick:f,style:{paddingLeft:48,paddingRight:48},children:R?(0,e.jsxs)("span",{children:[(0,e.jsx)(fe,{})," \u52A0\u8F7D\u4E2D..."]}):"\u52A0\u8F7D\u66F4\u591A"})}),H=(0,s.useMemo)(function(){return z.map(function(o){return{label:o.name,value:o.id}})},[z]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ee.Z,{bordered:!1,children:(0,e.jsxs)(W.Z,{layout:"inline",form:i,initialValues:{owner:["wjh","zxx"]},onValuesChange:C,children:[(0,e.jsx)($,{title:"\u6240\u5C5E\u7C7B\u76EE",block:!0,style:{paddingBottom:11},children:(0,e.jsx)(P,{name:"category",children:(0,e.jsx)(se,{expandable:!0,children:Ye.O.map(function(o){return(0,e.jsx)(se.Option,{value:o.value,children:o.label},o.value)})})})}),(0,e.jsxs)($,{title:"owner",grid:!0,children:[(0,e.jsx)(P,{name:"owner",noStyle:!0,children:(0,e.jsx)(V.default,{mode:"multiple",placeholder:"\u9009\u62E9 owner",style:{minWidth:"6rem"},options:H})}),(0,e.jsx)("a",{className:c.selfTrigger,onClick:Y,children:"\u53EA\u770B\u81EA\u5DF1\u7684"})]}),(0,e.jsx)($,{title:"\u5176\u5B83\u9009\u9879",grid:!0,last:!0,children:(0,e.jsxs)(ye.Z,{gutter:16,children:[(0,e.jsx)(te.Z,{xl:8,lg:10,md:12,sm:24,xs:24,children:(0,e.jsx)(P,r()(r()({},b),{},{label:"\u6D3B\u8DC3\u7528\u6237",name:"user",children:(0,e.jsx)(V.default,{placeholder:"\u4E0D\u9650",style:{maxWidth:200,width:"100%"},options:[{label:"\u674E\u4E09",value:"lisa"}]})}))}),(0,e.jsx)(te.Z,{xl:8,lg:10,md:12,sm:24,xs:24,children:(0,e.jsx)(P,r()(r()({},b),{},{label:"\u597D\u8BC4\u5EA6",name:"rate",children:(0,e.jsx)(V.default,{placeholder:"\u4E0D\u9650",style:{maxWidth:200,width:"100%"},options:[{label:"\u4F18\u79C0",value:"good"}]})}))})]})})]})}),(0,e.jsx)(ee.Z,{style:{marginTop:24},bordered:!1,bodyStyle:{padding:"8px 32px 32px 32px"},children:(0,e.jsx)(K.Z,{size:"large",loading:S,rowKey:"id",itemLayout:"vertical",loadMore:X,dataSource:D,renderItem:function(g){return(0,e.jsxs)(K.Z.Item,{actions:[(0,e.jsx)(L,{type:"star-o",text:g.star},"star"),(0,e.jsx)(L,{type:"like-o",text:g.like},"like"),(0,e.jsx)(L,{type:"message",text:g.message},"message")],extra:(0,e.jsx)("div",{className:c.listItemExtra}),children:[(0,e.jsx)(K.Z.Item.Meta,{title:(0,e.jsx)("a",{className:c.listItemMetaTitle,href:g.href,children:g.title}),description:(0,e.jsxs)("span",{children:[(0,e.jsx)(w.Z,{children:"Ant Design"}),(0,e.jsx)(w.Z,{children:"\u8BBE\u8BA1\u8BED\u8A00"}),(0,e.jsx)(w.Z,{children:"\u8682\u8681\u91D1\u670D"})]})}),(0,e.jsx)(Le,{data:g})]},g.id)}})})]})},Qe=Je}}]);