编辑器富文本引入

This commit is contained in:
red-deng-deng 2022-01-06 11:00:24 +08:00
parent 5fced05579
commit 4e5c9ed70b
4 changed files with 37 additions and 18 deletions

View File

@ -13,7 +13,7 @@ export default class edittemplate extends React.Component{
super(props) super(props)
this.state={ this.state={
model:{ model:{
images:['https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220104/1a07d79a196132fe2fc5a5400c79d23c.png','https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220104/7cf0833811a67b38bd03df45a33afa27.png'], images:[],
button_color:'', button_color:'',
bg_color:'' bg_color:''
} }

View File

@ -21,7 +21,7 @@ export default class edittemplate extends React.Component{
showType:1,//兑换码/白名单/立减金 showType:1,//兑换码/白名单/立减金
model:{ model:{
id:"", id:"",
images:['https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220104/1a07d79a196132fe2fc5a5400c79d23c.png','https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220104/7cf0833811a67b38bd03df45a33afa27.png'], images:[],
thumb:null, thumb:null,
title:"落地页标题", title:"落地页标题",
client:1, client:1,

View File

@ -263,7 +263,8 @@ export default class edittemplate extends React.Component{
<RadioButton value={2}>富文本</RadioButton> <RadioButton value={2}>富文本</RadioButton>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem required={false} labelname=" " prop="bottom" id="bottom" labelwidth="100px"> {
this.state.model.activityType==1?<FormItem required={false} labelname=" " prop="bottom" id="bottom" labelwidth="100px">
<ImageUpload <ImageUpload
className="zent-image-upload-demo" className="zent-image-upload-demo"
maxSize={5 * 1024 * 1024} maxSize={5 * 1024 * 1024}
@ -277,7 +278,25 @@ export default class edittemplate extends React.Component{
defaultFileList={this.state.model.images[2] ? [{'src':this.state.model.images[2]}] : null} defaultFileList={this.state.model.images[2] ? [{'src':this.state.model.images[2]}] : null}
/> />
</FormItem> </FormItem>:null
}
{
this.state.model.activityType==2?<FormItem required={false} labelname="背景图案:" prop="bottom" id="bottom" labelwidth="100px">
<ImageUpload
className="zent-image-upload-demo"
maxSize={5 * 1024 * 1024}
maxAmount={1}
multiple
sortable
tips="单张图片不超过 5M"
onChange={(e)=>{this.onUploadChange2(e)} }
onUpload={this.onUpload}
onError={this.onUploadError}
defaultFileList={this.state.model.images[2] ? [{'src':this.state.model.images[2]}] : null}
/>
</FormItem>:null
}
{ {
this.state.isSystemModel ? ( this.state.isSystemModel ? (
<FormItem labelname="权重" prop="sort" id="sort" labelwidth="80px"> <FormItem labelname="权重" prop="sort" id="sort" labelwidth="80px">

View File

@ -689,7 +689,7 @@ this.state.goodsConfigure.list==1?<img className="goodsPic" src={'https://lsxdem
<div className="control page-title-control"> <div className="control page-title-control">
{ {
this.state.activeNavStatus==1 ? this.state.activeNavStatus==1 ?
( <h1>落地页设置</h1>) : this.state.activeNavStatus==2 ? ( <h1></h1>):( <h1></h1>) ( <h1 style={{fontSize:'16px'}}>落地页设置</h1>) : this.state.activeNavStatus==2 ? ( <h1 style={{fontSize:'16px'}}></h1>):( <h1 style={{fontSize:'16px'}}></h1>)
} }