diff --git a/src/components/page/GenerateCharts.vue b/src/components/page/GenerateCharts.vue index 2334e04..149a4a1 100644 --- a/src/components/page/GenerateCharts.vue +++ b/src/components/page/GenerateCharts.vue @@ -1307,16 +1307,19 @@ export default { }, handleImageAdd(type) { this.picStyle = { note: '', picUrl: '', title: '' }; + this.picStyle1 = { note: '', picUrl: '', title: '' }; this.picStyle.visiTitle = 'Add Figure'; this.pictVisible = true; }, handleTableAdd(type) { this.lineStyle = { note: '', table_data: '', html_data: '' }; + this.lineStyle1 = { note: '', table_data: '', html_data: '' }; this.lineStyle.visiTitle = 'Add Table'; this.threeVisible = true; }, addUploadWordTable(data) { this.lineStyle = { note: '', table: data.table_data, html_data: data.html_data }; + this.lineStyle1 = { note: '', table: data.table_data, html_data: data.html_data }; this.lineStyle.visiTitle = 'Add Table'; this.threeVisible = true; @@ -1330,13 +1333,18 @@ export default { this.pictVisible = true; } else if (type == 'table') { this.lineStyle = {}; - this.lineStyle = { - ...data, - table: JSON.parse(data.table_data), - html_data: data.html_data, - note: data.note, - title: data.title - }; + this.lineStyle1 = {}; + // 1. 提取处理逻辑 +const formattedData = { + ...data, + table: JSON.parse(data.table_data), + // 如果 data 中已经包含了 html_data, note, title,且不需要特殊处理, + // 解构赋值 (...data) 其实已经把它们带进来了。 +}; + +// 2. 统一赋值 +this.lineStyle = formattedData; +this.lineStyle1 = { ...formattedData }; // 使用浅拷贝确保两个变量指向不同引用(如果需要独立修改) this.lineStyle.visiTitle = 'Edit Table'; this.threeVisible = true; } diff --git a/src/components/page/components/Tinymce/index.vue b/src/components/page/components/Tinymce/index.vue index 1b114b2..0fecb1f 100644 --- a/src/components/page/components/Tinymce/index.vue +++ b/src/components/page/components/Tinymce/index.vue @@ -9,7 +9,10 @@ import htmlDocx from 'html-docx-js/dist/html-docx.js'; import { Document, Packer, PageOrientation, Paragraph, TextRun } from 'docx'; // 引入 docx.js import html2canvas from 'html2canvas'; -const tableStyle = ` b span{ +const tableStyle = `*{ + font-family: 'Charis SIL'; +} + b span{ font-weight: bold !important; } i span{ diff --git a/src/components/page/components/table/word.vue b/src/components/page/components/table/word.vue index 9345118..972a07b 100644 --- a/src/components/page/components/table/word.vue +++ b/src/components/page/components/table/word.vue @@ -3954,6 +3954,7 @@ return false margin-top: 5px; margin-bottom: 5px; min-height: 30px; + font-family: 'Charis SIL'; } ::v-deep .tox.tox-tinymce-inline { z-index: 9999 !important;