Mixin mixin允许我们对某一个块的重复使用,类似于函数. 用法:首先声明mixin,然后使用(在mixin名字之前加+即可以使用)即可. 最简单的mixin jade: //- 声明 mixin list ul li foo li bar li baz //- 使用 +list +list html: <ul> <li>foo</li> <li>bar</li> <li>baz</li> </ul> &…
Mixin works as a function. extends layout include mixins/storeForm block content .inner h2 #{title} +storeForm({name: 'NODE'}) Here, we use include keyword to inlcude a mixin file. include mixins/storeForm Exec a mixin function we can use '+': +store…