Button-group
A setting of type button-group
Dùng để thiết lập giá trị theo thiết bị có sẵn
Attribute | Description | require |
---|---|---|
deviceEnabled | Turn on multiple devices | no |
options | button option | yes |
Setting
{
id: "button_group",
type: "button_group",
deviceEnabled: true,
label: "button_group",
options: [
{
label: "Label 1",
value: "value_1",
icon: "CancelMinor",
},
{
label: "Label 2",
value: "value_2",
icon: "FilterMinor",
},
],
default: {
desktop: "value_1",
},
},
Giao diện
Khi truy cập giá trị của button-group ,dữ liệu được trả về dưới dạng:
{settings.button_group}
Output
- Nếu deviceEnabled : true
{
"desktop": "value_1",
"tablet": "value_2"
}
-Nếu deviceEnabled : false
"value_1",