Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <template lang="pug">
  2. b-modal.simple-modal(
  3. :active="showUnauthModal"
  4. width="720"
  5. scroll= "keep"
  6. @close="toggleModal"
  7. )
  8. ...
  9. button.is-primary(@click="toggleModal")
  10. | Go Back
  11. </template>
  12.  
  13. state: {
  14. showUnauthModal: false,
  15. },
  16.  
  17. toggleModal() {
  18. this.showUnauthModal = false;
  19. },
  20.  
  21. watch: {
  22. something(value) {
  23. if (value != null) {
  24. if (value.status === 401) {
  25. this.showUnauthModal = true; //this is how my modal opens
  26. }
  27. }
  28. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement