Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
luna
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
luna
Commits
caa8c69b
Commit
caa8c69b
authored
Apr 23, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update]搜索不区分大小写
parent
e769c99a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
asset-tree.component.ts
src/app/elements/asset-tree/asset-tree.component.ts
+3
-3
No files found.
src/app/elements/asset-tree/asset-tree.component.ts
View file @
caa8c69b
...
@@ -268,7 +268,7 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
...
@@ -268,7 +268,7 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
if
(
!
zTreeObj
)
{
if
(
!
zTreeObj
)
{
return
null
;
return
null
;
}
}
const
_keywords
=
this
.
query
;
const
_keywords
=
this
.
query
.
toLowerCase
()
;
const
nodes
=
zTreeObj
.
transformToArray
(
zTreeObj
.
getNodes
());
const
nodes
=
zTreeObj
.
transformToArray
(
zTreeObj
.
getNodes
());
if
(
!
_keywords
)
{
if
(
!
_keywords
)
{
if
(
this
.
hiddenNodes
)
{
if
(
this
.
hiddenNodes
)
{
...
@@ -289,9 +289,9 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
...
@@ -289,9 +289,9 @@ export class ElementAssetTreeComponent implements OnInit, OnChanges {
const
matchedNodes
=
zTreeObj
.
getNodesByFilter
(
function
(
node
)
{
const
matchedNodes
=
zTreeObj
.
getNodesByFilter
(
function
(
node
)
{
if
(
node
.
meta
.
type
===
'asset'
)
{
if
(
node
.
meta
.
type
===
'asset'
)
{
const
host
=
node
.
meta
.
asset
;
const
host
=
node
.
meta
.
asset
;
return
host
.
hostname
.
indexOf
(
_keywords
)
!==
-
1
||
host
.
ip
.
indexOf
(
_keywords
)
!==
-
1
;
return
host
.
hostname
.
toLowerCase
().
indexOf
(
_keywords
)
!==
-
1
||
host
.
ip
.
indexOf
(
_keywords
)
!==
-
1
;
}
else
{
}
else
{
return
node
.
name
.
indexOf
(
_keywords
)
!==
-
1
;
return
node
.
name
.
toLowerCase
().
indexOf
(
_keywords
)
!==
-
1
;
}
}
});
});
matchedNodes
.
forEach
((
node
)
=>
{
matchedNodes
.
forEach
((
node
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment