럭키시트 로드 가능, 옵션이 안불러짐
This commit is contained in:
120
src/vite-env.d.ts
vendored
120
src/vite-env.d.ts
vendored
@@ -61,3 +61,123 @@ declare module "luckyexcel" {
|
||||
LuckyExcelResult,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Luckysheet 타입 선언
|
||||
*/
|
||||
declare module "luckysheet" {
|
||||
interface LuckysheetConfig {
|
||||
container?: string;
|
||||
title?: string;
|
||||
lang?: string;
|
||||
data?: any[];
|
||||
myFolderUrl?: string;
|
||||
plugins?: string[];
|
||||
fontList?: Array<{
|
||||
fontFamily: string;
|
||||
name: string;
|
||||
}>;
|
||||
options?: {
|
||||
showtoolbar?: boolean;
|
||||
showinfobar?: boolean;
|
||||
showsheetbar?: boolean;
|
||||
showstatisticBar?: boolean;
|
||||
allowCopy?: boolean;
|
||||
allowEdit?: boolean;
|
||||
enableAddRow?: boolean;
|
||||
enableAddCol?: boolean;
|
||||
sheetRightClickConfig?: {
|
||||
delete?: boolean;
|
||||
copy?: boolean;
|
||||
rename?: boolean;
|
||||
color?: boolean;
|
||||
hide?: boolean;
|
||||
move?: boolean;
|
||||
};
|
||||
cellRightClickConfig?: {
|
||||
copy?: boolean;
|
||||
copyAs?: boolean;
|
||||
paste?: boolean;
|
||||
insertRow?: boolean;
|
||||
insertColumn?: boolean;
|
||||
deleteRow?: boolean;
|
||||
deleteColumn?: boolean;
|
||||
deleteCell?: boolean;
|
||||
hideRow?: boolean;
|
||||
hideColumn?: boolean;
|
||||
rowHeight?: boolean;
|
||||
columnWidth?: boolean;
|
||||
clear?: boolean;
|
||||
matrix?: boolean;
|
||||
sort?: boolean;
|
||||
filter?: boolean;
|
||||
chart?: boolean;
|
||||
image?: boolean;
|
||||
link?: boolean;
|
||||
data?: boolean;
|
||||
cellFormat?: boolean;
|
||||
};
|
||||
};
|
||||
hook?: {
|
||||
cellMousedown?: (cell: any, postion: any, sheetFile: any) => void;
|
||||
cellClick?: (cell: any, postion: any, sheetFile: any) => void;
|
||||
sheetActivate?: (
|
||||
index: number,
|
||||
isPivotInitial: boolean,
|
||||
isInitialLoad: boolean,
|
||||
) => void;
|
||||
updated?: (operate: any) => void;
|
||||
};
|
||||
}
|
||||
|
||||
interface LuckysheetAPI {
|
||||
create: (config: LuckysheetConfig) => void;
|
||||
destroy: () => void;
|
||||
refreshFormula: () => void;
|
||||
setSheetData: (data: any[]) => void;
|
||||
getAllSheets: () => any[];
|
||||
getSheet: (index?: number) => any;
|
||||
setActiveSheet: (index: number) => void;
|
||||
getCellValue: (r: number, c: number, data?: any) => any;
|
||||
setCellValue: (r: number, c: number, d: any, isRefresh?: boolean) => void;
|
||||
getRange: () => any[];
|
||||
setRange: (range: any[]) => void;
|
||||
scroll: (settings: { scrollLeft?: number; scrollTop?: number }) => void;
|
||||
resize: () => void;
|
||||
undo: () => void;
|
||||
redo: () => void;
|
||||
copy: () => void;
|
||||
paste: () => void;
|
||||
cut: () => void;
|
||||
insertRow: (index?: number) => void;
|
||||
insertColumn: (index?: number) => void;
|
||||
deleteRow: (start: number, end?: number) => void;
|
||||
deleteColumn: (start: number, end?: number) => void;
|
||||
hideRow: (rowIndexes: number[]) => void;
|
||||
showRow: (rowIndexes: number[]) => void;
|
||||
hideColumn: (columnIndexes: number[]) => void;
|
||||
showColumn: (columnIndexes: number[]) => void;
|
||||
setRowHeight: (rowInfo: { [key: number]: number }) => void;
|
||||
setColumnWidth: (columnInfo: { [key: number]: number }) => void;
|
||||
getRowHeight: (rowIndexes: number[]) => { [key: number]: number };
|
||||
getColumnWidth: (columnIndexes: number[]) => { [key: number]: number };
|
||||
setWorkbookName: (name: string) => void;
|
||||
getWorkbookName: () => string;
|
||||
exitEditMode: () => void;
|
||||
enterEditMode: (cell?: any) => void;
|
||||
updateCell: (r: number, c: number, value: any) => void;
|
||||
refreshCanvas: () => void;
|
||||
}
|
||||
|
||||
const luckysheet: LuckysheetAPI;
|
||||
export = luckysheet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Luckysheet 전역 변수 타입 선언
|
||||
*/
|
||||
declare global {
|
||||
interface Window {
|
||||
luckysheet: any;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user