feat: 完成 DOCX R4 元素级视觉门禁
建立 Chromium、Word 与 WPS 的可编辑内容、段落几何、页眉页脚、封面、媒体和逐页视觉比较链路。 支持封面独立分节、正文页码重启、主题页边距与横向纸张,并将自然分页差异降为诊断项。 修正代码块内边距和折叠表格单元格边框映射,14 套主题生产矩阵与六组布局视觉矩阵通过。
This commit is contained in:
@@ -731,6 +731,19 @@ export function ExportSettingsDrawer({
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
<label className="switch-control divider-control">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={config.header.showOnFirstPage}
|
||||
disabled={!config.header.enabled}
|
||||
onChange={(event) =>
|
||||
updateHeader({
|
||||
showOnFirstPage: event.target.checked
|
||||
})
|
||||
}
|
||||
/>
|
||||
<span>正文首页显示页眉</span>
|
||||
</label>
|
||||
<label className="switch-control divider-control">
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -854,7 +867,7 @@ export function ExportSettingsDrawer({
|
||||
})
|
||||
}
|
||||
/>
|
||||
<span>首页显示页码</span>
|
||||
<span>正文首页显示页码</span>
|
||||
</label>
|
||||
<label className="switch-control divider-control">
|
||||
<input
|
||||
|
||||
@@ -109,7 +109,8 @@ describe("导出设置缓存", () => {
|
||||
pageDecorationsMode: undefined,
|
||||
header: {
|
||||
...defaultExportConfig.header,
|
||||
fontFamily: undefined
|
||||
fontFamily: undefined,
|
||||
showOnFirstPage: undefined
|
||||
},
|
||||
footer: {
|
||||
...defaultExportConfig.footer,
|
||||
@@ -123,6 +124,7 @@ describe("导出设置缓存", () => {
|
||||
|
||||
expect(migrated.pageDecorationsMode).toBe("theme");
|
||||
expect(migrated.header.fontFamily).toContain("Microsoft YaHei");
|
||||
expect(migrated.header.showOnFirstPage).toBe(true);
|
||||
expect(migrated.footer.showOnFirstPage).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ const officialTheme = createTheme("official", {
|
||||
...formalTheme.pageDefaults,
|
||||
header: {
|
||||
...defaultExportConfig.header,
|
||||
fontFamily: '"Mdpdf Fandol Song", SimSun, serif'
|
||||
fontFamily: '"Mdpdf Fandol Song", SimSun, serif',
|
||||
showOnFirstPage: false
|
||||
},
|
||||
footer: {
|
||||
...defaultExportConfig.footer,
|
||||
@@ -105,6 +106,7 @@ describe("主题推荐页边距", () => {
|
||||
|
||||
expect(selected.pageDecorationsMode).toBe("theme");
|
||||
expect(selected.header.fontFamily).toContain("Fandol Song");
|
||||
expect(selected.header.showOnFirstPage).toBe(false);
|
||||
expect(selected.footer).toMatchObject({
|
||||
alignment: "outer",
|
||||
format: "official-page",
|
||||
|
||||
Reference in New Issue
Block a user