This commit is contained in:
2025-12-23 15:39:17 +08:00
parent 530470d138
commit 1129050654
3 changed files with 20 additions and 8 deletions

View File

@@ -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;
}

View File

@@ -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{

View File

@@ -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;