target 拥有 if/unless 属性,可以按照一定条件来选择是否执行 target。
结合 property 来说,if/unless 只能判断变量是否存在,而不能判断 property 的值。所以,以下的 target 输出同样的内容:
|
|
若要判断 property 得值是否与某个值相等,就需要使用 condition:
|
|
Quick notes
target 拥有 if/unless 属性,可以按照一定条件来选择是否执行 target。
结合 property 来说,if/unless 只能判断变量是否存在,而不能判断 property 的值。所以,以下的 target 输出同样的内容:
|
|
若要判断 property 得值是否与某个值相等,就需要使用 condition:
|
|