Commit 9afcf004 authored by 涂伟's avatar 涂伟

fix: '台账表快速检索特殊字符处理逻辑添加'

parent ec92282d
Pipeline #88031 passed with stages
......@@ -366,9 +366,11 @@ const TableManager = props => {
const searchStyle = val => {
let n;
if (showSearchStyle) {
const escapedSearchValue = searchValue.replace(/\\/g, '\\\\');
const regex = new RegExp(escapedSearchValue, 'g');
n = val.replace(
new RegExp(searchValue, 'g'),
`<span style='color:red'>${searchValue}</span>`,
regex,
`<span style='color:red'>${searchValue}</span>`
);
} else {
n = val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment