ฉันค่อนข้างใหม่กับหยกและฉันมีปัญหาดังต่อไปนี้ มีมิกซ์อิน (แบบง่าย) นี้:
mixin someMixin()
.someClass
block first
.otherClass
block second
ตอนนี้ฉันพยายามให้คุณมิกซ์อินนี้หลายครั้งในเทมเพลตเดียว แบบนี้.
+someMixin()
block first
div First Block of first Mixin
block second
div Second Block of first Mixin
+someMixin()
block first
div First Block of second Mixin
block second
div Second Block of second Mixin
ด้วยเหตุนี้จึงใช้เฉพาะบล็อกของมิกซ์อินแรกเท่านั้น แบบนี้
<div class="someClass">First Block of first Mixin</div>
<div class="otherClass">Second Block of first Mixin</div>
<div class="someClass">First Block of first Mixin</div>
<div class="otherClass">Second Block of first Mixin</div>
ฉันคาดหวังผลลัพธ์เช่นนี้:
<div class="someClass">First Block of first Mixin</div>
<div class="otherClass">Second Block of first Mixin</div>
<div class="someClass">First Block of second Mixin</div>
<div class="otherClass">Second Block of second Mixin</div>
ฉันพลาดอะไรไปที่นี่? ขอบคุณล่วงหน้า.
อามิรู