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
3975e6ac
Commit
3975e6ac
authored
Nov 27, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
99c79c3b
2f0b3791
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
common.js
src/utils/common.js
+6
-0
No files found.
src/utils/common.js
View file @
3975e6ac
...
@@ -67,6 +67,7 @@ const attrShortMapper = {
...
@@ -67,6 +67,7 @@ const attrShortMapper = {
// 编辑时想拖拽组件需要生成的css属性
// 编辑时想拖拽组件需要生成的css属性
// 只需要位置,不需要来源透明度等等
// 只需要位置,不需要来源透明度等等
const
operatProps
=
[
'x'
,
'y'
,
'left'
,
'top'
,
'right'
,
'bottom'
,
'width'
,
'height'
,
'rotation'
];
const
operatProps
=
[
'x'
,
'y'
,
'left'
,
'top'
,
'right'
,
'bottom'
,
'width'
,
'height'
,
'rotation'
];
const
ignoreProps
=
[
'left'
,
'right'
,
'top'
,
'bottom'
];
// 属性单位 对照表, 如果是数值的时候需要添加单位
// 属性单位 对照表, 如果是数值的时候需要添加单位
const
attrUnitMapper
=
{
const
attrUnitMapper
=
{
...
@@ -281,6 +282,11 @@ export const styles = {
...
@@ -281,6 +282,11 @@ export const styles = {
});
});
}
}
// 把不需要参与样式计算的属性干掉
_
.
forEach
(
ignoreProps
,
prop
=>
{
delete
cmpSelfProps
[
prop
];
});
if
(
component
.
type
===
'label'
)
{
if
(
component
.
type
===
'label'
)
{
// 如果是label类型,把fillColor转换为color
// 如果是label类型,把fillColor转换为color
cmpSelfProps
.
color
=
cmpSelfProps
.
fillColor
;
cmpSelfProps
.
color
=
cmpSelfProps
.
fillColor
;
...
...
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