Commit f87bd87a authored by 张晨辰's avatar 张晨辰

feat: label.color->label.fillColor

parent 83819722
...@@ -268,6 +268,7 @@ export const styles = { ...@@ -268,6 +268,7 @@ export const styles = {
cmpSelfProps.height *= cmpSelfProps.scaleY; cmpSelfProps.height *= cmpSelfProps.scaleY;
} }
// 获取拖拽组件的样式,只生成operatProps中的属性
if (onlyOpera) { if (onlyOpera) {
_.forIn(cmpSelfProps, (val, key) => { _.forIn(cmpSelfProps, (val, key) => {
if (operatProps.indexOf(key) === -1) { if (operatProps.indexOf(key) === -1) {
...@@ -276,6 +277,12 @@ export const styles = { ...@@ -276,6 +277,12 @@ export const styles = {
}); });
} }
if (component.type === 'label') {
// 如果是label类型,把fillColor转换为color
cmpSelfProps.color = cmpSelfProps.fillColor;
delete cmpSelfProps.fillColor;
}
// console.log('cmpSelfProps after inherit ', cmpSelfProps); // console.log('cmpSelfProps after inherit ', cmpSelfProps);
cmpSelfProps = styles.getStylesFromObj(cmpSelfProps, project); cmpSelfProps = styles.getStylesFromObj(cmpSelfProps, project);
_.forIn(cmpSelfProps, (value, key) => { _.forIn(cmpSelfProps, (value, key) => {
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
type: 'input', type: 'input',
value: '' value: ''
}, },
color: { fillColor: {
title: '颜色', title: '颜色',
type: 'colorPicker', type: 'colorPicker',
value: '#000' value: '#000'
......
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