Product Attachments
Documentation: Product Attachments Component
Overview
Model Documentation
model
object used in the Product Attachments Component contains configuration options that control the component's appearance and behavior.Model Structure
String
A unique identifier for the component. Used for element targeting and CSS styling.
String
Optional CSS class(es) to apply to the component's container.
String
Optional header text to display above the list of attachments.
Number
Determines the alignment of the header:
1
: Align left2
: Center align3
: Align rightExample Model
{
"id": "productAttachments",
"cssClass": "attachments-class",
"header": "Product Documents",
"alignment": 2
}
Component Structure
1.
2.
HTML Template
JavaScript
Explanation
productData.mediaItems
, filtering those with a media type of "Attachment" or 2.getAlignmentClass
method returns CSS classes based on the alignment value specified in the model, which affects how the header is positioned.Usage
1.
ProductAttachments
component in your Vue app.2.
3.
ProductAttachments
component in your template and provide the necessary data.