Commit f0c39d99 authored by rockyl's avatar rockyl

修改rotate属性为rotation

parent b3dc3d14
...@@ -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',
rotate: 'add', rotation: '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', 'rotate']; const operatProps = ['x', 'y', 'width', 'height', 'rotation'];
// 属性单位 对照表, 如果是数值的时候需要添加单位 // 属性单位 对照表, 如果是数值的时候需要添加单位
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 'rotate': case 'rotation':
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;`;
......
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
type: 'inputNumber', type: 'inputNumber',
value: 1 value: 1
}, },
rotate: { rotation: {
title: '旋转', title: '旋转',
type: 'inputNumber', type: 'inputNumber',
props: { props: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment