ACL
Container Attributes
All component configurations support Container properties at the first level.
Component Properties
| Name | Type | Default | Supports Variable Pattern | Description |
|---|---|---|---|---|
| className | string | ✔️ | The className of the component | |
| style | object | The style of the component | ||
| unit | string | item | Units of selectors | |
| mapping | { value: string, label: string | number } | { value: 'value', label: 'label' } | The mapping relationship of value is the default { value, label },If other keys are provided, they will be saved together | |
| useOriginValue | bool | false | Given mapping: { value: 'id', label: 'name' }, When useOriginValue is true, value would be [{ id: 'xxx',name: 'xxx' }], When useOriginValue is false, value would be [{ value: 'xxx',label: xxx' }], | |
| stringEqual | bool | true | When comparing options, whether to convert to string for comparison | |
| idListUrl | string | If idListUrl is provided, it means that this ACL uses the server side lazy loading form to load data. First, use idListUrl to get the id of all data. Then, when the scroll bar scrolls down, then send a request to obtain detailed data through the dataUrl attribute according to the id of the display window. | ||
| dataUrl | string | When idListUrl is not provided, the ACL obtains all data at once through dataUrl; when idListUrl is provided, the ACL obtains detailed data of certain rows based on id through dataUrl | ||
| dataSource | dataSource | You can also specify the data source of formEntity as the data source of the ACL. When using this property, the idListUrl and dataUrl properties will be ignored. | ||
| dataResponseKeyPath | string | ✔️ | Take a certain subdata in response data as the data source. | |
| translateDataResponse | string | ✔️ | Transform the obtained data, using the eval expression, this refers to the obtained data. | |
| dataFilters | ConditionalListPropertyPropType(DataFilters) | ✔️ | Fixed filter conditions hidden by requesting data source cannot be changed through the interface | |
| dataExclusion | Array<string> | ✔️ | Exclude some data from the data returned by the API | |
| multiple | bool | false | Exclude some data from the data returned by the API | |
| columnDefs | array | Definition of columns in ACL table, supporting ag-grid's columnDefs | ||
| placeholder | string | placeholder of input element | ||
| supportImport | bool | false | Whether the import is supported | |
| maxSizePerReq | number | 1000 | Maximum number of rows per request during import | |
| supportExport | bool | false | Whether export is supported, exportColumns must be configured when true | |
| exportColumns | Array<{ value: string, label: string }> | columns exported when exported | ||
| transformKey | string | When converting the field, there is no primary key mapping.value in Excel, but there is a conversion field. Use the conversion field call to convert the request address to get the primary key. | ||
| transformUrl | string | Convert request address, fixed post, fixed body format{ key: <Convert fields>, values: Array<Convert field values> } | ||
| AgTableProps | object | The attribute passed to AgTable, supporting all attributes of ag-grid |
All the remaining componentsProps will be passed to the component root element (Select).
dataSource
| Name | Type | Default | Supports Variable Pattern | Description |
|---|---|---|---|---|
| token | string | FormEntity token. | ||
| pbcToken | string | PBC token. | ||
| listUrl | string | Get the address of the detailed data of the list. | ||
| listIdsUrl | string | Get the address of all data ids in the list. | ||
| listByIdsUrl | string | Get the address of the detailed data based on id. |
JS API
The interface obtained through formApi.getFieldApi() is as follows:
| Name | Type | Description |
|---|---|---|
| node | HTML Element | The root DOM element of the component |