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
flush
jerry4054d2ea52bd
diff --git a/packages/ui-plugin-sheets/src/Controller/SheetBarUIContruller.ts b/packages/ui-plugin-sheets/src/Controller/SheetBarUIContruller.tsindex 63dbddae07..0cf353c4da 100644--- a/packages/ui-plugin-sheets/src/Controller/SheetBarUIContruller.ts+++ b/packages/ui-plugin-sheets/src/Controller/SheetBarUIContruller.ts@@ -1,5 +1,7 @@import { BaseMenuItem, BaseUlProps, ColorPicker } from '@univerjs/base-ui';import { Nullable, Plugin, ACTION_NAMES, CommandManager, SheetActionBase, UIObserver } from '@univerjs/core';+import { SheetUIPlugin } from '..';+import { SHEET_UI_PLUGIN_NAME } from '../Basics';import { SheetBar } from "../View/SheetBar";import styles from '../View/SheetBar/index.module.less';@@ -138,13 +140,6 @@ export class SheetBarUIController {onClick: (color: string) => {that.setUIObserve('onUIChangeObservable', { name: 'changeSheetColor', value: color });},- lang: {- collapseLocale: 'colorPicker.collapse',- changeLocale: 'colorPicker.change',- customColorLocale: 'colorPicker.customColor',- cancelColorLocale: 'colorPicker.cancelColor',- confirmColorLocale: 'colorPicker.confirmColor',- },},},className: styles.selectColorPicker,@@ -165,6 +160,7 @@ export class SheetBarUIController {border: true,}];+ this._plugin.getPluginByName<SheetUIPlugin>(SHEET_UI_PLUGIN_NAME)?.getComponentManager().register(this._plugin.getPluginName() + ColorPicker.name, ColorPicker)CommandManager.getActionObservers().add((event) => {const action = event.action as SheetActionBase<any>;const data = event.data;diff --git a/packages/ui-plugin-sheets/src/View/SheetBar/SheetBar.tsx b/packages/ui-plugin-sheets/src/View/SheetBar/SheetBar.tsxindex 58b32da06d..7e28f0943a 100644--- a/packages/ui-plugin-sheets/src/View/SheetBar/SheetBar.tsx+++ b/packages/ui-plugin-sheets/src/View/SheetBar/SheetBar.tsx@@ -18,6 +18,7 @@ import { SheetBarMenu } from './SheetBarMenu';import { Nullable, Observer, PLUGIN_NAMES, Workbook } from '@univerjs/core';import styles from './index.module.less';import { SlideTabBar } from '../../Basics/SlideTabBar/SlideTabBar';+import { SheetUIPlugin, SHEET_UI_PLUGIN_NAME } from '../..';type SheetState = {sheetList: BaseSheetBarProps[];@@ -53,7 +54,7 @@ export class SheetBar extends Component<BaseSheetBarProps, SheetState> {}resetLabel(list: any) {- const componentManager = this.getContext().getPluginManager().getPluginByName<BaseComponentPlugin>(PLUGIN_NAMES.BASE_COMPONENT)?.getComponentManager();+ const componentManager = this.getContext().getPluginManager().getPluginByName<SheetUIPlugin>(SHEET_UI_PLUGIN_NAME)?.getComponentManager();for (let i = 0; i < list.length; i++) {const item = list[i];