完成编辑器底部栏限制,配置一个时,不显示bottomBar

This commit is contained in:
许红梅 2022-09-09 11:42:21 +08:00
parent 5d052825ea
commit f2637a0dea
2 changed files with 10 additions and 12 deletions

View File

@ -197,11 +197,8 @@ export default class edittemplate extends React.Component {
<div className="component-item">
<div className="v-editItem">
<span>首页</span>
<p className="dflexacsa"><span className="showType">显示</span>
<Switch
checked={this.state.navlist[0].iswitch}
onChange={checked=>this.handleChangeStatus(0,checked)}
/></p>
<p className="dflexacsa"><span>显示</span>
</p>
</div>
<FormItem labelname="添加图片:" prop="top" id="top" labelwidth="100px">
<div className="dflexacsa">
@ -246,13 +243,13 @@ export default class edittemplate extends React.Component {
this.setState({ 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>
</div>
<div className="component-item">
<div className="v-editItem">
<span>订单</span>
<p className="dflexacsa"><span className="showType">显示</span>
<p className="dflexacsa"><span className="showType">{this.state.navlist[1].iswitch?'显示':'隐藏'}</span>
<Switch
checked={this.state.navlist[1].iswitch}
onChange={checked=>this.handleChangeStatus(1,checked)}
@ -301,13 +298,13 @@ export default class edittemplate extends React.Component {
Bus.emit('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>
</div>
<div className="component-item">
<div className="v-editItem">
<span>我的券</span>
<p className="dflexacsa"><span className="showType">显示</span>
<p className="dflexacsa"><span className="showType">{this.state.navlist[2].iswitch?'显示':'隐藏'}</span>
<Switch
checked={this.state.navlist[2].iswitch}
onChange={checked=>this.handleChangeStatus(2,checked)}
@ -356,7 +353,7 @@ export default class edittemplate extends React.Component {
this.setState({ 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>
</div>
<div className="color-control">

View File

@ -12,7 +12,7 @@ export default class edittemplate extends React.Component {
this.state = {
clientY: 0,
selectDom: '',
icon: ''
icon: '',
}
}
opendescFn() {
@ -49,6 +49,7 @@ export default class edittemplate extends React.Component {
render() {
let goodsConfig = this.props.goodsdata;
let {backgroundImg,search,picture,title,bottomBar}=goodsConfig;
let naVisual=bottomBar.navlist.filter(item=>item.iswitch);
return (
<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
}
{
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
}
{