Commit c0f28d01 by 李嘉林

文本组件

parent b3c5586e
......@@ -3,18 +3,20 @@
<template>
<div class="text-text">
<p
:style="{
'word-breakword-break':'break-all',
'color':getfontsizeColor,
'background-color':getbackgroundColor,
'padding-top':getPaddingList[0]['value']+'px',
'padding-bottom':getPaddingList[1]['value']+'px',
'padding-left':getPaddingList[2]['value']+'px',
'padding-right':getPaddingList[3]['value']+'px',
'textAlign':getAlign,
'fontSize':getFontSize}"
@click="itemClick"
>{{getContent}}</p>
:style="{
'word-breakword-break':'break-all',
'color':getfontsizeColor,
'background-color':getbackgroundColor,
'padding-top':getPaddingList[0]['value']+'px',
'padding-bottom':getPaddingList[1]['value']+'px',
'padding-left':getPaddingList[2]['value']+'px',
'padding-right':getPaddingList[3]['value']+'px',
'textAlign':getAlign,
'line-height':lineHeight,
'fontSize':getFontSize
}"
@click="itemClick()"
>{{getContent}}</p>
</div>
</template>
......@@ -101,8 +103,17 @@ export default {
return this.datas.componentData.backgroundColor;
}
},
customSize () {
return this.datas.componentData.customSize || 12;
},
lineHeight () {
return this.datas.componentData.lineHeight || 1;
},
getFontSize() {
if (this.datas.componentData) {
if(this.datas.componentData.initcharSize == 0) {
return this.customSize + "px";
}
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