tijiao
This commit is contained in:
@@ -964,6 +964,7 @@ str = str.replace(regex, function (match, content, offset, fullString) {
|
||||
const documentFile = zip.file("word/document.xml");
|
||||
if (!documentFile) {
|
||||
console.error("❌ 找不到 word/document.xml,无法解析 Word 文件");
|
||||
callback([]);
|
||||
return;
|
||||
}
|
||||
const relsFile = zip.file("word/_rels/document.xml.rels");
|
||||
@@ -997,7 +998,8 @@ str = str.replace(regex, function (match, content, offset, fullString) {
|
||||
const allTables = [];
|
||||
if (!tables || tables.length === 0) {
|
||||
console.warn("未找到表格内容,请检查 XML 结构");
|
||||
return [];
|
||||
callback([]);
|
||||
return;
|
||||
}
|
||||
for (const table of tables) {
|
||||
const rows = table.getElementsByTagNameNS(namespace, "tr");
|
||||
|
||||
Reference in New Issue
Block a user