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
f0c39d99
Commit
f0c39d99
authored
Nov 13, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改rotate属性为rotation
parent
b3dc3d14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
common.js
src/utils/common.js
+3
-3
properties.js
src/utils/properties.js
+1
-1
No files found.
src/utils/common.js
View file @
f0c39d99
...
@@ -28,7 +28,7 @@ export const componentsMap = [
...
@@ -28,7 +28,7 @@ export const componentsMap = [
const
propsComputeRules
=
{
const
propsComputeRules
=
{
x
:
'add'
,
x
:
'add'
,
y
:
'add'
,
y
:
'add'
,
rotat
e
:
'add'
,
rotat
ion
:
'add'
,
scaleX
:
'multi'
,
scaleX
:
'multi'
,
scaleY
:
'multi'
,
scaleY
:
'multi'
,
alpha
:
'multi'
,
alpha
:
'multi'
,
...
@@ -60,7 +60,7 @@ const attrShortMapper = {
...
@@ -60,7 +60,7 @@ const attrShortMapper = {
// 编辑时想拖拽组件需要生成的css属性
// 编辑时想拖拽组件需要生成的css属性
// 只需要位置,不需要来源透明度等等
// 只需要位置,不需要来源透明度等等
const
operatProps
=
[
'x'
,
'y'
,
'width'
,
'height'
,
'rotat
e
'
];
const
operatProps
=
[
'x'
,
'y'
,
'width'
,
'height'
,
'rotat
ion
'
];
// 属性单位 对照表, 如果是数值的时候需要添加单位
// 属性单位 对照表, 如果是数值的时候需要添加单位
const
attrUnitMapper
=
{
const
attrUnitMapper
=
{
...
@@ -180,7 +180,7 @@ export const styles = {
...
@@ -180,7 +180,7 @@ export const styles = {
if
(
invalidAttr
(
key
,
value
))
return
''
;
if
(
invalidAttr
(
key
,
value
))
return
''
;
switch
(
attr
)
{
switch
(
attr
)
{
case
'rotat
e
'
:
case
'rotat
ion
'
:
return
[
'transform'
,
[
`rotate(
${
value
}
deg)`
]];
//`transform: rotate(${value}deg);`;
return
[
'transform'
,
[
`rotate(
${
value
}
deg)`
]];
//`transform: rotate(${value}deg);`;
case
'background-image'
:
case
'background-image'
:
return
[
'background-image'
,
[
`url(
${
value
}
)`
]];
//`background-image: url(${value});background-position:center;background-size:contain;`;
return
[
'background-image'
,
[
`url(
${
value
}
)`
]];
//`background-image: url(${value});background-position:center;background-size:contain;`;
...
...
src/utils/properties.js
View file @
f0c39d99
...
@@ -23,7 +23,7 @@ export default {
...
@@ -23,7 +23,7 @@ export default {
type
:
'inputNumber'
,
type
:
'inputNumber'
,
value
:
1
value
:
1
},
},
rotat
e
:
{
rotat
ion
:
{
title
:
'旋转'
,
title
:
'旋转'
,
type
:
'inputNumber'
,
type
:
'inputNumber'
,
props
:
{
props
:
{
...
...
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