完成编辑器底部栏限制,配置一个时,不显示bottomBar
This commit is contained in:
parent
5d052825ea
commit
f2637a0dea
|
@ -197,11 +197,8 @@ export default class edittemplate extends React.Component {
|
||||||
<div className="component-item">
|
<div className="component-item">
|
||||||
<div className="v-editItem">
|
<div className="v-editItem">
|
||||||
<span>首页</span>
|
<span>首页</span>
|
||||||
<p className="dflexacsa"><span className="showType">显示</span>
|
<p className="dflexacsa"><span>显示</span>
|
||||||
<Switch
|
</p>
|
||||||
checked={this.state.navlist[0].iswitch}
|
|
||||||
onChange={checked=>this.handleChangeStatus(0,checked)}
|
|
||||||
/></p>
|
|
||||||
</div>
|
</div>
|
||||||
<FormItem labelname="添加图片:" prop="top" id="top" labelwidth="100px">
|
<FormItem labelname="添加图片:" prop="top" id="top" labelwidth="100px">
|
||||||
<div className="dflexacsa">
|
<div className="dflexacsa">
|
||||||
|
@ -246,13 +243,13 @@ export default class edittemplate extends React.Component {
|
||||||
this.setState({ navlist: model2 })
|
this.setState({ navlist: model2 })
|
||||||
Bus.emit('navlist', model2)
|
Bus.emit('navlist', model2)
|
||||||
}}
|
}}
|
||||||
value={this.state.navlist[0].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} />
|
value={this.state.navlist[0].text} placeholder={"首页"} labelWidth={'0px'} maxLength={5} height={'36px'} width={'300px'} alignment={'left'} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div className="component-item">
|
<div className="component-item">
|
||||||
<div className="v-editItem">
|
<div className="v-editItem">
|
||||||
<span>订单</span>
|
<span>订单</span>
|
||||||
<p className="dflexacsa"><span className="showType">显示</span>
|
<p className="dflexacsa"><span className="showType">{this.state.navlist[1].iswitch?'显示':'隐藏'}</span>
|
||||||
<Switch
|
<Switch
|
||||||
checked={this.state.navlist[1].iswitch}
|
checked={this.state.navlist[1].iswitch}
|
||||||
onChange={checked=>this.handleChangeStatus(1,checked)}
|
onChange={checked=>this.handleChangeStatus(1,checked)}
|
||||||
|
@ -301,13 +298,13 @@ export default class edittemplate extends React.Component {
|
||||||
Bus.emit('navlist', model2)
|
Bus.emit('navlist', model2)
|
||||||
this.setState({ navlist: model2 })
|
this.setState({ navlist: model2 })
|
||||||
}}
|
}}
|
||||||
value={this.state.navlist[1].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} />
|
value={this.state.navlist[1].text} placeholder={"订单"} labelWidth={'0px'} maxLength={5} height={'36px'} width={'300px'} alignment={'left'} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div className="component-item">
|
<div className="component-item">
|
||||||
<div className="v-editItem">
|
<div className="v-editItem">
|
||||||
<span>我的券</span>
|
<span>我的券</span>
|
||||||
<p className="dflexacsa"><span className="showType">显示</span>
|
<p className="dflexacsa"><span className="showType">{this.state.navlist[2].iswitch?'显示':'隐藏'}</span>
|
||||||
<Switch
|
<Switch
|
||||||
checked={this.state.navlist[2].iswitch}
|
checked={this.state.navlist[2].iswitch}
|
||||||
onChange={checked=>this.handleChangeStatus(2,checked)}
|
onChange={checked=>this.handleChangeStatus(2,checked)}
|
||||||
|
@ -356,7 +353,7 @@ export default class edittemplate extends React.Component {
|
||||||
this.setState({ navlist:model2})
|
this.setState({ navlist:model2})
|
||||||
Bus.emit('navlist', model2)
|
Bus.emit('navlist', model2)
|
||||||
}}
|
}}
|
||||||
value={this.state.navlist[2].text} placeholder={"请输入"} labelWidth={'0px'} maxLength={4} height={'36px'} width={'300px'} alignment={'left'} />
|
value={this.state.navlist[2].text} placeholder={"我的券"} labelWidth={'0px'} maxLength={5} height={'36px'} width={'300px'} alignment={'left'} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
<div className="color-control">
|
<div className="color-control">
|
||||||
|
|
|
@ -12,7 +12,7 @@ export default class edittemplate extends React.Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
clientY: 0,
|
clientY: 0,
|
||||||
selectDom: '',
|
selectDom: '',
|
||||||
icon: ''
|
icon: '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
opendescFn() {
|
opendescFn() {
|
||||||
|
@ -49,6 +49,7 @@ export default class edittemplate extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
let goodsConfig = this.props.goodsdata;
|
let goodsConfig = this.props.goodsdata;
|
||||||
let {backgroundImg,search,picture,title,bottomBar}=goodsConfig;
|
let {backgroundImg,search,picture,title,bottomBar}=goodsConfig;
|
||||||
|
let naVisual=bottomBar.navlist.filter(item=>item.iswitch);
|
||||||
return (
|
return (
|
||||||
<div className="editor-main goodstemplate" style={{ background:backgroundImg && backgroundImg.bgImg ? `url('${backgroundImg.bgImg}') center center /cover` :backgroundImg.bgColor }}>
|
<div className="editor-main goodstemplate" style={{ background:backgroundImg && backgroundImg.bgImg ? `url('${backgroundImg.bgImg}') center center /cover` :backgroundImg.bgColor }}>
|
||||||
{
|
{
|
||||||
|
@ -87,7 +88,7 @@ export default class edittemplate extends React.Component {
|
||||||
goodsConfig.describe.type == 2 ? <img className="susactive_tip" onClick={this.opendescFn.bind(this)} src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png'} /> : null
|
goodsConfig.describe.type == 2 ? <img className="susactive_tip" onClick={this.opendescFn.bind(this)} src={'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/acticeTextTip.png'} /> : null
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
bottomBar && bottomBar.iswitch ? <div ref="bottomBar" onClick={e => this.customComponent(e, 'bottomBar', 'marketing-list')} className={this.state.selectDom == 'bottomBar' ? 'selectBottomBorder' : ''}><BottomBarView bottomBarConfig={bottomBar} /></div> : null
|
bottomBar && bottomBar.iswitch&&naVisual.length>1 ? <div ref="bottomBar" onClick={e => this.customComponent(e, 'bottomBar', 'marketing-list')} className={this.state.selectDom == 'bottomBar' ? 'selectBottomBorder' : ''}><BottomBarView bottomBarConfig={bottomBar} /></div> : null
|
||||||
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue