更新时间:2023-10-08 23:40:10
这是应该"工作的方式 - 基本上,该属性不存在,直到用户选中复选框,然后才设置"(存在).因此,如果您想在选中复选框时执行自定义操作,请测试该属性是否存在作为运行自定义操作的条件,而不是检查自定义属性设置的值.
This is how it is "supposed" to work - basically, the property doesn't exist until a user checks the checkbox, then it is "set" (exists). So if you want to do a custom action when a checkbox is checked, you test for the existence of the property as a condition for running the custom action, instead of checking for the value that the custom prop is set to.
我认为从命令行处理此问题的***方法是您已经提到的:如果您希望选中复选框,请在命令行中指定自定义道具,否则,不要选中复选框被选中.
I think the best way to handle this from the command line is what you have already mentioned: if you want the checkbox to be selected, specifiy the custom prop on the command line, otherwise, don't and the checkbox will not be selected.