我想在树枝上做一些数学运算。我有2个变量,价格和数量,我想乘以它们。但是当我这样做时:
{{ {{ carts.price }} * {{ carts.quantity }} }}
返回错误
A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "punctuation" of value "{".
我怎样才能做到这一点
这是因为您重复了{}
,请尝试如下操作:{{ carts.price * carts.quantity }}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句