Skip to content

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.

Merge branch 'dev' of https://github.com/dream-num/univer into dev

Dushusir4625bc7728c4
diff --cc packages/base-sheets/src/Controller/ToolBarController.ts
index 09b5d67e05,f12384c41a..219d9a846f
--- a/packages/base-sheets/src/Controller/ToolBarController.ts
+++ b/packages/base-sheets/src/Controller/ToolBarController.ts
@@@ -433,9 -471,13 +471,13 @@@ export class ToolBarController
const cellData = this._plugin.getWorkbook().getActiveSheet().getRange(currentRangeData).getObjectValue({ isIncludeStyle: true });
}
});
+
+ this._plugin.context.getContextObserver('onSheetRenderDidMountObservable').add(() => {
+ this._initSelectedObserver();
+ });
}
- initRegisterComponent() {
+ private _initRegisterComponent() {
const pluginName = this._plugin.getPluginName();
// 注册自定义组件
diff --cc packages/sheets-plugin-numfmt/src/Controller/NumfmtModalController.ts
index bc4fe4f98a,4acc14f6aa..11bdb6696e
--- a/packages/sheets-plugin-numfmt/src/Controller/NumfmtModalController.ts
+++ b/packages/sheets-plugin-numfmt/src/Controller/NumfmtModalController.ts
@@@ -88,14 -95,38 +95,38 @@@ export class NumfmtModalController
},
},
},
+ {
+ name: 'number',
+ locale: 'toolbar.numberFormat',
+ show: false,
+ group: [
+ {
+ locale: 'button.confirm',
+ type: 'primary',
+ },
+ {
+ locale: 'button.cancel',
+ },
+ ],
+ onCancel: () => {
+ this.showModal('number', false);
+ },
+ children: {
+ name: NUMFMT_PLUGIN_NAME + FormatContent.name,
+ props: {
+ data: NUMBERFORMAT,
+ onClick: (value: string) => console.dir(value),
+ },
+ },
+ },
];
- this.initRegisterComponent();
+ this._initRegisterComponent();
- this.init();
+ this._initialize();
}
- init() {
+ private _initialize() {
this._plugin.getObserver('onNumfmtModalDidMountObservable')!.add((component) => {
this._numfmtModal = component;