Repo for the search and displace core module including the interface to select files and search and displace operations to run on them. https://searchanddisplace.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.4 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="wrap">
  3. <Panel header="Header">
  4. <FileUpload
  5. name="demo[]"
  6. :customUpload="true"
  7. :auto="true"
  8. @uploader="myUploader"
  9. >
  10. <template #empty>
  11. <p>Drag and drop files to here to upload.</p>
  12. </template>
  13. </FileUpload>
  14. </Panel>
  15. <!-- <process-file :files="files"></process-file>-->
  16. <BlockUI :blocked="uiBlocked" :fullScreen="true"></BlockUI>
  17. </div>
  18. </template>
  19. <script>
  20. import FileUpload from 'primevue/fileupload';
  21. import BlockUI from 'primevue/blockui';
  22. import Panel from 'primevue/panel';
  23. export default {
  24. data() {
  25. return {
  26. uiBlocked: false,
  27. files: [],
  28. };
  29. },
  30. props: {
  31. filters: {
  32. required: true,
  33. type: Array,
  34. },
  35. },
  36. components: {
  37. FileUpload,
  38. BlockUI,
  39. Panel,
  40. },
  41. methods: {
  42. myUploader(event) {
  43. this.uiBlocked = true;
  44. event.files.forEach((file) => {
  45. // Handle the file
  46. this.files.push(file);
  47. });
  48. setTimeout(() => {
  49. this.uiBlocked = false;
  50. // this.$router.push('process-file');
  51. }, 500);
  52. },
  53. },
  54. };
  55. </script>