|
|
@@ -461,11 +461,14 @@ export default {
|
|
|
this.$refs.component.forEach((item) => {
|
|
|
item.updateProperty('view_pinyin', data.view_pinyin);
|
|
|
item.updateProperty('pinyin_position', data.pinyin_position);
|
|
|
- item.updateRichTextProperty('fontFamily', data.font);
|
|
|
- item.updateRichTextProperty('fontSize', data.font_size);
|
|
|
- item.updateRichTextProperty('lineHeight', data.line_height);
|
|
|
- item.updateRichTextProperty('color', data.text_color);
|
|
|
- item.updateRichTextProperty('align', data.align);
|
|
|
+ const formats = [
|
|
|
+ { type: 'fontFamily', val: data.font },
|
|
|
+ { type: 'fontSize', val: data.font_size },
|
|
|
+ { type: 'lineHeight', val: data.line_height },
|
|
|
+ { type: 'color', val: data.text_color },
|
|
|
+ { type: 'align', val: data.align },
|
|
|
+ ];
|
|
|
+ item.patchSetRichFormat(formats);
|
|
|
|
|
|
item.setUnifiedAttr(data);
|
|
|
});
|
|
|
@@ -480,11 +483,14 @@ export default {
|
|
|
if (item.$refs.base.checked) {
|
|
|
item.updateProperty('view_pinyin', data.view_pinyin);
|
|
|
item.updateProperty('pinyin_position', data.pinyin_position);
|
|
|
- item.updateRichTextProperty('fontFamily', data.font);
|
|
|
- item.updateRichTextProperty('fontSize', data.font_size);
|
|
|
- item.updateRichTextProperty('lineHeight', data.line_height);
|
|
|
- item.updateRichTextProperty('color', data.text_color);
|
|
|
- item.updateRichTextProperty('align', data.align);
|
|
|
+ const formats = [
|
|
|
+ { type: 'fontFamily', val: data.font },
|
|
|
+ { type: 'fontSize', val: data.font_size },
|
|
|
+ { type: 'lineHeight', val: data.line_height },
|
|
|
+ { type: 'color', val: data.text_color },
|
|
|
+ { type: 'align', val: data.align },
|
|
|
+ ];
|
|
|
+ item.patchSetRichFormat(formats);
|
|
|
|
|
|
item.setUnifiedAttr(data);
|
|
|
}
|