本文档由 Apifox 自动生成,推荐使用 Apifox - API 文档、API 调试、API Mock、API 自动化测试!
<salla-product-card> web component is used to contain content and actions about a single product in a card display mode. The component incorporates options for displaying images, hovering over buttons, product information, and more.
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
| Full Image | full-image | Whether or not to show the full image on the card. | boolean | undefined |
| Hide Add Button | hide-add-btn | Whether or not to hide the "add to cart" button. | boolean | undefined |
| Horizontal | horizontal | Whether or not to show the product card as Horizontal card. | boolean | undefined |
| Special | special | Whether or not to show the product card as Special card. | boolean | undefined |
| Minimal | minimal | Whether or not to show the product card as Minimal card. | boolean | undefined |
| Product | product | The product's data. | string | undefined |
| Shadow On Hover | shadow-on-hover | Whether or not to support the effect of shadow on hover. | boolean | undefined |
| Show Quantity | show-quantity | Whether or not to show quantity. | boolean | undefined |
slots makes it customizable to modify certain labels, such as add-to-cart-label.| Slot | Description |
|---|---|
"add-to-cart-label" | The add to cart text label |
salla-product-card component. If you want to further customize the component and build your own product card component, please read further in this sectioncustom-salla-product-card phrase. That allows developers to create their own custom product cards that is returned when the salla-products-list is called.custom-salla-product-card that extends the functionality of a standard HTML element.customElements object provided by the browser, and is given the name custom-salla-product-card that Salla has pre-deifned. This element is then assigned to the class variable, say ProductCard, which extends the HTMLElement class.ProductCard class has two methods: connectedCallback and render. The connectedCallback method is called automatically by the browser when the element is added to the DOM, and the render method is used to generate the content for the custom element.扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

扫码加入交流群