Итак, я хочу построить мопсин:
mixin productTile({img, title, desc, price, withCatLink = false, cat: {title = '', path = ''} = {}})
.ProductTile
p
+icon({name: 'long-arrow-right'})
Я называю это так:
-
const prodInfo = {
img: '/img/icon.png',
title: 'test title',
desc: 'testdesc',
price: '1200',
withCatLink: true,
cat: {
title: 'test category',
path: ''
}
};
+productTile(prodInfo)
Но я сталкиваюсь с проблемой:
SyntaxError: Argument name clash (366:103)
Так что, может быть, я ошибаюсь в разделении объектов, потому что когда я удаляю cat: {title = '', path = ''} = {}
из объявления mixin, все в порядке