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
7cb7b6c1
Commit
7cb7b6c1
authored
Apr 16, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉压缩
parent
a0f0edff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
project.js
src/store/modules/project.js
+9
-4
No files found.
src/store/modules/project.js
View file @
7cb7b6c1
...
...
@@ -98,6 +98,7 @@ export const projectStore = {
creator
:
''
,
operator
:
''
,
operators
:
''
,
update_time
:
''
,
data
:
{
options
:
{},
views
:
[],
...
...
@@ -126,10 +127,12 @@ export const projectStore = {
},
updateProject
(
state
,
project
)
{
const
{
id
,
name
,
creator
,
data
}
=
project
;
const
{
id
,
name
,
creator
,
data
,
operators
,
update_time
}
=
project
;
state
.
id
=
id
;
state
.
name
=
name
;
state
.
creator
=
creator
;
state
.
operators
=
operators
;
state
.
update_time
=
update_time
;
const
localData
=
state
.
data
;
if
(
data
)
{
...
...
@@ -502,9 +505,9 @@ export const projectStore = {
},
getters
:
{
project
(
state
)
{
const
{
id
,
name
,
creator
,
data
}
=
state
;
const
{
id
,
name
,
creator
,
data
,
update_time
}
=
state
;
return
{
id
,
name
,
creator
,
id
,
name
,
creator
,
update_time
,
data
:
JSON
.
stringify
(
data
),
};
},
...
...
@@ -671,7 +674,9 @@ export const projectStore = {
}
},
async
saveToRemote
({
state
,
dispatch
,
getters
},
{
remark
})
{
await
projectApi
.
saveOne
(
getters
.
project
,
remark
);
console
.
log
(
getters
.
project
);
let
result
=
await
projectApi
.
saveOne
(
getters
.
project
,
remark
);
console
.
log
(
result
);
dispatch
(
'deleteLocalVersion'
,
state
.
id
);
},
async
updateProject
({
commit
},
projectID
)
{
...
...
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