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