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
20 KiB
1 lines
20 KiB
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[190],{40110:function(k,R,t){var v=t(1413),C=t(67294),B=t(509),f=t(91146),U=function(T,c){return C.createElement(f.Z,(0,v.Z)((0,v.Z)({},T),{},{ref:c,icon:B.Z}))},S=C.forwardRef(U);R.Z=S},39829:function(k,R,t){t.r(R),t.d(R,{default:function(){return q}});var v=t(97857),C=t.n(v),B=t(15009),f=t.n(B),U=t(99289),S=t.n(U),y=t(35312);function T(X,Z){return c.apply(this,arguments)}function c(){return c=S()(f()().mark(function X(Z,l){return f()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,y.request)("/api/admin/money/audit",C()({method:"POST",headers:{"Content-Type":"application/json"},data:Z},l||{})));case 1:case"end":return r.stop()}},X)})),c.apply(this,arguments)}function L(X,Z){return A.apply(this,arguments)}function A(){return A=S()(f()().mark(function X(Z,l){return f()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,y.request)("/api/admin/money/list",C()({method:"POST",headers:{"Content-Type":"application/json"},data:Z},l||{})));case 1:case"end":return r.stop()}},X)})),A.apply(this,arguments)}var W=t(58125),M=t(90930),w=t(67539),H=t(66309),K=t(86250),z=t(86738),x=t(14726),b=t(67294),I=t(52043),P=t(42767),g=t(85893),i=function(){var Z=(0,y.useParams)(),l=Z.code,u=(0,b.useRef)();(0,b.useEffect)(function(){var o;(o=u.current)===null||o===void 0||o.reload()},[l]);var r=[{title:"id",dataIndex:"id",valueType:"textarea",copyable:!0,hideInSearch:!0,renderText:function(p,e){return(0,I.m0)(e.createdAt||0)+(0,I.RQ)(e.id||0,6)}},{title:"\u7528\u6237",hideInSearch:!0,dataIndex:"user",valueType:"textarea",width:150,renderText:function(p,e){if(e.user)return(0,g.jsx)(P.Z,{data:e.user})}},{title:"\u91D1\u989D\uFF08\u5143\uFF09",hideInSearch:!0,dataIndex:"cent",valueType:"textarea",renderText:function(p){return(0,W.D)(p)}},{title:"\u652F\u4ED8\u5B9D\u540D\u79F0",dataIndex:"name",hideInSearch:!0},{title:"\u652F\u4ED8\u5B9D\u8D26\u53F7",dataIndex:"aliPayAccount",hideInSearch:!0},{title:"\u8BA2\u5355\u53F7",dataIndex:"orderId",hideInSearch:!0,ellipsis:!0},{title:"\u8F6C\u8D26\u65F6\u95F4",dataIndex:"transDate",hideInSearch:!0},{title:"\u72B6\u6001",dataIndex:"status",hideInSearch:!0,renderText:function(p){var e=(0,I.XY)(),a=e.find(function(n){return n.value===p+""}),s=a?a.label:"\u672A\u77E5";return(0,g.jsx)(H.Z,{color:a==null?void 0:a.color,children:s})}},{title:"\u72B6\u6001",dataIndex:"status",hideInTable:!0,valueType:"select",fieldProps:{options:(0,I.XY)()}},{title:"\u5907\u6CE8",dataIndex:"reason",hideInSearch:!0},{title:"\u7533\u8BF7\u65F6\u95F4",dataIndex:"createdAt",valueType:"dateTime",hideInSearch:!0},{title:"\u64CD\u4F5C",width:100,hideInSearch:!0,renderText:function(p){return(0,g.jsx)(K.Z,{gap:"small",wrap:!0,children:p.status===0&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(z.Z,{title:"\u62D2\u7EDD\u63D0\u73B0\u7533\u8BF7",description:"\u62D2\u7EDD\u540E\uFF0C\u72B6\u6001\u65E0\u6CD5\u4FEE\u6539\u6210\u5BA1\u6279\u901A\u8FC7\uFF0C\u786E\u5B9A\u62D2\u7EDD\u5417?",onConfirm:S()(f()().mark(function e(){var a;return f()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,T({id:p.id,status:-2,reason:""});case 2:(a=u.current)===null||a===void 0||a.reload();case 3:case"end":return n.stop()}},e)})),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,g.jsx)(x.ZP,{children:"\u62D2\u7EDD"})}),(0,g.jsx)(z.Z,{title:"\u901A\u8FC7\u63D0\u73B0\u7533\u8BF7",description:"\u901A\u8FC7\u540E\u7CFB\u7EDF\u5C06\u81EA\u52A8\u8F6C\u8D26\uFF0C\u65E0\u6CD5\u64A4\u56DE\uFF0C\u786E\u5B9A\u901A\u8FC7\u5417?",onConfirm:S()(f()().mark(function e(){var a;return f()().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,T({id:p.id,status:1,reason:""});case 2:(a=u.current)===null||a===void 0||a.reload();case 3:case"end":return n.stop()}},e)})),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,g.jsx)(x.ZP,{type:"primary",children:"\u901A\u8FC7"})})]})})}}];return(0,g.jsx)(M._z,{children:(0,g.jsx)(w.Z,{actionRef:u,request:function(){var o=S()(f()().mark(function p(e){var a,s,n;return f()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,L(C()(C()({},e),{},{appCode:l}));case 2:return n=E.sent,E.abrupt("return",{data:(a=n.data)===null||a===void 0?void 0:a.data,total:(s=n.data)===null||s===void 0?void 0:s.total,success:!0});case 4:case"end":return E.stop()}},p)}));return function(p){return o.apply(this,arguments)}}(),columns:r})})},q=i},42767:function(k,R,t){t.d(R,{Z:function(){return l}});var v=t(5574),C=t.n(v),B=t(55241),f=t(2487),U=t(71230),S=t(7134),y=t(67294),T=t(52043),c=t(58125),L=t(15009),A=t.n(L),W=t(97857),M=t.n(W),w=t(99289),H=t.n(w),K=t(40110),z=t(67539),x=t(55102),b=t(42075),I=t(14726),P=t(17788),g=t(4575),i=t(85893),q=function(r){var o=(0,y.useState)(),p=C()(o,2),e=p[0],a=p[1],s=(0,y.useState)(),n=C()(s,2),d=n[0],E=n[1],D=[{title:"\u5E94\u7528\u540D",dataIndex:"appName",ellipsis:!0,hideInSearch:!0,filterDropdown:function(h){var m=h.setSelectedKeys,V=h.selectedKeys,$=h.confirm,N=h.clearFilters;return(0,i.jsxs)("div",{style:{padding:8},children:[(0,i.jsx)(x.Z,{placeholder:"\u641C\u7D22\u5E94\u7528",value:V[0],onChange:function(j){return m(j.target.value?[j.target.value]:[])},onPressEnter:function(){return $()},style:{marginBottom:8,display:"block"}}),(0,i.jsxs)(b.Z,{children:[(0,i.jsx)(I.ZP,{onClick:function(){return $()},type:"primary",children:"\u641C\u7D22"}),(0,i.jsx)(I.ZP,{onClick:function(){return N&&N()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(h,m){return typeof h=="string"&&typeof(m==null?void 0:m.appName)=="string"?m.appName.includes(h):!1},filterIcon:function(h){return(0,i.jsx)(K.Z,{style:{color:h?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}},{title:"\u5E94\u7528\u5305\u540D",dataIndex:"packageName",hideInSearch:!0,ellipsis:!0,filterDropdown:function(h){var m=h.setSelectedKeys,V=h.selectedKeys,$=h.confirm,N=h.clearFilters;return(0,i.jsxs)("div",{style:{padding:8},children:[(0,i.jsx)(x.Z,{placeholder:"\u641C\u7D22\u5305\u540D",value:V[0],onChange:function(j){return m(j.target.value?[j.target.value]:[])},onPressEnter:function(){return $()},style:{marginBottom:8,display:"block"}}),(0,i.jsxs)(b.Z,{children:[(0,i.jsx)(I.ZP,{onClick:function(){return $()},type:"primary",children:"\u641C\u7D22"}),(0,i.jsx)(I.ZP,{onClick:function(){return N&&N()},type:"link",children:"\u6E05\u9664"})]})]})},onFilter:function(h,m){return typeof h=="string"&&typeof(m==null?void 0:m.packageName)=="string"?m.packageName.includes(h):!1},filterIcon:function(h){return(0,i.jsx)(K.Z,{style:{color:h?"#1890ff":void 0},onPointerOverCapture:void 0,onPointerMoveCapture:void 0})}}],F=function(){var O=H()(A()().mark(function h(){var m,V,$,N;return A()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:return j.next=2,(0,g.ai)();case 2:m=j.sent,m.data&&($=[],N=[],(V=r.data.localAppList)===null||V===void 0||V.forEach(function(Y){var J;(J=m.data)!==null&&J!==void 0&&J.some(function(te){return te.packageName===Y.packageName})?$.push(M()(M()({},Y),{},{evil:!0})):N.push(M()(M()({},Y),{},{evil:!1}))}),a([].concat($,N)),E([].concat($,N)));case 4:case"end":return j.stop()}},h)}));return function(){return O.apply(this,arguments)}}();return(0,y.useEffect)(function(){F()},[]),(0,i.jsx)(P.Z,{style:{width:600},onCancel:r.onClose,visible:!0,footer:[],children:(0,i.jsx)(z.Z,{onRow:function(h){return{style:{backgroundColor:h.evil?"red":"transparent"}}},search:!1,onReset:function(){E(e)},columns:D,dataSource:d})})},X=q,Z=function(r){var o=(0,y.useState)(!1),p=C()(o,2),e=p[0],a=p[1],s=(0,T.E7)(r.data.env);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(B.Z,{content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("p",{children:[(0,i.jsx)("label",{children:"\u603B\u6536\u5165\uFF1A"}),(0,c.P)(r.data.income),"\u5143"]}),(0,i.jsxs)("p",{children:[(0,i.jsx)("label",{children:"\u5DF2\u63D0\u73B0\uFF1A"}),(0,c.D)(r.data.realMoney),"\u5143"]}),r.data.localAppList&&r.data.localAppList.length>0&&(0,i.jsxs)("p",{children:[(0,i.jsx)("label",{children:"\u5DF2\u5B89\u88C5\u5E94\u7528\uFF1A"}),r.data.localAppList.length,"\u4E2A",(0,i.jsx)("a",{onClick:function(){a(!0)},style:{marginLeft:20},children:"\u67E5\u770B"})]}),s.length>0&&(0,i.jsx)(f.Z,{size:"small",header:(0,i.jsx)("div",{children:"\u8BBE\u5907\u5F02\u5E38\u4FE1\u606F"}),bordered:!0,dataSource:s,renderItem:function(d){return(0,i.jsx)(f.Z.Item,{children:d})}})]}),children:(0,i.jsxs)(U.Z,{children:[(0,i.jsx)(S.C,{src:r.data.avatar||"https://apks.bzgames.cn/matrix/fc3fca88a8b28ff602e7a38d8164938b.png"}),(0,i.jsxs)("p",{style:{fontSize:12,marginLeft:10,color:s.length>0?"red":""},children:["id:",r.data.id,(0,i.jsx)("br",{}),r.data.nickname||r.data.mobile]})]})}),e&&(0,i.jsx)(X,{onClose:function(){a(!1)},data:r.data})]})},l=Z},4575:function(k,R,t){t.d(R,{XM:function(){return L},ai:function(){return T},nr:function(){return K},re:function(){return w},vE:function(){return W}});var v=t(15009),C=t.n(v),B=t(97857),f=t.n(B),U=t(99289),S=t.n(U),y=t(35312);function T(x){return c.apply(this,arguments)}function c(){return c=S()(C()().mark(function x(b){return C()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.abrupt("return",(0,y.request)("/api/superAdmin/evilAppList",f()({method:"GET"},b||{})));case 1:case"end":return P.stop()}},x)})),c.apply(this,arguments)}function L(x,b){return A.apply(this,arguments)}function A(){return A=S()(C()().mark(function x(b,I){return C()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.abrupt("return",(0,y.request)("/api/superAdmin/saveEvilApp",f()({method:"POST",headers:{"Content-Type":"application/json"},data:b},I||{})));case 1:case"end":return g.stop()}},x)})),A.apply(this,arguments)}function W(x,b){return M.apply(this,arguments)}function M(){return M=S()(C()().mark(function x(b,I){return C()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.abrupt("return",(0,y.request)("/api/superAdmin/saveWhiteUser",f()({method:"POST",params:f()({},b)},I||{})));case 1:case"end":return g.stop()}},x)})),M.apply(this,arguments)}function w(x,b){return H.apply(this,arguments)}function H(){return H=S()(C()().mark(function x(b,I){return C()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.abrupt("return",(0,y.request)("/api/superAdmin/transfer",f()({method:"POST",params:f()({},b)},I||{})));case 1:case"end":return g.stop()}},x)})),H.apply(this,arguments)}function K(x){return z.apply(this,arguments)}function z(){return z=S()(C()().mark(function x(b){return C()().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.abrupt("return",(0,y.request)("/api/superAdmin/whiteUserList",f()({method:"GET"},b||{})));case 1:case"end":return P.stop()}},x)})),z.apply(this,arguments)}},52043:function(k,R,t){t.d(R,{E7:function(){return C},FG:function(){return v},RQ:function(){return U},XY:function(){return B},aV:function(){return S},m0:function(){return f}});var v=function(){return[{label:"\u51E1\u7C73\u6E38",value:"fanmiyou"},{label:"\u5947\u8FF9",value:"qiji"},{label:"\u5229\u597D",value:"lihao"},{label:"\u4F73\u7476",value:"jiayao"}]},C=function(T){var c=[];if(!T)return c;for(var L=T>>1,A=["\u7528\u6237\u6253\u5F00\u4E86USB\u8C03\u8BD5\u6A21\u5F0F","\u7528\u6237\u6253\u5F00\u4E86\u5F00\u53D1\u8005\u6A21\u5F0F","\u7528\u6237\u6253\u5F00\u4E86\u65E0\u969C\u788D\u6A21\u5F0F","\u7528\u6237\u624B\u673A\u5DF2\u7ECFRoot","\u7528\u6237\u5B89\u88C5\u4E86Xpose","\u7528\u6237\u5F00\u542F\u4E86VPN","\u7528\u6237\u5F00\u542F\u4EE3\u7406","\u652F\u4ED8\u5B9D\u672A\u5B89\u88C5","\u5FAE\u4FE1\u672A\u5B89\u88C5"],W=0,M=A;W<M.length;W++){var w=M[W];L&1&&c.push(w),L>>=1}return c},B=function(){return[{label:"\u5F85\u5BA1\u6279",value:"0",color:"orange"},{label:"\u5BA1\u6279\u901A\u8FC7",value:"1",color:"green"},{label:"\u8F6C\u8D26\u4E2D",value:"2",color:"orange"},{label:"\u8F6C\u8D26\u6210\u529F",value:"3",color:"green"},{label:"\u8F6C\u8D26\u5931\u8D25",value:"-1",color:"red"},{label:"\u5BA1\u6279\u62D2\u7EDD",value:"-2",color:"red"}]},f=function(T){var c=new Date(T),L=c.getFullYear().toString().padStart(4,"0"),A=(c.getMonth()+1).toString().padStart(2,"0"),W=c.getDate().toString().padStart(2,"0");return L+A+W},U=function(T,c){var L=T.toString();return L.padStart(c,"0")},S=function(T){var c=T;return c<1024?c+" B":(c=parseFloat((c/1024).toFixed(2)),c<1024?c+" KB":(c=parseFloat((c/1024).toFixed(2)),c+" MB"))}},58125:function(k,R,t){t.d(R,{D:function(){return C},P:function(){return v}});var v=function(f){return f?parseFloat((f/1e5).toFixed(2)):0},C=function(f){return f?parseFloat((f/100).toFixed(2)):0}},86250:function(k,R,t){t.d(R,{Z:function(){return Z}});var v=t(67294),C=t(93967),B=t.n(C),f=t(98423),U=t(98065),S=t(53124),y=t(91945),T=t(45503);const c=["wrap","nowrap","wrap-reverse"],L=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],A=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],W=(l,u)=>{const r=u.wrap===!0?"wrap":u.wrap;return{[`${l}-wrap-${r}`]:r&&c.includes(r)}},M=(l,u)=>{const r={};return A.forEach(o=>{r[`${l}-align-${o}`]=u.align===o}),r[`${l}-align-stretch`]=!u.align&&!!u.vertical,r},w=(l,u)=>{const r={};return L.forEach(o=>{r[`${l}-justify-${o}`]=u.justify===o}),r};function H(l,u){return B()(Object.assign(Object.assign(Object.assign({},W(l,u)),M(l,u)),w(l,u)))}var K=H;const z=l=>{const{componentCls:u}=l;return{[u]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},x=l=>{const{componentCls:u}=l;return{[u]:{"&-gap-small":{gap:l.flexGapSM},"&-gap-middle":{gap:l.flexGap},"&-gap-large":{gap:l.flexGapLG}}}},b=l=>{const{componentCls:u}=l,r={};return c.forEach(o=>{r[`${u}-wrap-${o}`]={flexWrap:o}}),r},I=l=>{const{componentCls:u}=l,r={};return A.forEach(o=>{r[`${u}-align-${o}`]={alignItems:o}}),r},P=l=>{const{componentCls:u}=l,r={};return L.forEach(o=>{r[`${u}-justify-${o}`]={justifyContent:o}}),r},g=()=>({});var i=(0,y.I$)("Flex",l=>{const{paddingXS:u,padding:r,paddingLG:o}=l,p=(0,T.TS)(l,{flexGapSM:u,flexGap:r,flexGapLG:o});return[z(p),x(p),b(p),I(p),P(p)]},g,{resetStyle:!1}),q=function(l,u){var r={};for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&u.indexOf(o)<0&&(r[o]=l[o]);if(l!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,o=Object.getOwnPropertySymbols(l);p<o.length;p++)u.indexOf(o[p])<0&&Object.prototype.propertyIsEnumerable.call(l,o[p])&&(r[o[p]]=l[o[p]]);return r},Z=v.forwardRef((l,u)=>{const{prefixCls:r,rootClassName:o,className:p,style:e,flex:a,gap:s,children:n,vertical:d=!1,component:E="div"}=l,D=q(l,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:F,direction:O,getPrefixCls:h}=v.useContext(S.E_),m=h("flex",r),[V,$,N]=i(m),G=d!=null?d:F==null?void 0:F.vertical,j=B()(p,o,F==null?void 0:F.className,m,$,N,K(m,l),{[`${m}-rtl`]:O==="rtl",[`${m}-gap-${s}`]:(0,U.n)(s),[`${m}-vertical`]:G}),Y=Object.assign(Object.assign({},F==null?void 0:F.style),e);return a&&(Y.flex=a),s&&!(0,U.n)(s)&&(Y.gap=s),V(v.createElement(E,Object.assign({ref:u,className:j,style:Y},(0,f.Z)(D,["justify","wrap","align"])),n))})},66309:function(k,R,t){t.d(R,{Z:function(){return p}});var v=t(67294),C=t(93967),B=t.n(C),f=t(98423),U=t(98787),S=t(69760),y=t(96159),T=t(45353),c=t(53124),L=t(54548),A=t(10274),W=t(14747),M=t(45503),w=t(91945);const H=e=>{const{paddingXXS:a,lineWidth:s,tagPaddingHorizontal:n,componentCls:d,calc:E}=e,D=E(n).sub(s).equal(),F=E(a).sub(s).equal();return{[d]:Object.assign(Object.assign({},(0,W.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:D,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,L.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${d}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${d}-close-icon`]:{marginInlineStart:F,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${d}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${d}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:D}}),[`${d}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},K=e=>{const{lineWidth:a,fontSizeIcon:s,calc:n}=e,d=e.fontSizeSM;return(0,M.TS)(e,{tagFontSize:d,tagLineHeight:(0,L.bf)(n(e.lineHeightSM).mul(d).equal()),tagIconSize:n(s).sub(n(a).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},z=e=>({defaultBg:new A.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var x=(0,w.I$)("Tag",e=>{const a=K(e);return H(a)},z),b=function(e,a){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,n=Object.getOwnPropertySymbols(e);d<n.length;d++)a.indexOf(n[d])<0&&Object.prototype.propertyIsEnumerable.call(e,n[d])&&(s[n[d]]=e[n[d]]);return s},P=v.forwardRef((e,a)=>{const{prefixCls:s,style:n,className:d,checked:E,onChange:D,onClick:F}=e,O=b(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:h,tag:m}=v.useContext(c.E_),V=J=>{D==null||D(!E),F==null||F(J)},$=h("tag",s),[N,G,j]=x($),Y=B()($,`${$}-checkable`,{[`${$}-checkable-checked`]:E},m==null?void 0:m.className,d,G,j);return N(v.createElement("span",Object.assign({},O,{ref:a,style:Object.assign(Object.assign({},n),m==null?void 0:m.style),className:Y,onClick:V})))}),g=t(98719);const i=e=>(0,g.Z)(e,(a,s)=>{let{textColor:n,lightBorderColor:d,lightColor:E,darkColor:D}=s;return{[`${e.componentCls}${e.componentCls}-${a}`]:{color:n,background:E,borderColor:d,"&-inverse":{color:e.colorTextLightSolid,background:D,borderColor:D},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var q=(0,w.bk)(["Tag","preset"],e=>{const a=K(e);return i(a)},z);function X(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Z=(e,a,s)=>{const n=X(s);return{[`${e.componentCls}${e.componentCls}-${a}`]:{color:e[`color${s}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var l=(0,w.bk)(["Tag","status"],e=>{const a=K(e);return[Z(a,"success","Success"),Z(a,"processing","Info"),Z(a,"error","Error"),Z(a,"warning","Warning")]},z),u=function(e,a){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(s[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,n=Object.getOwnPropertySymbols(e);d<n.length;d++)a.indexOf(n[d])<0&&Object.prototype.propertyIsEnumerable.call(e,n[d])&&(s[n[d]]=e[n[d]]);return s};const o=v.forwardRef((e,a)=>{const{prefixCls:s,className:n,rootClassName:d,style:E,children:D,icon:F,color:O,onClose:h,bordered:m=!0,visible:V}=e,$=u(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:N,direction:G,tag:j}=v.useContext(c.E_),[Y,J]=v.useState(!0),te=(0,f.Z)($,["closeIcon","closable"]);v.useEffect(()=>{V!==void 0&&J(V)},[V]);const ae=(0,U.o2)(O),le=(0,U.yT)(O),ne=ae||le,ce=Object.assign(Object.assign({backgroundColor:O&&!ne?O:void 0},j==null?void 0:j.style),E),Q=N("tag",s),[de,fe,pe]=x(Q),me=B()(Q,j==null?void 0:j.className,{[`${Q}-${O}`]:ne,[`${Q}-has-color`]:O&&!ne,[`${Q}-hidden`]:!Y,[`${Q}-rtl`]:G==="rtl",[`${Q}-borderless`]:!m},n,d,fe,pe),oe=ee=>{ee.stopPropagation(),h==null||h(ee),!ee.defaultPrevented&&J(!1)},[,ve]=(0,S.Z)((0,S.w)(e),(0,S.w)(j),{closable:!1,closeIconRender:ee=>{const Ce=v.createElement("span",{className:`${Q}-close-icon`,onClick:oe},ee);return(0,y.wm)(ee,Ce,_=>({onClick:ue=>{var re;(re=_==null?void 0:_.onClick)===null||re===void 0||re.call(_,ue),oe(ue)},className:B()(_==null?void 0:_.className,`${Q}-close-icon`)}))}}),ge=typeof $.onClick=="function"||D&&D.type==="a",se=F||null,he=se?v.createElement(v.Fragment,null,se,D&&v.createElement("span",null,D)):D,ie=v.createElement("span",Object.assign({},te,{ref:a,className:me,style:ce}),he,ve,ae&&v.createElement(q,{key:"preset",prefixCls:Q}),le&&v.createElement(l,{key:"status",prefixCls:Q}));return de(ge?v.createElement(T.Z,{component:"Tag"},ie):ie)});o.CheckableTag=P;var p=o}}]);
|
|
|