selectable - 获取列值并将其与记录的可用选项中的值匹配。以下列数组为例,如果记录值设置为 open,则 Open 值将显示在列中。
['open' => 'Open', 'closed' => 'Closed']可用选项根据下拉选项定义。
status:
label: Status
type: selectable以下属性受支持。
| Property | Description |
|---|---|
| options | available options for the dropdown, as an array. |
| optionsMethod | take options from a method defined on the model or as a static method, eg Class::method. |
| optionsPreset | take options from a preset list of defined options. |
options 值可以显式地将选项指定为数组。
status:
label: Status
type: selectable
options:
pending: Pending
active: Active此 optionsPreset 可用于从 选项预设定义 中提取值。
icon:
label: Icon
type: selectable
optionsPreset: phosphorIcons