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
dc218e9c
Commit
dc218e9c
authored
Apr 29, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复选择远程和本地导致丢失的问题
parent
e55c563d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
ProjectConflictResolveDialog.vue
src/views/Editor/dialogs/ProjectConflictResolveDialog.vue
+20
-12
No files found.
src/views/Editor/dialogs/ProjectConflictResolveDialog.vue
View file @
dc218e9c
...
@@ -138,13 +138,14 @@
...
@@ -138,13 +138,14 @@
let
remoteStr
=
remote
?
JSON
.
stringify
(
remote
)
:
''
;
let
remoteStr
=
remote
?
JSON
.
stringify
(
remote
)
:
''
;
let
localStr
=
local
?
JSON
.
stringify
(
local
)
:
''
;
let
localStr
=
local
?
JSON
.
stringify
(
local
)
:
''
;
let
compare
=
{
let
compare
=
{
key
,
resolved
:
!
((
!
remote
||
!
local
)
||
remoteStr
!==
localStr
),
resolved
:
!
((
!
remote
||
!
local
)
||
remoteStr
!==
localStr
),
};
};
if
(
remote
)
{
if
(
remote
)
{
compare
.
remote
=
{
name
:
remote
[
name
],
key
,
data
:
remoteStr
,
obj
:
remote
};
compare
.
remote
=
{
name
:
remote
[
name
],
data
:
remoteStr
,
obj
:
remote
};
}
}
if
(
local
)
{
if
(
local
)
{
compare
.
local
=
{
name
:
local
[
name
],
key
,
data
:
localStr
,
obj
:
local
};
compare
.
local
=
{
name
:
local
[
name
],
data
:
localStr
,
obj
:
local
};
}
}
compares
.
push
(
compare
);
compares
.
push
(
compare
);
...
@@ -194,17 +195,24 @@
...
@@ -194,17 +195,24 @@
delete
this
.
localObj
[
category
];
delete
this
.
localObj
[
category
];
}
}
}
else
{
}
else
{
if
(
conflict
.
local
)
{
let
matched
=
false
;
data
.
some
((
item
,
index
)
=>
{
data
.
some
((
item
,
index
)
=>
{
if
(
item
[
categoryConfig
.
key
]
===
conflict
.
local
.
key
)
{
if
(
item
[
categoryConfig
.
key
]
===
conflict
.
key
)
{
if
(
resultData
)
{
if
(
resultData
)
{
data
[
index
]
=
resultData
;
data
[
index
]
=
resultData
;
}
else
{
}
else
{
data
.
splice
(
index
,
1
);
data
.
splice
(
index
,
1
);
}
}
matched
=
true
;
return
true
;
return
true
;
}
}
});
});
if
(
!
matched
)
{
if
(
resultData
)
{
data
.
push
(
resultData
);
}
else
{
}
}
}
}
}
this
.
$set
(
conflict
,
'resolved'
,
true
);
this
.
$set
(
conflict
,
'resolved'
,
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