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
857e99eb
Commit
857e99eb
authored
Nov 13, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改processes和scripts为json字符串,在编辑器端转换成obj
parent
29348cbc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
131 deletions
+16
-131
info.json
mock/api/editor/info.json
+6
-130
env.js
src/store/modules/env.js
+9
-0
project.js
src/store/modules/project.js
+1
-1
No files found.
mock/api/editor/info.json
View file @
857e99eb
...
@@ -10,138 +10,14 @@
...
@@ -10,138 +10,14 @@
"custom"
:
[]
"custom"
:
[]
},
},
"processes"
:
[
"processes"
:
[
{
"{
\"
id
\"
:
\"
entry
\"
,
\"
name
\"
:
\"
Entry
\"
,
\"
desc
\"
:
\"
入口
\"
,
\"
group
\"
:
\"
base
\"
,
\"
type
\"
:
\"
builtin
\"
,
\"
props
\"
:{},
\"
output
\"
:[
\"
success
\"
]}"
,
"id"
:
"entry"
,
"{
\"
id
\"
:
\"
wait
\"
,
\"
name
\"
:
\"
Wait
\"
,
\"
desc
\"
:
\"
等待执行
\"
,
\"
group
\"
:
\"
base
\"
,
\"
type
\"
:
\"
builtin
\"
,
\"
props
\"
:{
\"
duration
\"
:{
\"
type
\"
:
\"
number
\"
,
\"
default
\"
:1000}},
\"
output
\"
:[
\"
complete
\"
]}"
,
"name"
:
"Entry"
,
"{
\"
id
\"
:
\"
hehe
\"
,
\"
name
\"
:
\"
Hehe
\"
,
\"
desc
\"
:
\"
呵呵
\"
,
\"
type
\"
:
\"
builtin
\"
,
\"
subEntry
\"
:
\"
1
\"
,
\"
sub
\"
:{
\"
1
\"
:{
\"
uuid
\"
:
\"
1
\"
,
\"
alias
\"
:
\"
入口
\"
,
\"
meta
\"
:
\"
entry
\"
,
\"
output
\"
:{
\"
success
\"
:[
\"
2
\"
]}},
\"
2
\"
:{
\"
uuid
\"
:
\"
2
\"
,
\"
meta
\"
:
\"
wait
\"
,
\"
alias
\"
:
\"
等待
\"
,
\"
props
\"
:{
\"
duration
\"
:500}}}}"
,
"desc"
:
"入口"
,
"{
\"
id
\"
:
\"
prefab1
\"
,
\"
name
\"
:
\"
Prefab1
\"
,
\"
desc
\"
:
\"
转盘预设
\"
,
\"
type
\"
:
\"
builtin
\"
,
\"
isPrefab
\"
:true,
\"
subEntry
\"
:
\"
1
\"
,
\"
sub
\"
:{
\"
1
\"
:{
\"
uuid
\"
:
\"
1
\"
,
\"
alias
\"
:
\"
入口
\"
,
\"
meta
\"
:
\"
entry
\"
,
\"
output
\"
:{
\"
success
\"
:[
\"
2
\"
]}},
\"
2
\"
:{
\"
uuid
\"
:
\"
2
\"
,
\"
meta
\"
:
\"
wait
\"
,
\"
alias
\"
:
\"
等待
\"
,
\"
props
\"
:{
\"
duration
\"
:500}}}}"
"group"
:
"base"
,
"type"
:
"builtin"
,
"props"
:
{},
"output"
:
[
"success"
]
},
{
"id"
:
"wait"
,
"name"
:
"Wait"
,
"desc"
:
"等待执行"
,
"group"
:
"base"
,
"type"
:
"builtin"
,
"props"
:
{
"duration"
:
{
"type"
:
"number"
,
"default"
:
1000
}
},
"output"
:
[
"complete"
]
},
{
"id"
:
"hehe"
,
"name"
:
"Hehe"
,
"desc"
:
"呵呵"
,
"type"
:
"builtin"
,
"subEntry"
:
"1"
,
"sub"
:
{
"1"
:
{
"uuid"
:
"1"
,
"alias"
:
"入口"
,
"meta"
:
"entry"
,
"output"
:
{
"success"
:
[
"2"
]
}
},
"2"
:
{
"uuid"
:
"2"
,
"meta"
:
"wait"
,
"alias"
:
"等待"
,
"props"
:
{
"duration"
:
500
}
}
}
},
{
"id"
:
"prefab1"
,
"name"
:
"Prefab1"
,
"desc"
:
"转盘预设"
,
"type"
:
"builtin"
,
"isPrefab"
:
true
,
"subEntry"
:
"1"
,
"sub"
:
{
"1"
:
{
"uuid"
:
"1"
,
"alias"
:
"入口"
,
"meta"
:
"entry"
,
"output"
:
{
"success"
:
[
"2"
]
}
},
"2"
:
{
"uuid"
:
"2"
,
"meta"
:
"wait"
,
"alias"
:
"等待"
,
"props"
:
{
"duration"
:
500
}
}
}
}
],
],
"scripts"
:
[
"scripts"
:
[
{
"{
\"
id
\"
:
\"
wave
\"
,
\"
name
\"
:
\"
Wave
\"
,
\"
props
\"
:{
\"
duration
\"
:{
\"
type
\"
:
\"
number
\"
,
\"
default
\"
:1000},
\"
name
\"
:{
\"
type
\"
:
\"
string
\"
,
\"
default
\"
:
\"
hello
\"
},
\"
color
\"
:{
\"
type
\"
:
\"
color
\"
,
\"
default
\"
:
\"
#123456
\"
},
\"
type
\"
:{
\"
type
\"
:[
\"
rotate
\"
,
\"
jump
\"
,
\"
breath
\"
],
\"
default
\"
:
\"
rotate
\"
},
\"
ease
\"
:{
\"
type
\"
:[
\"
linear
\"
,
\"
cubic
\"
,
\"
back
\"
],
\"
default
\"
:
\"
linear
\"
},
\"
autoPlay
\"
:{
\"
type
\"
:
\"
boolean
\"
,
\"
default
\"
:false}}}"
,
"id"
:
"wave"
,
"{
\"
id
\"
:
\"
zoom-button
\"
,
\"
name
\"
:
\"
ZoomButton
\"
,
\"
props
\"
:{
\"
zoomTo
\"
:{
\"
type
\"
:
\"
number
\"
,
\"
default
\"
:1.1}}}"
"name"
:
"Wave"
,
"props"
:
{
"duration"
:
{
"type"
:
"number"
,
"default"
:
1000
},
"name"
:
{
"type"
:
"string"
,
"default"
:
"hello"
},
"color"
:
{
"type"
:
"color"
,
"default"
:
"#123456"
},
"type"
:
{
"type"
:
[
"rotate"
,
"jump"
,
"breath"
],
"default"
:
"rotate"
},
"ease"
:
{
"type"
:
[
"linear"
,
"cubic"
,
"back"
],
"default"
:
"linear"
},
"autoPlay"
:
{
"type"
:
"boolean"
,
"default"
:
false
}
}
},
{
"id"
:
"zoom-button"
,
"name"
:
"ZoomButton"
,
"props"
:
{
"zoomTo"
:
{
"type"
:
"number"
,
"default"
:
1.1
}
}
}
]
]
}
}
}
}
\ No newline at end of file
src/store/modules/env.js
View file @
857e99eb
...
@@ -22,6 +22,9 @@ export const envStore = {
...
@@ -22,6 +22,9 @@ export const envStore = {
mutations
:
{
mutations
:
{
updateEnv
(
state
,
env
)
{
updateEnv
(
state
,
env
)
{
Object
.
assign
(
state
,
env
);
Object
.
assign
(
state
,
env
);
parseItem
(
state
.
processes
);
parseItem
(
state
.
scripts
);
state
.
initialized
=
true
;
state
.
initialized
=
true
;
},
},
},
},
...
@@ -85,3 +88,9 @@ function groupProcesses(processes, filterFunc) {
...
@@ -85,3 +88,9 @@ function groupProcesses(processes, filterFunc) {
});
});
return
result
;
return
result
;
}
}
function
parseItem
(
list
)
{
for
(
let
i
=
0
,
li
=
list
.
length
;
i
<
li
;
i
++
)
{
list
[
i
]
=
JSON
.
parse
(
list
[
i
]);
}
}
src/store/modules/project.js
View file @
857e99eb
...
@@ -33,7 +33,7 @@ export const projectStore = {
...
@@ -33,7 +33,7 @@ export const projectStore = {
views
:
[],
views
:
[],
assets
:
[],
assets
:
[],
dataMapping
:
[],
dataMapping
:
[],
process
Map
:
{}
,
process
es
:
[]
,
},
},
activeComponent
:
{},
activeComponent
:
{},
activeComponentCopy
:
{},
// 当前选中节点的镜像,用来处理拖拽时数据变化频繁的问题
activeComponentCopy
:
{},
// 当前选中节点的镜像,用来处理拖拽时数据变化频繁的问题
...
...
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