调整编辑器删除框文本
This commit is contained in:
parent
1e99514aa1
commit
fcb6b32e45
|
@ -25,8 +25,8 @@ export default class edittemplate extends React.Component {
|
||||||
clientY:0,
|
clientY:0,
|
||||||
|
|
||||||
selectDom:'',
|
selectDom:'',
|
||||||
|
icon:'',
|
||||||
icon:''
|
comName:''
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ export default class edittemplate extends React.Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
customComponent(e,name,icon){
|
customComponent(e,name,icon,comName){
|
||||||
|
|
||||||
//getBoundingClientRect().top ;获取div最顶边距离浏览器的位置
|
//getBoundingClientRect().top ;获取div最顶边距离浏览器的位置
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ export default class edittemplate extends React.Component {
|
||||||
|
|
||||||
let offset_top=this.refs[name].getBoundingClientRect().top;
|
let offset_top=this.refs[name].getBoundingClientRect().top;
|
||||||
|
|
||||||
this.setState({clientY:(offset_top-125),selectDom:name,icon:icon});
|
this.setState({clientY:(offset_top-125),selectDom:name,icon:icon,comName});
|
||||||
|
|
||||||
if(name=='searchBar'){
|
if(name=='searchBar'){
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ export default class edittemplate extends React.Component {
|
||||||
|
|
||||||
goodsConfig.search&&goodsConfig.search.iswitch?
|
goodsConfig.search&&goodsConfig.search.iswitch?
|
||||||
|
|
||||||
<div onClick={e=>this.customComponent(e,'search','marketing-sousuolan-')} className={this.state.selectDom=='search'?'selectBorder':''} ref="search"><SearchBarView searchConfig={goodsConfig.search} /></div>:null
|
<div onClick={e=>this.customComponent(e,'search','marketing-sousuolan-','搜索栏')} className={this.state.selectDom=='search'?'selectBorder':''} ref="search"><SearchBarView searchConfig={goodsConfig.search} /></div>:null
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,18 +126,18 @@ export default class edittemplate extends React.Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
goodsConfig.picture&&goodsConfig.picture.iswitch? <div onClick={e=>this.customComponent(e,'picture','marketing-tupian')} ref="picture" className={this.state.selectDom=='picture'?'selectBorder':''}><img src={goodsConfig.picture.img} alt="" className="picture"/></div>:null
|
goodsConfig.picture&&goodsConfig.picture.iswitch? <div onClick={e=>this.customComponent(e,'picture','marketing-tupian','图片')} ref="picture" className={this.state.selectDom=='picture'?'selectBorder':''}><img src={goodsConfig.picture.img} alt="" className="picture"/></div>:null
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
goodsConfig.title&&goodsConfig.title.iswitch&&goodsConfig.title.comstyle==1?<div onClick={e=>this.customComponent(e,'title','marketing-fuwenbenkuang')} ref="title" className={this.state.selectDom=='title'?'selectBorder':''}><div className={goodsConfig.title.textAlign +' content-title '+goodsConfig.title.fontSize} style={{color:goodsConfig.title.fontColor,fontWeight:'bold'}}>{goodsConfig.title.text}</div></div>:null
|
goodsConfig.title&&goodsConfig.title.iswitch&&goodsConfig.title.comstyle==1?<div onClick={e=>this.customComponent(e,'title','marketing-fuwenbenkuang','标题')} ref="title" className={this.state.selectDom=='title'?'selectBorder':''}><div className={goodsConfig.title.textAlign +' content-title '+goodsConfig.title.fontSize} style={{color:goodsConfig.title.fontColor,fontWeight:'bold'}}>{goodsConfig.title.text}</div></div>:null
|
||||||
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
||||||
goodsConfig.title&&goodsConfig.title.iswitch&&goodsConfig.title.comstyle==2?<div onClick={e=>this.customComponent(e,'title','marketing-fuwenbenkuang')} ref="title" className={this.state.selectDom=='title'?'selectBorder':''}>
|
goodsConfig.title&&goodsConfig.title.iswitch&&goodsConfig.title.comstyle==2?<div onClick={e=>this.customComponent(e,'title','marketing-fuwenbenkuang','标题')} ref="title" className={this.state.selectDom=='title'?'selectBorder':''}>
|
||||||
<img src={goodsConfig.title.pic} alt="" className="title-pic"/>
|
<img src={goodsConfig.title.pic} alt="" className="title-pic"/>
|
||||||
</div>:null
|
</div>:null
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ export default class edittemplate extends React.Component {
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
goodsConfig.bottomBar&&goodsConfig.bottomBar.iswitch&&naVisual.length>1? <div ref="bottomBar" onClick={e=>this.customComponent(e,'bottomBar','marketing-list')} className={this.state.selectDom=='bottomBar'?'selectBottomBorder':''}><BottomBarView bottomBarConfig={goodsConfig.bottomBar}/></div>:null
|
goodsConfig.bottomBar&&goodsConfig.bottomBar.iswitch&&naVisual.length>1? <div ref="bottomBar" onClick={e=>this.customComponent(e,'bottomBar','marketing-list','底部栏')} className={this.state.selectDom=='bottomBar'?'selectBottomBorder':''}><BottomBarView bottomBarConfig={goodsConfig.bottomBar}/></div>:null
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ export default class edittemplate extends React.Component {
|
||||||
|
|
||||||
this.state.selectDom?<div className="delete-component" style={{top:this.state.clientY}}>
|
this.state.selectDom?<div className="delete-component" style={{top:this.state.clientY}}>
|
||||||
|
|
||||||
<i className={'marketing '+this.state.icon}></i>
|
<span>{this.state.comName}</span>
|
||||||
|
|
||||||
<b className="split">|</b>
|
<b className="split">|</b>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
top: 2%;
|
top: 3%;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
left: 4%;
|
left: 4%;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: -10px;
|
right: -36px;
|
||||||
-ms-flex-align: center;
|
-ms-flex-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 6px 8px;
|
padding: 6px 8px;
|
||||||
|
|
Loading…
Reference in New Issue