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
5d31f64c
Commit
5d31f64c
authored
Apr 27, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into res-group
parents
21438934
77598422
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
project.js
src/store/modules/project.js
+13
-1
ProjectConflictResolveDialog.vue
src/views/Editor/dialogs/ProjectConflictResolveDialog.vue
+14
-6
yarn.lock
yarn.lock
+1
-1
No files found.
src/store/modules/project.js
View file @
5d31f64c
...
@@ -414,16 +414,28 @@ export const projectStore = {
...
@@ -414,16 +414,28 @@ export const projectStore = {
let
_node1
=
node
;
let
_node1
=
node
;
console
.
log
(
_node1
)
console
.
log
(
_node1
)
copyNodeCatch
=
clonePureObj
(
_node1
)
copyNodeCatch
=
clonePureObj
(
_node1
)
console
.
log
(
"copyNodeCatch"
,
copyNodeCatch
)
if
(
copyState
==
1
)
{
if
(
copyState
==
1
)
{
//复制行为
//复制行为
copyNodeCatch
.
events
copyNodeCatch
.
events
}
else
if
(
copyState
==
2
)
{
}
else
if
(
copyState
==
2
)
{
//不复制行为
//不复制行为
delete
copyNodeCatch
.
events
console
.
log
(
this
)
deleteChildEvent
(
copyNodeCatch
)
}
}
//copy(JSON.stringify(copyNodeCatch))
//copy(JSON.stringify(copyNodeCatch))
function
deleteChildEvent
(
copyNodeCatch
){
console
.
log
(
123
)
delete
copyNodeCatch
.
events
;
if
(
copyNodeCatch
.
children
){
for
(
let
item
of
copyNodeCatch
.
children
){
deleteChildEvent
(
item
)
}
}
}
},
},
pasteNode
(
state
,
{
node
,
parentNode
,
pasteState
})
{
pasteNode
(
state
,
{
node
,
parentNode
,
pasteState
})
{
let
_node1
=
copyNodeCatch
;
let
_node1
=
copyNodeCatch
;
console
.
log
(
copyNodeCatch
);
console
.
log
(
copyNodeCatch
);
...
...
src/views/Editor/dialogs/ProjectConflictResolveDialog.vue
View file @
5d31f64c
...
@@ -348,7 +348,7 @@
...
@@ -348,7 +348,7 @@
//console.log(merged);
//console.log(merged);
let
startLine
=
modifiedStartLineNumber
+
offset
;
let
startLine
=
modifiedStartLineNumber
+
offset
+
(
modifiedEndLineNumber
===
0
?
1
:
0
)
;
mergedCodeLines
.
splice
(
startLine
-
1
,
modifiedEndLineNumber
-
modifiedStartLineNumber
+
1
,
...
merged
);
mergedCodeLines
.
splice
(
startLine
-
1
,
modifiedEndLineNumber
-
modifiedStartLineNumber
+
1
,
...
merged
);
offset
+=
3
+
remotePart
.
length
;
offset
+=
3
+
remotePart
.
length
;
}
}
...
@@ -387,10 +387,11 @@
...
@@ -387,10 +387,11 @@
}
}
break
;
break
;
}
}
if
(
replacer
!==
undefined
)
{
/*
if (replacer !== undefined) {
replaceText(replacer);
replaceText(replacer);
//this.localData = lines.join('\n');
//this.localData = lines.join('\n');
}
}*/
replaceText
(
replacer
);
this
.
delayTrack
();
this
.
delayTrack
();
this
.
conflictIndex
--
;
this
.
conflictIndex
--
;
...
@@ -404,18 +405,25 @@
...
@@ -404,18 +405,25 @@
}
}
return
resultLines
.
join
(
'
\
n'
);
return
resultLines
.
join
(
'
\
n'
);
}
}
return
null
;
}
}
function
replaceText
(
replacer
)
{
function
replaceText
(
replacer
)
{
model
.
pushEditOperations
([],
[
{
let
op
=
{
range
:
{
range
:
{
startLineNumber
:
conflict
.
remoteLine
+
1
,
startLineNumber
:
conflict
.
remoteLine
+
1
,
startColumn
:
0
,
startColumn
:
1
,
endLineNumber
:
conflict
.
localLine
+
1
,
endLineNumber
:
conflict
.
localLine
+
1
,
endColumn
:
Number
.
MAX_VALUE
,
endColumn
:
Number
.
MAX_VALUE
,
},
},
text
:
replacer
,
text
:
replacer
,
}],
()
=>
[]);
};
if
(
replacer
===
null
)
{
op
.
range
.
startLineNumber
=
conflict
.
remoteLine
;
op
.
range
.
startColumn
=
Number
.
MAX_VALUE
;
}
model
.
pushEditOperations
([],
[
op
],
()
=>
[]);
}
}
},
},
...
mapMutations
([
...
mapMutations
([
...
...
yarn.lock
View file @
5d31f64c
...
@@ -8703,7 +8703,7 @@ vue-loader@^15.7.0:
...
@@ -8703,7 +8703,7 @@ vue-loader@^15.7.0:
"vue-monaco@http://gitlab2.dui88.com/laoqifeng/vue-monaco.git":
"vue-monaco@http://gitlab2.dui88.com/laoqifeng/vue-monaco.git":
version "0.3.1"
version "0.3.1"
resolved "http://gitlab2.dui88.com/laoqifeng/vue-monaco.git#
13de23ce8ba73525cf08678227ae0c579fe2319d
"
resolved "http://gitlab2.dui88.com/laoqifeng/vue-monaco.git#
d8153f9d3f41eee09a7a0c05212333dea5c86712
"
dependencies:
dependencies:
monaco-editor "^0.20.0"
monaco-editor "^0.20.0"
nano-assign "^1.0.0"
nano-assign "^1.0.0"
...
...
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