Skip to content

Commit

Permalink
fix(core): fix ui params (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexf00 authored Nov 30, 2024
1 parent b967aee commit 42ac08c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
16 changes: 15 additions & 1 deletion packages/preset-docs-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,28 @@ export interface IUniverDocsCorePresetConfig extends
export function UniverDocsCorePreset(config: Partial<IUniverDocsCorePresetConfig> = {}): IPreset {
const {
container = 'app',
header,
footer,
toolbar,
menu,
contextMenu,
disableAutoFocus,
} = config;

return {
plugins: [
UniverDocsPlugin,
UniverRenderEnginePlugin,
UniverFormulaEnginePlugin,
[UniverUIPlugin, { container }],
[UniverUIPlugin, {
container,
header,
footer,
toolbar,
menu,
contextMenu,
disableAutoFocus,
}],
UniverDocsUIPlugin,
],
};
Expand Down
16 changes: 15 additions & 1 deletion packages/preset-sheets-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ export function UniverSheetsCorePreset(config: Partial<IUniverSheetsCorePresetCo
const {
container = 'app',
workerURL: workerSrc,
header,
footer,
toolbar,
menu,
contextMenu,
disableAutoFocus,
} = config;

const useWorker = !!workerSrc;
Expand All @@ -53,7 +59,15 @@ export function UniverSheetsCorePreset(config: Partial<IUniverSheetsCorePresetCo
plugins: [
UniverDocsPlugin,
UniverRenderEnginePlugin,
[UniverUIPlugin, { container }],
[UniverUIPlugin, {
container,
header,
footer,
toolbar,
menu,
contextMenu,
disableAutoFocus,
}],
UniverDocsUIPlugin,

useWorker
Expand Down

0 comments on commit 42ac08c

Please sign in to comment.