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
302b9bae
Commit
302b9bae
authored
May 14, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复独立行为编辑器的bug
parent
8262071b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
9 deletions
+13
-9
editor.js
src/store/modules/editor.js
+1
-1
package.js
src/store/modules/package.js
+5
-4
behavior.scss
src/themes/light/behavior.scss
+1
-0
BehaviorTab.vue
src/views/Editor/Inspector/BehaviorTab.vue
+3
-3
ProcessEditor.vue
src/views/ProcessEditor.vue
+3
-1
No files found.
src/store/modules/editor.js
View file @
302b9bae
...
...
@@ -59,7 +59,7 @@ export const editorStore = {
}
return
'0x0'
;
},
behaviorEditable
(
state
)
{
behaviorEditable
:
state
=>
()
=>
{
let
win
=
state
.
processEditorWin
;
return
!
win
||
win
.
closed
||
!
win
.
editable
;
},
...
...
src/store/modules/package.js
View file @
302b9bae
...
...
@@ -32,9 +32,10 @@ export const packageStore = {
},
mutations
:
{
resetPackageStore
(
state
,
sourceState
)
{
for
(
let
key
in
sourceState
)
{
state
[
key
]
=
sourceState
[
key
];
}
state
.
packageInfos
=
sourceState
.
packageInfos
;
state
.
packages
=
sourceState
.
packages
;
let
builtins
=
state
.
processTree
.
find
(
item
=>
item
.
name
===
'normal'
).
children
.
find
(
item
=>
item
.
name
===
'builtin'
);
builtins
.
children
=
sourceState
.
processTree
.
find
(
item
=>
item
.
name
===
'normal'
).
children
.
find
(
item
=>
item
.
name
===
'builtin'
).
children
;
},
updatePackageInfos
(
state
,
packageInfos
)
{
for
(
let
i
=
0
,
li
=
typeMapping
.
length
;
i
<
li
;
i
++
)
{
...
...
@@ -209,7 +210,7 @@ export const packageStore = {
for
(
let
packageInfo
of
state
.
packageInfos
[
group
])
{
const
{
package_id
,
versions
}
=
packageInfo
;
if
(
!
dependencies
[
package_id
])
{
dependencies
[
package_id
]
=
m
axSatisfying
(
versions
,
'*'
);
dependencies
[
package_id
]
=
semverM
axSatisfying
(
versions
,
'*'
);
}
}
}
...
...
src/themes/light/behavior.scss
View file @
302b9bae
...
...
@@ -14,6 +14,7 @@ $dock-pin-width: 9px;
.editor-wrapper
{
flex
:
1
;
display
:
flex
;
height
:
0
;
}
.behavior-editor
{
flex
:
1
;
...
...
src/views/Editor/Inspector/BehaviorTab.vue
View file @
302b9bae
...
...
@@ -89,7 +89,7 @@
}
},
addTrigger
(
command
)
{
if
(
this
.
behaviorEditable
){
if
(
this
.
behaviorEditable
()
){
let
trigger
=
{
behaviors
:
[]};
switch
(
command
)
{
case
'custom-global'
:
...
...
@@ -126,7 +126,7 @@
}
},
addBehavior
(
eventName
,
behaviors
)
{
if
(
this
.
behaviorEditable
){
if
(
this
.
behaviorEditable
()
){
const
alias
=
`
${
this
.
activeComponent
.
name
}
_
${
eventName
}
`
+
(
behaviors
.
length
>
0
?
'_'
+
(
behaviors
.
length
+
1
)
:
''
);
this
.
addBehaviorDirect
({
...
...
@@ -175,7 +175,7 @@
this
.
makeProjectDirty
();
},
async
deleteBehavior
(
index
,
behaviors
)
{
if
(
this
.
behaviorEditable
){
if
(
this
.
behaviorEditable
()
){
let
deleteMeta
=
false
;
await
this
.
$confirm
(
this
.
$t
(
'Are you sure to delete it
\'
s process?'
),
this
.
$t
(
'Alert'
),
{
confirmButtonText
:
this
.
$t
(
'Delete'
),
...
...
src/views/ProcessEditor.vue
View file @
302b9bae
...
...
@@ -45,6 +45,7 @@
window
.
onbeforeunload
=
(
e
)
=>
{
return
this
.
showBadge
?
true
:
null
;
};
this
.
updateProcessTree
();
},
computed
:
{
...
mapState
({
...
...
@@ -114,7 +115,8 @@
close
()
{
window
.
close
();
},
...
mapMutations
([
'clearBehavior'
,
'resetProjectData'
,
'resetPackageStore'
,
'behavior_save'
])
...
mapMutations
([
'clearBehavior'
,
'resetProjectData'
,
'resetPackageStore'
,
'behavior_save'
,
'updateProcessTree'
])
}
}
</
script
>
...
...
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