如果默认值一般设置为false或置空,那么可以给变量名取相反含义,以适应大多数人的第一感觉(这个功能应该被开启)

发布时间 2023-04-26 11:09:41作者: 我欲皆真

这个之前也知道,不过今天看https://www.ag-grid.com/angular-data-grid/grid-interface/的时候见有提到,记录下:

 

Where the property is a boolean (true or false), then false (or left blank) is the default value. For this reason, on / off items are presented in a way that causes the most common behaviour to be used when the value is false. For example, suppressCellFocus is named as such because most people will want cell focus to be enabled.