Appearance
wiz-image
Use the wiz-image component to add images of supported formats to your e-Detailer. For more information, see Image.
Learn more about components
Usage
To add the wiz-image component to your slide and change its properties, in the ./slides/default/index.vue file:
Add the
<wiz-image></wiz-image>tag to your slide template.html<!--./slides/default/index.vue --> <template> <wiz-slide class="editable-block"> <wiz-image id="wiz-image-0547" class="default" data-asset-id="hlb3gef8ut" src="./media/images/f6194d90-8f03-11ec-96c2-ea6c057b1b2f.jpg" :alt="'An image'"></wiz-image> </wiz-slide> </template>The
idandclassattributes are required for the correct display of the component styles in eWizard Editor.The
data-asset-idattribute is required for the Veeva Vault modules in theassets.jsonfile. For more information, see Veeva Vault publish settings.Change the image alternative (alt) text in the
<i18n></i18n>localization tag.html<!--./slides/default/index.vue --> <i18n> { "eng": { "altText": "<span style='line-height:30px;font-size:30px;'>My image</span>" } } </i18n>For more information, see Localization.
Attributes
You can change the wiz-image component appearance and behavior using the following attributes within the <wiz-image></wiz-image> tag:
component-nameChange the component label displayed on the Properties tab in eWizard Editor.
html<wiz-image component-name="My image"></wiz-image>srcChange the image path in the
srcattribute value.html<wiz-image src="./common/media/images/f6194d90-8f03-11ec-96c2-ea6c057b1b2f.jpg"></wiz-image>The
./common/media/imagespath is the default one for images. You can rename the image and provide a new path. To change the default path, edit theimagesproperty in the./.ewizard/settings.jsonfile of your project.altChange the image alternative text in the
altattribute.html<wiz-image :alt="'My image alternative text'"></wiz-image>To localize the image alternative text within the
<i18n></i18n>tag, use the:alt="$t('altText')"variable. For more information, see Localization.
Properties
The following properties are available:
| Property | Type | Default value | Description |
|---|---|---|---|
alt | string | Image | The text displayed on the e-Detailer slide if the image fails to load. |
componentName | string | Image | The text label displayed in eWizard Editor. |
src | string | ./media/images/default-image.png | The path or link to the image file. |