Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix: default setting in header and footer (#2977)
Ran Luoeeaf78f36c3e
diff --git a/packages/docs-ui/src/views/header-footer/panel/DocHeaderFooterOptions.tsx b/packages/docs-ui/src/views/header-footer/panel/DocHeaderFooterOptions.tsxindex c53713801b..2327cad7d8 100644--- a/packages/docs-ui/src/views/header-footer/panel/DocHeaderFooterOptions.tsx+++ b/packages/docs-ui/src/views/header-footer/panel/DocHeaderFooterOptions.tsx@@ -157,7 +157,12 @@ export const DocHeaderFooterOptions = (props: IDocHeaderFooterOptionsProps) => {const documentStyle = docDataModel?.getSnapshot().documentStyle;if (documentStyle) {- const { marginHeader, marginFooter, useFirstPageHeaderFooter, evenAndOddHeaders } = documentStyle;+ const {+ marginHeader = 0,+ marginFooter = 0,+ useFirstPageHeaderFooter = BooleanNumber.FALSE,+ evenAndOddHeaders = BooleanNumber.FALSE,+ } = documentStyle;setOptions({marginHeader,@@ -166,7 +171,6 @@ export const DocHeaderFooterOptions = (props: IDocHeaderFooterOptionsProps) => {evenAndOddHeaders,});}- // eslint-disable-next-line react-hooks/exhaustive-deps}, [unitId]);return (