primevue-mirror/doc/image/TemplateDoc.vue

51 lines
1.6 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>An eye icon is displayed by default when the image is hovered in preview mode. Use the <i>indicator</i> slot for custom content.</p>
</DocSectionText>
<div class="card flex justify-content-center">
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="Image" width="250" preview>
2023-05-02 07:27:03 +00:00
<template #indicatoricon>
2023-02-28 08:29:30 +00:00
<i class="pi pi-check"></i>
</template>
</Image>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
basic: `
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="Image" width="250" preview>
2023-05-01 15:42:39 +00:00
<template #indicatoricon>
2023-02-28 08:29:30 +00:00
<i class="pi pi-check"></i>
</template>
</Image>`,
options: `
<template>
<div class="card flex justify-content-center">
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="Image" width="250" preview>
2023-05-02 07:27:03 +00:00
<template #indicatoricon>
2023-02-28 08:29:30 +00:00
<i class="pi pi-check"></i>
</template>
</Image>
</div>
</template>`,
composition: `
<template>
<div class="card flex justify-content-center">
<Image src="https://primefaces.org/cdn/primevue/images/galleria/galleria12.jpg" alt="Image" width="250" preview>
2023-05-02 07:27:03 +00:00
<template #indicatoricon>
2023-02-28 08:29:30 +00:00
<i class="pi pi-check"></i>
</template>
</Image>
</div>
</template>`
}
};
}
};
</script>