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
8fc7ba69
Commit
8fc7ba69
authored
Mar 17, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
420f7c0b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
6 deletions
+58
-6
en.json
src/locales/en.json
+3
-0
zh-CN.json
src/locales/zh-CN.json
+3
-0
project.js
src/store/modules/project.js
+28
-2
Views.vue
src/views/Editor/Views.vue
+24
-4
No files found.
src/locales/en.json
View file @
8fc7ba69
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
"Alert"
:
"Alert"
,
"Alert"
:
"Alert"
,
"Confirm"
:
"Confirm"
,
"Confirm"
:
"Confirm"
,
"Cancel"
:
"Cancel"
,
"Cancel"
:
"Cancel"
,
"Yes"
:
"Yes"
,
"No"
:
"No"
,
"Close"
:
"Close"
,
"Close"
:
"Close"
,
"Still Close"
:
"Still Close"
,
"Still Close"
:
"Still Close"
,
"Save"
:
"Save"
,
"Save"
:
"Save"
,
...
@@ -116,6 +118,7 @@
...
@@ -116,6 +118,7 @@
"Duplicate project success"
:
"Duplicate project success"
,
"Duplicate project success"
:
"Duplicate project success"
,
"Project name cannot be empty"
:
"Project name cannot be empty"
,
"Project name cannot be empty"
:
"Project name cannot be empty"
,
"This action will permanently delete project"
:
"This action will permanently delete project[{projectName}], continue?"
,
"This action will permanently delete project"
:
"This action will permanently delete project[{projectName}], continue?"
,
"Do you copy the behavior of this node"
:
"Do you copy the behavior of this node?"
,
"Fetching projects"
:
"Fetching projects…"
,
"Fetching projects"
:
"Fetching projects…"
,
"Failed to fetch env"
:
"Failed to fetch env"
,
"Failed to fetch env"
:
"Failed to fetch env"
,
"Failed to fetch projects"
:
"Failed to fetch projects"
,
"Failed to fetch projects"
:
"Failed to fetch projects"
,
...
...
src/locales/zh-CN.json
View file @
8fc7ba69
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
"Alert"
:
"提示"
,
"Alert"
:
"提示"
,
"Confirm"
:
"确认"
,
"Confirm"
:
"确认"
,
"Cancel"
:
"取消"
,
"Cancel"
:
"取消"
,
"Yes"
:
"是"
,
"No"
:
"否"
,
"Close"
:
"关闭"
,
"Close"
:
"关闭"
,
"Refresh"
:
"刷新"
,
"Refresh"
:
"刷新"
,
"Still Close"
:
"直接关闭"
,
"Still Close"
:
"直接关闭"
,
...
@@ -136,6 +138,7 @@
...
@@ -136,6 +138,7 @@
"Duplicate project success"
:
"项目复制成功"
,
"Duplicate project success"
:
"项目复制成功"
,
"Project name cannot be empty"
:
"项目名不能为空"
,
"Project name cannot be empty"
:
"项目名不能为空"
,
"This action will permanently delete project"
:
"您将删除项目[{projectName}], 是否继续?"
,
"This action will permanently delete project"
:
"您将删除项目[{projectName}], 是否继续?"
,
"Do you copy the behavior of this node"
:
"是否复制行为?"
,
"Fetching projects"
:
"获取项目列表…"
,
"Fetching projects"
:
"获取项目列表…"
,
"Failed to fetch env"
:
"获取环境失败"
,
"Failed to fetch env"
:
"获取环境失败"
,
"Failed to fetch projects"
:
"获取项目列表失败"
,
"Failed to fetch projects"
:
"获取项目列表失败"
,
...
...
src/store/modules/project.js
View file @
8fc7ba69
...
@@ -378,9 +378,35 @@ export const projectStore = {
...
@@ -378,9 +378,35 @@ export const projectStore = {
},
},
copyNode
(
state
,
{
node
,
parentNode
})
{
copyNode
(
state
,
{
node
,
parentNode
,
copyState
})
{
let
_node1
=
node
;
let
_node1
=
node
;
copyNodeCatch
=
_node1
;
console
.
log
(
_node1
)
copyNodeCatch
=
clonePureObj
(
_node1
)
if
(
copyState
==
1
){
//复制行为
copyNodeCatch
.
events
}
else
if
(
copyState
==
2
){
//不复制行为
copyNodeCatch
.
events
=
null
}
//重置uuid
let
keys
=
Object
.
getOwnPropertyNames
(
copyNodeCatch
.
events
)
for
(
let
key
of
keys
){
console
.
log
(
"key"
,
key
)
console
.
log
(
copyNodeCatch
.
events
[
key
])
console
.
log
(
copyNodeCatch
.
events
[
key
].
behaviors
)
if
(
copyNodeCatch
.
events
[
key
].
behaviors
){
for
(
let
behavior
of
copyNodeCatch
.
events
[
key
].
behaviors
){
// behavior.uuid=generateUUID()
// behavior.meta=generateUUID()
}
}
}
console
.
log
(
copyNodeCatch
)
//localStorage.copyNodeCatch=_node1;
//localStorage.copyNodeCatch=_node1;
// let _node=copyBaseRoot(_node1);
// let _node=copyBaseRoot(_node1);
// setUUIDForAllChildren(_node)
// setUUIDForAllChildren(_node)
...
...
src/views/Editor/Views.vue
View file @
8fc7ba69
...
@@ -265,10 +265,30 @@
...
@@ -265,10 +265,30 @@
});
});
break
;
break
;
case
'copy'
:
case
'copy'
:
this
.
copyNode
({
node
:
data
,
this
.
$confirm
(
this
.
$t
(
'Do you copy the behavior of this node'
),
this
.
$t
(
'Alert'
),
{
parentNode
:
node
.
parent
.
data
confirmButtonText
:
this
.
$t
(
'Yes'
),
});
cancelButtonText
:
this
.
$t
(
'No'
),
type
:
'warning'
}).
then
(
()
=>
{
//copyState:1复制行为,2不复制行为
this
.
copyNode
({
node
:
data
,
parentNode
:
node
.
parent
.
data
,
copyState
:
1
});
},
()
=>
{
//copyState:1复制行为,2不复制行为
this
.
copyNode
({
node
:
data
,
parentNode
:
node
.
parent
.
data
,
copyState
:
2
});
}
)
break
;
break
;
case
'paste'
:
case
'paste'
:
this
.
pasteNode
({
this
.
pasteNode
({
...
...
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