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.
 
 
 

2 line
6.8 KiB

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