|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[339,1322,8821,3416,3729,2320,2359,858],{13277:function(){},77413:function(V,M,t){"use strict";t.r(M),t.d(M,{default:function(){return n}});var f=t(58024),y=t(91894),b=t(71153),d=t(60331),x=t(86582),p=t(3182),L=t(2824),o=t(47673),C=t(4107),Z=t(94043),i=t.n(Z),E=t(67294),F=t(49101),K=t(78009),W=t(48971);function U(l){return $.apply(this,arguments)}function $(){return $=(0,p.Z)(i().mark(function l(T){return i().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,W.WY)("/kitchen/api/goods-taste/goods-taste-list",{method:"get",data:T}));case 1:case"end":return r.stop()}},l)})),$.apply(this,arguments)}function I(l){return k.apply(this,arguments)}function k(){return k=(0,p.Z)(i().mark(function l(T){return i().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,W.WY)("/kitchen/api/goods-taste/edit",{method:"post",data:T}));case 1:case"end":return r.stop()}},l)})),k.apply(this,arguments)}var g=t(85893),v=void 0,s=C.Z.Search,m=function(){var T=(0,E.useState)([]),S=(0,L.Z)(T,2),r=S[0],D=S[1],O=(0,E.useState)([!1]),A=(0,L.Z)(O,2),B=A[0],R=A[1],G=(0,E.useState)(""),N=(0,L.Z)(G,2),j=N[0],z=N[1];(0,E.useEffect)(function(){var h=function(){var a=(0,p.Z)(i().mark(function u(e){return i().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,U().then(function(X){X.data&&D(X.data)});case 2:case"end":return P.stop()}},u)}));return function(e){return a.apply(this,arguments)}}();h()},[]);var Y=function(){var h=(0,p.Z)(i().mark(function a(){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,I(r);case 2:return e.next=4,w();case 4:case"end":return e.stop()}},a)}));return function(){return h.apply(this,arguments)}}(),w=function(){var h=(0,p.Z)(i().mark(function a(){return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U().then(function(c){c.data&&D(c.data)});case 2:case"end":return e.stop()}},a)}));return function(){return h.apply(this,arguments)}}(),H=function(a){z(a.target.value)},J=function(a){var u=(0,x.Z)(r),e=u[a].tasteClassList||[];j&&(!e||(e==null?void 0:e.indexOf(j))===-1)&&e.push(j),u[a].tasteClassList=e,D(u);var c=(0,x.Z)(B);c[a]=!1,R(c),z(""),Y()},Q=function(a,u){var e=(0,x.Z)(r),c=e[u].tasteClassList;c=c.filter(function(P){return P!==a}),e[u].tasteClassList=c,D(e),Y()};return(0,g.jsx)(K.ZP,{children:(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(y.Z,{title:"\u83DC\u54C1\u53E3\u5473",extra:(0,g.jsx)("div",{children:(0,g.jsx)(s,{enterButton:"\u6DFB\u52A0",onSearch:function(a){var u=r;!u.find(function(e){return e.tasteClassName==a})&&a&&D([].concat((0,x.Z)(u),[{tasteClassName:a,tasteClassList:[]}]))}})}),children:r==null?void 0:r.map(function(h,a){var u;return(0,g.jsxs)(y.Z,{title:h.tasteClassName,extra:(0,g.jsx)("a",{onClick:function(){var c=(0,x.Z)(r);c=c.filter(function(P){return P.tasteClassName!==h.tasteClassName}),D(c),I(c),w()},children:"\u5220\u9664"}),style:{width:300,height:300,float:"left"},children:[(u=h.tasteClassList)===null||u===void 0?void 0:u.map(function(e){var c=(0,g.jsx)(d.Z,{className:"edit-tag",style:{marginTop:"3px"},closable:!0,onClose:function(){return Q(e,a)},children:(0,g.jsxs)("span",{children:[" ",e," "]})},e);return c}),B[a]?(0,g.jsx)(C.Z,{style:{marginTop:"3px"},type:"text",size:"small",className:"tag-input",value:j,onChange:H,onBlur:J.bind(v,a),onPressEnter:J.bind(v,a)}):(0,g.jsxs)(d.Z,{className:"site-tag-plus",onClick:function(){var c=(0,x.Z)(B);c[a]=!0,R(c)},children:[(0,g.jsx)(F.Z,{})," \u6DFB\u52A0"]})]},a)})})})})},n=m},9708:function(V,M,t){"use strict";t.d(M,{Z:function(){return p},F:function(){return L}});var f=t(96156),y=t(94184),b=t.n(y),d=t(93355),x=(0,d.b)("warning","error","");function p(o,C,Z){var i;return b()((i={},(0,f.Z)(i,"".concat(o,"-status-success"),C==="success"),(0,f.Z)(i,"".concat(o,"-status-warning"),C==="warning"),(0,f.Z)(i,"".concat(o,"-status-error"),C==="error"),(0,f.Z)(i,"".concat(o,"-status-validating"),C==="validating"),(0,f.Z)(i,"".concat(o,"-has-feedback"),Z),i))}var L=function(C,Z){return Z||C}},65223:function(V,M,t){"use strict";t.d(M,{q3:function(){return x},qI:function(){return p},RV:function(){return L},Rk:function(){return o},aM:function(){return C},Ux:function(){return Z}});var f=t(22122),y=t(48526),b=t(98423),d=t(67294),x=d.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}}),p=d.createContext(null),L=function(E){var F=(0,b.Z)(E,["prefixCls"]);return d.createElement(y.RV,(0,f.Z)({},F))},o=d.createContext({prefixCls:""}),C=d.createContext({}),Z=function(E){var F=E.children,K=E.status,W=E.override,U=(0,d.useContext)(C),$=(0,d.useMemo)(function(){var I=(0,f.Z)({},U);return W&&delete I.isFormItemInput,K&&(delete I.status,delete I.hasFeedback,delete I.feedbackIcon),I},[K,W,U]);return d.createElement(C.Provider,{value:$},F)}},60331:function(V,M,t){"use strict";t.d(M,{Z:function(){return g}});var f=t(96156),y=t(22122),b=t(28481),d=t(54549),x=t(94184),p=t.n(x),L=t(98423),o=t(67294),C=t(53124),Z=t(98787),i=t(21790),E=function(v,s){var m={};for(var n in v)Object.prototype.hasOwnProperty.call(v,n)&&s.indexOf(n)<0&&(m[n]=v[n]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(v);l<n.length;l++)s.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(v,n[l])&&(m[n[l]]=v[n[l]]);return m},F=function(s){var m,n=s.prefixCls,l=s.className,T=s.checked,S=s.onChange,r=s.onClick,D=E(s,["prefixCls","className","checked","onChange","onClick"]),O=o.useContext(C.E_),A=O.getPrefixCls,B=function(j){S==null||S(!T),r==null||r(j)},R=A("tag",n),G=p()(R,(m={},(0,f.Z)(m,"".concat(R,"-checkable"),!0),(0,f.Z)(m,"".concat(R,"-checkable-checked"),T),m),l);return o.createElement("span",(0,y.Z)({},D,{className:G,onClick:B}))},K=F,W=function(v,s){var m={};for(var n in v)Object.prototype.hasOwnProperty.call(v,n)&&s.indexOf(n)<0&&(m[n]=v[n]);if(v!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(v);l<n.length;l++)s.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(v,n[l])&&(m[n[l]]=v[n[l]]);return m},U=new RegExp("^(".concat(Z.Y.join("|"),")(-inverse)?$")),$=new RegExp("^(".concat(Z.E.join("|"),")$")),I=function(s,m){var n,l=s.prefixCls,T=s.className,S=s.style,r=s.children,D=s.icon,O=s.color,A=s.onClose,B=s.closeIcon,R=s.closable,G=R===void 0?!1:R,N=W(s,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),j=o.useContext(C.E_),z=j.getPrefixCls,Y=j.direction,w=o.useState(!0),H=(0,b.Z)(w,2),J=H[0],Q=H[1];o.useEffect(function(){"visible"in N&&Q(N.visible)},[N.visible]);var h=function(){return O?U.test(O)||$.test(O):!1},a=(0,y.Z)({backgroundColor:O&&!h()?O:void 0},S),u=h(),e=z("tag",l),c=p()(e,(n={},(0,f.Z)(n,"".concat(e,"-").concat(O),u),(0,f.Z)(n,"".concat(e,"-has-color"),O&&!u),(0,f.Z)(n,"".concat(e,"-hidden"),!J),(0,f.Z)(n,"".concat(e,"-rtl"),Y==="rtl"),n),T),P=function(_){_.stopPropagation(),A==null||A(_),!_.defaultPrevented&&("visible"in N||Q(!1))},X=function(){return G?B?o.createElement("span",{className:"".concat(e,"-close-icon"),onClick:P},B):o.createElement(d.Z,{className:"".concat(e,"-close-icon"),onClick:P}):null},nt="onClick"in N||r&&r.type==="a",at=(0,L.Z)(N,["visible"]),q=D||null,rt=q?o.createElement(o.Fragment,null,q,o.createElement("span",null,r)):r,tt=o.createElement("span",(0,y.Z)({},at,{ref:m,className:c,style:a}),rt,X());return nt?o.createElement(i.Z,null,tt):tt},k=o.forwardRef(I);k.CheckableTag=K;var g=k},71153:function(V,M,t){"use strict";var f=t(38663),y=t.n(f),b=t(13277),d=t.n(b)}}]);
|