Commit c0f28d01 by 李嘉林

文本组件

parent b3c5586e
...@@ -12,8 +12,10 @@ ...@@ -12,8 +12,10 @@
'padding-left':getPaddingList[2]['value']+'px', 'padding-left':getPaddingList[2]['value']+'px',
'padding-right':getPaddingList[3]['value']+'px', 'padding-right':getPaddingList[3]['value']+'px',
'textAlign':getAlign, 'textAlign':getAlign,
'fontSize':getFontSize}" 'line-height':lineHeight,
@click="itemClick" 'fontSize':getFontSize
}"
@click="itemClick()"
>{{getContent}}</p> >{{getContent}}</p>
</div> </div>
</template> </template>
...@@ -101,8 +103,17 @@ export default { ...@@ -101,8 +103,17 @@ export default {
return this.datas.componentData.backgroundColor; return this.datas.componentData.backgroundColor;
} }
}, },
customSize () {
return this.datas.componentData.customSize || 12;
},
lineHeight () {
return this.datas.componentData.lineHeight || 1;
},
getFontSize() { getFontSize() {
if (this.datas.componentData) { if (this.datas.componentData) {
if(this.datas.componentData.initcharSize == 0) {
return this.customSize + "px";
}
return this.datas.componentData.initcharSize + "em"; return this.datas.componentData.initcharSize + "em";
} }
} }
......
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