2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
|
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[68056],{96278:function(D){D.exports={root:"root___7VXfh",colorWeak:"colorWeak___2fQ5G","ant-layout":"ant-layout___2lk2i",globalSpin:"globalSpin___3wjkL","ant-table":"ant-table___3MoMQ","ant-table-thead":"ant-table-thead___2F4eD","ant-table-tbody":"ant-table-tbody___1iFAX",formBox:"formBox___1MR6m",hrefModal:"hrefModal___GOUPi",shop:"shop___3KrmS"}},13334:function(D,T,l){"use strict";l.r(T),l.d(T,{default:function(){return q}});var $=l(77883),O=l(85986),ee=l(34792),F=l(48086),te=l(71194),S=l(50146),se=l(57663),W=l(71577),ae=l(47673),L=l(4107),le=l(63185),j=l(9676),ie=l(88983),M=l(47933),w=l(67294),H=l(49101),U=l(73218),V=l(8212),Z=l(67724),Y=l(8812),J=l(28216),Q=l(96278),b=l.n(Q),z=l(5283),ne=l.n(z),k=l(56173),de=l(41273),m=l(30672),e=l(85893),I,R,K=M.ZP.Group,G=j.Z.Group,X=L.Z.TextArea,q=(I=(0,J.$j)(B=>{var t=B.commondesign,d=B.globaldesign;return{commondesign:t,globaldesign:d}}),I(R=class extends w.PureComponent{constructor(){super(...arguments);this.state={visible:!1,list:[],marginLeft:0,checkedList:[],play:!0,playTime:4,changeTime:1.5,adapt:"sy",styleType:1,nav:!1,editModel:!1,editsrc:"",editHref:"",editdesc:"",edittarget:""},this.updataDomCallBack=t=>{var d=this.props.commondesign,r=d.Carousel,a=r.element,u=r.callback,o=r.callClose,E=(0,m.lw)((0,m.Kd)()),n=a.find(".box"),f="";n.css({"background-image":"url("+t.list[0].path+")"});var y="",p=t.list.length;if(t.nav){for(var _="",P=0,g=0;g<p;g++)g==0?_+='<li class="on"></li>':_+="<li ></li>";n.html('<div class="carouselNav"><ul style="width:'+p*45+'px;">'+_+"</ul></div>")}else n.html("");for(var C=0;C<p;C++){var A=t.list[C];y+='<img src="'+A.path+'"/><div style="background-image:url('+A.path+');"></div>'}a.find(".imgloadBox").length>0?a.find(".imgloadBox").html(y):a.prepend('<div style="display: none;" class="imgloadBox">'+y+"</div>"),n.attr("class","box "+t.adapt),a.attr("data-canousel",JSON.stringify(t))},this.show=t=>{t?(t=JSON.parse(t),this.setState({list:t.list,marginLeft:0,checkedList:t.checkedList,play:t.play,playTime:t.playTime,changeTime:t.changeTime,adapt:t.adapt,styleType:t.styleType,nav:!!t.nav})):this.setState({list:[],marginLeft:0,checkedList:[],play:!0,playTime:4,changeTime:1.5,adapt:"sy",styleType:1,nav:!1})},this.renderStyle=()=>{var t=this.state.styleType,d=r=>{r.target.classList[0]=="styleli"&&this.setState({styleType:r.target.dataset.type})};return(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"label",children:"\u98CE\u683C\uFF1A"}),(0,e.jsxs)("div",{className:"content",onClick:d,children:[(0,e.jsx)("div",{className:"styleli "+(t==1?"on":""),"data-type":1,style:{backgroundPosition:"-315px -650px"}}),""]})]})},this.renderEditModal=()=>{var t=this,d=this.props.dispatch,r=this.state,a=r.editModel,u=r.editsrc,o=r.editHref,E=r.editdesc,n=r.edittarget,f=r.list,y=(0,m.lw)((0,m.Kd)()),p=()=>{var i=f;i[this.index]={src:u,href:o||"",desc:E||"",target:n||""},this.setState({list:i,editModel:!1,editsrc:"",editHref:"",editdesc:"",edittarget:""})},_=()=>{this.setState({editModel:!1})},P=this.index==0,g=this.index==f.length-1,C=()=>{if(this.index>0){this.index--;var i=f[this.index];this.setState({editsrc:i.path,editHref:i.href||"",editdesc:i.desc||"",edittarget:i.target||""})}},A=()=>{if(this.index<f.length-1){this.index++;var i=f[this.index];this.setState({editsrc:i.path,editHref:i.href||"",editdesc:i.desc||"",edittarget:i.target||""})}},c=i=>{this.setState({editHref:i.target.value})},s=i=>{this.setState({editdesc:i.target.value})},h=()=>{d({type:"commondesign/setState",payload:{Href:{visible:!0,type:{course:!0,information:!0,link:!0,dialog:!0,page:!0,member:!0,shop:!0,forum:!0,question:!0},typex:!1,callback:i=>{var x=(0,k.wS)(i,t),N=x.url;t.setState({editHref:N||""})}}}})},v=i=>{var x=i.target.value;this.state.edittarget&&(x=""),this.setState({edittarget:x})};return(0,e.jsxs)(S.Z,{title:"\u7F16\u8F91\u56FE\u7247",visible:a,onOk:p,width:520,onCancel:_,maskClosable:!1,className:b().hrefModal,children:[(0,e.jsx)("div",{className:"editImgbox",children:(0,e.jsxs)("div",{className:"view
|