mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
1 line
1.1 KiB
JavaScript
1 line
1.1 KiB
JavaScript
(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["1a90eb1e"],{"1a90eb1e":function(e,t,l){"use strict";l.d(t,"__esModule",{value:!0}),l.d(t,"default",{enumerable:!0,get:function(){return d;}});var n=l("f19d2b93");l("35be718c");var a=l("5b220c3d"),o=l("a9d1a279");let r=(e,t=0)=>Math.floor(Math.random()*(e-t+1))+t,s=e=>Array(r(5)).join(".").split(".").map((t,l)=>{let a=`${e}${l}`;return{value:a,label:(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,n.jsxs)("span",{children:["Found ",e," on"," ",(0,n.jsx)("a",{href:`https://s.taobao.com/search?q=${e}`,target:"_blank",rel:"noopener noreferrer",children:a})]}),(0,n.jsxs)("span",{children:[r(200,100)," results"]})]})};});var d=()=>{let[e,t]=(0,a.useState)([]);return(0,n.jsx)(o.AutoComplete,{popupMatchSelectWidth:252,style:{width:300},options:e,onSelect:e=>{console.log("onSelect",e);},onSearch:e=>{t(e?s(e):[]);},size:"large",children:(0,n.jsx)(o.Input.Search,{size:"large",placeholder:"input here",enterButton:!0})});};}}]); |