|
@@ -179,7 +179,7 @@ export const formulaStringToArray = (text,elemap,formulaMap) => {
|
|
const elementReg = /^E\[(.[^\]]+_.[^\]]+)\]/;//元素
|
|
const elementReg = /^E\[(.[^\]]+_.[^\]]+)\]/;//元素
|
|
const paramReg = /^WP\[(.[^\]]+)\]/;//节点参数
|
|
const paramReg = /^WP\[(.[^\]]+)\]/;//节点参数
|
|
const commaReg = /^,/;//逗号
|
|
const commaReg = /^,/;//逗号
|
|
- const operatorReg = /^(\+|-|\*|%)/;//加减乘除
|
|
|
|
|
|
+ const operatorReg = /^ (\+|-|\*|%) /;//加减乘除
|
|
const wordReg = /^[\u4e00-\u9fa5\w0-9'"-]+/;//文本
|
|
const wordReg = /^[\u4e00-\u9fa5\w0-9'"-]+/;//文本
|
|
const logicalReg = /^(>=|<=|>|<|=|&&)/;//逻辑符号
|
|
const logicalReg = /^(>=|<=|>|<|=|&&)/;//逻辑符号
|
|
|
|
|
|
@@ -380,6 +380,7 @@ export const formulaStringToArray = (text,elemap,formulaMap) => {
|
|
}
|
|
}
|
|
|
|
|
|
strIndex += operator.length;//索引移动
|
|
strIndex += operator.length;//索引移动
|
|
|
|
+ //console.log(operator.length)
|
|
}else if(wordReg.test(nuText)){
|
|
}else if(wordReg.test(nuText)){
|
|
//匹配文本
|
|
//匹配文本
|
|
let word = nuText.match(wordReg)[0];
|
|
let word = nuText.match(wordReg)[0];
|