PTViewer added to FileUpload component

pull/6439/head
tugcekucukoglu 2024-09-18 16:08:32 +03:00
parent a251228a89
commit 8db74e2da6
3 changed files with 33 additions and 12 deletions

View File

@ -1,8 +0,0 @@
<template>
<DocSectionText v-bind="$attrs">
<p>{{ $attrs.description }}</p>
</DocSectionText>
<div class="card">
<img class="w-full" src="https://primefaces.org/cdn/primevue/images/pt/fileupload.jpg" />
</div>
</template>

View File

@ -0,0 +1,29 @@
<template>
<DocSectionText v-bind="$attrs" />
<DocPTViewer :docs="docs">
<div class="w-full">
<FileUpload name="demo[]" url="/api/upload" :multiple="true" accept="image/*" :maxFileSize="1000000">
<template #empty>
<span>Drag and drop files to here to upload.</span>
</template>
</FileUpload>
</div>
</DocPTViewer>
</template>
<script>
import { getPTOptions } from '@/components/doc/helpers';
export default {
data() {
return {
docs: [
{
data: getPTOptions('FileUpload'),
key: 'FileUpload'
}
]
};
}
};
</script>

View File

@ -11,16 +11,16 @@
<script>
import DocApiTable from '@/components/doc/DocApiTable.vue';
import { getPTOptions } from '@/components/doc/helpers';
import PTImage from './PTImage.vue';
import PTViewer from './PTViewer.vue';
export default {
data() {
return {
docs: [
{
id: 'pt.image',
label: 'Wireframe',
component: PTImage
id: 'pt.viewer',
label: 'Viewer',
component: PTViewer
},
{
id: 'pt.doc.fileupload',