|
@@ -176,12 +176,6 @@ class EditableSpan extends Component{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- /*shouldComponentUpdate(next){
|
|
|
- if(JSON.stringify(next) == JSON.stringify(this.props)){
|
|
|
- return false;
|
|
|
- }
|
|
|
- return true;
|
|
|
- }*/
|
|
|
componentWillReceiveProps(next){
|
|
|
const isRead = this.props.isRead;
|
|
|
if(next.isRead != isRead){
|
|
@@ -205,7 +199,7 @@ class EditableSpan extends Component{
|
|
|
const preSelected = saveText[i-1];
|
|
|
const isFull = full?' '+style['full']:''; //是否宽度设为整行宽度
|
|
|
//有标点符号之外的字符或者前一个标签有选中值时,显示为黑色,否则灰显
|
|
|
- const unselect = config.punctuationReg.test(value)||preSelected?'':style['unselect'];
|
|
|
+ const unselect = value.match(config.punctuationReg)||preSelected?'':style['unselect'];
|
|
|
return classNames(style['editable-span'],isFull,unselect);
|
|
|
}
|
|
|
|