simpleCart js缩略图未定义

Ant*_*ony 5 javascript

为了这个好处,如果我找到许多人提出同样的问题.要显示缩略图图像.

项目设置:

<div class="simpleCart_shelfItem">
        <img src="images/buttons.png" alt="Sample Product" class="item_thumb" thumb="images/buttonsthumb.png">
          <h2 class="item_name"> Awesome T-shirt </h2>
        <p>  <input type="text" value="1" class="item_Quantity"><br>
          <span class="item_price">$35.99</span><br>
          <a class="item_add" href="javascript:;"> Add to Cart </a></p>
        </div>
Run Code Online (Sandbox Code Playgroud)

注意:图像具有item_thumb类和属性thumb,其中值是缩略图图像的url.

购物车设置:

simpleCart({
cartColumns: [
    { view: "image" , attr: "thumb", label: false },
    { attr: "name" , label: "Name" } ,
    { attr: "price" , label: "Price", view: 'currency' } ,
    { view: "decrement" , label: false , text: "-" } ,
    { attr: "quantity" , label: "Qty" } ,
    { view: "increment" , label: false , text: "+" } ,
    { attr: "total" , label: "SubTotal", view: 'currency' } ,
    { view: "remove" , text: "Remove" , label: false }
]
});
Run Code Online (Sandbox Code Playgroud)

Ant*_*ony 1

我不是专家,但这就是我让它发挥作用的方式。希望对某人有帮助。如果有人有更好的方法/解释,请告诉我。