mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
1 line
4.5 KiB
JavaScript
1 line
4.5 KiB
JavaScript
(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["289be8f6"],{"289be8f6":function(e,t,l){"use strict";l.d(t,"__esModule",{value:!0}),l.d(t,"default",{enumerable:!0,get:function(){return m;}});var n=l("777fffbe"),r=l("852bbaa9"),a=l("f19d2b93");l("ca48c88c");var s=r._(l("5b220c3d")),i=l("e22febe0"),o=l("a9d1a279"),c=n._(l("c8164e25")),d=n._(l("e15e14cb")),u=n._(l("072ab8a9"));l("2a5e301e"),u.default.locale("en");let{Option:p}=o.Select,{RangePicker:h}=o.DatePicker,f=[{title:"Name",dataIndex:"name",filters:[{text:"filter1",value:"filter1"}]},{title:"Age",dataIndex:"age"}],j=()=>{let{token:e}=o.theme.useToken(),[t,l]=(0,s.useState)(!1),[n,r]=(0,s.useState)(!1),c=s.default.useRef([]),d=[{title:"Upload File",description:"Put your files here.",target:()=>c.current[0]},{title:"Save",description:"Save your changes.",target:()=>c.current[1]},{title:"Other Actions",description:"Click to see other actions.",target:()=>c.current[2]}];return(0,a.jsxs)(o.Space,{direction:"vertical",size:[0,16],style:{width:"100%",paddingTop:16,borderTop:`1px solid ${e.colorBorder}`},children:[(0,a.jsx)(o.Pagination,{defaultCurrent:1,total:50,showSizeChanger:!0}),(0,a.jsxs)(o.Space,{wrap:!0,children:[(0,a.jsxs)(o.Select,{showSearch:!0,style:{width:200},children:[(0,a.jsx)(p,{value:"jack",children:"jack"}),(0,a.jsx)(p,{value:"lucy",children:"lucy"})]}),(0,a.jsx)(o.DatePicker,{}),(0,a.jsx)(o.TimePicker,{}),(0,a.jsx)(h,{})]}),(0,a.jsxs)(o.Space,{wrap:!0,children:[(0,a.jsx)(o.Button,{type:"primary",onClick:()=>{l(!0);},children:"Show Modal"}),(0,a.jsx)(o.Button,{onClick:()=>{o.Modal.info({title:"some info",content:"some info"});},children:"Show info"}),(0,a.jsx)(o.Button,{onClick:()=>{o.Modal.confirm({title:"some info",content:"some info"});},children:"Show confirm"}),(0,a.jsx)(o.Popconfirm,{title:"Question?",children:(0,a.jsx)("a",{href:"#",children:"Click to confirm"})})]}),(0,a.jsx)(o.Transfer,{dataSource:[],showSearch:!0,targetKeys:[]}),(0,a.jsx)("div",{style:{width:320,border:`1px solid ${e.colorBorder}`,borderRadius:8},children:(0,a.jsx)(o.Calendar,{fullscreen:!1,value:(0,u.default)()})}),(0,a.jsxs)(o.Form,{name:"basic",autoComplete:"off",labelCol:{sm:{span:4}},wrapperCol:{span:6},children:[(0,a.jsx)(o.Form.Item,{label:"Username",name:"username",rules:[{required:!0}],children:(0,a.jsx)(o.Input,{width:200})}),(0,a.jsx)(o.Form.Item,{label:"Age",name:"age",rules:[{type:"number",min:0,max:99}],initialValue:100,children:(0,a.jsx)(o.InputNumber,{width:200})}),(0,a.jsx)(o.Form.Item,{wrapperCol:{offset:2,span:6},children:(0,a.jsx)(o.Button,{type:"primary",htmlType:"submit",children:"Submit"})})]}),(0,a.jsx)(o.Table,{dataSource:[],columns:f}),(0,a.jsx)(o.Modal,{title:"Locale Modal",open:t,onCancel:()=>{l(!1);},children:(0,a.jsx)("p",{children:"Locale Modal"})}),(0,a.jsxs)(o.Space,{wrap:!0,size:80,children:[(0,a.jsx)(o.QRCode,{value:"https://ant.design/",status:"expired",onRefresh:()=>console.log("refresh")}),(0,a.jsx)(o.Image,{width:160,src:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"})]}),(0,a.jsx)(o.Upload,{listType:"picture-card",fileList:[{uid:"-1",name:"image.png",status:"done",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"-2",percent:50,name:"image.png",status:"uploading",url:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"},{uid:"-3",name:"image.png",status:"error"}]}),(0,a.jsx)(o.Divider,{orientation:"left",children:"Tour"}),(0,a.jsx)(o.Button,{type:"primary",onClick:()=>r(!0),children:"Begin Tour"}),(0,a.jsxs)(o.Space,{children:[(0,a.jsx)(o.Button,{ref:e=>e&&c.current.splice(0,0,e),children:" Upload"}),(0,a.jsx)(o.Button,{ref:e=>e&&c.current.splice(1,0,e),type:"primary",children:"Save"}),(0,a.jsx)(o.Button,{ref:e=>e&&c.current.splice(2,0,e),icon:(0,a.jsx)(i.EllipsisOutlined,{})})]}),(0,a.jsx)(o.Tour,{open:n,steps:d,onClose:()=>r(!1)})]});};var m=()=>{let[e,t]=(0,s.useState)(c.default);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{marginBottom:16},children:[(0,a.jsx)("span",{style:{marginInlineEnd:16},children:"Change locale of components:"}),(0,a.jsxs)(o.Radio.Group,{value:e,onChange:e=>{let l=e.target.value;t(l),l?u.default.locale("zh-cn"):u.default.locale("en");},children:[(0,a.jsx)(o.Radio.Button,{value:c.default,children:"English"},"en"),(0,a.jsx)(o.Radio.Button,{value:d.default,children:"\u4E2D\u6587"},"cn")]})]}),(0,a.jsx)(o.ConfigProvider,{locale:e,children:(0,a.jsx)(j,{})})]});};}}]); |