|
|
@@ -15,7 +15,11 @@
|
|
|
v-if="block.type === 'text'"
|
|
|
:key="'text-' + index"
|
|
|
class="pinyin-sentence"
|
|
|
- :style="[{ 'align-items': pinyinPosition === 'top' ? 'flex-end' : 'flex-start' }, block.sentenceStyle]"
|
|
|
+ :style="[
|
|
|
+ { 'align-items': pinyinPosition === 'top' ? 'flex-end' : 'flex-start' },
|
|
|
+ block.sentenceStyle,
|
|
|
+ block.parentStyle,
|
|
|
+ ]"
|
|
|
>
|
|
|
<span
|
|
|
v-for="(word, wIndex) in block.word_list"
|
|
|
@@ -688,7 +692,11 @@ export default {
|
|
|
sentenceStyle.paddingLeft = styleObj.paddingLeft;
|
|
|
delete styleObj.paddingLeft;
|
|
|
}
|
|
|
-
|
|
|
+ let parentStyle = {};
|
|
|
+ if (styleObj && styleObj.textAlign === 'center') {
|
|
|
+ parentStyle['text-align'] = 'center';
|
|
|
+ parentStyle['display'] = 'block';
|
|
|
+ }
|
|
|
return {
|
|
|
type: 'text',
|
|
|
word_list: item.word_list,
|
|
|
@@ -699,6 +707,7 @@ export default {
|
|
|
sentenceStyle,
|
|
|
rawStyleText: combinedStyle,
|
|
|
hasEmphasisDot,
|
|
|
+ parentStyle,
|
|
|
};
|
|
|
},
|
|
|
|