ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# B.10 ConditionTask Sets a property if a certain condition holds true - this is a generalization of [Section聽B.6](apbs06.html "B.6 AvailableTask") and [Section聽B.50](apbs50.html "B.50 UpToDateTask"). If the condition holds true, the property value is set to true by default; otherwise, the property is not set. You can set the value to something other than the default by specifying the `value` attribute. Conditions are specified as nested elements, you must specify exactly one condition - see [conditions](ch05s08.html "5.8 Conditions") for a complete list of nested elements. Table B.12:聽Attributes NameTypeDescriptionDefaultRequired`property``String`The name of the property to set.n/aYes`value``String`The value to set the property to. Defaults to "true".`true`No`else``String`The value to set the property to if the condition evaluates to false. By default the property will remain unset.n/aNo B.10.1 Examples ``` <condition property="isMacOrWindows"> <or> <os family="mac"/> <os family="windows"/> </or> </condition> ``` B.10.2 Supported Nested Tags - `or` - `and`