2 lines
9.5 KiB
JavaScript
2 lines
9.5 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[94013],{56829:function(oe,f,r){"use strict";r.r(f),r.d(f,{default:function(){return W}});var ce=r(57338),y=r(273),he=r(57663),S=r(71577),ue=r(13062),c=r(71230),ge=r(47673),h=r(4107),ve=r(66126),u=r(99177),de=r(89032),l=r(15746),t=r(11849),_e=r(18106),E=r(95562),I=r(67294),B=r(28216),F=r(49101),K=r(41273),T=r(7861),L=r(44258),i=r.n(L),g=r(30672),U=r(19755),me=r.n(U),e=r(85893),p,x,j=E.Z.TabPane,W=(p=(0,B.$j)(m=>{var s=m.globaldesign,o=m.commondesign;return{globaldesign:s,commondesign:o}}),p(x=class extends I.Component{constructor(){super(...arguments);this.state={filterSelect:"",filter:{blur:0,brightness:1,contrast:1,saturate:1,grayscale:0,sepia:0,hueRotate:0,invert:0},filterVisible:!1}}shouldComponentUpdate(){return!window.startMouseMove}changeFilter(){var s=this,o=this.state.filter;(0,K.gV)({type:"filter",parentSelf:s,filter:o})}renderFilter(){var s=this,o=this.state,v=o.filterSelect,n=o.filter,_=n.blur,R=n.brightness,C=n.contrast,M=n.saturate,b=n.grayscale,D=n.sepia,P=n.hueRotate,O=n.invert,Z=s.props.globaldesign.selectElement,A=(0,g.lw)((0,g.Kd)()),N=(0,T.GA)("image/"),V=Z.find("img").length>0&&Z.find("img").eq(0).attr("src")?Z.find("img").eq(0).attr("src"):N+"filter.jpg",w={value:_,min:0,max:100,step:.1,onAfterChange:a=>{window.termination=!1},onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{blur:a})},()=>{s.changeFilter()})}},$={value:_,min:0,max:100,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{blur:a.target.value})},()=>{s.changeFilter()})}},G={value:R,min:0,max:10,step:.1,onAfterChange:a=>{window.termination=!1},onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{brightness:a})},()=>{s.changeFilter()})}},X={value:R,min:0,max:10,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{brightness:a.target.value})},()=>{s.changeFilter()})}},z={value:C,min:0,max:10,step:.1,onAfterChange:a=>{window.termination=!1},onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{contrast:a})},()=>{s.changeFilter()})}},H={value:C,min:0,max:10,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{contrast:a.target.value})},()=>{s.changeFilter()})}},J={value:M,min:0,max:10,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{saturate:a})},()=>{s.changeFilter()})}},Q={value:M,min:0,max:10,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{saturate:a.target.value})},()=>{s.changeFilter()})}},Y={value:b,min:0,max:1,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{grayscale:a})},()=>{s.changeFilter()})}},k={value:b,min:0,max:1,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{grayscale:a.target.value})},()=>{s.changeFilter()})}},q={value:D,min:0,max:1,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{sepia:a})},()=>{s.changeFilter()})}},ee={value:D,min:0,max:1,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{sepia:a.target.value})},()=>{s.changeFilter()})}},te={value:P,min:0,max:360,step:.1,onAfterChange:a=>{window.termination=!1},onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{hueRotate:a})},()=>{s.changeFilter()})}},ae={value:P,min:0,max:360,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{hueRotate:a.target.value})},()=>{s.changeFilter()})}},se={value:O,min:0,max:1,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{invert:a})},()=>{s.changeFilter()})}},re={value:O,min:0,max:1,step:.1,onChange:a=>{s.setState({filter:(0,t.Z)((0,t.Z)({},n),{},{invert:a.target.value})},()=>{s.changeFilter()})}},ne=()=>{s.setState({filterSelect:"",filter:{blur:0,brightness:1,contrast:1,saturate:1,grayscale:0,sepia:0,hueRotate:0,invert:0}},()=>{s.changeFilter()})},le=[{name:"1977",filter:{brightness:1.1,contrast:1.1,blur:0,saturate:1.3,grayscale:0,sepia:0,hueRotate:0,invert:0}},{name:"\u4E9A\u4E01",filter:{brightness:1.2,contrast:.9,blur:0,saturate:.85,grayscale:0,sepia:0,hueRotate:20,invert:0}},{name:"\u963F\u9A6C\u7F57",filter:{brightness:1.1,contrast:.9,blur:0,saturate:1.5,grayscale:0,sepia:0,hueRotate:-10,invert:0}},{name:"\u5E03\u5170\u5357 ",filter:{brightness:1,contrast:1.4,blur:0,saturate:1,grayscale:0,sepia:.5,hueRotate:0,invert:0}},{name:"\u5E03\u9C81\u514B\u6797",filter:{brightness:1.1,contrast:.9,blur:0,saturate:1,grayscale:0,sepia:0,hueRotate:0,invert:0}},{name:"\u514B\u62C9\u4F26\u767B",filter:{brightness:1,contrast:1.2,blur:0,saturate:1.25,grayscale:0,sepia:0,hueRotate:0,invert:0}},{name:"\u65E9\u8D77\u7684\u9E1F\u513F",filter:{brightness:1,contrast:.9,blur:0,saturate:1,grayscale:0,sepia:.2,hueRotate:0,invert:0}},{name:"\u683C\u5B50\u68C9\u5E03",filter:{brightness:1.05,contrast:1,blur:0,saturate:1,grayscale:0,sepia:0,hueRotate:350,invert:0}},{name:"\u54C8\u5FB7\u68EE",filter:{brightness:1.2,contrast:.9,blur:0,saturate:1.1,grayscale:0,sepia:0,hueRotate:0,invert:0}},{name:"\u58A8\u6C34\u74F6",filter:{brightness:1.1,contrast:1.1,blur:0,saturate:1,grayscale:1,sepia:.3,hueRotate:0,invert:0}},{name:"Lofi",filter:{brightness:1,contrast:1.5,blur:0,saturate:1.1,grayscale:0,sepia:0,hueRotate:0,invert:0}},{name:"Maven",filter:{brightness:.95,contrast:.95,blur:0,saturate:1.5,grayscale:0,sepia:.25,hueRotate:0,invert:0}},{name:"\u96F7\u8036\u65AF",filter:{brightness:1.1,contrast:.85,blur:0,saturate:.75,grayscale:0,sepia:.22,hueRotate:0,invert:0}},{name:"\u65AF\u5EF7\u68EE",filter:{brightness:1.15,contrast:.75,blur:0,saturate:.85,grayscale:0,sepia:0,hueRotate:0,invert:0}},{name:"Toaster",filter:{brightness:.9,contrast:1.5,blur:0,saturate:1,grayscale:0,sepia:0,hueRotate:0,invert:0}},{name:"\u74E6\u5C14\u767B",filter:{brightness:1.1,contrast:1,blur:0,saturate:1.6,grayscale:0,sepia:0,hueRotate:350,invert:0}},{name:"\u74E6\u4F26\u897F\u4E9A",filter:{brightness:1.08,contrast:1.08,blur:0,saturate:1,grayscale:0,sepia:.08,hueRotate:0,invert:0}},{name:"Xpro2 ",filter:{brightness:1,contrast:1,blur:0,saturate:1,grayscale:0,sepia:.3,hueRotate:0,invert:0}}],ie=(a,d)=>{s.setState({filterSelect:d,filter:a.filter},()=>{s.changeFilter()})};return(0,e.jsxs)("div",{style:{margin:"10px -8px 0"},children:[(0,e.jsxs)(E.Z,{defaultActiveKey:"1",className:i().preset,style:{padding:"0 10px"},children:[(0,e.jsx)(j,{tab:"\u9884\u8BBE",children:le.map((a,d)=>(0,e.jsxs)("div",{className:"presetLi "+(v==d?"presetOn":""),onClick:()=>ie(a,d),children:[(0,e.jsx)("img",{src:V,style:{filter:"brightness(".concat(a.filter.brightness,") contrast(").concat(a.filter.contrast,") blur(").concat(a.filter.blur,"px) saturate(").concat(a.filter.saturate,") grayscale(").concat(a.filter.grayscale,") sepia(").concat(a.filter.sepia,") hue-rotate(").concat(a.filter.hueRotate,"deg) invert(").concat(a.filter.invert,")")}}),(0,e.jsx)("div",{className:"name",children:a.name})]},"preset"+d))},"1"),(0,e.jsxs)(j,{tab:"\u81EA\u5B9A\u4E49",children:[(0,e.jsxs)(c.Z,{className:i().attrRow,gutter:10,children:[(0,e.jsx)(l.Z,{span:7,children:A.formatMessage({id:"animate.hblur"})}),(0,e.jsx)(l.Z,{span:10,children:(0,e.jsx)(u.Z,(0,t.Z)({},w))}),(0,e.jsx)(l.Z,{span:7,children:(0,e.jsx)(h.Z,(0,t.Z)({},$))})]}),(0,e.jsxs)(c.Z,{className:i().attrRow,gutter:10,children:[(0,e.jsx)(l.Z,{span:7,children:"\u4EAE\u5EA6"}),(0,e.jsx)(l.Z,{span:10,children:(0,e.jsx)(u.Z,(0,t.Z)({},G))}),(0,e.jsx)(l.Z,{span:7,children:(0,e.jsx)(h.Z,(0,t.Z)({},X))})]}),(0,e.jsxs)(c.Z,{className:i().attrRow,gutter:10,children:[(0,e.jsx)(l.Z,{span:7,children:"\u5BF9\u6BD4\u5EA6"}),(0,e.jsx)(l.Z,{span:10,children:(0,e.jsx)(u.Z,(0,t.Z)({},z))}),(0,e.jsx)(l.Z,{span:7,children:(0,e.jsx)(h.Z,(0,t.Z)({},H))})]}),(0,e.jsxs)(c.Z,{className:i().attrRow,gutter:10,children:[(0,e.jsx)(l.Z,{span:7,children:"\u9971\u548C\u5EA6"}),(0,e.jsx)(l.Z,{span:10,children:(0,e.jsx)(u.Z,(0,t.Z)({},J))}),(0,e.jsx)(l.Z,{span:7,children:(0,e.jsx)(h.Z,(0,t.Z)({},Q))})]}),(0,e.jsxs)(c.Z,{className:i().attrRow,gutter:10,children:[(0,e.jsx)(l.Z,{span:7,children:"\u7070\u5EA6"}),(0,e.jsx)(l.Z,{span:10,children:(0,e.jsx)(u.Z,(0,t.Z)({},Y))}),(0,e.jsx)(l.Z,{span:7,children:(0,e.jsx)(h.Z,(0,t.Z)({},k))})]}),(0,e.jsxs)(c.Z,{className:i().attrRow,gutter:10,children:[(0,e.jsx)(l.Z,{span:7,children:"\u52A0\u6E29"}),(0,e.jsx)(l.Z,{span:10,children:(0,e.jsx)(u.Z,(0,t.Z)({},q))}),(0,e.jsx)(l.Z,{span:7,children:(0,e.jsx)(h.Z,(0,t.Z)({},ee))})]}),(0,e.jsxs)(c.Z,{className:i().attrRow,gutter:10,children:[(0,e.jsx)(l.Z,{span:7,children:"\u8272\u76F8"}),(0,e.jsx)(l.Z,{span:10,children:(0,e.jsx)(u.Z,(0,t.Z)({},te))}),(0,e.jsx)(l.Z,{span:7,children:(0,e.jsx)(h.Z,(0,t.Z)({},ae))})]}),(0,e.jsxs)(c.Z,{className:i().attrRow,gutter:10,children:[(0,e.jsx)(l.Z,{span:7,children:"\u53CD\u8272"}),(0,e.jsx)(l.Z,{span:10,children:(0,e.jsx)(u.Z,(0,t.Z)({},se))}),(0,e.jsx)(l.Z,{span:7,children:(0,e.jsx)(h.Z,(0,t.Z)({},re))})]})]},"2")]}),(0,e.jsx)("div",{className:i().hoverCleanFooter,children:(0,e.jsx)(S.Z,{onClick:ne,children:A.formatMessage({id:"common.reset"})})})]})}renderFilterDrawer(){var s=this.state.filterVisible,o=(0,g.lw)((0,g.Kd)()),v=()=>{this.setState({filterVisible:!1})};return(0,e.jsx)(y.Z,{title:"".concat(o.formatMessage({id:"mack.dsc.aj"})).concat(o.formatMessage({id:"mack.dsc.ap"})),width:240,open:s,getContainer:()=>document.getElementById("root"),mask:!1,onClose:v,className:i().hoverDrawer,children:this.renderFilter()})}render(){var s=this.props.globaldesign,o=s.selectElement,v=s.version,n=this.state.filterVisible,_=(0,g.lw)((0,g.Kd)());return o?v=="Concise"?(0,e.jsx)("div",{children:this.renderFilter()}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:i().addBoxBtn,onClick:()=>{this.setState({filterVisible:!0})},children:[(0,e.jsx)(F.Z,{}),_.formatMessage({id:"mack.dsc.aj"})]}),this.renderFilterDrawer()]}):!1}})||x)}}]);
|