你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Microsoft.Common.CheckBox UI 元素
CheckBox 控件允许用户检查或不检查某选项。 控件在 true
选中控件或 false
未选中时返回。
UI 示例
架构
{
"name": "legalAccept",
"type": "Microsoft.Common.CheckBox",
"label": "I agree to the terms and conditions.",
"constraints": {
"required": true,
"validationMessage": "Please acknowledge the legal conditions."
}
}
示例输出
true
备注
设置为required
true
该复选框时,用户必须选中该复选框。 如果用户未选中该复选框,会显示验证消息。
后续步骤
- 有关创建 UI 定义的简介,请参阅 CreateUiDefinition 入门。
- 有关 UI 元素中的公用属性的说明,请参阅 CreateUiDefinition 元素。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈