mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["9dd52b99"],{"4833e5f1":function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return x;}});var a=i("777fffbe"),r=i("852bbaa9"),n=i("f19d2b93"),s=r._(i("5b220c3d"));i("892aecc9");var l=a._(i("1164364c")),d=a._(i("23546486")),o=i("a9d1a279"),c=i("e22febe0");let u={cn:{extra:"\u8BBE\u7F6E\u989D\u5916\u5185\u5BB9",actions:"\u8BBE\u7F6E\u5217\u8868\u64CD\u4F5C\u7EC4"},en:{extra:"set `extra` of List.Item",actions:"set `actions` of List.Item"}},h=({icon:e,text:t})=>(0,n.jsxs)(o.Space,{children:[s.default.createElement(e),t]}),g=Array.from({length:1}).map((e,t)=>({href:"https://ant.design",title:`ant design part ${t}`,avatar:`https://api.dicebear.com/7.x/miniavs/svg?seed=${t}`,description:"Ant Design, a design language for background applications, is refined by Ant UED Team.",content:"We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently."})),m=e=>{let t=s.default.useRef(null);return(0,n.jsx)("div",{ref:t,style:{position:"absolute",inset:0,height:300},children:(0,n.jsx)(o.List,{itemLayout:"vertical",size:"large",dataSource:g,renderItem:t=>(0,s.createElement)(o.List.Item,{...e,key:t.title,actions:[(0,n.jsx)(h,{icon:c.StarOutlined,text:"156"},"list-vertical-star-o"),(0,n.jsx)(h,{icon:c.LikeOutlined,text:"156"},"list-vertical-like-o"),(0,n.jsx)(h,{icon:c.MessageOutlined,text:"2"},"list-vertical-message")],extra:(0,n.jsx)("img",{width:272,alt:"logo",src:"https://gw.alipayobjects.com/zos/rmsportal/mqaQswcyDLcXyDKnZfES.png"}),children:[(0,n.jsx)(o.List.Item.Meta,{avatar:(0,n.jsx)(o.Avatar,{src:t.avatar}),title:(0,n.jsx)("a",{href:t.href,children:t.title}),description:t.description}),t.content]})})});};var x=()=>{let[e]=(0,d.default)(u);return(0,n.jsx)(l.default,{height:300,semantics:[{name:"extra",desc:e.extra,version:"5.18.0"},{name:"actions",desc:e.actions,version:"5.18.0"}],children:(0,n.jsx)(m,{})});};},"4bbce25c":function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return l;}});var a=i("f19d2b93");i("5f8855a4");var r=i("a9d1a279");let n=[{title:"Title 1"},{title:"Title 2"},{title:"Title 3"},{title:"Title 4"},{title:"Title 5"},{title:"Title 6"}],s=()=>(0,a.jsx)(r.List.Item,{children:(0,a.jsx)(r.Card,{title:"title",children:"Card content"})});var l=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.List,{grid:{gutter:16,column:4},dataSource:n,renderItem:e=>(0,a.jsx)(r.List.Item,{children:(0,a.jsx)(r.Card,{title:e.title,children:"Card content"})})}),(0,a.jsx)(r.List,{grid:{gutter:16,column:4},dataSource:n,renderItem:()=>(0,a.jsx)(s,{})}),(0,a.jsx)(r.List,{grid:{gutter:16,column:4},dataSource:n,renderItem:()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s,{}),(0,a.jsx)("div",{})]})})]});},"60ef0901":function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return s;}});var a=i("f19d2b93");i("a4d7d998");var r=i("a9d1a279");let n=["Racing car sprays burning fuel into crowd.","Japanese princess to wed commoner.","Australian walks 100km after outback crash.","Man charged over missing wedding girl.","Los Angeles battles huge wildfires."];var s=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Divider,{orientation:"left",children:"Default Size"}),(0,a.jsx)(r.List,{header:(0,a.jsx)("div",{children:"Header"}),footer:(0,a.jsx)("div",{children:"Footer"}),bordered:!0,dataSource:n,renderItem:e=>(0,a.jsxs)(r.List.Item,{children:[(0,a.jsx)(r.Typography.Text,{mark:!0,children:"[ITEM]"})," ",e]})}),(0,a.jsx)(r.Divider,{orientation:"left",children:"Small Size"}),(0,a.jsx)(r.List,{size:"small",header:(0,a.jsx)("div",{children:"Header"}),footer:(0,a.jsx)("div",{children:"Footer"}),bordered:!0,dataSource:n,renderItem:e=>(0,a.jsx)(r.List.Item,{children:e})}),(0,a.jsx)(r.Divider,{orientation:"left",children:"Large Size"}),(0,a.jsx)(r.List,{size:"large",header:(0,a.jsx)("div",{children:"Header"}),footer:(0,a.jsx)("div",{children:"Footer"}),bordered:!0,dataSource:n,renderItem:e=>(0,a.jsx)(r.List.Item,{children:e})})]});},"7a86d7dc":function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return s;}});var a=i("f19d2b93");i("23fbea8b");var r=i("a9d1a279");let n=[{title:"Title 1"},{title:"Title 2"},{title:"Title 3"},{title:"Title 4"}];var s=()=>(0,a.jsx)(r.List,{grid:{gutter:16,column:4},dataSource:n,renderItem:e=>(0,a.jsx)(r.List.Item,{children:(0,a.jsx)(r.Card,{title:e.title,children:"Card content"})})});},"96a0331e":function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return s;}});var a=i("f19d2b93");i("68785c49");var r=i("a9d1a279");let n=[{title:"Title 1"},{title:"Title 2"},{title:"Title 3"},{title:"Title 4"},{title:"Title 5"},{title:"Title 6"}];var s=()=>(0,a.jsx)(r.List,{grid:{gutter:16,xs:1,sm:2,md:4,lg:4,xl:6,xxl:3},dataSource:n,renderItem:e=>(0,a.jsx)(r.List.Item,{children:(0,a.jsx)(r.Card,{title:e.title,children:"Card content"})})});},b16a2627:function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return l;}});var a=i("f19d2b93");i("45a0b748");var r=i("a9d1a279");let n=["Racing car sprays burning fuel into crowd.","Japanese princess to wed commoner.","Australian walks 100km after outback crash.","Man charged over missing wedding girl.","Los Angeles battles huge wildfires."],s=[{title:"Ant Design Title 1"},{title:"Ant Design Title 2"},{title:"Ant Design Title 3"},{title:"Ant Design Title 4"}];var l=()=>(0,a.jsxs)(r.ConfigProvider,{theme:{components:{List:{headerBg:"pink",footerBg:"pink",emptyTextPadding:32,itemPadding:"26px",itemPaddingSM:"16px",itemPaddingLG:"36px",metaMarginBottom:20,avatarMarginRight:20,titleMarginBottom:10,descriptionFontSize:20}}},children:[(0,a.jsx)(r.Divider,{orientation:"left",children:"Default Size"}),(0,a.jsx)(r.List,{header:(0,a.jsx)("div",{children:"Header"}),footer:(0,a.jsx)("div",{children:"Footer"}),bordered:!0,dataSource:n,renderItem:e=>(0,a.jsxs)(r.List.Item,{children:[(0,a.jsx)(r.Typography.Text,{mark:!0,children:"[ITEM]"})," ",e]})}),(0,a.jsx)(r.Divider,{orientation:"left",children:"Small Size"}),(0,a.jsx)(r.List,{size:"small",header:(0,a.jsx)("div",{children:"Header"}),footer:(0,a.jsx)("div",{children:"Footer"}),bordered:!0,dataSource:n,renderItem:e=>(0,a.jsx)(r.List.Item,{children:e})}),(0,a.jsx)(r.Divider,{orientation:"left",children:"Large Size"}),(0,a.jsx)(r.List,{size:"large",header:(0,a.jsx)("div",{children:"Header"}),footer:(0,a.jsx)("div",{children:"Footer"}),bordered:!0,dataSource:n,renderItem:e=>(0,a.jsx)(r.List.Item,{children:e})}),(0,a.jsx)(r.Divider,{orientation:"left",children:"Meta"}),(0,a.jsx)(r.List,{itemLayout:"horizontal",dataSource:s,renderItem:(e,t)=>(0,a.jsx)(r.List.Item,{children:(0,a.jsx)(r.List.Item.Meta,{avatar:(0,a.jsx)(r.Avatar,{src:`https://api.dicebear.com/7.x/miniavs/svg?seed=${t}`}),title:(0,a.jsx)("a",{href:"https://ant.design",children:e.title}),description:"Ant Design, a design language for background applications, is refined by Ant UED Team"})})}),(0,a.jsx)(r.Divider,{orientation:"left",children:"Vertical"}),(0,a.jsx)(r.List,{itemLayout:"vertical",dataSource:s,renderItem:(e,t)=>(0,a.jsx)(r.List.Item,{children:(0,a.jsx)(r.List.Item.Meta,{avatar:(0,a.jsx)(r.Avatar,{src:`https://api.dicebear.com/7.x/miniavs/svg?seed=${t}`}),title:(0,a.jsx)("a",{href:"https://ant.design",children:e.title}),description:"Ant Design, a design language for background applications, is refined by Ant UED Team"})})}),(0,a.jsx)(r.Divider,{orientation:"left",children:"Empty Text"}),(0,a.jsx)(r.List,{})]});},d9afabc1:function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return c;}});var a=i("777fffbe"),r=i("f19d2b93");i("fc885f45");var n=a._(i("5b220c3d")),s=i("e22febe0"),l=i("a9d1a279");let d=Array.from({length:23}).map((e,t)=>({href:"https://ant.design",title:`ant design part ${t}`,avatar:`https://api.dicebear.com/7.x/miniavs/svg?seed=${t}`,description:"Ant Design, a design language for background applications, is refined by Ant UED Team.",content:"We supply a series of design principles, practical patterns and high quality design resources (Sketch and Axure), to help people create their product prototypes beautifully and efficiently."})),o=({icon:e,text:t})=>(0,r.jsxs)(l.Space,{children:[n.default.createElement(e),t]});var c=()=>(0,r.jsx)(l.List,{itemLayout:"vertical",size:"large",pagination:{onChange:e=>{console.log(e);},pageSize:3},dataSource:d,footer:(0,r.jsxs)("div",{children:[(0,r.jsx)("b",{children:"ant design"})," footer part"]}),renderItem:e=>(0,r.jsxs)(l.List.Item,{actions:[(0,r.jsx)(o,{icon:s.StarOutlined,text:"156"},"list-vertical-star-o"),(0,r.jsx)(o,{icon:s.LikeOutlined,text:"156"},"list-vertical-like-o"),(0,r.jsx)(o,{icon:s.MessageOutlined,text:"2"},"list-vertical-message")],extra:(0,r.jsx)("img",{width:272,alt:"logo",src:"https://gw.alipayobjects.com/zos/rmsportal/mqaQswcyDLcXyDKnZfES.png"}),children:[(0,r.jsx)(l.List.Item.Meta,{avatar:(0,r.jsx)(l.Avatar,{src:e.avatar}),title:(0,r.jsx)("a",{href:e.href,children:e.title}),description:e.description}),e.content]},e.title)});},dd0c159b:function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return o;}});var a=i("f19d2b93");i("710d5289");var r=i("5b220c3d"),n=i("a9d1a279");let s=[{title:"Ant Design Title 1"},{title:"Ant Design Title 2"},{title:"Ant Design Title 3"},{title:"Ant Design Title 4"}],l=["top","bottom","both"],d=["start","center","end"];var o=()=>{let[e,t]=(0,r.useState)("bottom"),[i,o]=(0,r.useState)("center");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Space,{direction:"vertical",style:{marginBottom:"20px"},size:"middle",children:[(0,a.jsxs)(n.Space,{children:[(0,a.jsx)("span",{children:"Pagination Position:"}),(0,a.jsx)(n.Radio.Group,{optionType:"button",value:e,onChange:e=>{t(e.target.value);},children:l.map(e=>(0,a.jsx)(n.Radio.Button,{value:e,children:e},e))})]}),(0,a.jsxs)(n.Space,{children:[(0,a.jsx)("span",{children:"Pagination Align:"}),(0,a.jsx)(n.Radio.Group,{optionType:"button",value:i,onChange:e=>{o(e.target.value);},children:d.map(e=>(0,a.jsx)(n.Radio.Button,{value:e,children:e},e))})]})]}),(0,a.jsx)(n.List,{pagination:{position:e,align:i},dataSource:s,renderItem:(e,t)=>(0,a.jsx)(n.List.Item,{children:(0,a.jsx)(n.List.Item.Meta,{avatar:(0,a.jsx)(n.Avatar,{src:`https://api.dicebear.com/7.x/miniavs/svg?seed=${t}`}),title:(0,a.jsx)("a",{href:"https://ant.design",children:e.title}),description:"Ant Design, a design language for background applications, is refined by Ant UED Team"})})})]});};},debbef8d:function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return d;}});var a=i("777fffbe"),r=i("f19d2b93");i("b4643e1b");var n=i("5b220c3d"),s=i("a9d1a279"),l=a._(i("2fa25a63")),d=()=>{let[e,t]=(0,n.useState)([]),i=(i=!0)=>{fetch("https://randomuser.me/api/?results=20&inc=name,gender,email,nat,picture&noinfo").then(e=>e.json()).then(a=>{t(e.concat(a.results)),i&&s.message.success(`${a.results.length} more items loaded!`);});};return(0,n.useEffect)(()=>{i(!1);},[]),(0,r.jsx)(s.List,{children:(0,r.jsx)(l.default,{data:e,height:400,itemHeight:47,itemKey:"email",onScroll:e=>{1>=Math.abs(e.currentTarget.scrollHeight-e.currentTarget.scrollTop-400)&&i();},children:e=>(0,r.jsxs)(s.List.Item,{children:[(0,r.jsx)(s.List.Item.Meta,{avatar:(0,r.jsx)(s.Avatar,{src:e.picture.large}),title:(0,r.jsx)("a",{href:"https://ant.design",children:e.name.last}),description:e.email}),(0,r.jsx)("div",{children:"Content"})]},e.email)})});};},eba84af0:function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return d;}});var a=i("777fffbe"),r=i("f19d2b93");i("a651d3dd");var n=i("5b220c3d"),s=i("a9d1a279"),l=a._(i("401cc1f3")),d=()=>{let[e,t]=(0,n.useState)(!1),[i,a]=(0,n.useState)([]),d=()=>{e||(t(!0),fetch("https://randomuser.me/api/?results=10&inc=name,gender,email,nat,picture&noinfo").then(e=>e.json()).then(e=>{a([...i,...e.results]),t(!1);}).catch(()=>{t(!1);}));};return(0,n.useEffect)(()=>{d();},[]),(0,r.jsx)("div",{id:"scrollableDiv",style:{height:400,overflow:"auto",padding:"0 16px",border:"1px solid rgba(140, 140, 140, 0.35)"},children:(0,r.jsx)(l.default,{dataLength:i.length,next:d,hasMore:i.length<50,loader:(0,r.jsx)(s.Skeleton,{avatar:!0,paragraph:{rows:1},active:!0}),endMessage:(0,r.jsx)(s.Divider,{plain:!0,children:"It is all, nothing more \u{1F910}"}),scrollableTarget:"scrollableDiv",children:(0,r.jsx)(s.List,{dataSource:i,renderItem:e=>(0,r.jsxs)(s.List.Item,{children:[(0,r.jsx)(s.List.Item.Meta,{avatar:(0,r.jsx)(s.Avatar,{src:e.picture.large}),title:(0,r.jsx)("a",{href:"https://ant.design",children:e.name.last}),description:e.email}),(0,r.jsx)("div",{children:"Content"})]},e.email)})})});};},f0b3c333:function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return s;}});var a=i("f19d2b93");i("57fa1310");var r=i("a9d1a279");let n=[{title:"Ant Design Title 1"},{title:"Ant Design Title 2"},{title:"Ant Design Title 3"},{title:"Ant Design Title 4"}];var s=()=>(0,a.jsx)(r.List,{itemLayout:"horizontal",dataSource:n,renderItem:(e,t)=>(0,a.jsx)(r.List.Item,{children:(0,a.jsx)(r.List.Item.Meta,{avatar:(0,a.jsx)(r.Avatar,{src:`https://api.dicebear.com/7.x/miniavs/svg?seed=${t}`}),title:(0,a.jsx)("a",{href:"https://ant.design",children:e.title}),description:"Ant Design, a design language for background applications, is refined by Ant UED Team"})})});},ff6d2a90:function(e,t,i){"use strict";i.d(t,"__esModule",{value:!0}),i.d(t,"default",{enumerable:!0,get:function(){return l;}});var a=i("f19d2b93");i("8eb76012");var r=i("5b220c3d"),n=i("a9d1a279");let s="https://randomuser.me/api/?results=3&inc=name,gender,email,nat,picture&noinfo";var l=()=>{let[e,t]=(0,r.useState)(!0),[i,l]=(0,r.useState)(!1),[d,o]=(0,r.useState)([]),[c,u]=(0,r.useState)([]);(0,r.useEffect)(()=>{fetch(s).then(e=>e.json()).then(e=>{t(!1),o(e.results),u(e.results);});},[]);let h=e||i?null:(0,a.jsx)("div",{style:{textAlign:"center",marginTop:12,height:32,lineHeight:"32px"},children:(0,a.jsx)(n.Button,{onClick:()=>{l(!0),u(d.concat([void 0,void 0,void 0].map(()=>({loading:!0,name:{},picture:{}})))),fetch(s).then(e=>e.json()).then(e=>{let t=d.concat(e.results);o(t),u(t),l(!1),window.dispatchEvent(new Event("resize"));});},children:"loading more"})});return(0,a.jsx)(n.List,{className:"demo-loadmore-list",loading:e,itemLayout:"horizontal",loadMore:h,dataSource:c,renderItem:e=>{var t;return(0,a.jsx)(n.List.Item,{actions:[(0,a.jsx)("a",{children:"edit"},"list-loadmore-edit"),(0,a.jsx)("a",{children:"more"},"list-loadmore-more")],children:(0,a.jsxs)(n.Skeleton,{avatar:!0,title:!1,loading:e.loading,active:!0,children:[(0,a.jsx)(n.List.Item.Meta,{avatar:(0,a.jsx)(n.Avatar,{src:e.picture.large}),title:(0,a.jsx)("a",{href:"https://ant.design",children:null===(t=e.name)||void 0===t?void 0:t.last}),description:"Ant Design, a design language for background applications, is refined by Ant UED Team"}),(0,a.jsx)("div",{children:"content"})]})});}});};}}]); |