Skip to content

Instantly share code, notes, and snippets.

View DespertaWeb's full-sized avatar

Lou Rectoret DespertaWeb

  • Catalonia, not Spain
View GitHub Profile
@DespertaWeb
DespertaWeb / axiosScript.js
Last active May 17, 2018 09:20
File load and Display
axios({
url: `${config.BASE}/download/${this.section.urlSingular}_50.pdf`,
method: 'GET',
headers: LocalStorage.get('inv.headers'),
responseType: 'blob'
})
.then((response) => {
this.urlPdf = URL.createObjectURL(response.data)
})
.catch((error) => {
@DespertaWeb
DespertaWeb / pagination_component.vue
Last active June 1, 2018 21:08
2 way binding Select Component Vue.js
<template>
<nav id="pagination" class="clearfix u-text-align-right u-margin-bottom-l u-line-height-40">
Page
<select id="pagination_select" v-model="pageSelected" class="e-select i-svg__arrow-down" :disabled="totalPages === 1 ? true : false">
<option
id="`pagination_select__option`"
v-for="pageNumber in totalPages"
:selected="pageNumber === currentPage"
:value="pageNumber"
>