primevue-mirror/doc/scrolltop/ElementDoc.vue

114 lines
6.6 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>Setting the <i>target</i> property to <i>parent</i> binds ScrollTop to its parent element that has scrolling content.</p>
</DocSectionText>
2023-10-23 20:39:50 +00:00
<div class="card flex justify-content-center">
2023-02-28 08:29:30 +00:00
<ScrollPanel style="width: 250px; height: 200px">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae et leo duis ut diam. Ultricies mi quis hendrerit dolor magna eget est lorem. Amet consectetur adipiscing
elit ut. Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna. Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus orci ac auctor augue mauris. Semper
feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut etiam sit amet nisl purus. Cursus sit amet
dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas. Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris. Eget egestas purus viverra accumsan in nisl nisi.
Suscipit adipiscing bibendum est ultricies integer. Mattis aliquam faucibus purus in massa tempor nec.
</p>
2023-10-24 12:35:30 +00:00
<ScrollTop
target="parent"
:threshold="100"
icon="pi pi-arrow-up"
:pt="{
2023-11-02 11:29:09 +00:00
root: 'w-2rem h-2rem border-round-sm bg-primary',
2023-10-24 12:35:30 +00:00
icon: {
2023-10-24 12:57:38 +00:00
class: 'text-base'
2023-10-24 12:35:30 +00:00
}
}"
/>
2023-02-28 08:29:30 +00:00
</ScrollPanel>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
2023-11-02 11:29:09 +00:00
<ScrollPanel style="width: 250px; height: 200px">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae et leo duis ut diam. Ultricies mi quis hendrerit dolor magna eget est lorem. Amet consectetur adipiscing
elit ut. Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna. Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus orci ac auctor augue mauris. Semper
feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut etiam sit amet nisl purus. Cursus sit amet
dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas. Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris. Eget egestas purus viverra accumsan in nisl nisi.
Suscipit adipiscing bibendum est ultricies integer. Mattis aliquam faucibus purus in massa tempor nec.
</p>
<ScrollTop
target="parent"
:threshold="100"
icon="pi pi-arrow-up"
:pt="{
root: 'w-2rem h-2rem border-round-sm bg-primary',
icon: {
class: 'text-base'
}
}"
/>
</ScrollPanel>
2023-10-15 09:38:39 +00:00
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-10-23 20:39:50 +00:00
<div class="card flex justify-content-center">
2023-02-28 08:29:30 +00:00
<ScrollPanel style="width: 250px; height: 200px">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae et leo duis ut diam. Ultricies mi quis hendrerit dolor magna eget est lorem. Amet consectetur adipiscing
elit ut. Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna. Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus orci ac auctor augue mauris. Semper
feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut etiam sit amet nisl purus. Cursus sit amet
dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas. Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris. Eget egestas purus viverra accumsan in nisl nisi.
Suscipit adipiscing bibendum est ultricies integer. Mattis aliquam faucibus purus in massa tempor nec.
</p>
2023-10-24 12:35:30 +00:00
<ScrollTop
target="parent"
:threshold="100"
icon="pi pi-arrow-up"
:pt="{
2023-11-02 11:29:09 +00:00
root: 'w-2rem h-2rem border-round-sm bg-primary',
2023-10-24 12:35:30 +00:00
icon: {
2023-10-24 13:01:10 +00:00
class: 'text-base'
2023-10-24 12:35:30 +00:00
}
}"
/>
2023-02-28 08:29:30 +00:00
</ScrollPanel>
</div>
</template>
2023-10-15 09:38:39 +00:00
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-10-23 20:39:50 +00:00
<div class="card flex justify-content-center">
2023-02-28 08:29:30 +00:00
<ScrollPanel style="width: 250px; height: 200px">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae et leo duis ut diam. Ultricies mi quis hendrerit dolor magna eget est lorem. Amet consectetur adipiscing
elit ut. Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna. Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus orci ac auctor augue mauris. Semper
feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut etiam sit amet nisl purus. Cursus sit amet
dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas. Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris. Eget egestas purus viverra accumsan in nisl nisi.
Suscipit adipiscing bibendum est ultricies integer. Mattis aliquam faucibus purus in massa tempor nec.
</p>
2023-10-24 12:35:30 +00:00
<ScrollTop
target="parent"
:threshold="100"
icon="pi pi-arrow-up"
:pt="{
2023-11-02 11:29:09 +00:00
root: 'w-2rem h-2rem border-round-sm bg-primary',
2023-10-24 12:35:30 +00:00
icon: {
2023-10-24 13:01:10 +00:00
class: 'text-base'
2023-10-24 12:35:30 +00:00
}
}"
/>
2023-02-28 08:29:30 +00:00
</ScrollPanel>
</div>
</template>
2023-10-24 12:35:30 +00:00
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>