This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template>...</template> | |
<script> | |
export default { | |
name: 'SomeComponent', | |
methods: { | |
removeWithSuccess(someReturnedData) { | |
/* Some implementation for success case */ | |
}, | |
removeWithFail(error) { | |
/* Some implementation for fail case */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template>...</template> | |
<script> | |
export default { | |
name: 'SomeComponent', | |
methods: { | |
remove () { | |
this.$store.dispatch('removeSomething', this.id) | |
.then(() => { | |
/* Some implementation for success case */ | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# src/vuex/actions.js | |
export default { | |
... | |
notify: (store, data) => { | |
Vue.prototype.$notify({ | |
group: (data.group || 'general'), | |
type: (data.type || 'warn'), | |
duration: (data.time || 6000), | |
speed: (data.speed || 1000), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<img src="./assets/logo.png"> | |
<router-view/> | |
<button @click="download">Download</button> | |
<div id="pdf"></div> | |
</div> | |
</template> | |
<script> |