ScrollTop pt demo added
parent
316c1c3720
commit
8f923ad130
|
@ -0,0 +1,74 @@
|
||||||
|
<template>
|
||||||
|
<DocSectionText v-bind="$attrs"> </DocSectionText>
|
||||||
|
<div class="card flex justify-content-center">
|
||||||
|
<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" :pt="{ root: { class: 'w-2rem h-2rem bg-primary' }, icon: { class: 'w-1rem h-1rem' } }" />
|
||||||
|
</ScrollPanel>
|
||||||
|
</div>
|
||||||
|
<DocSectionCode :code="code" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
code: {
|
||||||
|
basic: `
|
||||||
|
<ScrollTop target="parent"
|
||||||
|
:pt="{
|
||||||
|
root: { class: 'w-2rem h-2rem bg-primary' },
|
||||||
|
icon: { class: 'w-1rem h-1rem' }
|
||||||
|
}"
|
||||||
|
/>`,
|
||||||
|
options: `
|
||||||
|
<template>
|
||||||
|
<div class="card flex justify-content-center">
|
||||||
|
<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"
|
||||||
|
:pt="{
|
||||||
|
root: { class: 'w-2rem h-2rem bg-primary' },
|
||||||
|
icon: { class: 'w-1rem h-1rem' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</ScrollPanel>
|
||||||
|
</div>
|
||||||
|
</template>`,
|
||||||
|
composition: `
|
||||||
|
<template>
|
||||||
|
<div class="card flex justify-content-center">
|
||||||
|
<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"
|
||||||
|
:pt="{
|
||||||
|
root: { class: 'w-2rem h-2rem bg-primary' },
|
||||||
|
icon: { class: 'w-1rem h-1rem' }
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</ScrollPanel>
|
||||||
|
</div>
|
||||||
|
</template>`
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<template>
|
||||||
|
<DocSectionText v-bind="$attrs">
|
||||||
|
<p>{{ $attrs.description }}</p>
|
||||||
|
</DocSectionText>
|
||||||
|
<div>
|
||||||
|
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/scrolltop.jpg" />
|
||||||
|
</div>
|
||||||
|
</template>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<template>
|
||||||
|
<div class="doc-main">
|
||||||
|
<div class="doc-intro">
|
||||||
|
<h1>ScrollTop Pass Through</h1>
|
||||||
|
</div>
|
||||||
|
<DocSections :docs="docs" />
|
||||||
|
</div>
|
||||||
|
<DocSectionNav :docs="docs" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import DocApiTable from '@/components/doc/DocApiTable.vue';
|
||||||
|
import { getPTOption } from '@/components/doc/helpers/PTHelper.js';
|
||||||
|
import PtDoc from './PTDoc.vue';
|
||||||
|
import PTImage from './PTImage.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
docs: [
|
||||||
|
{
|
||||||
|
id: 'pt.image',
|
||||||
|
label: 'WireFrame',
|
||||||
|
component: PTImage
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'pt.doc',
|
||||||
|
label: 'ScrollTop Elements',
|
||||||
|
component: DocApiTable,
|
||||||
|
data: getPTOption('ScrollTop')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'pt.demo',
|
||||||
|
label: 'Demo',
|
||||||
|
component: PtDoc
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -1,5 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<DocComponent title="Vue ScrollTop Component" header="ScrollTop" description="ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly." :componentDocs="docs" :apiDocs="['ScrollTop']" />
|
<DocComponent
|
||||||
|
title="Vue ScrollTop Component"
|
||||||
|
header="ScrollTop"
|
||||||
|
description="ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly."
|
||||||
|
:componentDocs="docs"
|
||||||
|
:apiDocs="['ScrollTop']"
|
||||||
|
:ptTabComponent="ptComponent"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -8,6 +15,7 @@ import BasicDoc from '@/doc/scrolltop/BasicDoc';
|
||||||
import ElementDoc from '@/doc/scrolltop/ElementDoc';
|
import ElementDoc from '@/doc/scrolltop/ElementDoc';
|
||||||
import ImportDoc from '@/doc/scrolltop/ImportDoc';
|
import ImportDoc from '@/doc/scrolltop/ImportDoc';
|
||||||
import StyleDoc from '@/doc/scrolltop/StyleDoc';
|
import StyleDoc from '@/doc/scrolltop/StyleDoc';
|
||||||
|
import PTComponent from '@/doc/scrolltop/pt/index.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
|
@ -38,7 +46,8 @@ export default {
|
||||||
label: 'Accessibility',
|
label: 'Accessibility',
|
||||||
component: AccessibilityDoc
|
component: AccessibilityDoc
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
ptComponent: PTComponent
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue