- import React, { useMemo, useEffect, useState } from 'react';
- import '@grapecity/spread-sheets-pivot-addon';
- import '@grapecity/spread-sheets-designer-resources-cn';
- import '@grapecity/spread-sheets-designer';
- import { Designer } from '@grapecity/spread-sheets-designer-react';
- import style from './style.less';
- import { CSSProperties } from 'react';
- interface Props {
- onSave?: (json: string, blob: Blob) => any;
- beforeUpload?: () => void;
- afterUpload?: () => void;
- data?: string;
- type: 'json' | 'blob';
- styleInfo?: CSSProperties;
- disabled: boolean;
- }
- export default function SpreadComponent(props: Props) {
- function init(spread) {
- debugger;
- }
- return (
- <div className={style['spreadjs']}>
- <Designer workbookInitialized={spread => init(spread)}></Designer>
- </div>
- );
- }
复制代码 |