Commit bc3ffc80 authored by 任建锋's avatar 任建锋

添加粘贴选项

parent ecdac185
......@@ -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);
......
......@@ -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不复制行为
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment