Skip to content

Instantly share code, notes, and snippets.

@bachhm-dev
Created September 1, 2020 16:01
Show Gist options
  • Save bachhm-dev/6a9bae86c000e5543bc5107c2dca4505 to your computer and use it in GitHub Desktop.
Save bachhm-dev/6a9bae86c000e5543bc5107c2dca4505 to your computer and use it in GitHub Desktop.
<template>
<!-- template code -->
</template>
<script>
import download from "@/use/download";
import upload from "@/use/upload";
export default {
setup(){
return { ...download(), ...upload() }
}
}
</script>
@gangsthub
Copy link

It is recommended to explicitly put the options in the component, so we don't have the same issue as with mixings: not knowing where the methods came from.

   return { filePath, downloadBlob, downloadJSON, /*...*/}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment