CN-1479 fix: 搜索组件showHint提示文本修改

This commit is contained in:
刘洪洪
2023-12-13 17:05:16 +08:00
parent 3d1fbfa5fd
commit f5f857bcb4
14 changed files with 471 additions and 579 deletions

View File

@@ -2,8 +2,8 @@ var renderData = [
{
name: '$LOG_TYPE',
description: 'A variable is a symbolic representation of data that enables you to access a value without having to enter it manually wherever you need it. You can use $ to reference variables throughout Advanced Search. ',
details() {
//支持jsx 嵌套写法,万一测试要关键字加重呢
details () {
// 支持jsx 嵌套写法,万一测试要关键字加重呢
return <div>
$log_type: The table name of logs.
</div>
@@ -12,24 +12,24 @@ var renderData = [
{
name: '$FILTER',
description: 'A variable is a symbolic representation of data that enables you to access a value without having to enter it manually wherever you need it. You can use $ to reference variables throughout Advanced Search. ',
details() {
//支持jsx 嵌套写法,万一测试要关键字加重呢
details () {
// 支持jsx 嵌套写法,万一测试要关键字加重呢
return <div>
$filter: The default filter clauses. such as time period, Vsys ID, and other default expressions, etc.
</div>
}
},
];
}
]
function main() {
function main () {
const varTips = {}
renderData.forEach((item, index) => {
const data = item // 这是个闭包
varTips[item.name] = {
name: item.name,
type: 'Variables',
description() {
return (<div className='var-tips'>
description () {
return (<div className="var-tips">
<h2>{data.name}</h2>
<h3> Description: </h3>
<p> {data.description}</p>
@@ -38,7 +38,7 @@ function main() {
<renderer renderFun={data.details}></renderer> : <p>{data.details} </p>}
</div>)
}
};
}
})
return varTips
}