Last active
July 20, 2020 12:58
-
-
Save Kaperskyguru/660015e04f77d32211d6ac0aa461b3ea to your computer and use it in GitHub Desktop.
This file contains 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
<script> | |
import { mapGetters } from "vuex"; | |
import ErrorService from "../Services/ErrorService"; | |
export default { | |
name: "HelloWorld", | |
props: { | |
todo: Object, | |
}, | |
computed: { | |
...mapGetters(["getUser"]), | |
}, | |
methods: { | |
getUserName(id) { | |
const user = this.getUser(id); | |
if (user) return user.username; | |
}, | |
// Display Error with SweetAlert (when Name is Click) | |
displayAlert() { | |
ErrorService.displayErrorAlert("Testing message"); | |
}, | |
}, | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment