|
@@ -87,8 +87,10 @@ class EditableSpan extends Component{
|
|
|
temp = newText.replace(searchPre,'');
|
|
|
isEnd = !(newText.indexOf(searchPre)>0);
|
|
|
search = temp.replace(/[(^\s*)|(\s*$)|(^\,*)|(\,*$)]/g,'');
|
|
|
- //console.log(labelVal,'旧:',searchPre,'新:',newText,'搜索:',search);
|
|
|
- handleSearch&&handleSearch({text:search,isEnd,boxMark,mainIds});
|
|
|
+ console.log(labelVal,'旧:',searchPre,'新:',newText,'搜索:',search);
|
|
|
+ if(config.punctuationReg.test(search)){ //只有标点符号时不搜索
|
|
|
+ handleSearch&&handleSearch({text:search,isEnd,boxMark,mainIds});
|
|
|
+ }
|
|
|
//搜索后保持现在的值,继续输入时要用于对比
|
|
|
that.setState({
|
|
|
searchPre:newText
|