2023-04-28 08:56:09 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs"> </DocSectionText>
|
|
|
|
<div class="card flex justify-content-center">
|
|
|
|
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
|
|
|
|
|
|
|
|
<OverlayPanel ref="op" :pt="{ root: { class: 'surface-ground' } }">
|
|
|
|
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
|
|
|
|
</OverlayPanel>
|
|
|
|
</div>
|
|
|
|
<DocSectionCode :code="code" />
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code: {
|
2023-09-22 12:54:14 +00:00
|
|
|
basic: `
|
|
|
|
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
|
2023-04-28 08:56:09 +00:00
|
|
|
|
|
|
|
<OverlayPanel ref="op"
|
|
|
|
:pt="{
|
|
|
|
root: { class: 'surface-ground' }
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
|
|
|
|
</OverlayPanel>`,
|
2023-09-22 12:54:14 +00:00
|
|
|
options: `
|
|
|
|
<template>
|
2023-04-28 08:56:09 +00:00
|
|
|
<div class="card flex justify-content-center">
|
|
|
|
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
|
|
|
|
|
|
|
|
<OverlayPanel ref="op"
|
|
|
|
:pt="{
|
|
|
|
root: { class: 'surface-ground' }
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
|
|
|
|
</OverlayPanel>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
methods: {
|
|
|
|
toggle(event) {
|
|
|
|
this.$refs.op.toggle(event);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
<\/script>`,
|
2023-09-22 12:54:14 +00:00
|
|
|
composition: `
|
|
|
|
<template>
|
2023-04-28 08:56:09 +00:00
|
|
|
<div class="card flex justify-content-center">
|
|
|
|
<Button type="button" icon="pi pi-image" label="Image" @click="toggle" />
|
|
|
|
|
|
|
|
<OverlayPanel ref="op"
|
|
|
|
:pt="{
|
|
|
|
root: { class: 'surface-ground' }
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<img src="https://primefaces.org/cdn/primevue/images/product/bamboo-watch.jpg" alt="Bamboo Watch" />
|
|
|
|
</OverlayPanel>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
|
|
|
|
const op = ref();
|
|
|
|
const toggle = (event) => {
|
|
|
|
op.value.toggle(event);
|
|
|
|
}
|
|
|
|
<\/script>`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toggle(event) {
|
|
|
|
this.$refs.op.toggle(event);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|