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
chore(commit): npm run pre-commit
Dushusirbd0d9b6b079a
diff --git a/.husky/pre-commit b/.husky/pre-commitindex aeb264c58a..5acce99ecb 100755--- a/.husky/pre-commit+++ b/.husky/pre-commit@@ -1,5 +1,5 @@#!/usr/bin/env sh-#. "$(dirname -- "$0")/_/husky.sh"+. "$(dirname -- "$0")/_/husky.sh"# lint all changed files-#npm run pre-commit+npm run pre-commitdiff --git a/packages/sheets-plugin-numfmt/src/Controller/NumfmtModalController.ts b/packages/sheets-plugin-numfmt/src/Controller/NumfmtModalController.tsindex 1d0f64d7a1..217d4fb023 100644--- a/packages/sheets-plugin-numfmt/src/Controller/NumfmtModalController.ts+++ b/packages/sheets-plugin-numfmt/src/Controller/NumfmtModalController.ts@@ -122,20 +122,8 @@ export class NumfmtModalController {this._initialize();}- private _initialize() {- this._plugin.getObserver('onNumfmtModalDidMountObservable')!.add((component) => {- this._numfmtModal = component;- this.resetModalData();- });- }-- private _initRegisterComponent() {- this._sheetPlugin.registerComponent(NUMFMT_PLUGIN_NAME + FormatContent.name, FormatContent);- this._sheetPlugin.registerModal(NUMFMT_PLUGIN_NAME + NumfmtModal.name, NumfmtModal);- }-resetContentData(data: any[]) {- const locale = this._plugin.getContext().getLocale();+ const locale = this._plugin.getGlobalContext().getLocale();for (let i = 0; i < data.length; i++) {if (data[i].locale) {data[i].label = locale.get(data[i].locale);@@ -146,7 +134,7 @@ export class NumfmtModalController {// 渲染所需数据resetModalData() {- const locale = this._plugin.getContext().getLocale();+ const locale = this._plugin.getGlobalContext().getLocale();this._modalData.forEach((item) => {item.title = locale.get(item.locale);if (item.group && item.group.length) {@@ -165,4 +153,16 @@ export class NumfmtModalController {this.resetModalData();}}++ private _initialize() {+ this._plugin.getObserver('onNumfmtModalDidMountObservable')!.add((component) => {+ this._numfmtModal = component;+ this.resetModalData();+ });+ }++ private _initRegisterComponent() {+ this._sheetPlugin.registerComponent(NUMFMT_PLUGIN_NAME + FormatContent.name, FormatContent);+ this._sheetPlugin.registerModal(NUMFMT_PLUGIN_NAME + NumfmtModal.name, NumfmtModal);+ }}