From f831bd3868871f1cfb3501b5810c851ef39757d1 Mon Sep 17 00:00:00 2001 From: yanmao <55792257+yanmao-cc@users.noreply.github.com> Date: Sat, 4 Dec 2021 23:31:42 +0800 Subject: [PATCH] Update index.ts --- packages/toolbar-vue/src/config/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/toolbar-vue/src/config/index.ts b/packages/toolbar-vue/src/config/index.ts index 076c46c9..4016736d 100644 --- a/packages/toolbar-vue/src/config/index.ts +++ b/packages/toolbar-vue/src/config/index.ts @@ -13,6 +13,7 @@ export const getToolbarDefaultConfig = ( const language = engine.language.get<{ [key: string]: { [key: string]: string }; }>('toolbar'); + const fontSizeInContainer = engine.container.css('font-size'); return [ { type: 'collapse', @@ -414,7 +415,7 @@ export const getToolbarDefaultConfig = ( { key: '40px', content: '40px', hotkey: false }, { key: '48px', content: '48px', hotkey: false }, ].map((item) => - item.key === engine.container.css('font-size') + item.key === fontSizeInContainer ? { ...item, isDefault: true } : item, ),