switch - 用作一个开关,在两个预定义条件或列表查询之间进行切换,可以是未定、开启或关闭状态。
is_approved:
label: Approved
type: switch
conditions:
- is_approved <> true
- is_approved = true以下属性可用于过滤器。
| Property | Description |
|---|---|
| default | set to 1 or 2 to make the filter checked by default. Default 0. |
| select | an array with custom SQL select statement to use for the filter, included for when the conditions is indeterminate (first item) and is checked (second item). |
您可以设置 default 值以设置默认过滤值。对于默认值,使用 0 表示关闭,1 表示不确定,2 表示开启。
is_approved:
label: Approved
type: switch
default: 1