|
@@ -15,7 +15,10 @@
|
|
|
v-if="block.type === 'text'"
|
|
v-if="block.type === 'text'"
|
|
|
:key="'text-' + index"
|
|
:key="'text-' + index"
|
|
|
class="pinyin-sentence"
|
|
class="pinyin-sentence"
|
|
|
- :style="[{ 'align-items': pinyinPosition === 'top' ? 'flex-end' : 'flex-start' }]"
|
|
|
|
|
|
|
+ :style="[
|
|
|
|
|
+ { 'align-items': pinyinPosition === 'top' ? 'flex-end' : 'flex-start' },
|
|
|
|
|
+ block.sentenceStyle
|
|
|
|
|
+ ]"
|
|
|
>
|
|
>
|
|
|
<span v-for="(word, wIndex) in block.word_list" :key="wIndex" class="pinyin-text" :style="block.styleObj">
|
|
<span v-for="(word, wIndex) in block.word_list" :key="wIndex" class="pinyin-text" :style="block.styleObj">
|
|
|
<span
|
|
<span
|
|
@@ -677,6 +680,13 @@ export default {
|
|
|
|
|
|
|
|
const styleObj = combinedStyle ? this.parseStyleToObject(combinedStyle) : null;
|
|
const styleObj = combinedStyle ? this.parseStyleToObject(combinedStyle) : null;
|
|
|
|
|
|
|
|
|
|
+ // 提取 paddingLeft 用于段落缩进,从 styleObj 中移除
|
|
|
|
|
+ const sentenceStyle = {};
|
|
|
|
|
+ if (styleObj && styleObj.paddingLeft) {
|
|
|
|
|
+ sentenceStyle.paddingLeft = styleObj.paddingLeft;
|
|
|
|
|
+ delete styleObj.paddingLeft;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
type: 'text',
|
|
type: 'text',
|
|
|
word_list: item.word_list,
|
|
word_list: item.word_list,
|
|
@@ -684,6 +694,7 @@ export default {
|
|
|
oldIndex,
|
|
oldIndex,
|
|
|
paragraphIndex,
|
|
paragraphIndex,
|
|
|
styleObj,
|
|
styleObj,
|
|
|
|
|
+ sentenceStyle,
|
|
|
rawStyleText: combinedStyle,
|
|
rawStyleText: combinedStyle,
|
|
|
hasEmphasisDot,
|
|
hasEmphasisDot,
|
|
|
};
|
|
};
|