刘光辉
10 小时以前 0dfe84494048ce27ba8449831782128412d3eb13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import type { Dependency } from '@univerjs/core';
 
import { DependentOn, Inject, Injector, LocaleService, Plugin, UniverInstanceType } from '@univerjs/core';
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui';
 
import zhCN from '../locales/zh-CN';
import { JnpfSheetsCellService } from '../services/sheet-cell.service';
 
@DependentOn(UniverSheetsUIPlugin)
export class JnpfSheetsCellPlugin extends Plugin {
  static override pluginName = 'JNPF_SHEET_CELL_PLUGIN';
  static override type = UniverInstanceType.UNIVER_SHEET;
 
  constructor(
    @Inject(Injector) protected readonly _injector: Injector,
    @Inject(LocaleService) private readonly _localeService: LocaleService,
  ) {
    super();
 
    this._localeService.load({
      zhCN,
    });
  }
 
  override onStarting(): void {
    ([[JnpfSheetsCellService]] as Dependency[]).forEach(d => this._injector.add(d));
  }
}