刘光辉
11 小时以前 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
29
30
31
32
33
import type { IAccessor, ICommand } from '@univerjs/core';
 
import { CommandType } from '@univerjs/core';
 
import { JnpfSheetsExcelFileService } from '../../services/sheet-excel-file.service';
import { JnpfCommandIds } from '../../utils/define';
 
export const JnpfSheetsImportExcelFileOperation: ICommand = {
  handler: async (_: IAccessor) => {
    return true;
  },
  id: JnpfCommandIds.importExcelFile,
  type: CommandType.OPERATION,
};
 
export const JnpfSheetsDownloadExcelFileOperation: ICommand = {
  handler: async (_: IAccessor) => {
    return true;
  },
  id: JnpfCommandIds.downloadExcelFile,
  type: CommandType.OPERATION,
};
 
export const JnpfSheetsImportCsvFileOperation: ICommand = {
  handler: async (accessor: IAccessor) => {
    const jnpfSheetsExcelFileService = accessor.get(JnpfSheetsExcelFileService);
    jnpfSheetsExcelFileService?.handleImportCsv();
 
    return true;
  },
  id: JnpfCommandIds.importCsvFile,
  type: CommandType.OPERATION,
};