【发布时间】:2013-11-04 19:20:25
【问题描述】:
jade中可以有变量属性名吗?我想创建一个具有不同属性名称的 mixin:
mixin button_post(test)
button(
#{test.name}='#{test.value}'
)
如果这可以循环完成也会很好:
mixin button_post()
button(
each key, value in {one: 'one', two: 'two', three: 'three'}
#{key}='#{value}'
)
【问题讨论】:
标签: javascript pug