UNPKG

@nocobase/plugin-excel-formula-field

Version:

English | [中文](./README.zh-CN.md)

21 lines (20 loc) 744 B
import { BaseFieldOptions, DataTypes, Field } from '@nocobase/database'; export declare class ExcelFormulaField extends Field { get dataType(): DataTypes.StringDataTypeConstructor | DataTypes.DoubleDataTypeConstructor; calculate(expression: any, scope: any): any; initFieldData: ({ transaction }: { transaction: any; }) => Promise<void>; calculateField: (instance: any) => Promise<void>; updateFieldData: (instance: any, { transaction }: { transaction: any; }) => Promise<void>; bind(): void; unbind(): void; toSequelize(): any; } export interface ExcelFormulaFieldOptions extends BaseFieldOptions { type: 'excelFormula'; dataType?: 'number' | 'string'; expression: string; }