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
bc3ffc80
Commit
bc3ffc80
authored
Mar 17, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加粘贴选项
parent
ecdac185
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
31 deletions
+6
-31
project.js
src/store/modules/project.js
+4
-30
Views.vue
src/views/Editor/Views.vue
+2
-1
No files found.
src/store/modules/project.js
View file @
bc3ffc80
...
...
@@ -20,6 +20,7 @@ import {fetchApi} from "../../api/common"
import
{
toZeroing
}
from
"psd-parse-web"
import
{
arrayFind
}
from
"element-ui/src/utils/util"
;
const
storeName
=
'project'
;
const
psStoreName
=
'pack-history'
;
...
...
@@ -387,38 +388,11 @@ export const projectStore = {
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()
}
}
delete
copyNodeCatch
.
events
}
console
.
log
(
copyNodeCatch
)
//localStorage.copyNodeCatch=_node1;
// let _node=copyBaseRoot(_node1);
// setUUIDForAllChildren(_node)
// if (parentNode) {
// if (!parentNode.children) {
// Vue.set(parentNode, 'children', []);
// }
// parentNode.children.push(_node);
// } else {
// state.data.views.push(_node);
// }
//copy(JSON.stringify(copyNodeCatch))
},
pasteNode
(
state
,
{
node
,
parentNode
,
pasteState
})
{
let
_node1
=
copyNodeCatch
;
console
.
log
(
copyNodeCatch
);
...
...
src/views/Editor/Views.vue
View file @
bc3ffc80
...
...
@@ -42,7 +42,7 @@
@
node-drop=
"onNodeDrop"
>
<div
slot-scope=
"
{ node, data }" class="tree-node">
<div
class=
"node-name"
>
<div
class=
"node-name"
>
{{
data
.
name
}}
</div>
...
...
@@ -282,6 +282,7 @@
parentNode
:
node
.
parent
.
data
,
copyState
:
1
});
},
()
=>
{
//copyState:1复制行为,2不复制行为
...
...
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