@aliretail/react-materials-components
Version:
40 lines (33 loc) • 1.48 kB
Markdown
title: FormulaInput-API
order: 1
category: UI
description: FormulaInput 组件描述
screenshot: https://gw.alicdn.com/imgextra/i2/O1CN01yW3hCD1M8CnqeKFlq_!!6000000001389-2-tps-90-90.png
# 公式输入组件
用于输入公式的组件
## API
| 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 |
| ----------- | -------------------------------------- | ---- | ----------------------- | ------ | ---- |
| value | 公式 | N | string | | |
| onChange | 公式变更回调 | N | (value: string) => void | | |
| configList | 公式元素配置数组 | Y | IFormulaConfig[] | | |
| noWrapper | 是否去掉外部包裹,直接展示公式输入界面 | N | boolean | false | |
| dialogTitle | 弹层标题 | N | string | | |
| isPreview | 是否只读 | N | boolean | false | |
| disabled | 是否禁用 | N | boolean | false | |
## IFormulaConfig
```typescript
interface IFormulaConfig {
title: string;
value: string;
tips: any;
code: string;
dataSource: Array<{
label: string;
value: string;
tips: string;
}>;
}
```