facade.js 617 B

12345678910111213141516171819
  1. import { SetNumfmtCommand as l, SheetsNumfmtCellContentController as i } from "@univerjs/sheets-numfmt";
  2. import { FRange as o, FWorkbook as s } from "@univerjs/sheets/facade";
  3. class a extends o {
  4. setNumberFormat(t) {
  5. const e = [];
  6. return this.forEach((m, r) => e.push({ row: m, col: r, pattern: t })), this._commandService.syncExecuteCommand(l.id, {
  7. unitId: this._workbook.getUnitId(),
  8. subUnitId: this._worksheet.getSheetId(),
  9. values: e
  10. }), this;
  11. }
  12. }
  13. o.extend(a);
  14. class c extends s {
  15. setNumfmtLocal(t) {
  16. return this._injector.get(i).setNumfmtLocal(t), this;
  17. }
  18. }
  19. s.extend(c);