primevue-mirror/doc/inplace/ImageDoc.vue

85 lines
2.3 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Any content such as an image can be placed inside an Inplace.</p>
</DocSectionText>
<div class="card">
2024-05-25 14:14:15 +00:00
<Inplace>
2023-02-28 08:29:30 +00:00
<template #display>
2024-05-25 14:14:15 +00:00
<span class="inline-flex items-center gap-2">
<span class="pi pi-image"></span>
<span>View Photo</span>
</span>
2023-02-28 08:29:30 +00:00
</template>
<template #content>
2024-05-25 14:14:15 +00:00
<img class="w-full sm:w-80 shadow-md" alt="Nature" src="https://primefaces.org/cdn/primevue/images/nature/nature8.jpg" />
2023-02-28 08:29:30 +00:00
</template>
</Inplace>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
<Inplace>
2023-02-28 08:29:30 +00:00
<template #display>
2024-05-25 14:14:15 +00:00
<span class="inline-flex items-center gap-2">
<span class="pi pi-image"></span>
<span>View Photo</span>
</span>
2023-02-28 08:29:30 +00:00
</template>
<template #content>
2024-05-25 14:14:15 +00:00
<img class="w-full sm:w-80 shadow-md" alt="Nature" src="https://primefaces.org/cdn/primevue/images/nature/nature8.jpg" />
2023-02-28 08:29:30 +00:00
</template>
2023-10-15 09:38:39 +00:00
</Inplace>
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
<Inplace>
<template #display>
2024-05-25 14:14:15 +00:00
<span class="inline-flex items-center gap-2">
<span class="pi pi-image"></span>
<span>View Photo</span>
</span>
2023-02-28 08:29:30 +00:00
</template>
<template #content>
2024-05-25 14:14:15 +00:00
<img class="w-full sm:w-80 shadow-md" alt="Nature" src="https://primefaces.org/cdn/primevue/images/nature/nature8.jpg" />
2023-02-28 08:29:30 +00:00
</template>
</Inplace>
</div>
</template>
<script>
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
<Inplace>
<template #display>
2024-05-25 14:14:15 +00:00
<span class="inline-flex items-center gap-2">
<span class="pi pi-image"></span>
<span>View Photo</span>
</span>
2023-02-28 08:29:30 +00:00
</template>
<template #content>
2024-05-25 14:14:15 +00:00
<img class="w-full sm:w-80 shadow-md" alt="Nature" src="https://primefaces.org/cdn/primevue/images/nature/nature8.jpg" />
2023-02-28 08:29:30 +00:00
</template>
</Inplace>
</div>
</template>
<script setup>
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>