From e3b2fcda322fcf839e196acbed4f6dd8b259c77a Mon Sep 17 00:00:00 2001 From: qiang Date: Sat, 2 Nov 2019 12:05:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20cover-view=20?= =?UTF-8?q?=E6=96=87=E5=AD=97=E6=8E=92=E7=89=88=EF=BC=88v3-app=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/app-plus/view/mixins/cover.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/platforms/app-plus/view/mixins/cover.js b/src/platforms/app-plus/view/mixins/cover.js index ea92d6475..c51aa9d98 100644 --- a/src/platforms/app-plus/view/mixins/cover.js +++ b/src/platforms/app-plus/view/mixins/cover.js @@ -1,6 +1,7 @@ const base = ['padding', 'borderRadius', 'borderColor', 'borderWidth', 'backgroundColor'] -const text = ['color', 'textAlign', 'lineHeight', 'fontSize', 'fontWeight', 'textOverflow'] +const text = ['color', 'textAlign', 'lineHeight', 'fontSize', 'fontWeight', 'textOverflow', 'whiteSpace'] const image = [] +const textAlign = { start: 'left', end: 'right' } let index = 0 export default { @@ -53,13 +54,14 @@ export default { tag: 'font', position, textStyles: { - align: style.textAlign, + align: textAlign[style.textAlign] || style.textAlign, color: style.color, decoration: 'none', lineSpacing: (parseFloat(style.lineHeight) - parseFloat(style.fontSize)) + 'px', margin: style.padding, overflow: style.textOverflow, size: style.fontSize, + verticalAlign: 'top', weight: style.fontWeight, whiteSpace: style.whiteSpace }, -- GitLab