新增 新增、编辑立减金商品,在使用说明中展示限制长度
This commit is contained in:
parent
029f388c3b
commit
6518594631
|
@ -328,4 +328,17 @@
|
|||
#addNew1 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.countBox_par {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
.countBox {
|
||||
position: absolute;
|
||||
color: #999;
|
||||
bottom: 5%;
|
||||
z-index: 999999;
|
||||
right: 3%;
|
||||
}
|
||||
}
|
|
@ -1,10 +1,12 @@
|
|||
import React from 'react'
|
||||
import Editor from 'wangeditor'
|
||||
import './index.less'
|
||||
export default class wangeditor extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
editorHtml: ''
|
||||
editorHtml: '',
|
||||
count: 0
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
|
@ -39,6 +41,7 @@ export default class wangeditor extends React.Component {
|
|||
self.props.setEdittext(str)
|
||||
return
|
||||
}
|
||||
self.setState({ count: text.length })
|
||||
self.setState({ editorHtml: newHtml })
|
||||
self.props.setEdittext(newHtml)
|
||||
}
|
||||
|
@ -49,6 +52,11 @@ export default class wangeditor extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
return <div id='wangeditorDom' style={{ width: this.props.width }}></div>
|
||||
return (
|
||||
<div className='countBox_par'>
|
||||
<div id='wangeditorDom' style={{ width: this.props.width }}></div>
|
||||
<p className='countBox'>{this.state.count + '/' + 500}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue