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
5b6c9dde
Commit
5b6c9dde
authored
Mar 30, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交一波
parent
9be049cf
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
80 additions
and
40 deletions
+80
-40
BooleanInput.vue
src/components/inputs/BooleanInput.vue
+1
-0
ColorInput.vue
src/components/inputs/ColorInput.vue
+1
-0
DynamicSelector.vue
src/components/inputs/DynamicSelector.vue
+6
-3
NodeSelectInput.vue
src/components/inputs/NodeSelectInput.vue
+27
-6
Vector2Input.vue
src/components/inputs/Vector2Input.vue
+9
-9
zh-CN.json
src/locales/zh-CN.json
+1
-0
project.js
src/store/modules/project.js
+3
-3
behavior.scss
src/themes/light/behavior.scss
+23
-15
editor.scss
src/themes/light/editor.scss
+1
-0
index.scss
src/themes/light/index.scss
+1
-1
Editor.vue
src/views/Editor.vue
+5
-1
Assets.vue
src/views/Editor/Assets.vue
+2
-1
ToolBar.vue
src/views/Editor/ToolBar.vue
+0
-1
No files found.
src/components/inputs/BooleanInput.vue
View file @
5b6c9dde
...
...
@@ -31,6 +31,7 @@
<
style
scoped
>
.picker
{
flex
:
1
;
float
:
right
;
margin-top
:
4px
;
}
...
...
src/components/inputs/ColorInput.vue
View file @
5b6c9dde
...
...
@@ -59,6 +59,7 @@
}
.picker
{
flex
:
1
;
float
:
right
;
}
</
style
>
src/components/inputs/DynamicSelector.vue
View file @
5b6c9dde
...
...
@@ -8,9 +8,12 @@
v-model=
"popoverVisible"
:disabled=
"!editable"
>
<el-radio-group
v-model=
"editValue.type"
size=
"mini"
@
change=
"onChange"
:disabled=
"!editable"
>
<el-radio-button
v-for=
"(item, key) in dataTypes"
:label=
"key"
:key=
"key"
>
{{
item
}}
</el-radio-button>
</el-radio-group>
<div>
<el-radio-group
v-model=
"editValue.type"
size=
"mini"
@
change=
"onChange"
:disabled=
"!editable"
>
<el-radio-button
v-for=
"(item, key) in dataTypes"
:label=
"key"
:key=
"key"
>
{{
item
}}
</el-radio-button>
</el-radio-group>
<el-button
circle
plain
type=
"danger"
icon=
"el-icon-close"
class=
"micro"
style=
"margin-left: 5px;"
@
click=
"popoverVisible=false"
/>
</div>
<el-input
clearable
slot=
"reference"
:value=
"editValue.value"
@
input=
"onInput"
@
change=
"onChange"
:readonly=
"!editable"
:placeholder=
"defaultValue"
/>
...
...
src/components/inputs/NodeSelectInput.vue
View file @
5b6c9dde
<
template
>
<div
style=
"display: flex;flex: 1;"
>
<el-popover
placement=
"
top
"
placement=
"
bottom
"
popper-class=
"node-select-popover"
class=
"node-select-container"
trigger=
"manual"
width=
"400"
height=
"500"
v-model=
"popoverVisible"
@
after-enter=
"onPopoverShow"
>
<div>
<el-input
v-model=
"filterText"
prefix-icon=
"el-icon-search"
size=
"mini"
clearable
/>
...
...
@@ -16,8 +18,10 @@
v-if=
"popoverVisible"
:data=
"behavior_views"
:props=
"defaultProps"
:expand-on-click-node=
"false"
:expand-on-click-node=
"true"
:default-expanded-keys=
"expandedKeys"
draggable
node-key=
"uuid"
highlight-current
:default-expand-all=
"true"
@
node-click=
"handleNodeClick"
...
...
@@ -32,8 +36,8 @@
<div
class=
"bottom-bar"
>
<div></div>
<div>
<el-button
@
click=
"onCancel"
plain
>
Cancel
</el-button>
<el-button
@
click=
"onConfirm"
type=
"primary"
>
Confirm
</el-button>
<el-button
@
click=
"onCancel"
plain
>
{{
$t
(
'Cancel'
)
}}
</el-button>
<el-button
@
click=
"onConfirm"
type=
"primary"
>
{{
$t
(
'Confirm'
)
}}
</el-button>
</div>
</div>
</div>
...
...
@@ -41,7 +45,7 @@
:readonly=
"!editable"
>
<template
slot=
"prepend"
>
<el-tooltip
effect=
"dark"
:content=
"nodePath"
placement=
"top"
:open-delay=
"500"
:disabled=
"!nodePath"
>
<
el-button>
{{
nodeScheme
}}
</el-butto
n>
<
span>
{{
nodeScheme
}}
</spa
n>
</el-tooltip>
</
template
>
</el-input>
...
...
@@ -74,6 +78,7 @@
label
:
'name'
},
nodePath
:
''
,
expandedKeys
:
[],
}
},
watch
:
{
...
...
@@ -121,7 +126,12 @@
}
},
filterNodeMethod
(
value
,
data
)
{
return
data
.
name
.
toLowerCase
().
includes
(
value
.
toLowerCase
());
if
(
value
.
startsWith
(
':uuid|'
)){
let
targetUUID
=
value
.
replace
(
':uuid|'
,
''
);
return
data
.
uuid
===
targetUUID
;
}
else
{
return
data
.
name
.
toLowerCase
().
includes
(
value
.
toLowerCase
());
}
},
onInput
(
v
,
oldValue
)
{
if
(
v
!==
this
.
value
)
{
...
...
@@ -133,6 +143,7 @@
},
onClickEdit
()
{
this
.
popoverVisible
=
!
this
.
popoverVisible
;
},
onClickClean
()
{
this
.
nodePath
=
''
;
...
...
@@ -150,6 +161,16 @@
handleNodeClick
(
data
,
node
)
{
this
.
selectedNodeUUID
=
data
.
uuid
;
},
onPopoverShow
(){
let
uuid
=
this
.
editValue
;
if
(
uuid
){
this
.
filterText
=
':uuid|'
+
uuid
;
this
.
updateFilter
();
this
.
$refs
.
tree
.
setCurrentKey
(
uuid
);
this
.
expandedKeys
=
[
uuid
];
this
.
selectedNodeUUID
=
uuid
;
}
},
},
}
</
script
>
...
...
src/components/inputs/Vector2Input.vue
View file @
5b6c9dde
<
template
>
<div>
<div
class=
"vector2-input"
>
<span
class=
"field-label"
>
x
</span>
<el-input-number
:disabled=
"!editable"
:value=
"editValue.x"
@
input
=
"v=>onInput(v, 'x')"
controls-position=
"right"
<el-input-number
style=
"flex: 1;"
:disabled=
"!editable"
v-model=
"editValue.x"
@
change
=
"v=>onInput(v, 'x')"
controls-position=
"right"
:placeholder=
"defaultValue.x"
></el-input-number>
<span
class=
"field-label"
>
y
</span>
<el-input-number
:disabled=
"!editable"
:value=
"editValue.y"
@
input
=
"v=>onInput(v, 'y')"
controls-position=
"right"
<el-input-number
style=
"flex: 1;"
:disabled=
"!editable"
v-model=
"editValue.y"
@
change
=
"v=>onInput(v, 'y')"
controls-position=
"right"
:placeholder=
"defaultValue.y"
></el-input-number>
</div>
</
template
>
...
...
@@ -20,19 +20,19 @@
props
:
[
'value'
,
'container'
,
'property'
,
'propertyName'
,
'editable'
],
data
()
{
return
{
editValue
:
{},
//
editValue: {},
}
},
watch
:
{
value
(
v
)
{
let
editValue
=
v
===
undefined
?
this
.
property
.
default
:
v
;
this
.
editValue
=
parseVector2
(
editValue
);
//
let editValue = v === undefined ? this.property.default : v;
//
this.editValue = parseVector2(editValue);
}
},
computed
:
{
/*
editValue() {
return this.value === undefined ? this.
property.default : this.value
;
},
*/
editValue
()
{
return
this
.
value
===
undefined
?
this
.
defaultValue
:
parseVector2
(
this
.
value
)
;
},
defaultValue
()
{
let
value
=
this
.
property
.
default
;
let
placeholder
=
{};
...
...
src/locales/zh-CN.json
View file @
5b6c9dde
...
...
@@ -245,6 +245,7 @@
"pack"
:
{
"label"
:
"打包"
,
"sub"
:
{
"pack-debug-mode"
:
"调试打包"
,
"pack-manager"
:
"打包管理"
}
},
...
...
src/store/modules/project.js
View file @
5b6c9dde
...
...
@@ -834,11 +834,11 @@ export const projectStore = {
return
failedList
;
},
async
packProject
({
state
,
dispatch
},
params
)
{
let
debug
=
false
;
let
debug
=
params
.
debug
;
let
packedAssets
;
if
(
!
debug
)
{
//
if (!debug) {
packedAssets
=
await
packAssets
(
state
.
data
.
assets
);
}
//
}
const
packResult
=
await
projectApi
.
pack
(
state
.
id
,
debug
,
packedAssets
);
console
.
log
(
packResult
);
...
...
src/themes/light/behavior.scss
View file @
5b6c9dde
...
...
@@ -93,10 +93,11 @@ $dock-pin-width: 9px;
&
.hover
,
&
:hover
{
stroke
:
$--color-primary
;
stroke-dasharray
:
5
,
1
;
}
&
.contact
{
stroke
:
$--color-primary
;
}
}
&
.contact
{
stroke
:
$--color-primary
;
}
}
.node
{
...
...
@@ -284,7 +285,6 @@ $dock-pin-width: 9px;
flex-direction
:
column
;
.wrapper
{
padding
:
5px
;
flex
:
1
;
...
...
@@ -305,19 +305,20 @@ $dock-pin-width: 9px;
}
}
.inside-code
{
.inside-code
{
flex
:
1
;
height
:
0
;
border-top
:
1px
solid
$--border-color-base
;
.scrollbar
{
height
:
100%
;
.code-body
{
.code-body
{
tab-size
:
1
.5em
;
width
:
100%
;
margin
:
0
;
font-size
:
12px
;
white-space
:pre-wrap
;
white-space
:
pre-wrap
;
}
}
}
...
...
@@ -397,7 +398,7 @@ $dock-pin-width: 9px;
}
}
.property-name-popover
{
.property-name-popover
{
p
{
margin
:
0
;
//text-overflow: ellipsis;
...
...
@@ -417,7 +418,7 @@ $dock-pin-width: 9px;
}
}
.props-editor
{
.props-editor
{
.linked
{
display
:
block
;
height
:
26px
;
...
...
@@ -458,30 +459,37 @@ $dock-pin-width: 9px;
color
:
$--color-text-secondary
;
}
}
.field-label
{
.field-label
{
padding
:
0
5px
;
color
:
$--color-text-secondary
;
}
}
.source-input
{
.source-input
{
flex
:
1
;
}
.vector2-input
{
flex
:
1
;
display
:
flex
;
width
:
0
;
}
.node-select-container
{
flex
:
1
;
}
}
.source-input-popover
{
.wrapper
{
.source-input-popover
{
.wrapper
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
}
.enum-input-comment
{
.enum-input-comment
{
float
:
right
;
color
:
$--color-text-secondary
;
}
src/themes/light/editor.scss
View file @
5b6c9dde
...
...
@@ -17,6 +17,7 @@
margin-bottom
:
1px
;
padding
:
5px
10px
;
font-size
:
13px
;
justify-content
:
space-between
;
.menu
{
flex
:
1
;
...
...
src/themes/light/index.scss
View file @
5b6c9dde
...
...
@@ -118,7 +118,7 @@
.el-form-item__content
{
display
:
flex
;
justify-content
:
flex-end
;
//
justify-content: flex-end;
.el-input-number--mini
{
flex
:
1
;
...
...
src/views/Editor.vue
View file @
5b6c9dde
...
...
@@ -234,6 +234,9 @@
case
'pack'
:
await
this
.
pack
();
break
;
case
'pack-debug-mode'
:
await
this
.
pack
(
true
);
break
;
case
'pack-manager'
:
this
.
$refs
.
packManagerDialog
.
show
();
break
;
...
...
@@ -274,7 +277,7 @@
break
;
}
},
async
pack
()
{
async
pack
(
debug
)
{
let
cancel
;
cancel
=
await
this
.
saveProject
(
false
);
if
(
cancel
)
{
...
...
@@ -286,6 +289,7 @@
});
try
{
await
this
.
packProject
({
debug
:
debug
||
false
,
remark
:
this
.
lastSaveRemark
,
});
this
.
$message
({
...
...
src/views/Editor/Assets.vue
View file @
5b6c9dde
...
...
@@ -97,7 +97,8 @@
this
.
$refs
.
assetsShow
.
show
(
asset
);
},
onItemClick
(
asset
)
{
this
.
selectAssetItem
(
asset
);
this
.
updateAssetSize
(
asset
.
url
);
this
.
currentItem
=
asset
;
},
deleteAll
()
{
this
.
$confirm
(
this
.
$t
(
'Are you sure to delete all assets'
),
this
.
$t
(
'Alert'
),
{
...
...
src/views/Editor/ToolBar.vue
View file @
5b6c9dde
<
template
>
<div
class=
"tool-bar"
>
<sample-menu
:data=
"menu"
@
click-menu=
"clickMenu"
/>
<div
style=
"flex: 1"
></div>
<div
class=
"right-part"
>
<span>
[
{{
project
.
name
}}
]
...
...
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