Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
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
劳工
zeroing-editor
Commits
fe14e83c
Commit
fe14e83c
authored
Nov 11, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改dockpoint为dockpin
晚上分流器逻辑
parent
c9a419ca
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
186 additions
and
69 deletions
+186
-69
main.js
src/main.js
+4
-2
behavior.js
src/store/modules/behavior.js
+14
-4
env.js
src/store/modules/env.js
+8
-1
behavior.scss
src/themes/light/behavior.scss
+5
-5
BehaviorEditor.vue
src/views/Editor/behavior-editor/BehaviorEditor.vue
+3
-3
Board.vue
src/views/Editor/behavior-editor/Board.vue
+63
-25
DockPin.vue
src/views/Editor/behavior-editor/Board/DockPin.vue
+2
-2
ProcessNode.vue
src/views/Editor/behavior-editor/Board/ProcessNode.vue
+52
-24
MetaEditorDialog.vue
src/views/Editor/behavior-editor/MetaEditorDialog.vue
+2
-1
ProcessList.vue
src/views/Editor/behavior-editor/ProcessList.vue
+33
-2
No files found.
src/main.js
View file @
fe14e83c
...
...
@@ -4,7 +4,7 @@ import router from './router'
import
store
from
'./store/index'
import
i18n
from
'./i18n'
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
;
import
'./assets/style.css'
import
'./plugins/element.js'
...
...
@@ -15,4 +15,6 @@ new Vue({
store
,
i18n
,
render
:
h
=>
h
(
App
)
}).
$mount
(
'#app'
)
}).
$mount
(
'#app'
);
//todo 节点选择器
\ No newline at end of file
src/store/modules/behavior.js
View file @
fe14e83c
...
...
@@ -47,7 +47,7 @@ export const behaviorStore = {
});
}
},
add
Custom
ProcessMeta
(
state
,
meta
)
{
addProcessMeta
(
state
,
meta
)
{
state
.
data
.
processes
.
push
(
meta
);
return
process
;
},
...
...
@@ -99,8 +99,8 @@ export const behaviorStore = {
}
return
result
;
},
behavior_getAssetByUUID
:
state
=>
uuid
=>
{
return
state
.
data
.
assets
.
find
(
item
=>
item
.
uuid
===
uuid
);
behavior_getAssetByUUID
:
state
=>
uuid
=>
{
return
state
.
data
.
assets
.
find
(
item
=>
item
.
uuid
===
uuid
);
},
},
actions
:
{
...
...
@@ -112,7 +112,17 @@ export const behaviorStore = {
options
:
{},
output
:
[
'success'
,
'failed'
],
};
commit
(
'addCustomProcessMeta'
,
meta
);
commit
(
'addProcessMeta'
,
meta
);
return
meta
;
},
addDividerProcessMeta
({
commit
,
state
})
{
let
meta
=
{
id
:
generateUUID
(),
isDivider
:
true
,
name
:
'Divider'
,
output
:
[
'p0'
],
};
commit
(
'addProcessMeta'
,
meta
);
return
meta
;
},
}
...
...
src/store/modules/env.js
View file @
fe14e83c
...
...
@@ -29,12 +29,19 @@ export const envStore = {
return
groupProcesses
(
state
.
processes
,
process
=>
process
.
isPrefab
);
},
builtinProcessTree
:
state
=>
{
const
tree
=
groupProcesses
(
state
.
processes
,
process
=>
!
process
.
isPrefab
);
const
dividerProcess
=
{
id
:
'divider'
,
name
:
'Divider'
,
};
tree
.
unshift
(
dividerProcess
);
const
customProcess
=
{
id
:
'custom'
,
name
:
'Custom'
,
};
const
tree
=
groupProcesses
(
state
.
processes
,
process
=>
!
process
.
isPrefab
);
tree
.
unshift
(
customProcess
);
tree
.
push
({
name
:
'custom'
,
children
:
[],
...
...
src/themes/light/behavior.scss
View file @
fe14e83c
@import
"var"
;
$dock-p
oint
-width
:
9px
;
$dock-p
in
-width
:
9px
;
.behavior-editor-dialog
{
...
...
@@ -86,7 +86,7 @@ $dock-point-width: 9px;
border-radius
:
5px
;
outline
:
none
;
user-select
:
none
;
margin
:
0
$dock-p
oint
-width
;
margin
:
0
$dock-p
in
-width
;
/*&:hover {
border-color: $block-border-hover-background-color;
...
...
@@ -172,7 +172,7 @@ $dock-point-width: 9px;
display
:
flex
;
flex-direction
:
column
;
.p
oint
{
.p
in
{
border
:
1px
solid
$block-border-blur-background-color
;
padding
:
1px
;
margin-bottom
:
5px
;
...
...
@@ -201,12 +201,12 @@ $dock-point-width: 9px;
.input
{
@extend
.dock
;
left
:
-
$dock-p
oint
-width
;
left
:
-
$dock-p
in
-width
;
}
.output
{
@extend
.dock
;
right
:
-
$dock-p
oint
-width
;
right
:
-
$dock-p
in
-width
;
}
}
...
...
src/views/Editor/behavior-editor/BehaviorEditor.vue
View file @
fe14e83c
...
...
@@ -9,11 +9,11 @@
class=
"background full-size"
splitpanes-min=
"20"
:splitpanes-size=
"70"
/>
</split-panes>
<div
class=
"center full-size background"
splitpanes-min=
"20"
:splitpanes-size=
"
7
0"
>
<div
class=
"center full-size background"
splitpanes-min=
"20"
:splitpanes-size=
"
6
0"
>
<edit-path
:processStack=
"processStack"
@
pop=
"onPop"
/>
<board
ref=
"board"
@
select-process-node=
"onSelectProcessNode"
@
edit-process=
"editProcess"
/>
</div>
<div
class=
"properties background full-size"
splitpanes-min=
"20"
:splitpanes-size=
"
3
0"
>
<div
class=
"properties background full-size"
splitpanes-min=
"20"
:splitpanes-size=
"
2
0"
>
<properties-editor
ref=
"properties"
/>
</div>
</split-panes>
...
...
@@ -126,7 +126,7 @@
replaceMetaID
:
meta
.
id
,
});
}
this
.
$refs
.
board
.
updateProcessNode
();
this
.
$refs
.
board
.
updateProcessNode
(
meta
.
id
);
},
...
mapMutations
([
'updateProcesses'
,
...
...
src/views/Editor/behavior-editor/Board.vue
View file @
fe14e83c
...
...
@@ -9,11 +9,12 @@
<g
id=
"nodes"
>
<process-node
v-for=
"(process, key, index) of subProcessMap"
:ref=
"'pn_' + key"
:process=
"process"
:key=
"index"
@
click=
"onClickProcessNode(process, key)"
@
hover-p
oint=
"onPoint
Hover"
@
leave-p
oint=
"onPoint
Leave"
@
down-p
oint=
"onPo
intDown"
@
delete=
"onP
oint
Delete"
@
hover-p
in=
"onPin
Hover"
@
leave-p
in=
"onPin
Leave"
@
down-p
in=
"onP
intDown"
@
delete=
"onP
rocessNode
Delete"
@
dblclick=
"editSubProcess(process)"
@
meta-modified=
"onProcessMetaModified"
/>
</g>
</svg>
...
...
@@ -56,6 +57,10 @@
methods
:
{
...
mapActions
([
'addCustomProcessMeta'
,
'addDividerProcessMeta'
,
]),
...
mapMutations
([
'deleteProcessMeta'
,
]),
async
edit
(
process
,
resolveProcess
)
{
this
.
selectedProcessNode
=
null
;
...
...
@@ -82,10 +87,17 @@
this
.
$set
(
this
.
subProcessMap
,
uuid
,
process
);
},
async
addSubProcessData
(
processId
,
pos
)
{
let
process
;
if
(
processId
===
'custom'
)
{
const
processMeta
=
await
this
.
addCustomProcessMeta
();
let
process
,
processMeta
;
switch
(
processId
){
case
'custom'
:
processMeta
=
await
this
.
addCustomProcessMeta
();
processId
=
processMeta
.
id
;
break
;
case
'divider'
:
processMeta
=
await
this
.
addDividerProcessMeta
();
processId
=
processMeta
.
id
;
break
;
}
process
=
this
.
resolveProcess
(
processId
);
...
...
@@ -124,7 +136,7 @@
this
.
addSubProcess
(
data
.
uuid
,
data
);
this
.
$nextTick
(()
=>
{
events
.
$emit
(
'update-dock-p
oint
-pos'
);
events
.
$emit
(
'update-dock-p
in
-pos'
);
});
},
measure
()
{
...
...
@@ -133,7 +145,7 @@
state
.
boardOffset
.
y
=
y
;
this
.
$nextTick
(()
=>
{
events
.
$emit
(
'update-dock-p
oint
-pos'
);
events
.
$emit
(
'update-dock-p
in
-pos'
);
this
.
updateLines
();
});
},
...
...
@@ -165,20 +177,20 @@
state
.
lineID
++
;
}
},
onP
ointHover
(
x
,
y
,
point
)
{
this
.
$refs
.
toolTip
.
show
(
x
+
10
,
y
-
8
,
p
oint
);
onP
inHover
(
x
,
y
,
pin
)
{
this
.
$refs
.
toolTip
.
show
(
x
+
10
,
y
-
8
,
p
in
);
},
onP
ointLeave
(
x
,
y
,
point
)
{
onP
inLeave
(
x
,
y
,
pin
)
{
this
.
$refs
.
toolTip
.
hide
();
},
onP
ointDown
(
e
,
process
,
point
)
{
onP
intDown
(
e
,
process
,
pin
)
{
document
.
addEventListener
(
"mousemove"
,
this
.
onMouseMove
);
document
.
addEventListener
(
"mouseup"
,
this
.
onMouseUp
);
this
.
processDrawing
=
process
;
this
.
pointDrawing
=
p
oint
;
this
.
pointDrawing
=
p
in
;
const
{
x
,
y
}
=
process
.
design
;
const
startPos
=
process
.
design
.
output
[
p
oint
][
0
];
const
startPos
=
process
.
design
.
output
[
p
in
][
0
];
this
.
drawingLineStart
=
`M
${
startPos
.
x
+
x
-
DOCK_POINT_OFFSET
}
,
${
startPos
.
y
+
y
+
DOCK_POINT_OFFSET
}
C
${
startPos
.
x
+
x
+
100
}
,
${
startPos
.
y
+
y
}
`
;
this
.
lineDrawing
.
visible
=
true
;
state
.
drawing
=
true
;
...
...
@@ -208,7 +220,7 @@
prev
.
output
[
outputType
].
splice
(
outputIndex
,
1
);
this
.
$delete
(
this
.
lines
,
id
);
},
onP
ointDelete
(
process
)
{
onP
rocessNodeDelete
(
process
,
meta
)
{
this
.
$delete
(
this
.
subProcessMap
,
process
.
uuid
);
this
.
$delete
(
this
.
process
.
meta
.
sub
,
process
.
uuid
);
...
...
@@ -220,12 +232,30 @@
this
.
onDeleteLine
(
line
);
}
}
if
(
meta
.
isDivider
){
//如果是分流器还要删除对应的meta
this
.
deleteProcessMeta
(
meta
.
id
);
}
},
editSubProcess
(
process
)
{
if
(
process
.
meta
.
type
!==
'builtin'
||
process
.
meta
.
sub
&&
Object
.
keys
(
process
.
meta
.
sub
).
length
>
0
)
{
if
(
!
process
.
meta
.
isDivider
&&
(
process
.
meta
.
type
!==
'builtin'
||
process
.
meta
.
sub
&&
Object
.
keys
(
process
.
meta
.
sub
).
length
>
0
)
)
{
this
.
$emit
(
'edit-process'
,
process
);
}
},
onProcessMetaModified
(
process
,
meta
){
let
ids
=
Object
.
keys
(
this
.
lines
);
for
(
let
id
of
ids
)
{
const
line
=
this
.
lines
[
id
];
const
{
prev
,}
=
line
;
if
(
prev
===
process
)
{
const
{
outputType
}
=
line
;
if
(
meta
.
output
.
indexOf
(
outputType
)
<
0
){
this
.
onDeleteLine
(
line
);
}
}
}
},
onClickProcessNode
(
process
,
uuid
)
{
for
(
let
key
in
this
.
$refs
)
{
if
(
key
.
startsWith
(
'pn_'
))
{
...
...
@@ -242,14 +272,22 @@
}
}
},
updateProcessNode
()
{
if
(
this
.
selectedProcessNode
)
{
updateProcessNode
(
metaID
)
{
this
.
$nextTick
(()
=>
{
this
.
selectedProcessNode
.
updateSize
();
this
.
selectedProcessNode
.
updateDockPointPos
();
});
for
(
let
key
in
this
.
$refs
)
{
if
(
key
.
startsWith
(
'pn_'
))
{
const
processNode
=
this
.
$refs
[
key
][
0
];
if
(
processNode
.
meta
.
id
===
metaID
)
{
this
.
onProcessMetaModified
(
processNode
.
data
,
processNode
.
meta
);
processNode
.
updateSize
();
processNode
.
updateDockPointPos
();
}
}
}
});
}
}
}
</
script
>
...
...
src/views/Editor/behavior-editor/Board/DockP
oint
.vue
→
src/views/Editor/behavior-editor/Board/DockP
in
.vue
View file @
fe14e83c
<
template
>
<div
class=
"p
oint
"
<div
class=
"p
in
"
@
mousedown
.
stop=
"onMouseDown"
@
mouseenter
.
stop=
"onMouseEnter"
@
mouseleave
.
stop=
"onMouseLeave"
...
...
@@ -10,7 +10,7 @@
<
script
>
export
default
{
name
:
"DockP
oint
"
,
name
:
"DockP
in
"
,
props
:
[
'data'
],
methods
:
{
onMouseDown
(
e
)
{
...
...
src/views/Editor/behavior-editor/Board/ProcessNode.vue
View file @
fe14e83c
...
...
@@ -8,7 +8,11 @@
@
mousedown
.
stop
.
prevent
></i>
</div>
<div
class=
"body"
>
<div
class=
"field-item"
v-for=
"(param, key, index) in meta.options"
:key=
"index"
>
<div
v-if=
"meta.isDivider"
>
<el-button
size=
"mini"
icon=
"el-icon-plus"
circle
@
click=
"outputPointModify('add')"
></el-button>
<el-button
size=
"mini"
icon=
"el-icon-minus"
circle
@
click=
"outputPointModify('remove')"
></el-button>
</div>
<div
v-else
class=
"field-item"
v-for=
"(param, key, index) in meta.options"
:key=
"index"
>
<span
class=
"key"
>
{{
param
.
alias
||
key
}}
</span>
:
<div
v-if=
"param.type === 'color'"
>
<div
class=
"color-value"
:style=
"
{'background-color': valueToString(param, data, key)}">
</div>
...
...
@@ -17,27 +21,27 @@
</div>
</div>
<div
ref=
"inputDock"
class=
"dock input"
>
<dock-p
oint
v-if=
"meta.id !== 'entry'"
v-for=
"(point, key, index) in inputMeta"
:key=
"index"
></dock-point
>
<dock-p
in
v-if=
"meta.id !== 'entry'"
v-for=
"(pin, key, index) in inputMeta"
:key=
"index"
></dock-pin
>
</div>
<div
ref=
"outputDock"
class=
"dock output"
>
<dock-p
oint
v-for=
"(point, key, index) in meta.output"
:key=
"index"
:data=
"point
"
@
mouseenter=
"onP
oint
Hover"
@
mouseleave=
"onP
oint
Leave"
@
mousedown=
"onP
oint
Down"
></dock-p
oint
>
<dock-p
in
v-for=
"(pin, key, index) in meta.output"
:key=
"index"
:data=
"pin
"
@
mouseenter=
"onP
in
Hover"
@
mouseleave=
"onP
in
Leave"
@
mousedown=
"onP
in
Down"
></dock-p
in
>
</div>
</div>
</foreignObject>
</
template
>
<
script
>
import
DockP
oint
from
"./DockPoint
"
;
import
DockP
in
from
"./DockPin
"
;
import
{
state
}
from
"./state"
;
import
events
from
"../../../../global-events"
;
//todo 容器坐标改变影响节点坐标
export
default
{
name
:
"ProcessNode"
,
components
:
{
DockP
oint
},
components
:
{
DockP
in
},
props
:
[
'process'
],
data
()
{
this
.
prepare
();
...
...
@@ -52,10 +56,10 @@
mounted
()
{
this
.
updateSize
();
events
.
$on
(
'update-dock-p
oint
-pos'
,
this
.
updateDockPointPos
);
events
.
$on
(
'update-dock-p
in
-pos'
,
this
.
updateDockPointPos
);
},
destroyed
()
{
events
.
$off
(
'update-dock-p
oint
-pos'
,
this
.
updateDockPointPos
);
events
.
$off
(
'update-dock-p
in
-pos'
,
this
.
updateDockPointPos
);
},
computed
:
{
meta
()
{
...
...
@@ -75,7 +79,7 @@
methods
:
{
valueToString
(
param
,
data
,
key
)
{
if
(
param
.
type
===
'asset'
)
{
if
(
data
.
options
.
hasOwnProperty
(
key
))
{
if
(
data
.
options
.
hasOwnProperty
(
key
))
{
let
asset
=
this
.
$store
.
getters
.
behavior_getAssetByUUID
(
data
.
options
[
key
]);
return
asset
.
name
;
}
...
...
@@ -172,8 +176,8 @@
let
posArr
=
[];
dockPointPos
[
key
]
=
posArr
;
let
dockP
oint
=
container
.
children
[
i
];
const
{
x
,
y
}
=
dockP
oint
.
getBoundingClientRect
();
let
dockP
in
=
container
.
children
[
i
];
const
{
x
,
y
}
=
dockP
in
.
getBoundingClientRect
();
posArr
.
push
({
x
:
x
-
dx
-
offX
+
4.5
,
y
:
y
-
dy
-
offY
,
...
...
@@ -183,23 +187,47 @@
this
.
$set
(
this
.
process
.
data
.
design
,
side
,
dockPointPos
);
}
},
onP
ointHover
(
e
,
point
)
{
onP
inHover
(
e
,
pin
)
{
const
{
x
,
y
}
=
e
.
target
.
getBoundingClientRect
();
this
.
$emit
(
'hover-p
oint'
,
x
,
y
,
point
);
this
.
$emit
(
'hover-p
in'
,
x
,
y
,
pin
);
},
onP
ointLeave
(
e
,
point
)
{
onP
inLeave
(
e
,
pin
)
{
const
{
x
,
y
}
=
e
.
target
.
getBoundingClientRect
();
this
.
$emit
(
'leave-p
oint'
,
x
,
y
,
point
);
this
.
$emit
(
'leave-p
in'
,
x
,
y
,
pin
);
},
onP
ointDown
(
e
,
point
)
{
let
output
=
this
.
data
.
output
[
p
oint
];
onP
inDown
(
e
,
pin
)
{
let
output
=
this
.
data
.
output
[
p
in
];
if
(
!
output
||
output
.
length
===
0
)
{
this
.
$emit
(
'down-p
oint'
,
e
,
this
.
data
,
point
);
this
.
$emit
(
'down-p
in'
,
e
,
this
.
data
,
pin
);
}
},
onClickDelete
()
{
this
.
$emit
(
'delete'
,
this
.
data
);
},
this
.
$emit
(
'delete'
,
this
.
data
,
this
.
meta
);
},
outputPointModify
(
action
)
{
let
output
=
this
.
meta
.
output
;
let
count
=
output
.
length
;
switch
(
action
)
{
case
'add'
:
count
++
;
break
;
case
'remove'
:
count
--
;
if
(
count
<
0
)
{
count
=
0
;
}
break
;
}
output
.
splice
(
0
);
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
output
.
push
(
'p'
+
i
);
}
this
.
$emit
(
'meta-modified'
,
this
.
data
,
this
.
meta
);
this
.
$nextTick
(()
=>
{
this
.
updateDockPointPos
();
});
}
}
}
</
script
>
...
...
src/views/Editor/behavior-editor/MetaEditorDialog.vue
View file @
fe14e83c
...
...
@@ -70,12 +70,13 @@
edit
(
meta
)
{
this
.
visible
=
true
;
this
.
meta
=
JSON
.
parse
(
JSON
.
stringify
(
meta
));
this
.
oldMetaID
=
this
.
meta
.
id
;
},
onClickEditOptions
()
{
this
.
$refs
.
optionsEditorDialog
.
edit
(
this
.
meta
.
options
);
},
save
()
{
if
(
this
.
$store
.
getters
.
metaIDExists
(
this
.
meta
.
id
))
{
if
(
this
.
oldMetaID
!==
this
.
meta
.
id
&&
this
.
$store
.
getters
.
metaIDExists
(
this
.
meta
.
id
))
{
this
.
$alert
(
this
.
$t
(
'This Meta ID is in use, can not save'
),
this
.
$t
(
'Alert'
))
.
catch
((
e
)
=>
{
});
...
...
src/views/Editor/behavior-editor/ProcessList.vue
View file @
fe14e83c
<
template
>
<div
class=
"process-tree"
>
<el-input
v-model=
"filterText"
size=
"mini"
/>
<el-scrollbar
class=
"scrollbar"
wrap-class=
"wrap-x-hidden"
>
<el-tree
ref=
"tree"
:data=
"data"
:props=
"defaultProps"
empty-text=
""
:filter-node-method=
"filterNodeMethod"
>
<div
slot-scope=
"
{ node, data }" class="process-tree-node">
<div
class=
"node-name"
>
<span
:draggable=
"draggable(data)"
@
dragstart
.
stop=
"dragProcessStart(data, $event)"
>
{{
data
.
name
}}
</span>
</div>
<el-dropdown
v-if=
"
data.type !== 'builtin' && !data.hasOwnProperty('children') && data.id !== 'custom'
"
class=
"more-button"
size=
"mini"
trigger=
"click"
<el-dropdown
v-if=
"
metaEditable(data)
"
class=
"more-button"
size=
"mini"
trigger=
"click"
@
command=
"(command)=>
{onMoreMenu(command, data, node)}">
<el-link
icon=
"el-icon-more"
:underline=
"false"
@
click
.
stop
/>
<el-dropdown-menu
slot=
"dropdown"
>
...
...
@@ -27,6 +30,8 @@
</
template
>
<
script
>
const
editableIds
=
[
'custom'
,
'divider'
];
export
default
{
name
:
"ProcessList"
,
props
:
[
...
...
@@ -34,19 +39,40 @@
],
data
()
{
return
{
filterText
:
''
,
defaultProps
:
{
children
:
'children'
,
label
:
'name'
}
}
},
watch
:
{
filterText
(
val
)
{
this
.
updateFilter
();
},
data
:
{
handler
(
v
)
{
this
.
updateFilter
();
},
immediate
:
true
,
deep
:
true
}
},
methods
:
{
updateFilter
(){
if
(
this
.
$refs
.
tree
){
this
.
$refs
.
tree
.
filter
(
this
.
filterText
);
}
},
draggable
(
data
)
{
return
!
data
.
hasOwnProperty
(
'children'
);
return
!
data
.
hasOwnProperty
(
'children'
)
&&
data
.
isDivider
!==
true
;
},
dragProcessStart
(
data
,
event
)
{
event
.
dataTransfer
.
setData
(
'process'
,
data
.
id
);
},
metaEditable
(
data
){
return
data
.
type
!==
'builtin'
&&
!
data
.
hasOwnProperty
(
'children'
)
&&
!
editableIds
.
includes
(
data
.
id
)
&&
data
.
isDivider
!==
true
},
onMoreMenu
(
command
,
data
,
node
)
{
switch
(
command
)
{
case
'edit'
:
...
...
@@ -56,6 +82,11 @@
this
.
$emit
(
'delete-meta'
,
data
);
break
;
}
},
filterNodeMethod
(
value
,
data
)
{
let
filterDivider
=
data
.
isDivider
!==
true
;
if
(
!
value
)
return
filterDivider
;
return
filterDivider
&&
!
data
.
hasOwnProperty
(
'children'
)
&&
data
.
name
.
toUpperCase
().
indexOf
(
value
.
toUpperCase
())
>=
0
;
}
},
...
...
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