切换按钮和开关的区别 [英] difference between toggle button and switch

查看:177
本文介绍了切换按钮和开关的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

What is the difference between a toggle button and switch? As they provide same feature, what is the specific use case to use a toggle button or a switch?

切换按钮:

开关:

推荐答案

这不仅仅是编码问题,更像是一个用户体验问题.这是我的答案:

This is more of a User Experience question than just Coding. Here is my answer:

控件的描述是这样的:

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

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

然而,主要区别在于用户体验和使用.

However, the main difference lies in the User Experience and usage.

Fiori 指南的说明如下:何时使用 Switch

Here is what the Fiori Guideline says: When to use Switch

  • 您需要在对话框中强调开/关特性.
  • 您需要清楚地显示设置所处的模式或状态.
  • 当更改在用户更改后立即生效时,您需要一个用于二进制设置的切换开关.例如,如果用户需要设置数据传输或接受/拒绝业务对象.

对比

按钮的行为

总结一下,我可以说:开关主要代表一种状态(一种物理状态,如风扇开"或关")并且文字不能太大.

To summarize, I can say: Switch primarily represents a state(a physical state like a fan "On' or "Off") and the text should not be too big.

然而,按钮是一个动作,主要是用户执行的动词,这可以是更长的文本,如激活

whereas, a button is an action mostly a verb which user performs and this can be a longer text like "Activate

您可以通过一个示例了解更多有关基于 UX 的差异的信息:开关和切换的区别

You can read a little more on the difference based on UX with an example: Difference between switch and toggle

这篇关于切换按钮和开关的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆