为什么这不起作用?
extends layout
mixin WhyNotDefined(text)
p #{text}
append content
mixin WhyNotDefined('Hi')
我一直收到错误:WhyNotDefined_mixin is not defined
jade@0.20.3;节点v0.6.14
UPD。
愚蠢的我,mixins应该在块中定义。这有效:
extends layout
append content
mixin WhyNotDefined(text)
p #{text}
mixin WhyNotDefined('Hi')
答案 0 :(得分:2)
愚蠢的我,mixins应该在块中定义。这有效:
extends layout
append content
mixin WhyNotDefined(text)
p #{text}
mixin WhyNotDefined('Hi')