Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在这样的玉线中间使用mixin...
p some paragraph text !{ 'this'+'works' } but !{ +myMixin() } breaks it!
但它不起作用。我不知道如何在一条玉线中间引用一个 mixin。可能吗?
您需要特殊的方式来内联使用翡翠混合:
p. Hello I'm using #[+jadeMixin(param)] inline.
不可能在这样的句子中放入mixin。您可以做的是在 mixin中包含块并使用pikes | 对于纯文本。
mixin myMixin() strong block p This is a sentence +myMixin() | with bold text | and this is the rest of it
这将呈现:
<p>This is a sentence <strong>with bold text</strong> and this is the rest of it</p>