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
ff8abbd3
Commit
ff8abbd3
authored
Nov 12, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
行为编辑器关闭警告
parent
4e2a11fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
8 deletions
+18
-8
en.json
src/locales/en.json
+2
-0
behavior.js
src/store/modules/behavior.js
+0
-3
BehaviorEditorDialog.vue
src/views/Editor/dialogs/BehaviorEditorDialog.vue
+16
-5
No files found.
src/locales/en.json
View file @
ff8abbd3
...
...
@@ -3,6 +3,7 @@
"Confirm"
:
"Confirm"
,
"Cancel"
:
"Cancel"
,
"Close"
:
"Close"
,
"Still Close"
:
"Still Close"
,
"Save"
:
"Save"
,
"Copy"
:
"Copy"
,
"Exit"
:
"Exit"
,
...
...
@@ -77,6 +78,7 @@
"This Meta ID is in use, can not save"
:
"This Meta ID is in use, can not save!"
,
"Custom node desc"
:
"Custom node"
,
"Divider node desc"
:
"Divider node, exit will be executed in sequence"
,
"Save this behavior before"
:
"Save this behavior before?"
,
"menu"
:
{
"save"
:
"Save"
,
"details"
:
"Details"
,
...
...
src/store/modules/behavior.js
View file @
ff8abbd3
...
...
@@ -60,9 +60,6 @@ export const behaviorStore = {
behavior_save
(
state
)
{
state
.
originData
.
processes
=
state
.
data
.
processes
;
state
.
originBehaviors
[
0
]
=
state
.
currentBehavior
;
},
behavior_cancel
(
state
)
{
},
updateProcesses
(
state
,
{
targetMetaID
,
replaceMetaID
})
{
for
(
let
process
of
state
.
data
.
processes
)
{
...
...
src/views/Editor/dialogs/BehaviorEditorDialog.vue
View file @
ff8abbd3
<
template
>
<el-dialog
:title=
"$t('Behavior Editor')"
:visible
.
sync=
"visible"
@
before-close=
"beforeClose"
@
opened=
"onOpened"
<el-dialog
:title=
"$t('Behavior Editor')"
:visible
.
sync=
"visible"
:
before-close=
"beforeClose"
@
opened=
"onOpened"
:fullscreen=
"true"
:append-to-body=
"true"
:close-on-click-modal=
"false"
custom-class=
"behavior-editor-dialog"
>
<behavior-editor
v-if=
"editorReady"
ref=
"behaviorEditor"
class=
"full-size"
></behavior-editor>
...
...
@@ -42,10 +42,21 @@
this
.
visible
=
false
;
this
.
$emit
(
'change'
);
},
beforeClose
()
{
this
.
behavior_cancel
();
this
.
visible
=
false
;
this
.
$emit
(
'cancel'
);
beforeClose
(
done
)
{
this
.
$confirm
(
this
.
$t
(
'Save this behavior before?'
),
this
.
$t
(
'Alert'
),
{
showClose
:
false
,
closeOnClickModal
:
false
,
closeOnPressEscape
:
false
,
confirmButtonText
:
this
.
$t
(
'Confirm'
),
cancelButtonText
:
this
.
$t
(
'Still Close'
),
type
:
'warning'
}).
then
(()
=>
{
this
.
onSave
();
done
();
}).
catch
((
e
)
=>
{
this
.
$emit
(
'cancel'
);
done
();
});
},
onOpened
()
{
this
.
editorReady
=
true
;
...
...
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