/** * @file Transfer的表格对应选项 */ import React from 'react'; import type { SchemaApi } from 'amis'; import type { FormControlProps } from 'amis-core'; import type { Option } from 'amis'; interface OptionControlProps extends FormControlProps { className?: string; } type SourceType = 'custom' | 'api' | 'form' | 'variable'; interface OptionControlState { api: SchemaApi; labelField: string; valueField: string; source: SourceType; } export default class TransferTableOption extends React.Component { addColumns(): { type: string; actionType: string; label: string; level: string; dialog: { title: string; headerClassName: string; closeOnEsc: boolean; closeOnOutside: boolean; showCloseButton: boolean; onConfirm: (...args: Array) => void; body: { name: string; type: string; multiple: boolean; label: boolean; strictMode: boolean; addButtonText: string; draggable: boolean; value: any; items: ({ type: string; name: string; placeholder: string; required: boolean; value?: undefined; options?: undefined; } | { type: string; name: string; placeholder: string; value: string; options: { value: string; label: string; }[]; required?: undefined; })[]; }[]; }; }; addRows(): { type: string; tooltip: string; tooltipTheme: string; placement: string; tooltipStyle: { fontSize: string; }; className: string; body: { type: string; actionType: string; label: string; level: string; disabled: any; block: boolean; dialog: { title: string; headerClassName: string; closeOnEsc: boolean; closeOnOutside: boolean; showCloseButton: boolean; size: string; onConfirm: (...args: Array) => void; body: { type: string; wrapWithPanel: boolean; mode: string; body: { name: string; type: string; multiple: boolean; draggable: boolean; addButtonText: string; value: any; items: any[]; }[]; }[]; }; }[]; }; handleChange(value: Array