38 lines
1014 B
Vue
38 lines
1014 B
Vue
<template>
|
|
<DocSectionText v-bind="$attrs">
|
|
<p>Theming is implemented with the pass through properties in unstyled mode. Example below demonstrates the built-in Tailwind theme.</p>
|
|
</DocSectionText>
|
|
<DocSectionCode :code="code" embedded />
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
code: {
|
|
composition: `
|
|
<template>
|
|
<div class="card">
|
|
<Toast />
|
|
<FileUpload name="demo[]" url="./upload.php" @upload="onAdvancedUpload($event)" :multiple="true" accept="image/*" :maxFileSize="1000000">
|
|
<template #empty>
|
|
<p>Drag and drop files to here to upload.</p>
|
|
</template>
|
|
</FileUpload>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { useToast } from "primevue/usetoast";
|
|
const toast = useToast();
|
|
|
|
const onAdvancedUpload = () => {
|
|
toast.add({ severity: 'info', summary: 'Success', detail: 'File Uploaded', life: 3000 });
|
|
};
|
|
<\/script>`
|
|
}
|
|
};
|
|
}
|
|
};
|
|
</script>
|