...
|
...
|
@@ -45,7 +45,7 @@ |
|
|
type: String,
|
|
|
default: 'fav'
|
|
|
},
|
|
|
text: String,
|
|
|
text: [String, Number],
|
|
|
option: {
|
|
|
type: Object,
|
|
|
default() {
|
...
|
...
|
@@ -88,12 +88,16 @@ |
|
|
textStyle() {
|
|
|
let style = `font-size: ${pxToRem(this.option.textFontSize || defaultOption.textFontSize)};`;
|
|
|
|
|
|
if (['top', 'bottom'].indexOf(this.option.textAlign) >= 0) {
|
|
|
style += ` vertical-align: ${this.option.textAlign};`;
|
|
|
let textAlign = this.option.textAlign || defaultOption.textAlign;
|
|
|
|
|
|
if (['top', 'bottom'].indexOf(textAlign) >= 0) {
|
|
|
style += ` vertical-align: ${textAlign};`;
|
|
|
}
|
|
|
|
|
|
if (Number(this.option.textZoom) !== NaN) {
|
|
|
style += `transform: scale(${this.option.textZoom}, ${this.option.textZoom});`
|
|
|
let textZoom = this.option.textZoom || defaultOption.textAlign;
|
|
|
|
|
|
if (Number(textZoom) !== NaN) {
|
|
|
style += `transform: scale(${textZoom}, ${textZoom});`
|
|
|
}
|
|
|
|
|
|
return style;
|
...
|
...
|
|