button - 切换按钮和开关的区别

标签 button sapui5 user-experience sap-fiori

切换按钮和开关有什么区别?由于它们提供相同的功能,使用切换按钮或开关的具体用例是什么?

切换按钮:

Toggle Button

开关:

Switch

最佳答案

这不仅仅是编码问题,更是用户体验问题。这是我的回答:

该控件的描述如下:

切换是一个按钮:sap.m.ToggleButton

switch 是用户输入。 sap.m.Switch

但是,主要区别在于用户体验和使用。

Fiori 指南的内容如下:When to use Switch

  • You need to emphasize the On/Off characteristic within a dialog.
  • You need to clearly show the mode or state that a setting is in.
  • You need a toggle switch for binary settings when changes become effective immediately after the user changes them. For example, if the user needs to set data transmission or accept/reject business objects.

对比

Behavior of Buttons

总而言之,我可以说: 开关主要代表一种状态(物理状态,如风扇“开”或“关”) 并且文字不宜太大。

而按钮是一个 Action ,主要是用户执行的动词,这可以是较长的文本,例如“激活”

您可以通过示例进一步了解基于用户体验的差异: Difference between switch and toggle

关于button - 切换按钮和开关的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50525778/

相关文章:

java - 用于复制 url-webview 的按钮

ios - objective-c -播放相同声音时,8个按钮中的2个应该消失

visual-studio-code - Visual Studio 代码 1.3 中 openui 项目的智能感知

sapui5 - 导航到不同的 (JS) View - 无法访问路由器

jquery - 如何一起使用 jQuery fadeToggle() 和 CSS flexbox?

android - 如何在Flutter中制作方形凸起按钮?

html - 显示包含位置 :relative and position:absolute 的按钮时出现问题

javascript - 我们如何调整 sap.m.table 中行的高度?

JavaScript 兼容性

javascript - SonarQube 5.1.2 版本用户界面设计