fix(document): 统一编辑器与文书纸的排版和字体口径
This commit is contained in:
@@ -22,6 +22,7 @@ import type {
|
||||
SigningFieldValue,
|
||||
} from '@/api/workbench/types'
|
||||
|
||||
import { unlockTableLayout } from './rich-text'
|
||||
import {
|
||||
collectStructuredFieldIds,
|
||||
FIELD_ELEMENT_SELECTOR,
|
||||
@@ -783,6 +784,12 @@ export function buildSigningDocumentHtml(
|
||||
return contentHtml
|
||||
}
|
||||
|
||||
// 表格的「宽度锁」在渲染这一侧也要解掉,且必须在渲染填写项之前:
|
||||
// 编辑器导出的每张表都带 style="width: auto"(WangEditor 的序列化口径),
|
||||
// 它是**内联样式**,会盖掉 `.doc-paper table { width: 100% }` —— 结果就是
|
||||
// 「编辑器里撑满版心、预览/签署里按内容收缩」。详见 utils/rich-text 的 unlockTableLayout。
|
||||
unlockTableLayout(root)
|
||||
|
||||
// 已填写的取值优先于系统快照:签署后被固化的填写项要保持原样回显
|
||||
const answers: SigningAnswers = {
|
||||
...resolveAnswersFromSystem(data),
|
||||
|
||||
Reference in New Issue
Block a user