如何在玉器中使用if&else

新用户

我不知道Jade文件中if&else的用法。

我有:

br
                    each test in changes
                        .change-row
                            if test.property == "Image"
                             strong #{test.property}
                            else{
                            strong #{test.property}
                            span :  #{test.newValue}
                            }
马可比德曼

您必须从其他地方删除花括号并正确缩进代码。

br
each test in changes
  .change-row
    if test.property == "Image"
      strong #{test.property}
    else
      strong #{test.property}
      span :  #{test.newValue}

有关更多信息,请参见http://learnjade.com/tour/conditionals/

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章