具有 3 种状态的复选框或开关
Checkbox or Switch with 3 states
我正在搜索一种模式来显示二进制变量的第三状态(不确定)状态,但我在
中找不到
Switch
https://openui5.hana.ondemand.com/explored.html#/entity/sap.m.Switch/properties
或Checkbox
https://openui5.hana.ondemand.com/explored.html#/entity/sap.m.CheckBox/properties
在 OpenUI5 中甚至可能吗?
查看 TriStateCheckBox. It has 3 states
- 已检查
- 未选中
- 混合
它在 sap.ui.commons 下(这意味着它在移动设备上的表现不会像预期的那样,这反过来意味着您不能在 Fiori 应用程序中使用它)
在您的 link 中,第三种状态不是用于可视化复选框的状态,而是用于显示子复选框被选中的信息。
从概念上讲,我的解决方案是使用另一个库元素来显示可以假设多个状态的信息:combo.box https://openui5.hana.ondemand.com/explored.html#/entity/sap.m.ComboBox/samples
我正在搜索一种模式来显示二进制变量的第三状态(不确定)状态,但我在
中找不到Switch
https://openui5.hana.ondemand.com/explored.html#/entity/sap.m.Switch/properties
或Checkbox
https://openui5.hana.ondemand.com/explored.html#/entity/sap.m.CheckBox/properties
在 OpenUI5 中甚至可能吗?
查看 TriStateCheckBox. It has 3 states
- 已检查
- 未选中
- 混合
它在 sap.ui.commons 下(这意味着它在移动设备上的表现不会像预期的那样,这反过来意味着您不能在 Fiori 应用程序中使用它)
在您的 link 中,第三种状态不是用于可视化复选框的状态,而是用于显示子复选框被选中的信息。
从概念上讲,我的解决方案是使用另一个库元素来显示可以假设多个状态的信息:combo.box https://openui5.hana.ondemand.com/explored.html#/entity/sap.m.ComboBox/samples