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