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
12 KiB
1 lines
12 KiB
(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,76820,245538,e=>{"use strict";var t=e.i(84443).Col;e.s(["Col",()=>t],76820);var l=e.i(247699).Row;e.s(["Row",()=>l],245538)},100264,e=>{"use strict";var t=e.i(191788),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},i=e.i(117716);function r(){return(r=Object.assign.bind()).apply(this,arguments)}let n=t.forwardRef((e,n)=>t.createElement(i.default,r({},e,{ref:n,icon:l})));e.s(["default",()=>n],100264)},184897,e=>{"use strict";let t=Array.from({length:12}).map((e,t)=>({value:`cat${t+1}`,label:`类目${t+1}`}));e.s(["categoryOptions",0,t])},198968,e=>{"use strict";var t=e.i(191788),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},i=e.i(117716);function r(){return(r=Object.assign.bind()).apply(this,arguments)}let n=t.forwardRef((e,n)=>t.createElement(i.default,r({},e,{ref:n,icon:l})));e.s(["default",()=>n],198968)},265992,e=>{"use strict";var t=e.i(100264);e.s(["EditOutlined",()=>t.default])},400056,e=>{"use strict";let t=new Intl.NumberFormat("en-US"),l=e=>{let l=Number(e);return Number.isFinite(l)?t.format(l):""};e.s(["formatNumber",0,l,"formatYuan",0,e=>`\xa5 ${l(e)}`])},569792,e=>{"use strict";var t=e.i(391398),l=e.i(770042),i=e.i(265992),r=e.i(995746),n=e.i(241818),o=e.i(82275),a=e.i(397591),s=e.i(946077),d=e.i(76820),c=e.i(807073),u=e.i(882474),h=e.i(326440),f=e.i(245538),m=e.i(847942),p=e.i(3287);e.i(191788);var g=e.i(157413),v=e.i(400056),x=e.i(184897),b=e.i(535898);async function j(e){return(0,b.request)("/api/fake_list",{params:e})}let w=(0,e.i(827830).createStyles)(({token:e})=>({filterCardList:{".ant-card-meta-content":{marginTop:"0"},".ant-card-meta-avatar":{fontSize:"0"},".ant-list .ant-list-item-content-single":{maxWidth:"100%"}},cardInfo:{marginTop:"16px",marginLeft:"40px",zoom:"1","&::before, &::after":{display:"table",content:"' '"},"&::after":{clear:"both",height:"0",fontSize:"0",visibility:"hidden"},"& > div":{position:"relative",float:"left",width:"50%",textAlign:"left",p:{margin:"0",fontSize:"24px",lineHeight:"32px"},"p:first-child":{marginBottom:"4px",color:e.colorTextSecondary,fontSize:"12px",lineHeight:"20px"}}}}));function y(e){let l=+e;if(!l||Number.isNaN(l))return"";let i=e;return e>1e4&&(i=(0,t.jsxs)("span",{children:[Math.floor(e/1e4),(0,t.jsx)("span",{style:{position:"relative",top:-2,fontSize:14,fontStyle:"normal",marginLeft:2},children:"万"})]})),i}let M={wrapperCol:{xs:{span:24},sm:{span:16}}},S=({activeUser:e,newUser:l})=>{let{styles:i}=w();return(0,t.jsxs)("div",{className:i.cardInfo,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"活跃用户"}),(0,t.jsx)("p",{children:e})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"新增用户"}),(0,t.jsx)("p",{children:l})]})]})},F=()=>{let{styles:e}=w(),{data:b,isLoading:F,refetch:C}=(0,o.useQuery)({queryKey:["search-applications"],queryFn:()=>j({count:8}).then(e=>e.data)}),N=b?.list||[];return(0,t.jsxs)("div",{className:e.filterCardList,children:[(0,t.jsx)(s.Card,{variant:"borderless",children:(0,t.jsxs)(u.Form,{onValuesChange:(e,t)=>{console.log("form data",t),C()},children:[(0,t.jsx)(g.StandardFormRow,{title:"所属类目",block:!0,style:{paddingBottom:11},children:(0,t.jsx)(u.Form.Item,{name:"category",children:(0,t.jsx)(g.TagSelect,{expandable:!0,children:x.categoryOptions.filter(e=>void 0!==e.value&&null!==e.value).map(e=>(0,t.jsx)(g.TagSelect.Option,{value:e.value,children:e.label},e.value))})})}),(0,t.jsx)(g.StandardFormRow,{title:"其它选项",grid:!0,last:!0,children:(0,t.jsxs)(f.Row,{gutter:16,children:[(0,t.jsx)(d.Col,{lg:8,md:10,sm:10,xs:24,children:(0,t.jsx)(u.Form.Item,{...M,name:"author",label:"作者",children:(0,t.jsx)(m.Select,{placeholder:"不限",style:{maxWidth:200,width:"100%"},options:[{label:"王昭君",value:"lisa"}]})})}),(0,t.jsx)(d.Col,{lg:8,md:10,sm:10,xs:24,children:(0,t.jsx)(u.Form.Item,{...M,name:"rate",label:"好评度",children:(0,t.jsx)(m.Select,{placeholder:"不限",style:{maxWidth:200,width:"100%"},options:[{label:"优秀",value:"good"},{label:"普通",value:"normal"}]})})})]})})]})}),(0,t.jsx)("br",{}),(0,t.jsx)(h.List,{rowKey:"id",grid:{gutter:16,xs:1,sm:2,md:3,lg:3,xl:4,xxl:4},loading:F,dataSource:N,renderItem:e=>(0,t.jsx)(h.List.Item,{children:(0,t.jsxs)(s.Card,{hoverable:!0,styles:{body:{paddingBottom:20}},actions:[(0,t.jsx)(p.Tooltip,{title:"下载",children:(0,t.jsx)(l.DownloadOutlined,{})},"download"),(0,t.jsx)(p.Tooltip,{title:"编辑",children:(0,t.jsx)(i.EditOutlined,{})},"edit"),(0,t.jsx)(p.Tooltip,{title:"分享",children:(0,t.jsx)(n.ShareAltOutlined,{})},"share"),(0,t.jsx)(c.Dropdown,{menu:{items:[{key:"1",title:"1st menu item"},{key:"2",title:"2st menu item"}]},children:(0,t.jsx)(r.EllipsisOutlined,{})},"ellipsis")],children:[(0,t.jsx)(s.Card.Meta,{avatar:(0,t.jsx)(a.Avatar,{size:"small",src:e.avatar}),title:e.title}),(0,t.jsx)("div",{children:(0,t.jsx)(S,{activeUser:y(e.activeUser),newUser:(0,v.formatNumber)(e.newUser)})})]})},e.id)})]})};e.s(["Applications",0,F,"default",()=>F,"formatWan",0,y],569792)},749344,236107,e=>{"use strict";var t=e.i(191788),l=e.i(316419),i=e.i(938667);let r=e=>"object"==typeof e&&null!=e&&1===e.nodeType,n=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,o=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let l,i=getComputedStyle(e,null);return n(i.overflowY,t)||n(i.overflowX,t)||!!(l=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(l.clientHeight<e.scrollHeight||l.clientWidth<e.scrollWidth)}return!1},a=(e,t,l,i,r,n,o,a)=>n<e&&o>t||n>e&&o<t?0:n<=e&&a<=l||o>=t&&a>=l?n-e-i:o>t&&a<l||n<e&&a>l?o-t+r:0,s=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t},d=(e,t)=>{var l,i,n,d;let c;if("u"<typeof document)return[];let{scrollMode:u,block:h,inline:f,boundary:m,skipOverflowHiddenElements:p}=t,g="function"==typeof m?m:e=>e!==m;if(!r(e))throw TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,x=[],b=e;for(;r(b)&&g(b);){if((b=s(b))===v){x.push(b);break}null!=b&&b===document.body&&o(b)&&!o(document.documentElement)||null!=b&&o(b,p)&&x.push(b)}let j=null!=(i=null==(l=window.visualViewport)?void 0:l.width)?i:innerWidth,w=null!=(d=null==(n=window.visualViewport)?void 0:n.height)?d:innerHeight,{scrollX:y,scrollY:M}=window,{height:S,width:F,top:C,right:N,bottom:I,left:W}=e.getBoundingClientRect(),{top:_,right:L,bottom:R,left:T}={top:parseFloat((c=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(c.scrollMarginRight)||0,bottom:parseFloat(c.scrollMarginBottom)||0,left:parseFloat(c.scrollMarginLeft)||0},H="start"===h||"nearest"===h?C-_:"end"===h?I+R:C+S/2-_+R,O="center"===f?W+F/2-T+L:"end"===f?N+L:W-T,E=[];for(let e=0;e<x.length;e++){let t=x[e],{height:l,width:i,top:r,right:n,bottom:s,left:d}=t.getBoundingClientRect();if("if-needed"===u&&C>=0&&W>=0&&I<=w&&N<=j&&(t===v&&!o(t)||C>=r&&I<=s&&W>=d&&N<=n))break;let c=getComputedStyle(t),m=parseInt(c.borderLeftWidth,10),p=parseInt(c.borderTopWidth,10),g=parseInt(c.borderRightWidth,10),b=parseInt(c.borderBottomWidth,10),_=0,L=0,R="offsetWidth"in t?t.offsetWidth-t.clientWidth-m-g:0,T="offsetHeight"in t?t.offsetHeight-t.clientHeight-p-b:0,z="offsetWidth"in t?0===t.offsetWidth?0:i/t.offsetWidth:0,k="offsetHeight"in t?0===t.offsetHeight?0:l/t.offsetHeight:0;if(v===t)_="start"===h?H:"end"===h?H-w:"nearest"===h?a(M,M+w,w,p,b,M+H,M+H+S,S):H-w/2,L="start"===f?O:"center"===f?O-j/2:"end"===f?O-j:a(y,y+j,j,m,g,y+O,y+O+F,F),_=Math.max(0,_+M),L=Math.max(0,L+y);else{_="start"===h?H-r-p:"end"===h?H-s+b+T:"nearest"===h?a(r,s,l,p,b+T,H,H+S,S):H-(r+l/2)+T/2,L="start"===f?O-d-m:"center"===f?O-(d+i/2)+R/2:"end"===f?O-n+g+R:a(d,n,i,m,g+R,O,O+F,F);let{scrollLeft:e,scrollTop:o}=t;_=0===k?0:Math.max(0,Math.min(o+_/k,t.scrollHeight-l/k+T)),L=0===z?0:Math.max(0,Math.min(e+L/z,t.scrollWidth-i/z+R)),H+=o-_,O+=e-L}E.push({el:t,top:_,left:L})}return E},c=["parentNode"];function u(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function h(e,t){if(!e.length)return;let l=e.join("_");return t?`${t}_${l}`:c.includes(l)?`form_item_${l}`:l}function f(e){return u(e).join("_")}function m(e,t){let l=t.getFieldInstance(e),r=(0,i.getDOM)(l);if(r)return r;let n=h(u(e),t.__INTERNAL__.name);if(n)return document.getElementById(n)}e.s(["getFieldId",0,h,"getStatus",0,function(e,t,l,i,r,n){let o=i;return void 0!==n?o=n:l.validating?o="validating":e.length?o="error":t.length?o="warning":(l.touched||r&&l.validated)&&(o="success"),o},"toArray",0,u],236107),e.s(["default",0,function(e){let[i]=(0,l.useForm)(),r=t.useRef({}),n=t.useMemo(()=>e??{...i,__INTERNAL__:{itemRef:e=>t=>{let l=f(e);t?r.current[l]=t:delete r.current[l]}},scrollToField:(e,t={})=>{let{focus:l,...i}=t,r=m(e,n);r&&(!function(e,t){let l;if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;let i={top:parseFloat((l=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(l.scrollMarginRight)||0,bottom:parseFloat(l.scrollMarginBottom)||0,left:parseFloat(l.scrollMarginLeft)||0};if("object"==typeof t&&"function"==typeof t.behavior)return t.behavior(d(e,t));let r="boolean"==typeof t||null==t?void 0:t.behavior;for(let{el:l,top:n,left:o}of d(e,!1===t?{block:"end",inline:"nearest"}:t===Object(t)&&0!==Object.keys(t).length?t:{block:"start",inline:"nearest"})){let e=n-i.top+i.bottom,t=o-i.left+i.right;l.scroll({top:e,left:t,behavior:r})}}(r,{scrollMode:"if-needed",block:"nearest",...i}),l&&n.focusField(e))},focusField:e=>{let t=n.getFieldInstance(e);"function"==typeof t?.focus?t.focus():m(e,n)?.focus?.()},getFieldInstance:e=>{let t=f(e);return r.current[t]}},[e,i]);return[n]},"toNamePathStr",0,f],749344)},770042,241818,e=>{"use strict";var t=e.i(198968);e.s(["DownloadOutlined",()=>t.default],770042);var l=e.i(191788),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 000-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"}}]},name:"share-alt",theme:"outlined"},r=e.i(117716);function n(){return(n=Object.assign.bind()).apply(this,arguments)}let o=l.forwardRef((e,t)=>l.createElement(r.default,n({},e,{ref:t,icon:i})));e.s(["ShareAltOutlined",()=>o],241818)},995746,e=>{"use strict";var t=e.i(436612);e.s(["EllipsisOutlined",()=>t.default])}]);
|