Commit 4ba91182 by zhaochengxiang

服务搜索高亮

parent d1eac385
...@@ -13,7 +13,7 @@ import ExchangeOwnerModal from './ExchangeOwner'; ...@@ -13,7 +13,7 @@ import ExchangeOwnerModal from './ExchangeOwner';
import Table from '../../ResizeableTable'; import Table from '../../ResizeableTable';
import { dispatch } from '../../../../model'; import { dispatch } from '../../../../model';
import { showMessage, getQueryParam, paginate, isSzseEnv, formatDate, getDataModelerRole } from '../../../../util'; import { showMessage, getQueryParam, paginate, isSzseEnv, formatDate, getDataModelerRole, highlightSearchContentByTerms } from '../../../../util';
import { AnchorId, AnchorTimestamp, Action, CatalogId, ModelerId, DataModelerRoleReader } from '../../../../util/constant'; import { AnchorId, AnchorTimestamp, Action, CatalogId, ModelerId, DataModelerRoleReader } from '../../../../util/constant';
import { AppContext } from "../../../../App"; import { AppContext } from "../../../../App";
import SelectUser from "./SelectUsers"; import SelectUser from "./SelectUsers";
...@@ -544,7 +544,7 @@ const ModelTable = (props) => { ...@@ -544,7 +544,7 @@ const ModelTable = (props) => {
width: 200, width: 200,
render: (_, record) => { render: (_, record) => {
return <Tooltip title={record.basicInfo ? record.basicInfo[item.key] : ''}> return <Tooltip title={record.basicInfo ? record.basicInfo[item.key] : ''}>
<Text ellipsis={true}>{record.basicInfo ? record.basicInfo[item.key] : ''}</Text> <Text ellipsis={true}>{highlightSearchContentByTerms(record.basicInfo?record.basicInfo[item.key]:'', [keyword??''], true) }</Text>
</Tooltip> </Tooltip>
} }
}; };
...@@ -581,7 +581,7 @@ const ModelTable = (props) => { ...@@ -581,7 +581,7 @@ const ModelTable = (props) => {
} }
return newCols; return newCols;
}, [visibleColNames, attrs, indexCol, actionCol, modelId, detailItem, users, pagination]) }, [visibleColNames, attrs, indexCol, actionCol, modelId, detailItem, users, pagination, keyword])
const modelEventChange = (e) => { const modelEventChange = (e) => {
if (e.key === 'modelChange') { if (e.key === 'modelChange') {
......
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