0
我想使用帕格數據集屬性使塊。 問題是,當我將它們包含在一個頁面中時,它們內部有文本NaN
(下圖)。我該如何解決它?如何使用Pug將數據集添加到div?
這裏是我的mixin
mixin products(src, head, price)
.favorites__block&attributes(attributes)= data-filter
.favorites__image
img(src=src, alt="").favorites__img
.favorites__text
span.favorites__title #{head}
span.favorites__price $#{price}
.favorites__btns
button.favorites__cart Add to cart
button.favorites__order Order
我包括它的方式。
+products('assets/img/favorite_four.jpg', 'Machiato Coffee', '5')(data-filter='breakfast')
非常感謝! – Allan